fixed errors in supplier page
This commit is contained in:
@@ -36,6 +36,15 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9" nzRequired>
|
||||
Code Postal
|
||||
</nz-form-label>
|
||||
<nz-form-control nzSpan="12" nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Code Postal" formControlName="zipCode">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9" nzRequired>
|
||||
Ville
|
||||
@@ -50,7 +59,7 @@
|
||||
Délai Moyen
|
||||
</nz-form-label>
|
||||
<nz-form-control nzSpan="12" nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Délai Moyen" formControlName="deliveryDelay">
|
||||
<input nz-input type="number" placeholder="Délai Moyen" formControlName="deliveryDelay">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
|
||||
@@ -27,11 +27,13 @@ export class SupplierForm {
|
||||
email: new FormControl<string>(null, [Validators.required]),
|
||||
phone: new FormControl<string>(null, [Validators.required]),
|
||||
address: new FormControl<string>(null, [Validators.required]),
|
||||
zipCode: new FormControl<string>(null, [Validators.required]),
|
||||
city: new FormControl<string>(null, [Validators.required]),
|
||||
deliveryDelay: new FormControl<string>(null, [Validators.required]),
|
||||
|
||||
})
|
||||
supplier= input.required<GetSupplierDto | null>();
|
||||
|
||||
supplier= input<GetSupplierDto>();
|
||||
constructor() {
|
||||
effect(() => {
|
||||
if (this.supplier()) {
|
||||
@@ -40,6 +42,7 @@ export class SupplierForm {
|
||||
email: this.supplier().email,
|
||||
phone: this.supplier().phone,
|
||||
address: this.supplier().address,
|
||||
zipCode: this.supplier().zipCode,
|
||||
city: this.supplier().city,
|
||||
deliveryDelay: this.supplier().deliveryDelay,
|
||||
});
|
||||
|
||||
@@ -4,10 +4,13 @@
|
||||
<thead>
|
||||
<tr style="text-align: center">
|
||||
<th>Nom</th>
|
||||
<th>Prénom</th>
|
||||
<th>Téléphone</th>
|
||||
<th>Email</th>
|
||||
<th>Anniversaire</th>
|
||||
<th>Emprunt</th>
|
||||
<th>Adresse</th>
|
||||
<th>Code Postal</th>
|
||||
<th>Ville</th>
|
||||
<th>Délai moyen</th>
|
||||
<th>Produits</th>
|
||||
<th style="display: flex; align-items: center;">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -78,7 +78,6 @@ export class SupplierTable implements OnInit {
|
||||
try {
|
||||
|
||||
const suppliers = updateSupplierComponent.supplierForm.getRawValue();
|
||||
|
||||
await firstValueFrom(this.suppliersService.updateSupplierEndpoint(id, suppliers))
|
||||
|
||||
this.notificationService.success(
|
||||
|
||||
Reference in New Issue
Block a user