From 982c00874c8b6d95f2b666554d7d96d167b24c6c Mon Sep 17 00:00:00 2001 From: FyloZ Date: Tue, 9 Mar 2021 16:05:54 -0500 Subject: [PATCH] =?UTF-8?q?L'identifiant=20des=20employ=C3=A9es=20n'est=20?= =?UTF-8?q?plus=20modifiable.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/modules/employees/pages/edit/edit.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/modules/employees/pages/edit/edit.component.ts b/src/app/modules/employees/pages/edit/edit.component.ts index ad45c80..27d8478 100644 --- a/src/app/modules/employees/pages/edit/edit.component.ts +++ b/src/app/modules/employees/pages/edit/edit.component.ts @@ -97,7 +97,7 @@ export class EditComponent extends ErrorHandlingComponent { } get idControl(): FormControl { - this._idControl = this.lazyControl(this._idControl, () => new FormControl(this.employee.id, Validators.compose([Validators.required, Validators.pattern(new RegExp('^[0-9]+$')), Validators.min(0)]))) + this._idControl = this.lazyControl(this._idControl, () => new FormControl({value: this.employee.id, disabled: true}, Validators.compose([Validators.required, Validators.pattern(new RegExp('^[0-9]+$')), Validators.min(0)]))) return this._idControl }