diff --git a/src/components/DoSearch/DoSearch.tsx b/src/components/DoSearch/DoSearch.tsx index b1c163b..a0422ea 100644 --- a/src/components/DoSearch/DoSearch.tsx +++ b/src/components/DoSearch/DoSearch.tsx @@ -394,16 +394,27 @@ if(orderStartDate != ""){ const result = await Swal.fire( { icon: "info", - title: "Batch Release", - html: `

Selected Shop(s): ` + extractedIdsCount.toString() + `

-

Selected Item(s): ` + extractedItemsCount.toString() + `

`, + title: t("Batch Release"), + html: t("Selected Shop(s): ") + extractedIdsCount.toString() + `

`+ + t("Selected Item(s): ") + extractedItemsCount.toString() + `

`, showCancelButton: true, - confirmButtonText: "Confirm", - cancelButtonText: "Cancel", - confirmButtonColor: "#3085d6", + confirmButtonText: t("Confirm"), + cancelButtonText: t("Cancel"), + confirmButtonColor: "#638a01", cancelButtonColor: "#d33" }); if (result.isConfirmed) { + Swal.fire({ + title: t("Releasing"), + text: t("Please wait"), + allowOutsideClick: false, + allowEscapeKey: false, + showConfirmButton: false, + didOpen: () => { + Swal.showLoading(); + } + }); + await Promise.all(extractedIds.map((id) => releaseDo({ id: id }))); Swal.fire({ diff --git a/src/i18n/zh/do.json b/src/i18n/zh/do.json index 69e7369..2720aab 100644 --- a/src/i18n/zh/do.json +++ b/src/i18n/zh/do.json @@ -6,19 +6,25 @@ "Delivery Order Status": "交貨單狀態", "Order Date": "訂單日期", "Estimated Arrival": "預計到貨日期", - "Estimated Arrival From": "預計到貨日期從", - "Estimated Arrival To": "預計到貨日期到", + "Estimated Arrival From": "預計到貨日期", + "Estimated Arrival To": "預計到貨日期至", "Status": "來貨狀態", "Order Date From": "訂單日期", - "Order Date To": "訂單日期到", - "Code": "編號", - "code": "編號", + "Order Date To": "訂單日期至", + "Code": "門店訂單編號", + "code": "門店訂單編號", "Create": "新增", "Supplier Name": "供應商名稱", "Details": "詳情", "Pending": "待處理", "Receiving": "接收中", "Completed": "已完成", + "Please wait": "請稍候", + "Selected Shop(s): ": "已選擇店舖數量: ", + "Selected Item(s): ": "總貨品數量: ", + "Confirm": "確認", + "Cancel": "取消", + "Releasing": "處理中", "Shop Code": "店鋪編號", "Supplier Code": "供應商編號", "Estimated Arrival Date": "預計到貨日期", @@ -31,7 +37,6 @@ "Location": "庫位", "Price": "價格", "Action": "操作", - "Create": "新增", "Edit": "編輯", "Delete": "刪除", "Release": "放單",