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:59:41 +01:00
parent e66c95a65e
commit c20a0c5daf
3 changed files with 33 additions and 10 deletions
@@ -109,10 +109,6 @@ export class PurchaseOrderTable implements OnInit {
const futureDate = new Date(today);
futureDate.setMonth(today.getMonth() + 2);
const yyyy = futureDate.getFullYear();
const mm = (futureDate.getMonth() + 1).toString().padStart(2, '0');
const dd = futureDate.getDate().toString().padStart(2, '0');
const estimateDate = `${yyyy}-${mm}-${dd}`;
let trackingValue = 'TRK-';
const idStr = purchaseOrder.id?.toString() ?? '';
@@ -129,8 +125,6 @@ export class PurchaseOrderTable implements OnInit {
const deliveryNoteDto: CreateDeliveryNoteDto = {
trackingNumber: trackingValue,
expeditionDate: date,
estimateDeliveryDate: estimateDate,
delivererId: deliverer.delivererId,
productQuantities: productQuantities,
supplierId: purchaseOrder.supplierId
@@ -141,6 +135,7 @@ export class PurchaseOrderTable implements OnInit {
} catch {
this.notificationService.error('Erreur', 'Erreur lors du transfert');
}
this.onModalCancel(this.modalDeliverer());
this.purchaseOrdersLoading.set(false);
}