Skip to content

Commit 97aa44d

Browse files
HejdaJakubxkureck
authored andcommitted
fix(admin): application form item color
* Application form item used to have yellow color also after refresh. This bug has been fixed.
1 parent 33cf740 commit 97aa44d

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ export class ApplicationFormListComponent implements OnInit, OnChanges {
4141
@Input()
4242
displayedColumns: string[] = ['drag', 'shortname', 'type', 'disabled', 'hidden', 'preview', 'managegroups', 'edit', 'delete'];
4343

44+
@Input()
45+
refreshApplicationForm;
46+
4447
@Output()
4548
applicationFormItemsChange = new EventEmitter<ApplicationFormItem[]>();
4649

@@ -78,6 +81,9 @@ export class ApplicationFormListComponent implements OnInit, OnChanges {
7881

7982
ngOnChanges() {
8083
this.dataSource = this.applicationFormItems;
84+
if (this.refreshApplicationForm) {
85+
this.itemsChanged = [];
86+
}
8187

8288
}
8389

apps/admin-gui/src/app/vos/pages/group-detail-page/group-settings/group-settings-application-form/group-settings-application-form.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ <h1 class="page-subtitle">
115115
[applicationFormItems]="applicationFormItems"
116116
[theme]="'group-theme'"
117117
[displayedColumns]="editAuth ? ['drag', 'shortname', 'type', 'disabled', 'hidden', 'preview', 'managegroups', 'edit', 'delete'] : ['shortname', 'type', 'disabled', 'hidden', 'preview', 'managegroups']"
118+
[refreshApplicationForm]="refreshApplicationForm"
118119
(applicationFormItemsChange)="changeItems()">
119120
</app-application-form-list>
120121
</div>

apps/admin-gui/src/app/vos/pages/group-detail-page/group-settings/group-settings-application-form/group-settings-application-form.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export class GroupSettingsApplicationFormComponent implements OnInit {
6363
voHasEmbeddedGroupApplication = false;
6464
autoRegistrationEnabled: boolean;
6565
changeAutoRegistration: boolean;
66+
refreshApplicationForm = false;
6667

6768
// This counter is used to generate ids for newly added items. This fake ids are used in backend
6869
// to recognize new items in other items' dependencies
@@ -173,9 +174,11 @@ export class GroupSettingsApplicationFormComponent implements OnInit {
173174

174175
updateFormItems() {
175176
this.loading = true;
177+
this.refreshApplicationForm = true;
176178
this.registrarManager.getFormItemsForGroup(this.group.id).subscribe(formItems => {
177179
this.applicationFormItems = formItems;
178180
this.itemsChanged = false;
181+
this.refreshApplicationForm = false;
179182
this.loading = false;
180183
});
181184
}

apps/admin-gui/src/app/vos/pages/vo-detail-page/vo-settings/vo-settings-application-form/vo-settings-application-form.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ <h1 class="page-subtitle">
9999
[applicationFormItems]="applicationFormItems"
100100
[theme]="'vo-theme'"
101101
[displayedColumns]="displayedColumns"
102+
[refreshApplicationForm]="refreshApplicationForm"
102103
(applicationFormItemsChange)="changeItems()">
103104
</app-application-form-list>
104105
</div>

apps/admin-gui/src/app/vos/pages/vo-detail-page/vo-settings/vo-settings-application-form/vo-settings-application-form.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export class VoSettingsApplicationFormComponent implements OnInit {
5454

5555
editAuth: boolean;
5656
displayedColumns: string[] = [];
57+
refreshApplicationForm = false;
5758

5859
// This counter is used to generate ids for newly added items. This fake ids are used in backend
5960
// to recognize new items in other items' dependencies
@@ -149,10 +150,12 @@ export class VoSettingsApplicationFormComponent implements OnInit {
149150

150151
updateFormItems() {
151152
this.loading = true;
153+
this.refreshApplicationForm = true;
152154
this.registrarManager.getFormItemsForVo(this.vo.id).subscribe( formItems => {
153155
this.applicationFormItems = formItems;
154156
this.itemsChanged = false;
155157
this.setAuthRights();
158+
this.refreshApplicationForm = false;
156159
this.loading = false;
157160
});
158161
}

0 commit comments

Comments
 (0)