Added automatic generation in dashboard when employees start application to generate product under limit during absence

This commit is contained in:
2026-05-27 17:31:10 +01:00
parent d8112facb4
commit e66c95a65e
4 changed files with 106 additions and 38 deletions
@@ -9,37 +9,37 @@ import {firstValueFrom} from "rxjs";
import {NzNotificationService} from "ng-zorro-antd/notification";
@Component({
selector: 'app-deliverer-choice',
imports: [
FormsModule,
NzColDirective,
NzFlexDirective,
NzFormControlComponent,
NzFormLabelComponent,
NzOptionComponent,
NzRowDirective,
NzSelectComponent,
ReactiveFormsModule
],
templateUrl: './deliverer-choice.html',
styleUrl: './deliverer-choice.css',
selector: 'app-deliverer-choice',
imports: [
FormsModule,
NzColDirective,
NzFlexDirective,
NzFormControlComponent,
NzFormLabelComponent,
NzOptionComponent,
NzRowDirective,
NzSelectComponent,
ReactiveFormsModule
],
templateUrl: './deliverer-choice.html',
styleUrl: './deliverer-choice.css',
})
export class DelivererChoice implements OnInit {
private deliverersService = inject(DeliverersService);
private notificationService = inject(NzNotificationService);
private deliverersService = inject(DeliverersService);
private notificationService = inject(NzNotificationService);
choiceDelivererForm: FormGroup = new FormGroup({
delivererId: new FormControl<number>(null, Validators.required),
});
choiceDelivererForm: FormGroup = new FormGroup({
delivererId: new FormControl<number>(null, Validators.required),
});
deliverers = signal<GetDelivererDto[]>([]);
deliverers = signal<GetDelivererDto[]>([]);
async ngOnInit() {
try {
const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint());
this.deliverers.set(deliverers);
} catch {
this.notificationService.error('Erreur', 'Erreur lors de l\'affichage des livreurs');
async ngOnInit() {
try {
const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint());
this.deliverers.set(deliverers);
} catch {
this.notificationService.error('Erreur', 'Erreur lors de l\'affichage des livreurs');
}
}
}
}