Skip to content

Commit 8a71e0f

Browse files
HejdaJakubxkureck
authored andcommitted
fix(admin): add a star to required items
* Required items in the application form items list and on preview are marked with a star.
1 parent 1d8ed28 commit 8a71e0f

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

apps/admin-gui/src/app/vos/components/application-form-list/application-form-list.component.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<mat-spinner *ngIf="loading" class="ml-auto mr-auto"> </mat-spinner>
1+
<mat-spinner *ngIf="loading" class="ml-auto mr-auto"></mat-spinner>
22

33
<div *ngIf="this.applicationFormItems.length !== 0 && !loading" class="card mt-2">
44
<div class="card-body table-theme">
@@ -24,7 +24,9 @@
2424
<th *matHeaderCellDef mat-header-cell>
2525
{{'VO_DETAIL.SETTINGS.APPLICATION_FORM.SHORTNAME' | translate}}
2626
</th>
27-
<td *matCellDef="let applicationFormItem" mat-cell>{{applicationFormItem.shortname}}</td>
27+
<td *matCellDef="let applicationFormItem" mat-cell>
28+
{{applicationFormItem.shortname}}{{applicationFormItem.required ? '*' : ''}}
29+
</td>
2830
</ng-container>
2931
<ng-container matColumnDef="type">
3032
<th *matHeaderCellDef mat-header-cell>
@@ -41,8 +43,8 @@
4143
<td class="center" *matCellDef="let applicationFormItem" mat-cell>
4244
<div *ngIf="applicationFormItem.disabled !== 'NEVER'">
4345
<mat-icon class="pointer" [matTooltip]="disabledTooltip(applicationFormItem)"
44-
>lock</mat-icon
45-
>
46+
>lock
47+
</mat-icon>
4648
<br />
4749
{{disabledHiddenDependency(applicationFormItem, applicationFormItem.disabled, applicationFormItem.disabledDependencyItemId)}}
4850
</div>
@@ -55,8 +57,8 @@
5557
<td class="center" *matCellDef="let applicationFormItem" mat-cell>
5658
<div *ngIf="applicationFormItem.hidden !== 'NEVER'">
5759
<mat-icon class="pointer" [matTooltip]="hiddenTooltip(applicationFormItem)"
58-
>visibility_off</mat-icon
59-
>
60+
>visibility_off
61+
</mat-icon>
6062
<br />
6163
{{disabledHiddenDependency(applicationFormItem, applicationFormItem.hidden, applicationFormItem.hiddenDependencyItemId)}}
6264
</div>

apps/admin-gui/src/app/vos/components/application-form-preview/application-form-preview.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,12 @@ export class ApplicationFormPreviewComponent implements OnInit {
153153
applicationFormItem.i18n[this.currentLanguage] &&
154154
applicationFormItem.i18n[this.currentLanguage].label
155155
) {
156-
return applicationFormItem.i18n[this.currentLanguage].label;
156+
return (
157+
applicationFormItem.i18n[this.currentLanguage].label +
158+
(applicationFormItem.required ? '*' : '')
159+
);
157160
}
158-
return applicationFormItem.shortname;
161+
return applicationFormItem.shortname + (applicationFormItem.required ? '*' : '');
159162
}
160163

161164
getLocalizedHint(applicationFormItem: ApplicationFormItem) {

0 commit comments

Comments
 (0)