diff --git a/cerberus/src/app/applications/update-application/update-application.component.html b/cerberus/src/app/applications/update-application/update-application.component.html index 1f2b24a..9b89577 100644 --- a/cerberus/src/app/applications/update-application/update-application.component.html +++ b/cerberus/src/app/applications/update-application/update-application.component.html @@ -17,6 +17,7 @@
diff --git a/cerberus/src/app/applications/update-application/update-application.component.ts b/cerberus/src/app/applications/update-application/update-application.component.ts index 78968f9..d7cb5a2 100644 --- a/cerberus/src/app/applications/update-application/update-application.component.ts +++ b/cerberus/src/app/applications/update-application/update-application.component.ts @@ -50,7 +50,7 @@ export class UpdateApplicationComponent implements OnInit { const appToUpdate = { ...this.application } as Application; appToUpdate.name = this.form.controls.name.value; appToUpdate.serviceName = this.form.controls.serviceName.value; - // appToUpdate.serviceType = this.form.controls.serviceType.value; + appToUpdate.serviceType = this.form.controls.serviceType.value; appToUpdate.image = this.form.controls.image.value; this._applicationService.update(appToUpdate) diff --git a/cerberus/src/app/core/components/select/select.component.ts b/cerberus/src/app/core/components/select/select.component.ts index 8609e91..ac2042d 100644 --- a/cerberus/src/app/core/components/select/select.component.ts +++ b/cerberus/src/app/core/components/select/select.component.ts @@ -19,6 +19,7 @@ export class SelectComponent implements OnChanges { @Input() formControl: any; @Input() options?: any[]; @Input() optionLabel?: string; + @Input() value?: any; @ViewChild('select', {static: true}) select?: ElementRef; @ViewChild('selectIcon', {static: true}) selectIcon?: ElementRef; @Output() onSelection: EventEmitter = new EventEmitter(); @@ -33,6 +34,11 @@ export class SelectComponent implements OnChanges { value: option, label: typeof this.optionLabel === 'undefined' ? undefined : option[this.optionLabel] } as Option)); + + const selectedOption = this._options.find(option => option.value === this.value || option.value?.value === this.value); + if (selectedOption) { + this.setOption(selectedOption); + } } }