From c65549dde7b9c7f1bcfe42165e3ba42dee221e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 30 Aug 2022 15:05:24 +0200 Subject: [PATCH] Invoice component fixed assign package on select --- resources/ts/components/InvoiceTasksComponent.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/ts/components/InvoiceTasksComponent.vue b/resources/ts/components/InvoiceTasksComponent.vue index 508092f..b9dcb7b 100644 --- a/resources/ts/components/InvoiceTasksComponent.vue +++ b/resources/ts/components/InvoiceTasksComponent.vue @@ -290,6 +290,7 @@ export default defineComponent({ }, updateAmount(index: number): void { const task = this.tasks[index]; + task.package = null; switch (task.type) { case this.getTaskTypeEnum("web").value: case this.getTaskTypeEnum("seo").value: @@ -298,6 +299,7 @@ export default defineComponent({ case this.getTaskTypeEnum("forfait").value: task.amount = task.days * ((task.packageModel?.amount ?? 0) as number); + task.package = (task.packageModel?.id as number) ?? null; break; case this.getTaskTypeEnum("libre").value: // Do nothing, free input