|
4 | 4 | dynamicHeight="false" |
5 | 5 | > |
6 | 6 | <mat-tab label="{{'General' | translate }}"> |
7 | | - <div class="d-flex flex-row"> |
| 7 | + <div class="d-flex flex-row" *ngIf="selectCurrentUserIsAdmin$ | async"> |
8 | 8 | <!-- data.useGoogleSheetAsDefault --> |
9 | 9 | <mat-checkbox class="p-1" |
10 | 10 | [id]="'useGoogleSheetAsDefault'" |
|
13 | 13 | {{ 'Use Google Sheet as default' | translate }} |
14 | 14 | </mat-checkbox> |
15 | 15 | </div> |
16 | | - <div class="d-flex flex-row" *ngIf="!data.useGoogleSheetAsDefault"> |
| 16 | + <div class="d-flex flex-row" *ngIf="!data.useGoogleSheetAsDefault && selectCurrentUserIsAdmin$ | async" > |
17 | 17 | <!-- data.useOnlyPlanHours checkbox --> |
18 | 18 | <mat-checkbox class="p-1" |
19 | 19 | [id]="'useOnlyPlanHours'" |
|
40 | 40 | <!-- {{ 'Use detailed pause editing' | translate }}--> |
41 | 41 | <!-- </mat-checkbox>--> |
42 | 42 | <!-- </div>--> |
43 | | - <div class="d-flex flex-row" *ngIf="data.globalAutoBreakCalculationActive"> |
| 43 | + <div class="d-flex flex-row" *ngIf="data.globalAutoBreakCalculationActive && selectCurrentUserIsAdmin$ | async"> |
44 | 44 | <!-- data.autoBreakCalculationActive --> |
45 | 45 | <mat-checkbox class="p-1" |
46 | 46 | [id]="'autoBreakCalculationActive'" |
|
49 | 49 | {{ 'Auto break calculation' | translate }} |
50 | 50 | </mat-checkbox> |
51 | 51 | </div> |
52 | | - <div class="d-flex flex-row"> |
53 | | - <!-- data.allowAcceptOfPlannedHours --> |
54 | | - <mat-checkbox class="p-1" |
55 | | - [id]="'allowAcceptOfPlannedHours'" |
56 | | - [name]="'allowAcceptOfPlannedHours'" |
57 | | - [(ngModel)]="data.allowAcceptOfPlannedHours"> |
58 | | - {{ 'Allow accept of planned hours' | translate }} |
59 | | - </mat-checkbox> |
60 | | - </div> |
61 | 52 | <div class="d-flex flex-row"> |
62 | 53 | <!-- data.allowEditOfRegistrations --> |
63 | 54 | <mat-checkbox class="p-1" |
|
76 | 67 | {{ 'Allow personal time registration' | translate }} |
77 | 68 | </mat-checkbox> |
78 | 69 | </div> |
79 | | - <div class="d-flex flex-row"> |
| 70 | + <div class="d-flex flex-row" *ngIf="data.allowPersonalTimeRegistration && !data.allowAcceptOfPlannedHours"> |
80 | 71 | <!-- data.allowPersonalTimeRegistration --> |
81 | 72 | <mat-checkbox class="p-1" |
82 | 73 | [id]="'usePunchClock'" |
|
85 | 76 | {{ 'Use punch clock' | translate }} |
86 | 77 | </mat-checkbox> |
87 | 78 | </div> |
| 79 | + <div class="d-flex flex-row" *ngIf="data.allowPersonalTimeRegistration && !data.usePunchClock && selectCurrentUserIsAdmin$ | async"> |
| 80 | + <!-- data.allowAcceptOfPlannedHours --> |
| 81 | + <mat-checkbox class="p-1" |
| 82 | + [id]="'allowAcceptOfPlannedHours'" |
| 83 | + [name]="'allowAcceptOfPlannedHours'" |
| 84 | + [(ngModel)]="data.allowAcceptOfPlannedHours"> |
| 85 | + {{ 'Allow accept of planned hours' | translate }} |
| 86 | + </mat-checkbox> |
| 87 | + </div> |
88 | 88 | </mat-tab> |
89 | | - <mat-tab label="{{'Plan hours' | translate }}" *ngIf="data.useOnlyPlanHours && !data.useGoogleSheetAsDefault"> |
| 89 | + <mat-tab label="{{'Plan hours' | translate }}" *ngIf="data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && selectCurrentUserIsAdmin$ | async"> |
90 | 90 | <div class="d-flex flex-row" |
91 | 91 | *ngFor="let day of ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']"> |
92 | 92 | <mat-form-field class="p-1"> |
|
105 | 105 | </mat-form-field> |
106 | 106 | </div> |
107 | 107 | </mat-tab> |
108 | | - <mat-tab label="{{ 'Auto break calculation settings' | translate }}" *ngIf="data.autoBreakCalculationActive"> |
| 108 | + <mat-tab label="{{ 'Auto break calculation settings' | translate }}" *ngIf="data.autoBreakCalculationActive && selectCurrentUserIsAdmin$ | async"> |
109 | 109 | <ng-container *ngFor="let day of ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']"> |
110 | 110 | <div class="d-flex flex-row"> |
111 | 111 | <mat-form-field class="p-1"> |
|
175 | 175 | </div> |
176 | 176 | </ng-container> |
177 | 177 | </mat-tab> |
178 | | - <mat-tab label="{{'1st shift' | translate }}" *ngIf="!data.useOnlyPlanHours && !data.useGoogleSheetAsDefault"> |
| 178 | + <mat-tab label="{{'1st shift' | translate }}" *ngIf="!data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && selectCurrentUserIsAdmin$ | async"> |
179 | 179 | <ng-container *ngIf="selectCurrentUserIsAdmin$ | async"> |
180 | 180 | <div class="d-flex flex-row" |
181 | 181 | *ngFor="let day of ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']"> |
|
232 | 232 | </div> |
233 | 233 | </ng-container> |
234 | 234 | </mat-tab> |
235 | | - <mat-tab label="{{'2nd shift' | translate }}" *ngIf="!data.useOnlyPlanHours && !data.useGoogleSheetAsDefault"> |
| 235 | + <mat-tab label="{{'2nd shift' | translate }}" *ngIf="!data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && selectCurrentUserIsAdmin$ | async"> |
236 | 236 | <ng-container *ngIf="selectCurrentUserIsAdmin$ | async"> |
237 | 237 | <div class="d-flex flex-row" |
238 | 238 | *ngFor="let day of ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']"> |
|
0 commit comments