diff --git a/overlord/src/app/settings/settings.component.ts b/overlord/src/app/settings/settings.component.ts index 4c29809a..6d604ea7 100644 --- a/overlord/src/app/settings/settings.component.ts +++ b/overlord/src/app/settings/settings.component.ts @@ -104,13 +104,13 @@ export class SettingsComponent implements OnInit { }; this.accountTypes = data.accountTypes; this.voucherTypes = data.voucherTypes; + this.initLockAccountVoucherTypes(); this.showLockInformation(data.lockInformation); this.maintenance = data.maintenance; }); } - showLockInformation(info: LockInfo[]) { - this.lockInformation = info; + initLockAccountVoucherTypes() { this.lockInfoForm.controls.accountTypes.clear(); this.accountTypes.forEach(() => this.lockInfoForm.controls.accountTypes.push( @@ -127,6 +127,10 @@ export class SettingsComponent implements OnInit { }), ), ); + } + + showLockInformation(info: LockInfo[]) { + this.lockInformation = info; this.dataSource = new LockDataSource(this.lockObservable); this.lockObservable.next(this.lockInformation); }