Fixed error with estimateDeliveryDate in form to update the raw

This commit is contained in:
2026-05-26 14:57:36 +01:00
parent f233c46853
commit 4dd1d7e81d
5 changed files with 26 additions and 31 deletions
@@ -31,14 +31,17 @@ export class DelivereryNoteForm implements OnInit {
trackingNumber: new FormControl<string>(null),
delivererId: new FormControl<number>(null, [Validators.required]),
expeditionDate: new FormControl(null, [Validators.required]),
estimatedDate: new FormControl(null),
estimatedDate: new FormControl(null, [Validators.required]),
realDeliveryDate: new FormControl(null)
})
private deliverersService = inject(DeliverersService);
private notificationService = inject(NzNotificationService);
deliverers = signal<GetDelivererDto[]>([]);
deliveryNote = input<GetDeliveryNoteDto>();
async fetchDeliverers() {
try {
const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint());
@@ -52,12 +55,6 @@ export class DelivereryNoteForm implements OnInit {
await this.fetchDeliverers();
}
filter(input: string, option: any) {
return option.nzLabel.toLowerCase().includes(input.toLowerCase());
}
deliveryNote = input<GetDeliveryNoteDto>();
constructor() {
effect(() => {
if (this.deliveryNote()) {