Skip to content

Commit f048060

Browse files
Copilotrenemadsen
andcommitted
Fix tab rendering by using boolean properties in parent template *ngIf conditions
- Changed all *ngIf conditions on mat-tab elements to use isFirstUser and isAdmin boolean properties - Previously using selectCurrentUserIsFirstUser$ | async and selectCurrentUserIsAdmin$ | async - This ensures tabs render when the boolean values are set to true - Addresses issue where tab content was not rendering even with hardcoded boolean values Co-authored-by: renemadsen <[email protected]>
1 parent 0fbcfb4 commit f048060

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/assigned-site/assigned-site-dialog.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
</app-assigned-site-general-tab>
1414
</mat-tab>
1515
<mat-tab label="{{'Plan hours' | translate }} "
16-
*ngIf="data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && selectCurrentUserIsFirstUser$ | async">
16+
*ngIf="data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && isFirstUser">
1717
<div formGroupName="planHours">
1818
<app-assigned-site-plan-hours-tab
1919
[planHoursForm]="getPlanHoursFormGroup()">
2020
</app-assigned-site-plan-hours-tab>
2121
</div>
2222
</mat-tab>
2323
<mat-tab label="{{ 'Auto break calculation settings' | translate }}"
24-
*ngIf="data.autoBreakCalculationActive && selectCurrentUserIsAdmin$ | async">
24+
*ngIf="data.autoBreakCalculationActive && isAdmin">
2525
<div [formGroupName]="'autoBreakSettings'">
2626
<app-assigned-site-auto-break-tab
2727
[autoBreakSettingsForm]="getAutoBreakSettingsFormGroup()"
@@ -31,7 +31,7 @@
3131
</div>
3232
</mat-tab>
3333
<mat-tab label="{{'1st shift' | translate }}"
34-
*ngIf="!data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && selectCurrentUserIsFirstUser$ | async">
34+
*ngIf="!data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && isFirstUser">
3535
<div [formGroupName]="'firstShift'">
3636
<app-assigned-site-shift-tab
3737
[shiftForm]="getFirstShiftFormGroup()"
@@ -43,7 +43,7 @@
4343
</div>
4444
</mat-tab>
4545
<mat-tab label="{{'2nd shift' | translate }}"
46-
*ngIf="!data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && selectCurrentUserIsFirstUser$ | async">
46+
*ngIf="!data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && isFirstUser">
4747
<div [formGroupName]="'secondShift'">
4848
<app-assigned-site-shift-tab
4949
[shiftForm]="getSecondShiftFormGroup()"
@@ -55,7 +55,7 @@
5555
</div>
5656
</mat-tab>
5757
<mat-tab label="{{'3rd shift' | translate }}"
58-
*ngIf="data.thirdShiftActive && !data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && selectCurrentUserIsFirstUser$ | async">
58+
*ngIf="data.thirdShiftActive && !data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && isFirstUser">
5959
<div [formGroupName]="'thirdShift'">
6060
<app-assigned-site-shift-tab
6161
[shiftForm]="getThirdShiftFormGroup()"
@@ -67,7 +67,7 @@
6767
</div>
6868
</mat-tab>
6969
<mat-tab label="{{'4th shift' | translate }}"
70-
*ngIf="data.thirdShiftActive && data.fourthShiftActive && !data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && selectCurrentUserIsFirstUser$ | async">
70+
*ngIf="data.thirdShiftActive && data.fourthShiftActive && !data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && isFirstUser">
7171
<div [formGroupName]="'fourthShift'">
7272
<app-assigned-site-shift-tab
7373
[shiftForm]="getFourthShiftFormGroup()"
@@ -79,7 +79,7 @@
7979
</div>
8080
</mat-tab>
8181
<mat-tab label="{{'5th shift' | translate }}"
82-
*ngIf="data.thirdShiftActive && data.fourthShiftActive && data.fifthShiftActive && !data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && selectCurrentUserIsFirstUser$ | async">
82+
*ngIf="data.thirdShiftActive && data.fourthShiftActive && data.fifthShiftActive && !data.useOnlyPlanHours && !data.useGoogleSheetAsDefault && isFirstUser">
8383
<div [formGroupName]="'fifthShift'">
8484
<app-assigned-site-shift-tab
8585
[shiftForm]="getFifthShiftFormGroup()"

0 commit comments

Comments
 (0)