@feedmepos/mf-inventory-portal 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-BGdQEbub.js → App-C61RakQ7.js} +4 -4
- package/dist/{ApprovalView-ZVnZiv5z.js → ApprovalView-Cc1iYZqD.js} +8 -8
- package/dist/{BindingsDialog-Xv1WY4nc.js → BindingsDialog-Chd2EdfO.js} +2 -2
- package/dist/{BindingsPicker-DU993c30.js → BindingsPicker-CXXnZKq5.js} +2 -2
- package/dist/{BindingsTable-D7l8VhBm.js → BindingsTable-C5migJtC.js} +3 -3
- package/dist/{BulkReceiveRequestView-D_FTXYf_.js → BulkReceiveRequestView-9MSE2YVv.js} +603 -592
- package/dist/{ClosingDraftView-D5JOKXoi.js → ClosingDraftView-C4XBYgez.js} +14 -14
- package/dist/{ClosingHistoryView-CmxTAAXB.js → ClosingHistoryView-C_OtcjwH.js} +5 -5
- package/dist/{ClosingTemplateView-nmWLjcBU.js → ClosingTemplateView-BZpuwhWe.js} +14 -14
- package/dist/{DefaultView-BPUHeUFS.js → DefaultView-Dnub2r0C.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-Cd37qfVh.js → DeliveryOrderPrintPreview-U8g2O_pt.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-BbIMtGt6.js → EmailDialog.vue_vue_type_script_setup_true_lang-D3tETd4M.js} +23 -23
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BpLgqzDy.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DPVkPshX.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-SCOw_ln5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CCl3KLFs.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-C_NObeSH.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BgR0wjB0.js} +2 -2
- package/dist/{FmMultiselectDialog-CoPHnkxI.js → FmMultiselectDialog-BplRH37N.js} +2 -2
- package/dist/{FmMultiselectDialog-Rdm6qIvK.js → FmMultiselectDialog-DX3xMRs8.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BDzI1FdA.js → FmUnitInput.vue_vue_type_script_setup_true_lang-fKDQGIyW.js} +5 -5
- package/dist/{ImportView-B63aMGdu.js → ImportView-BYQcNVFt.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BFIIc75K.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bj3Bgpix.js} +1 -1
- package/dist/{IngredientGroupView-CJ4HlrIU.js → IngredientGroupView-B52_Gj1M.js} +5 -5
- package/dist/{IngredientsView-CoNcyNTe.js → IngredientsView-dp1q1202.js} +15 -15
- package/dist/{IntegrationExplorerView-DAeFTGHn.js → IntegrationExplorerView-CFDjUZ1x.js} +5 -5
- package/dist/{IntegrationView-CJUl3iue.js → IntegrationView-WxvHYqrr.js} +13 -13
- package/dist/{InventoryBindingForm-DdPMEmI-.js → InventoryBindingForm-CgsJGTLO.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-mxOaCbKj.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoDwQAGq.js} +5 -5
- package/dist/{InventoryBindingSummary-zPI5ILtC.js → InventoryBindingSummary-CJPi-O24.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-h10_QczG.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-6WGw2Tnv.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-80UHDoRE.js → PremiumBadge.vue_vue_type_script_setup_true_lang-D8iVxQQI.js} +1 -1
- package/dist/{PublishView-yOPM2yih.js → PublishView-DQxvMoL9.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-OnkjRXx-.js → PurchaseOrderPrintPreview-YN89wJJe.js} +2 -2
- package/dist/{ReceiveRequestView-CBb1gORL.js → ReceiveRequestView-Dld-AD3X.js} +13 -13
- package/dist/{RecipeView-DRTwXd4I.js → RecipeView-DTeYl1vN.js} +17 -17
- package/dist/{SettingsView-CEdO12Vh.js → SettingsView-ZKDeU7-t.js} +4 -4
- package/dist/{StockView-m18Sq9mS.js → StockView-iWDV-4Em.js} +20 -20
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-D10JRH7x.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DKQR-Oe-.js} +1 -1
- package/dist/{SupplierView-CCXjTHtc.js → SupplierView-DIFYaNh0.js} +12 -12
- package/dist/{SurchargeView-CwDs9Ula.js → SurchargeView-Dg744-lq.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CJA2mAcP.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-a1NAKsHT.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CYXSjfJd.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BiMBRYQP.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DGicHlXW.js → TransferDetails.vue_vue_type_script_setup_true_lang-BNb64xXp.js} +20 -20
- package/dist/{TransferTemplateView-BRihoYfW.js → TransferTemplateView-OKkFfbJr.js} +20 -20
- package/dist/{UnitCostHistoryView-DOfniDN7.js → UnitCostHistoryView-BQD8QfVO.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DtbJNQpG.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DrZ0DaVk.js} +4 -4
- package/dist/{UnitView-CC8guiL2.js → UnitView-WB01UGKV.js} +7 -7
- package/dist/{WarehouseView-C9mvqBwe.js → WarehouseView-xzBYaKJc.js} +5 -5
- package/dist/{WastageTemplateView-CskSe17o.js → WastageTemplateView-HQpsfs5m.js} +14 -14
- package/dist/{app-CMmw-R61.js → app-jwcH8Mn8.js} +13 -13
- package/dist/app.js +1 -1
- package/dist/{closing-template-lybNbtAa.js → closing-template-nSKzJbXQ.js} +1 -1
- package/dist/{date2-DSh0HwuX.js → date2-CcBFYPpF.js} +1 -1
- package/dist/{dayjs.min-ATJgKbZi.js → dayjs.min-CArZjoIW.js} +1 -1
- package/dist/{decimal-B-hcJ00I.js → decimal-kAd3KrAk.js} +2 -2
- package/dist/{defineDeepModel-B1L3Oqre.js → defineDeepModel-DW3GGnCB.js} +1 -1
- package/dist/{duplicate-template-DreVPyEc.js → duplicate-template-Dju7ozO-.js} +1 -1
- package/dist/{feature-HSB8Omca.js → feature-Dwlpa3ga.js} +2 -2
- package/dist/{format-time-from-id-C64eohX9.js → format-time-from-id-C8qHJtCE.js} +1 -1
- package/dist/{format-unit-display-t2gmos8e.js → format-unit-display-DW_s2GAu.js} +12 -12
- package/dist/{import-export.helper-B-GfmCCs.js → import-export.helper-BLEUR_2a.js} +6 -6
- package/dist/{index-2_Sb7taK.js → index-CQqLXfqq.js} +3 -3
- package/dist/{index-DBave372.js → index-DX29MkLw.js} +1 -1
- package/dist/{index-vszUrPTq.js → index-DeMIqTWp.js} +1 -1
- package/dist/{inventory-core-dart.default-lLJkt2vA.js → inventory-core-dart.default-BOlwkIOh.js} +1 -1
- package/dist/{jszip.min-OgbweCQi.js → jszip.min-UvNpneu6.js} +2 -2
- package/dist/{lz-string-O4X5Ihzo.js → lz-string-BJjf0Fvk.js} +1 -1
- package/dist/{netsuite-CmQmhpsr.js → netsuite-ojatCiHQ.js} +2 -2
- package/dist/{number-ByvJ7KtB.js → number-PbBeNwvZ.js} +3 -3
- package/dist/{predefined-templates-COor9jPP.js → predefined-templates-C11X8192.js} +1 -1
- package/dist/{purchase-order-template-DNmOc3Fp.js → purchase-order-template-CMQsOjp6.js} +1 -1
- package/dist/{recalculationUtils-D4_E99lG.js → recalculationUtils-DOIaJCEk.js} +1 -1
- package/dist/{rules-DwtDniym.js → rules-iqyXkujx.js} +2 -2
- package/dist/{stock-BQj4lYjF.js → stock-BhMYoMNR.js} +1 -1
- package/dist/{supplier-CSf_aavO.js → supplier-XEzdhDaU.js} +2 -2
- package/dist/{surcharge-MQIUdOx9.js → surcharge-Ors_mdMv.js} +1 -1
- package/dist/{uom-rules-DugH-bKi.js → uom-rules-BQohyyG-.js} +1 -1
- package/dist/{use-ingredient-select-dialog-DvZalqNZ.js → use-ingredient-select-dialog-DJ-u5t4P.js} +2 -2
- package/dist/{use-inventory-binding-dialog-Bsz1ptPI.js → use-inventory-binding-dialog-D3W-HnQ8.js} +2 -2
- package/dist/{use-template-enabled-locations-Dsk-Jr9o.js → use-template-enabled-locations-DVF4RYya.js} +2 -2
- package/dist/{use-transfer-locations-CMg-3f2N.js → use-transfer-locations-vRfZN9tb.js} +2 -2
- package/dist/{useHrmPermission-DEhz1Pvg.js → useHrmPermission-z87O-oAT.js} +1 -1
- package/dist/{useNavigationMenu-gbA48yRN.js → useNavigationMenu-DMRHryMp.js} +2 -2
- package/dist/{useSseClient-CM6DaHMy.js → useSseClient-6AYDEsLw.js} +3 -3
- package/dist/{vue-i18n-D5DPwwpF.js → vue-i18n-nOka-XyP.js} +158 -158
- package/dist/{xlsx.util-GIgrmmya.js → xlsx.util-DDX-Y6FY.js} +3 -3
- package/package.json +3 -3
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as lt, ref as w, computed as
|
|
2
|
-
import { u as et, a as Nt, E as It, T as vt, c as $t, s as zt, U as
|
|
3
|
-
import { i as rt, _ as Vt } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { a as bt, d as Ut } from "./number-
|
|
5
|
-
import { c as jt, d as nt, P as it, e as Ht, f as Yt, h as Qt, i as Wt, j as Zt, a as Kt, _ as Jt, b as Xt, g as Gt } from "./TransferDetails.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { i as es } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { d as Te } from "./dayjs.min-
|
|
8
|
-
import { e as ts } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { defineComponent as lt, ref as w, computed as R, watch as ze, openBlock as m, createElementBlock as g, Fragment as _e, createBlock as ie, Teleport as wt, createVNode as F, Transition as Pt, withCtx as Fe, createElementVNode as e, toDisplayString as d, unref as t, createCommentVNode as $, normalizeClass as O, renderList as Qe, createTextVNode as Xe, mergeModels as qt, useModel as Tt, resolveComponent as De, reactive as Bt, nextTick as tt, h as ve, watchEffect as Ot, isRef as mt, normalizeStyle as pt, normalizeProps as ft, mergeProps as st, guardReactiveProps as At } from "vue";
|
|
2
|
+
import { u as et, a as Nt, E as It, T as vt, c as $t, s as zt, U as Ae, q as Lt, V as yt, Q as Ge, x as Mt } from "./app-jwcH8Mn8.js";
|
|
3
|
+
import { i as rt, _ as Vt } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DPVkPshX.js";
|
|
4
|
+
import { a as bt, d as Ut } from "./number-PbBeNwvZ.js";
|
|
5
|
+
import { c as jt, d as nt, P as it, e as Ht, f as Yt, h as Qt, i as Wt, j as Zt, a as Kt, _ as Jt, b as Xt, g as Gt } from "./TransferDetails.vue_vue_type_script_setup_true_lang-BNb64xXp.js";
|
|
6
|
+
import { i as es } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-D8iVxQQI.js";
|
|
7
|
+
import { d as Te } from "./dayjs.min-CArZjoIW.js";
|
|
8
|
+
import { e as ts } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-DrZ0DaVk.js";
|
|
9
9
|
import { u as ss } from "./useTabStorage-BkIVScW_.js";
|
|
10
10
|
import { u as ns, _ as os } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DGlWE5I8.js";
|
|
11
11
|
import { useSnackbar as ut, components as as, useDialog as rs, useBreakpoints as ls } from "@feedmepos/ui-library";
|
|
12
|
-
import { c as is, h as ht, u as us, _ as cs, a as ds, b as ms } from "./EmailDialog.vue_vue_type_script_setup_true_lang-
|
|
12
|
+
import { c as is, h as ht, u as us, _ as cs, a as ds, b as ms } from "./EmailDialog.vue_vue_type_script_setup_true_lang-D3tETd4M.js";
|
|
13
13
|
import { useI18n as We, useCoreStore as kt } from "@feedmepos/mf-common";
|
|
14
|
-
import { u as Ct, a as ps } from "./supplier-
|
|
15
|
-
import { u as fs } from "./stock-
|
|
16
|
-
import { u as Ft } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { b as St, a as vs } from "./format-unit-display-
|
|
18
|
-
import { P as ys } from "./inventory-core-dart.default-
|
|
14
|
+
import { u as Ct, a as ps } from "./supplier-XEzdhDaU.js";
|
|
15
|
+
import { u as fs } from "./stock-BhMYoMNR.js";
|
|
16
|
+
import { u as Ft } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-a1NAKsHT.js";
|
|
17
|
+
import { b as St, a as vs } from "./format-unit-display-DW_s2GAu.js";
|
|
18
|
+
import { P as ys } from "./inventory-core-dart.default-BOlwkIOh.js";
|
|
19
19
|
import { _ as bs, F as He } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
|
|
20
|
-
import { u as
|
|
20
|
+
import { u as Rt } from "./feature-Dwlpa3ga.js";
|
|
21
21
|
import { P as hs, J as gs, D as xs } from "./app-DiX-EfV6.js";
|
|
22
|
-
import { u as _s } from "./netsuite-
|
|
23
|
-
import { s as gt, f as ws } from "./predefined-templates-
|
|
24
|
-
import { t as ks, d as Cs } from "./date2-
|
|
22
|
+
import { u as _s } from "./netsuite-ojatCiHQ.js";
|
|
23
|
+
import { s as gt, f as ws } from "./predefined-templates-C11X8192.js";
|
|
24
|
+
import { t as ks, d as Cs } from "./date2-CcBFYPpF.js";
|
|
25
25
|
import { F as xt } from "./form-mode.enum-BKiNVH6A.js";
|
|
26
|
-
import { p as Fs } from "./format-time-from-id-
|
|
26
|
+
import { p as Fs } from "./format-time-from-id-C8qHJtCE.js";
|
|
27
27
|
const Ss = {
|
|
28
28
|
key: 0,
|
|
29
29
|
class: "fixed inset-0 z-[200] bg-white flex flex-col overflow-hidden",
|
|
30
30
|
style: { "font-family": "Inter, sans-serif" }
|
|
31
|
-
},
|
|
31
|
+
}, Rs = {
|
|
32
32
|
key: 0,
|
|
33
33
|
class: "flex items-center justify-between px-24 h-[64px] border-b border-[#F0F0F0] shrink-0 bg-white"
|
|
34
|
-
},
|
|
34
|
+
}, Ds = { class: "fm-typo-en-title-md-800 text-[#1C1C1E]" }, Es = { class: "flex items-center gap-8" }, Ps = {
|
|
35
35
|
key: 1,
|
|
36
36
|
class: "flex items-center justify-center px-32 py-16 border-b border-[#F0F0F0] shrink-0 bg-white"
|
|
37
|
-
}, qs = { class: "flex items-center max-w-[600px] w-full" }, Ts = ["disabled"],
|
|
37
|
+
}, qs = { class: "flex items-center max-w-[600px] w-full" }, Ts = ["disabled"], Bs = { key: 1 }, Os = ["disabled"], As = { key: 1 }, Ns = {
|
|
38
38
|
class: "flex flex-col items-center gap-4 min-w-0",
|
|
39
39
|
disabled: !0
|
|
40
40
|
}, Is = { class: "flex flex-1 overflow-hidden" }, $s = { class: "flex-1 min-w-0 overflow-y-auto" }, zs = {
|
|
@@ -58,19 +58,19 @@ const Ss = {
|
|
|
58
58
|
}, Cn = { class: "fm-typo-en-body-md-700 text-[#1C1C1E] mb-12" }, Fn = { class: "mb-12" }, Sn = {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: "py-32 flex justify-center"
|
|
61
|
-
},
|
|
61
|
+
}, Rn = {
|
|
62
62
|
key: 1,
|
|
63
63
|
class: "py-32 text-center text-[#B2B3B6] fm-typo-en-body-md-400"
|
|
64
|
-
},
|
|
64
|
+
}, Dn = {
|
|
65
65
|
key: 2,
|
|
66
66
|
class: "flex flex-col gap-8"
|
|
67
|
-
}, En = ["onClick"], Pn = { class: "flex-1 min-w-0" }, qn = { class: "fm-typo-en-body-md-600 text-[#1C1C1E] mb-2" }, Tn = { class: "fm-typo-en-body-sm-400 text-[#6B6C70]" },
|
|
67
|
+
}, En = ["onClick"], Pn = { class: "flex-1 min-w-0" }, qn = { class: "fm-typo-en-body-md-600 text-[#1C1C1E] mb-2" }, Tn = { class: "fm-typo-en-body-sm-400 text-[#6B6C70]" }, Bn = {
|
|
68
68
|
key: 0,
|
|
69
69
|
class: "w-[8px] h-[8px] rounded-full bg-[#FF7823]"
|
|
70
|
-
},
|
|
70
|
+
}, On = {
|
|
71
71
|
key: 2,
|
|
72
72
|
class: "px-32 py-24"
|
|
73
|
-
},
|
|
73
|
+
}, An = { class: "flex flex-col gap-4 mb-12" }, Nn = { class: "fm-typo-en-title-sm-700 text-[#1C1C1E]" }, In = { class: "w-[332px] shrink-0 border-l border-[#F0F0F0] overflow-y-auto bg-white" }, $n = { class: "p-4" }, zn = { class: "flex flex-col gap-0 border border-[#E9EAEC] rounded-2xl bg-white overflow-hidden" }, Ln = { class: "px-10 py-5 border-b border-[#F0F0F0]" }, Mn = { class: "fm-typo-en-body-md-700 text-[#1C1C1E]" }, Vn = { class: "flex flex-col gap-0.5 px-10 py-4 border-b border-[#F0F0F0]" }, Un = { class: "text-[11px] leading-[14px] font-medium text-[#6B6C70]" }, jn = {
|
|
74
74
|
key: 0,
|
|
75
75
|
class: "text-[11px] leading-[14px] text-[#6B6C70]"
|
|
76
76
|
}, Hn = { class: "flex flex-col gap-0.5 px-10 py-4 border-b border-[#F0F0F0]" }, Yn = { class: "text-[11px] leading-[14px] font-medium text-[#6B6C70]" }, Qn = { class: "flex flex-col gap-0.5 px-10 py-4 border-b border-[#F0F0F0]" }, Wn = { class: "text-[11px] leading-[14px] font-medium text-[#6B6C70]" }, Zn = {
|
|
@@ -85,21 +85,21 @@ const Ss = {
|
|
|
85
85
|
},
|
|
86
86
|
emits: ["update:show", "submitted"],
|
|
87
87
|
setup(ne, { emit: k }) {
|
|
88
|
-
const { FmButton:
|
|
89
|
-
() =>
|
|
90
|
-
), C =
|
|
88
|
+
const { FmButton: z, FmDialog: U, FmIcon: j, FmTextField: D } = as, Z = ne, oe = k, { t: i } = We(), S = ut(), a = et(), ee = Ct(), X = Nt(), we = fs(), q = Ft(), T = St(), b = w(0), ue = w(!1), H = w(null), te = w(""), x = w(null), u = w(null), B = w(null), me = w(""), ce = w(""), K = w(!1), ye = w(!1), be = w(!1), pe = w(!1), Be = w(!1), Oe = w(/* @__PURE__ */ new Map()), Se = w(), ae = w([]), he = R(() => !!H.value), Ne = R(() => x.value === "transfer" ? !!u.value : x.value === "template" ? !!B.value : !1), ke = R(() => (ae.value.length ? ae.value : P.value.items ?? []).some((o) => o.quantity.amount > 0)), p = R(() => K.value), f = R(
|
|
89
|
+
() => ke.value && ye.value && be.value && !K.value
|
|
90
|
+
), C = R(() => b.value === 0 ? he.value : b.value === 1 ? Ne.value : b.value === 2 ? f.value : !1), E = R(
|
|
91
91
|
() => b.value === 2 ? i("inventory.transfer.receiveRequest.bulk.wizard.createTransferBtn") : i("inventory.transfer.receiveRequest.bulk.wizard.continueBtn")
|
|
92
|
-
), l =
|
|
92
|
+
), l = R(
|
|
93
93
|
() => M.value === "Purchase" ? "Purchase method" : "Transfer method"
|
|
94
|
-
), r =
|
|
94
|
+
), r = R(
|
|
95
95
|
() => M.value === "Purchase" ? "Purchase details" : "Transfer details"
|
|
96
|
-
), c =
|
|
96
|
+
), c = R(() => {
|
|
97
97
|
const s = te.value.trim().toLowerCase();
|
|
98
98
|
let o = a.locations;
|
|
99
99
|
return Z.selectedOutletIds && Z.selectedOutletIds.length > 0 && (o = o.filter((n) => Z.selectedOutletIds.includes(n.doc._id))), s ? o.filter(
|
|
100
100
|
(n) => n.name.toLowerCase().includes(s) || (n.doc.profile.code ?? "").toLowerCase().includes(s)
|
|
101
101
|
) : o;
|
|
102
|
-
}), h =
|
|
102
|
+
}), h = R(() => {
|
|
103
103
|
var le;
|
|
104
104
|
const s = (le = H.value) == null ? void 0 : le.doc._id, o = ee.suppliers.map((J) => ({
|
|
105
105
|
doc: J,
|
|
@@ -113,28 +113,28 @@ const Ss = {
|
|
|
113
113
|
const qe = J.type === "supplier" ? "" : ((je = J.doc.profile) == null ? void 0 : je.code) ?? "";
|
|
114
114
|
return J.name.toLowerCase().includes(W) || qe.toLowerCase().includes(W);
|
|
115
115
|
}) : Y;
|
|
116
|
-
}), y =
|
|
117
|
-
const s = ce.value.trim().toLowerCase(), o =
|
|
116
|
+
}), y = R(() => {
|
|
117
|
+
const s = ce.value.trim().toLowerCase(), o = T.templates;
|
|
118
118
|
return s ? o.filter((n) => n.name.toLowerCase().includes(s)) : o;
|
|
119
|
-
}), M =
|
|
119
|
+
}), M = R(() => {
|
|
120
120
|
var s;
|
|
121
|
-
if (
|
|
122
|
-
return typeof
|
|
123
|
-
if (
|
|
121
|
+
if (P.value.supplier)
|
|
122
|
+
return typeof P.value.supplier.internal == "string" ? "Transfer" : "Purchase";
|
|
123
|
+
if (x.value === "transfer" && u.value)
|
|
124
124
|
return u.value.type === "supplier" ? "Purchase" : "Transfer";
|
|
125
|
-
if (
|
|
126
|
-
const o =
|
|
125
|
+
if (x.value === "template" && B.value) {
|
|
126
|
+
const o = T.templates.find((n) => n._id === B.value);
|
|
127
127
|
if ((s = o == null ? void 0 : o.purchaseOrder) != null && s.supplier)
|
|
128
128
|
return typeof o.purchaseOrder.supplier.internal == "string" ? "Transfer" : "Purchase";
|
|
129
129
|
}
|
|
130
130
|
return "Transfer";
|
|
131
|
-
}),
|
|
131
|
+
}), A = R(() => H.value ? H.value.name : i("inventory.transfer.receiveRequest.bulk.wizard.notSelected")), v = R(() => x.value === "transfer" ? M.value === "Purchase" ? "Purchase from Supplier" : i("inventory.transfer.receiveRequest.bulk.wizard.outletToOutletMethod") : x.value === "template" ? i("inventory.transfer.receiveRequest.bulk.wizard.fromTemplateMethod") : i("inventory.transfer.receiveRequest.bulk.wizard.notChosen")), I = R(() => {
|
|
132
132
|
var s;
|
|
133
|
-
if (
|
|
133
|
+
if (x.value === "transfer" && u.value)
|
|
134
134
|
return u.value.name;
|
|
135
|
-
if (
|
|
136
|
-
const o =
|
|
137
|
-
return (s = o == null ? void 0 : o.purchaseOrder) != null && s.supplier ? o.purchaseOrder.supplier.name ||
|
|
135
|
+
if (x.value === "template" && B.value) {
|
|
136
|
+
const o = T.templates.find((n) => n._id === B.value);
|
|
137
|
+
return (s = o == null ? void 0 : o.purchaseOrder) != null && s.supplier ? o.purchaseOrder.supplier.name || B.value : (o == null ? void 0 : o.name) ?? B.value;
|
|
138
138
|
}
|
|
139
139
|
return i("inventory.transfer.receiveRequest.bulk.wizard.noneYet");
|
|
140
140
|
});
|
|
@@ -155,15 +155,15 @@ const Ss = {
|
|
|
155
155
|
var o, n, Y, W, le, J;
|
|
156
156
|
return s.type === "supplier" ? [(o = s.doc.address) == null ? void 0 : o.line1, (n = s.doc.address) == null ? void 0 : n.city].filter(Boolean).join(" · ") : [(W = (Y = s.doc.profile) == null ? void 0 : Y.address) == null ? void 0 : W.line1, (J = (le = s.doc.profile) == null ? void 0 : le.address) == null ? void 0 : J.city].filter(Boolean).join(" · ");
|
|
157
157
|
}
|
|
158
|
-
const re =
|
|
158
|
+
const re = R(
|
|
159
159
|
() => H.value ? de(H.value) : ""
|
|
160
|
-
), xe =
|
|
161
|
-
() =>
|
|
162
|
-
), Ee =
|
|
163
|
-
const o = (ae.value.length ? ae.value :
|
|
160
|
+
), xe = R(
|
|
161
|
+
() => x.value === "transfer" && u.value ? u.value.type === "supplier" ? ge(u.value) : de(u.value) : ""
|
|
162
|
+
), Ee = R(() => {
|
|
163
|
+
const o = (ae.value.length ? ae.value : P.value.items ?? []).filter((n) => n.quantity.amount > 0).length;
|
|
164
164
|
return o === 0 ? i("inventory.transfer.receiveRequest.bulk.wizard.noneYet") : `${o} ${o === 1 ? "item" : "items"}`;
|
|
165
165
|
});
|
|
166
|
-
function
|
|
166
|
+
function _(s) {
|
|
167
167
|
var n;
|
|
168
168
|
const o = (n = s.purchaseOrder) == null ? void 0 : n.supplier;
|
|
169
169
|
return o ? o.internal === "warehouse" ? `Transfer from ${o.name}` : o.internal === "restaurant" ? `Transfer from ${o.name}` : `Purchase from ${o.name}` : "";
|
|
@@ -207,9 +207,9 @@ const Ss = {
|
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function L() {
|
|
211
211
|
var Y;
|
|
212
|
-
const s =
|
|
212
|
+
const s = B.value ? T.templates.find((W) => W._id === B.value) : void 0, o = {
|
|
213
213
|
_rev: void 0,
|
|
214
214
|
email: void 0,
|
|
215
215
|
internal: void 0,
|
|
@@ -220,32 +220,32 @@ const Ss = {
|
|
|
220
220
|
_id: "",
|
|
221
221
|
name: "",
|
|
222
222
|
address: { line2: void 0, line1: "", state: "", city: "", postcode: "", country: "" }
|
|
223
|
-
}, n =
|
|
223
|
+
}, n = x.value === "transfer" && u.value ? u.value.type === "supplier" ? N(u.value.doc) : V(u.value) : x.value === "template" && (s != null && s.purchaseOrder.supplier) ? s.purchaseOrder.supplier : o;
|
|
224
224
|
return {
|
|
225
225
|
remark: void 0,
|
|
226
226
|
ref: void 0,
|
|
227
227
|
stockSnapshotId: void 0,
|
|
228
228
|
effectiveAt: void 0,
|
|
229
|
-
items:
|
|
229
|
+
items: x.value === "template" && ((Y = s == null ? void 0 : s.purchaseOrder) != null && Y.items) ? s.purchaseOrder.items : [],
|
|
230
230
|
supplier: n,
|
|
231
231
|
status: "DRAFT",
|
|
232
232
|
_id: "",
|
|
233
233
|
seqNumber: 0,
|
|
234
234
|
deliveryOrder: [],
|
|
235
|
-
template:
|
|
235
|
+
template: B.value ?? void 0,
|
|
236
236
|
templateDoc: s
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
const
|
|
239
|
+
const P = w(L()), se = w(`${Math.random()}`), fe = R(
|
|
240
240
|
() => {
|
|
241
241
|
var s;
|
|
242
|
-
return ((s =
|
|
242
|
+
return ((s = P.value.items) == null ? void 0 : s.filter((o) => o.quantity.amount === 0)) ?? [];
|
|
243
243
|
}
|
|
244
244
|
);
|
|
245
245
|
ze(
|
|
246
246
|
() => Z.show,
|
|
247
247
|
(s) => {
|
|
248
|
-
if (s && (b.value = 0, ue.value = !1, H.value = null,
|
|
248
|
+
if (s && (b.value = 0, ue.value = !1, H.value = null, x.value = null, u.value = null, B.value = null, te.value = "", me.value = "", ce.value = "", ye.value = !1, be.value = !1, ae.value = [], P.value = L(), se.value = `${Math.random()}`, T.fetchTemplates(), Z.selectedOutletIds && Z.selectedOutletIds.length === 1)) {
|
|
249
249
|
const o = a.locations.find(
|
|
250
250
|
(n) => n.doc._id === Z.selectedOutletIds[0]
|
|
251
251
|
);
|
|
@@ -259,21 +259,21 @@ const Ss = {
|
|
|
259
259
|
a._currentLocation = H.value, Ve(), Ue(), b.value = 1;
|
|
260
260
|
} else if (b.value === 1) {
|
|
261
261
|
if (!Ne.value) return;
|
|
262
|
-
|
|
262
|
+
P.value = L(), se.value = `${Math.random()}`, ae.value = [], b.value = 2;
|
|
263
263
|
} else b.value === 2 && $e();
|
|
264
264
|
}
|
|
265
265
|
function Le() {
|
|
266
266
|
b.value > 0 && b.value--;
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Re(s) {
|
|
269
269
|
s < b.value && (b.value = s);
|
|
270
270
|
}
|
|
271
271
|
function Me() {
|
|
272
272
|
oe("update:show", !1);
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
|
|
276
|
-
...
|
|
274
|
+
function Ce(s) {
|
|
275
|
+
x.value !== s && (x.value = s, u.value = null, B.value = null, ae.value = [], P.value = {
|
|
276
|
+
...P.value,
|
|
277
277
|
items: [],
|
|
278
278
|
template: void 0,
|
|
279
279
|
templateDoc: void 0
|
|
@@ -282,15 +282,15 @@ const Ss = {
|
|
|
282
282
|
function Pe(s) {
|
|
283
283
|
ae.value = s ?? [];
|
|
284
284
|
}
|
|
285
|
-
ze(
|
|
286
|
-
|
|
285
|
+
ze(B, (s) => {
|
|
286
|
+
x.value === "template" && s && (P.value = L(), se.value = `${Math.random()}`);
|
|
287
287
|
});
|
|
288
288
|
async function Ve() {
|
|
289
289
|
ye.value = !1;
|
|
290
290
|
try {
|
|
291
291
|
await ee.readSuppliers(), ye.value = !0;
|
|
292
292
|
} catch {
|
|
293
|
-
|
|
293
|
+
S.open({
|
|
294
294
|
title: i("inventory.transfer.form.unableToFetchListOfSuppliers.title"),
|
|
295
295
|
message: i("inventory.transfer.form.unableToFetchListOfSuppliers.message"),
|
|
296
296
|
type: "error"
|
|
@@ -298,20 +298,20 @@ const Ss = {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
async function Ue() {
|
|
301
|
-
|
|
301
|
+
Be.value = !0, Oe.value = /* @__PURE__ */ new Map();
|
|
302
302
|
try {
|
|
303
|
-
const s = await
|
|
303
|
+
const s = await we.readStockBalance(), o = /* @__PURE__ */ new Map();
|
|
304
304
|
for (const n of s.skus ?? [])
|
|
305
305
|
o.set(n.id, n);
|
|
306
|
-
|
|
306
|
+
Oe.value = o;
|
|
307
307
|
} catch {
|
|
308
308
|
} finally {
|
|
309
|
-
|
|
309
|
+
Be.value = !1;
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
function Ze() {
|
|
313
313
|
var s;
|
|
314
|
-
(s = Se.value) != null && s.getFormData && (
|
|
314
|
+
(s = Se.value) != null && s.getFormData && (P.value = { ...P.value, ...Se.value.getFormData() });
|
|
315
315
|
}
|
|
316
316
|
function $e() {
|
|
317
317
|
if (Ze(), fe.value.length > 0) {
|
|
@@ -322,17 +322,17 @@ const Ss = {
|
|
|
322
322
|
}
|
|
323
323
|
function Ke() {
|
|
324
324
|
var s;
|
|
325
|
-
|
|
325
|
+
P.value.items = ((s = P.value.items) == null ? void 0 : s.filter((o) => o.quantity.amount > 0)) ?? [], pe.value = !1, Je();
|
|
326
326
|
}
|
|
327
327
|
function Je() {
|
|
328
328
|
var n, Y;
|
|
329
329
|
const s = ys.validatePurchaseOrderItems({
|
|
330
330
|
skusById: X.skuById ?? {},
|
|
331
|
-
items:
|
|
331
|
+
items: P.value.items ?? []
|
|
332
332
|
}), o = Object.values(s).flat();
|
|
333
333
|
if (o.length > 0) {
|
|
334
334
|
const W = o[0];
|
|
335
|
-
|
|
335
|
+
S.open({
|
|
336
336
|
title: `[Row ${W.index + 1}] "${W.poItem.sku.name}"`,
|
|
337
337
|
message: `${W.message}`,
|
|
338
338
|
type: "error"
|
|
@@ -341,10 +341,10 @@ const Ss = {
|
|
|
341
341
|
}
|
|
342
342
|
(Y = (n = Se.value) == null ? void 0 : n.validateInputs) == null || Y.call(n);
|
|
343
343
|
}
|
|
344
|
-
async function
|
|
345
|
-
const s =
|
|
344
|
+
async function Dt() {
|
|
345
|
+
const s = P.value;
|
|
346
346
|
if (K.value = !0, s.items = s.items.filter((o) => o.quantity.amount > 0), !s.items.length) {
|
|
347
|
-
|
|
347
|
+
S.open({
|
|
348
348
|
title: "Cannot create order",
|
|
349
349
|
message: "There are no items with non-zero amount in your request.",
|
|
350
350
|
type: "error"
|
|
@@ -353,13 +353,13 @@ const Ss = {
|
|
|
353
353
|
}
|
|
354
354
|
(s.supplier.internal === "warehouse" || s.supplier.internal === "restaurant") && (s.items = s.items.map(({ totalCost: o, ...n }) => n));
|
|
355
355
|
try {
|
|
356
|
-
await
|
|
356
|
+
await q.createPurchaseOrder(s), S.open({
|
|
357
357
|
title: i("inventory.transfer.receiveRequest.create.success"),
|
|
358
358
|
message: i("inventory.transfer.receiveRequest.create.successMessage"),
|
|
359
359
|
type: "success"
|
|
360
360
|
}), oe("submitted"), oe("update:show", !1), Et();
|
|
361
361
|
} catch (o) {
|
|
362
|
-
|
|
362
|
+
S.open({
|
|
363
363
|
title: i("inventory.transfer.receiveRequest.create.error.title"),
|
|
364
364
|
message: i("inventory.transfer.receiveRequest.create.error.message"),
|
|
365
365
|
type: "error"
|
|
@@ -369,11 +369,11 @@ const Ss = {
|
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
function Et() {
|
|
372
|
-
b.value = 0, ue.value = !1, H.value = null,
|
|
372
|
+
b.value = 0, ue.value = !1, H.value = null, x.value = null, u.value = null, B.value = null, te.value = "", me.value = "", ce.value = "", ye.value = !1, be.value = !1, ae.value = [], P.value = L(), se.value = `${Math.random()}`;
|
|
373
373
|
}
|
|
374
|
-
return (s, o) => (
|
|
375
|
-
(
|
|
376
|
-
|
|
374
|
+
return (s, o) => (m(), g(_e, null, [
|
|
375
|
+
(m(), ie(wt, { to: "body" }, [
|
|
376
|
+
F(Pt, {
|
|
377
377
|
"enter-active-class": "transition-opacity duration-150 ease-out",
|
|
378
378
|
"enter-from-class": "opacity-0",
|
|
379
379
|
"enter-to-class": "opacity-100",
|
|
@@ -382,39 +382,39 @@ const Ss = {
|
|
|
382
382
|
"leave-to-class": "opacity-0"
|
|
383
383
|
}, {
|
|
384
384
|
default: Fe(() => [
|
|
385
|
-
s.show ? (
|
|
386
|
-
ue.value ?
|
|
387
|
-
e("span",
|
|
385
|
+
s.show ? (m(), g("div", Ss, [
|
|
386
|
+
ue.value ? $("", !0) : (m(), g("div", Rs, [
|
|
387
|
+
e("span", Ds, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.title")), 1),
|
|
388
388
|
e("div", Es, [
|
|
389
|
-
|
|
389
|
+
F(t(z), {
|
|
390
390
|
variant: "tertiary",
|
|
391
391
|
size: "md",
|
|
392
392
|
label: t(i)("inventory.transfer.receiveRequest.bulk.wizard.cancelBtn"),
|
|
393
393
|
onClick: Me
|
|
394
394
|
}, null, 8, ["label"]),
|
|
395
|
-
b.value > 0 ? (
|
|
395
|
+
b.value > 0 ? (m(), ie(t(z), {
|
|
396
396
|
key: 0,
|
|
397
397
|
variant: "secondary",
|
|
398
398
|
size: "md",
|
|
399
399
|
"prepend-icon": "arrow_back",
|
|
400
400
|
label: t(i)("inventory.transfer.receiveRequest.bulk.wizard.backBtn"),
|
|
401
401
|
onClick: Le
|
|
402
|
-
}, null, 8, ["label"])) :
|
|
403
|
-
|
|
402
|
+
}, null, 8, ["label"])) : $("", !0),
|
|
403
|
+
F(t(z), {
|
|
404
404
|
size: "md",
|
|
405
405
|
disabled: !C.value,
|
|
406
406
|
loading: K.value,
|
|
407
|
-
label:
|
|
407
|
+
label: E.value,
|
|
408
408
|
onClick: Ie
|
|
409
409
|
}, null, 8, ["disabled", "loading", "label"])
|
|
410
410
|
])
|
|
411
411
|
])),
|
|
412
|
-
ue.value ?
|
|
412
|
+
ue.value ? $("", !0) : (m(), g("div", Ps, [
|
|
413
413
|
e("div", qs, [
|
|
414
414
|
e("button", {
|
|
415
415
|
class: "flex flex-col items-center gap-4 min-w-0 group",
|
|
416
416
|
disabled: b.value <= 0,
|
|
417
|
-
onClick: o[0] || (o[0] = (n) =>
|
|
417
|
+
onClick: o[0] || (o[0] = (n) => Re(0))
|
|
418
418
|
}, [
|
|
419
419
|
e("div", {
|
|
420
420
|
class: O([
|
|
@@ -422,11 +422,11 @@ const Ss = {
|
|
|
422
422
|
b.value > 0 || b.value === 0 ? "bg-[#FF7823] text-white" : "bg-[#F0F0F0] text-[#6B6C70]"
|
|
423
423
|
])
|
|
424
424
|
}, [
|
|
425
|
-
b.value > 0 ? (
|
|
425
|
+
b.value > 0 ? (m(), ie(t(j), {
|
|
426
426
|
key: 0,
|
|
427
427
|
name: "check",
|
|
428
428
|
size: "sm"
|
|
429
|
-
})) : (
|
|
429
|
+
})) : (m(), g("span", Bs, "1"))
|
|
430
430
|
], 2),
|
|
431
431
|
e("span", {
|
|
432
432
|
class: O(["fm-typo-en-body-xs-500 whitespace-nowrap transition-colors duration-150", b.value >= 0 ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
|
|
@@ -438,7 +438,7 @@ const Ss = {
|
|
|
438
438
|
e("button", {
|
|
439
439
|
class: "flex flex-col items-center gap-4 min-w-0 group",
|
|
440
440
|
disabled: b.value <= 1,
|
|
441
|
-
onClick: o[1] || (o[1] = (n) =>
|
|
441
|
+
onClick: o[1] || (o[1] = (n) => Re(1))
|
|
442
442
|
}, [
|
|
443
443
|
e("div", {
|
|
444
444
|
class: O([
|
|
@@ -446,16 +446,16 @@ const Ss = {
|
|
|
446
446
|
b.value > 1 || b.value === 1 ? "bg-[#FF7823] text-white" : "bg-[#F0F0F0] text-[#6B6C70]"
|
|
447
447
|
])
|
|
448
448
|
}, [
|
|
449
|
-
b.value > 1 ? (
|
|
449
|
+
b.value > 1 ? (m(), ie(t(j), {
|
|
450
450
|
key: 0,
|
|
451
451
|
name: "check",
|
|
452
452
|
size: "sm"
|
|
453
|
-
})) : (
|
|
453
|
+
})) : (m(), g("span", As, "2"))
|
|
454
454
|
], 2),
|
|
455
455
|
e("span", {
|
|
456
456
|
class: O(["fm-typo-en-body-xs-500 whitespace-nowrap transition-colors duration-150", b.value >= 1 ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
|
|
457
457
|
}, d(l.value), 3)
|
|
458
|
-
], 8,
|
|
458
|
+
], 8, Os),
|
|
459
459
|
e("div", {
|
|
460
460
|
class: O(["flex-1 h-1 mx-8 transition-colors duration-200", b.value > 1 ? "bg-[#FF7823]" : "bg-[#E0E0E0]"])
|
|
461
461
|
}, null, 2),
|
|
@@ -476,13 +476,13 @@ const Ss = {
|
|
|
476
476
|
])),
|
|
477
477
|
e("div", Is, [
|
|
478
478
|
e("div", $s, [
|
|
479
|
-
b.value === 0 ? (
|
|
479
|
+
b.value === 0 ? (m(), g("div", zs, [
|
|
480
480
|
e("div", Ls, [
|
|
481
481
|
e("h3", Ms, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.step1Heading")), 1),
|
|
482
482
|
e("p", Vs, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.step1Desc")), 1)
|
|
483
483
|
]),
|
|
484
484
|
e("div", Us, [
|
|
485
|
-
|
|
485
|
+
F(t(D), {
|
|
486
486
|
"model-value": te.value,
|
|
487
487
|
"onUpdate:modelValue": o[2] || (o[2] = (n) => te.value = n),
|
|
488
488
|
"prepend-icon": "search",
|
|
@@ -490,15 +490,15 @@ const Ss = {
|
|
|
490
490
|
}, null, 8, ["model-value", "placeholder"])
|
|
491
491
|
]),
|
|
492
492
|
e("div", js, [
|
|
493
|
-
(
|
|
493
|
+
(m(!0), g(_e, null, Qe(c.value, (n, Y) => {
|
|
494
494
|
var W, le, J, qe, je, ct, dt;
|
|
495
|
-
return
|
|
495
|
+
return m(), g("div", {
|
|
496
496
|
key: n.dbName,
|
|
497
497
|
class: O(["flex items-center gap-8 px-12 h-[67px] cursor-pointer transition-colors duration-150", [
|
|
498
498
|
((W = H.value) == null ? void 0 : W.dbName) === n.dbName ? "bg-[#FFF5EE]" : "hover:bg-[#FAFAFA]",
|
|
499
499
|
Y > 0 ? "border-t border-[#F0F0F0]" : ""
|
|
500
500
|
]]),
|
|
501
|
-
onClick: (
|
|
501
|
+
onClick: (To) => H.value = n
|
|
502
502
|
}, [
|
|
503
503
|
e("div", Ys, [
|
|
504
504
|
e("span", Qs, d(n.name.slice(0, 2).toUpperCase()), 1)
|
|
@@ -507,9 +507,9 @@ const Ss = {
|
|
|
507
507
|
e("div", Zs, d(n.name), 1),
|
|
508
508
|
e("div", Ks, [
|
|
509
509
|
Xe(d(n.doc.profile.code ? `#${n.doc.profile.code}` : t(i)("inventory.transfer.receiveRequest.bulk.wizard.noCode")) + " ", 1),
|
|
510
|
-
(le = n.doc.profile.address) != null && le.line1 || (J = n.doc.profile.address) != null && J.city ? (
|
|
510
|
+
(le = n.doc.profile.address) != null && le.line1 || (J = n.doc.profile.address) != null && J.city ? (m(), g(_e, { key: 0 }, [
|
|
511
511
|
Xe(" · " + d([(qe = n.doc.profile.address) == null ? void 0 : qe.line1, (je = n.doc.profile.address) == null ? void 0 : je.city].filter(Boolean).join(" · ")), 1)
|
|
512
|
-
], 64)) :
|
|
512
|
+
], 64)) : $("", !0)
|
|
513
513
|
])
|
|
514
514
|
]),
|
|
515
515
|
e("span", Js, d(n.type === "warehouse" ? "Warehouse" : "Restaurant"), 1),
|
|
@@ -519,14 +519,14 @@ const Ss = {
|
|
|
519
519
|
((ct = H.value) == null ? void 0 : ct.dbName) === n.dbName ? "border-[#FF7823]" : "border-[#CCCCCC]"
|
|
520
520
|
])
|
|
521
521
|
}, [
|
|
522
|
-
((dt = H.value) == null ? void 0 : dt.dbName) === n.dbName ? (
|
|
522
|
+
((dt = H.value) == null ? void 0 : dt.dbName) === n.dbName ? (m(), g("div", Xs)) : $("", !0)
|
|
523
523
|
], 2)
|
|
524
524
|
], 10, Hs);
|
|
525
525
|
}), 128)),
|
|
526
|
-
c.value.length === 0 ? (
|
|
526
|
+
c.value.length === 0 ? (m(), g("div", Gs, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.noOutletsAvailable")), 1)) : $("", !0)
|
|
527
527
|
])
|
|
528
|
-
])) :
|
|
529
|
-
b.value === 1 ? (
|
|
528
|
+
])) : $("", !0),
|
|
529
|
+
b.value === 1 ? (m(), g("div", en, [
|
|
530
530
|
e("div", tn, [
|
|
531
531
|
e("h3", sn, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.step2Heading")), 1),
|
|
532
532
|
e("p", nn, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.step2Desc")), 1)
|
|
@@ -535,29 +535,29 @@ const Ss = {
|
|
|
535
535
|
e("div", {
|
|
536
536
|
class: O([
|
|
537
537
|
"border rounded-xl p-16 cursor-pointer transition-all duration-150 flex flex-col",
|
|
538
|
-
|
|
538
|
+
x.value === "transfer" ? "border-[#FF7823] bg-[#FFF5EE]" : "border-[#E0E0E0] bg-white hover:bg-[#FAFAFA]"
|
|
539
539
|
]),
|
|
540
|
-
onClick: o[3] || (o[3] = (n) =>
|
|
540
|
+
onClick: o[3] || (o[3] = (n) => Ce("transfer"))
|
|
541
541
|
}, [
|
|
542
542
|
e("div", an, [
|
|
543
543
|
e("div", {
|
|
544
|
-
class: O(["w-36 h-36 rounded-xl flex items-center justify-center shrink-0",
|
|
544
|
+
class: O(["w-36 h-36 rounded-xl flex items-center justify-center shrink-0", x.value === "transfer" ? "bg-[#FF7823]" : "bg-[#F0F0F0]"])
|
|
545
545
|
}, [
|
|
546
|
-
|
|
546
|
+
F(t(j), {
|
|
547
547
|
name: "swap_horiz",
|
|
548
548
|
size: "md",
|
|
549
|
-
class: O(
|
|
549
|
+
class: O(x.value === "transfer" ? "text-white" : "text-[#6B6C70]")
|
|
550
550
|
}, null, 8, ["class"])
|
|
551
551
|
], 2),
|
|
552
552
|
e("div", {
|
|
553
|
-
class: O(["w-16 h-16 rounded-full flex items-center justify-center shrink-0",
|
|
553
|
+
class: O(["w-16 h-16 rounded-full flex items-center justify-center shrink-0", x.value === "transfer" ? "bg-[#FF7823]" : "border border-[#CCCCCC]"])
|
|
554
554
|
}, [
|
|
555
|
-
|
|
555
|
+
x.value === "transfer" ? (m(), ie(t(j), {
|
|
556
556
|
key: 0,
|
|
557
557
|
name: "check",
|
|
558
558
|
size: "sm",
|
|
559
559
|
class: "text-white"
|
|
560
|
-
})) :
|
|
560
|
+
})) : $("", !0)
|
|
561
561
|
], 2)
|
|
562
562
|
]),
|
|
563
563
|
e("div", rn, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.outletToOutlet")), 1),
|
|
@@ -566,39 +566,39 @@ const Ss = {
|
|
|
566
566
|
e("div", {
|
|
567
567
|
class: O([
|
|
568
568
|
"border rounded-xl p-16 cursor-pointer transition-all duration-150 flex flex-col",
|
|
569
|
-
|
|
569
|
+
x.value === "template" ? "border-[#FF7823] bg-[#FFF5EE]" : "border-[#E0E0E0] bg-white hover:bg-[#FAFAFA]"
|
|
570
570
|
]),
|
|
571
|
-
onClick: o[4] || (o[4] = (n) =>
|
|
571
|
+
onClick: o[4] || (o[4] = (n) => Ce("template"))
|
|
572
572
|
}, [
|
|
573
573
|
e("div", un, [
|
|
574
574
|
e("div", {
|
|
575
|
-
class: O(["w-36 h-36 rounded-xl flex items-center justify-center shrink-0",
|
|
575
|
+
class: O(["w-36 h-36 rounded-xl flex items-center justify-center shrink-0", x.value === "template" ? "bg-[#FF7823]" : "bg-[#F0F0F0]"])
|
|
576
576
|
}, [
|
|
577
|
-
|
|
577
|
+
F(t(j), {
|
|
578
578
|
name: "description",
|
|
579
579
|
size: "md",
|
|
580
|
-
class: O(
|
|
580
|
+
class: O(x.value === "template" ? "text-white" : "text-[#6B6C70]")
|
|
581
581
|
}, null, 8, ["class"])
|
|
582
582
|
], 2),
|
|
583
583
|
e("div", {
|
|
584
|
-
class: O(["w-16 h-16 rounded-full flex items-center justify-center shrink-0",
|
|
584
|
+
class: O(["w-16 h-16 rounded-full flex items-center justify-center shrink-0", x.value === "template" ? "bg-[#FF7823]" : "border border-[#CCCCCC]"])
|
|
585
585
|
}, [
|
|
586
|
-
|
|
586
|
+
x.value === "template" ? (m(), ie(t(j), {
|
|
587
587
|
key: 0,
|
|
588
588
|
name: "check",
|
|
589
589
|
size: "sm",
|
|
590
590
|
class: "text-white"
|
|
591
|
-
})) :
|
|
591
|
+
})) : $("", !0)
|
|
592
592
|
], 2)
|
|
593
593
|
]),
|
|
594
594
|
e("div", cn, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.fromTemplate")), 1),
|
|
595
595
|
e("div", dn, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.fromTemplateDesc")), 1)
|
|
596
596
|
], 2)
|
|
597
597
|
]),
|
|
598
|
-
|
|
598
|
+
x.value === "transfer" ? (m(), g(_e, { key: 0 }, [
|
|
599
599
|
e("div", mn, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.step2SourceHeading")), 1),
|
|
600
600
|
e("div", pn, [
|
|
601
|
-
|
|
601
|
+
F(t(D), {
|
|
602
602
|
"model-value": me.value,
|
|
603
603
|
"onUpdate:modelValue": o[5] || (o[5] = (n) => me.value = n),
|
|
604
604
|
"prepend-icon": "search",
|
|
@@ -608,9 +608,9 @@ const Ss = {
|
|
|
608
608
|
}, null, 8, ["model-value", "placeholder"])
|
|
609
609
|
]),
|
|
610
610
|
e("div", fn, [
|
|
611
|
-
(
|
|
611
|
+
(m(!0), g(_e, null, Qe(h.value, (n, Y) => {
|
|
612
612
|
var W, le, J;
|
|
613
|
-
return
|
|
613
|
+
return m(), g("div", {
|
|
614
614
|
key: n.dbName,
|
|
615
615
|
class: O(["flex items-center gap-8 px-12 h-[67px] cursor-pointer transition-colors duration-150", [
|
|
616
616
|
((W = u.value) == null ? void 0 : W.doc._id) === n.doc._id ? "bg-[#FFF5EE]" : "hover:bg-[#FAFAFA]",
|
|
@@ -625,9 +625,9 @@ const Ss = {
|
|
|
625
625
|
e("div", gn, d(n.name), 1),
|
|
626
626
|
e("div", xn, [
|
|
627
627
|
Xe(d(G(n) ? `#${G(n)}` : t(i)("inventory.transfer.receiveRequest.bulk.wizard.noCode")) + " ", 1),
|
|
628
|
-
Q(n) ? (
|
|
628
|
+
Q(n) ? (m(), g(_e, { key: 0 }, [
|
|
629
629
|
Xe(" · " + d(Q(n)), 1)
|
|
630
|
-
], 64)) :
|
|
630
|
+
], 64)) : $("", !0)
|
|
631
631
|
])
|
|
632
632
|
]),
|
|
633
633
|
e("span", _n, d(n.type === "warehouse" ? "Warehouse" : n.type === "supplier" ? "Supplier" : "Restaurant"), 1),
|
|
@@ -637,17 +637,17 @@ const Ss = {
|
|
|
637
637
|
((le = u.value) == null ? void 0 : le.doc._id) === n.doc._id ? "border-[#FF7823]" : "border-[#CCCCCC]"
|
|
638
638
|
])
|
|
639
639
|
}, [
|
|
640
|
-
((J = u.value) == null ? void 0 : J.doc._id) === n.doc._id ? (
|
|
640
|
+
((J = u.value) == null ? void 0 : J.doc._id) === n.doc._id ? (m(), g("div", wn)) : $("", !0)
|
|
641
641
|
], 2)
|
|
642
642
|
], 10, vn);
|
|
643
643
|
}), 128)),
|
|
644
|
-
h.value.length === 0 ? (
|
|
644
|
+
h.value.length === 0 ? (m(), g("div", kn, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.noOutletsAvailable")), 1)) : $("", !0)
|
|
645
645
|
])
|
|
646
|
-
], 64)) :
|
|
647
|
-
|
|
646
|
+
], 64)) : $("", !0),
|
|
647
|
+
x.value === "template" ? (m(), g(_e, { key: 1 }, [
|
|
648
648
|
e("div", Cn, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.step2TemplateHeading")), 1),
|
|
649
649
|
e("div", Fn, [
|
|
650
|
-
|
|
650
|
+
F(t(D), {
|
|
651
651
|
"model-value": ce.value,
|
|
652
652
|
"onUpdate:modelValue": o[6] || (o[6] = (n) => ce.value = n),
|
|
653
653
|
"prepend-icon": "search",
|
|
@@ -656,59 +656,59 @@ const Ss = {
|
|
|
656
656
|
)
|
|
657
657
|
}, null, 8, ["model-value", "placeholder"])
|
|
658
658
|
]),
|
|
659
|
-
t(
|
|
660
|
-
|
|
659
|
+
t(T).loading ? (m(), g("div", Sn, [
|
|
660
|
+
F(t(j), {
|
|
661
661
|
name: "progress_activity",
|
|
662
662
|
class: "text-[#FF7823] animate-spin"
|
|
663
663
|
})
|
|
664
|
-
])) : y.value.length === 0 ? (
|
|
665
|
-
(
|
|
664
|
+
])) : y.value.length === 0 ? (m(), g("div", Rn, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.noTemplatesAvailable")), 1)) : (m(), g("div", Dn, [
|
|
665
|
+
(m(!0), g(_e, null, Qe(y.value, (n) => (m(), g("div", {
|
|
666
666
|
key: n._id,
|
|
667
667
|
class: O([
|
|
668
668
|
"border rounded-lg px-16 py-12 cursor-pointer transition-all duration-150 flex items-center gap-12",
|
|
669
|
-
|
|
669
|
+
B.value === n._id ? "border-[#FF7823] bg-[#FFF5EE]" : "border-[#E0E0E0] bg-white hover:bg-[#FAFAFA]"
|
|
670
670
|
]),
|
|
671
|
-
onClick: (Y) =>
|
|
671
|
+
onClick: (Y) => B.value = n._id
|
|
672
672
|
}, [
|
|
673
673
|
e("div", Pn, [
|
|
674
674
|
e("div", qn, d(n.name), 1),
|
|
675
|
-
e("div", Tn, d(
|
|
675
|
+
e("div", Tn, d(_(n)) + " · " + d(n.purchaseOrder.items.length) + " items ", 1)
|
|
676
676
|
]),
|
|
677
677
|
e("div", {
|
|
678
678
|
class: O([
|
|
679
679
|
"w-[18px] h-[18px] rounded-full border flex items-center justify-center shrink-0 transition-colors duration-150",
|
|
680
|
-
|
|
680
|
+
B.value === n._id ? "border-[#FF7823]" : "border-[#CCCCCC]"
|
|
681
681
|
])
|
|
682
682
|
}, [
|
|
683
|
-
|
|
683
|
+
B.value === n._id ? (m(), g("div", Bn)) : $("", !0)
|
|
684
684
|
], 2)
|
|
685
685
|
], 10, En))), 128))
|
|
686
686
|
]))
|
|
687
|
-
], 64)) :
|
|
688
|
-
])) :
|
|
689
|
-
b.value === 2 ? (
|
|
690
|
-
e("div",
|
|
687
|
+
], 64)) : $("", !0)
|
|
688
|
+
])) : $("", !0),
|
|
689
|
+
b.value === 2 ? (m(), g("div", On, [
|
|
690
|
+
e("div", An, [
|
|
691
691
|
e("h3", Nn, d(r.value), 1)
|
|
692
692
|
]),
|
|
693
|
-
(
|
|
693
|
+
(m(), ie(is, {
|
|
694
694
|
ref_key: "formRef",
|
|
695
695
|
ref: Se,
|
|
696
696
|
class: "w-full",
|
|
697
697
|
"onForm:ready": o[7] || (o[7] = () => be.value = !0),
|
|
698
698
|
"onForm:dataChange": Pe,
|
|
699
|
-
onValidationSuccess:
|
|
700
|
-
modelValue:
|
|
701
|
-
"onUpdate:modelValue": o[8] || (o[8] = (n) =>
|
|
702
|
-
disabled:
|
|
703
|
-
"locked-supplier":
|
|
699
|
+
onValidationSuccess: Dt,
|
|
700
|
+
modelValue: P.value,
|
|
701
|
+
"onUpdate:modelValue": o[8] || (o[8] = (n) => P.value = n),
|
|
702
|
+
disabled: p.value,
|
|
703
|
+
"locked-supplier": P.value.supplier,
|
|
704
704
|
suppliers: t(ee).suppliers,
|
|
705
705
|
skus: t(X).skus,
|
|
706
706
|
key: se.value,
|
|
707
707
|
"last-closing-date": s.lastClosingDate,
|
|
708
|
-
"sku-balance-map":
|
|
709
|
-
"is-balance-loading":
|
|
708
|
+
"sku-balance-map": Oe.value,
|
|
709
|
+
"is-balance-loading": Be.value
|
|
710
710
|
}, null, 8, ["modelValue", "disabled", "locked-supplier", "suppliers", "skus", "last-closing-date", "sku-balance-map", "is-balance-loading"]))
|
|
711
|
-
])) :
|
|
711
|
+
])) : $("", !0)
|
|
712
712
|
]),
|
|
713
713
|
e("div", In, [
|
|
714
714
|
e("div", $n, [
|
|
@@ -720,13 +720,13 @@ const Ss = {
|
|
|
720
720
|
e("span", Un, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.summaryDestination")), 1),
|
|
721
721
|
e("span", {
|
|
722
722
|
class: O(["text-[15px] leading-[20px] font-semibold transition-colors duration-200", H.value ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
|
|
723
|
-
}, d(
|
|
724
|
-
re.value ? (
|
|
723
|
+
}, d(A.value), 3),
|
|
724
|
+
re.value ? (m(), g("span", jn, d(re.value), 1)) : $("", !0)
|
|
725
725
|
]),
|
|
726
726
|
e("div", Hn, [
|
|
727
727
|
e("span", Yn, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.summaryMethod")), 1),
|
|
728
728
|
e("span", {
|
|
729
|
-
class: O(["text-[15px] leading-[20px] font-semibold transition-colors duration-200",
|
|
729
|
+
class: O(["text-[15px] leading-[20px] font-semibold transition-colors duration-200", x.value ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
|
|
730
730
|
}, d(v.value), 3)
|
|
731
731
|
]),
|
|
732
732
|
e("div", Qn, [
|
|
@@ -734,27 +734,27 @@ const Ss = {
|
|
|
734
734
|
e("span", {
|
|
735
735
|
class: O([
|
|
736
736
|
"text-[15px] leading-[20px] font-semibold transition-colors duration-200",
|
|
737
|
-
u.value ||
|
|
737
|
+
u.value || B.value ? "text-[#1C1C1E]" : "text-[#B2B3B6]"
|
|
738
738
|
])
|
|
739
739
|
}, d(I.value), 3),
|
|
740
|
-
xe.value ? (
|
|
740
|
+
xe.value ? (m(), g("span", Zn, d(xe.value), 1)) : $("", !0)
|
|
741
741
|
]),
|
|
742
742
|
e("div", Kn, [
|
|
743
743
|
e("span", Jn, d(t(i)("inventory.transfer.receiveRequest.bulk.wizard.summaryItems")), 1),
|
|
744
744
|
e("span", {
|
|
745
|
-
class: O(["text-[15px] leading-[20px] font-medium transition-colors duration-200",
|
|
745
|
+
class: O(["text-[15px] leading-[20px] font-medium transition-colors duration-200", ke.value ? "text-[#1C1C1E]" : "text-[#6B6C70]"])
|
|
746
746
|
}, d(Ee.value), 3)
|
|
747
747
|
])
|
|
748
748
|
])
|
|
749
749
|
])
|
|
750
750
|
])
|
|
751
751
|
])
|
|
752
|
-
])) :
|
|
752
|
+
])) : $("", !0)
|
|
753
753
|
]),
|
|
754
754
|
_: 1
|
|
755
755
|
})
|
|
756
756
|
])),
|
|
757
|
-
|
|
757
|
+
F(t(U), {
|
|
758
758
|
modelValue: pe.value,
|
|
759
759
|
"onUpdate:modelValue": o[10] || (o[10] = (n) => pe.value = n),
|
|
760
760
|
overlay: !0
|
|
@@ -764,13 +764,13 @@ const Ss = {
|
|
|
764
764
|
]),
|
|
765
765
|
"dialog-footer": Fe(() => [
|
|
766
766
|
e("div", oo, [
|
|
767
|
-
|
|
767
|
+
F(t(z), {
|
|
768
768
|
label: t(i)("common.cancel"),
|
|
769
769
|
variant: "tertiary",
|
|
770
770
|
size: "md",
|
|
771
771
|
onClick: o[9] || (o[9] = (n) => pe.value = !1)
|
|
772
772
|
}, null, 8, ["label"]),
|
|
773
|
-
|
|
773
|
+
F(t(z), {
|
|
774
774
|
label: t(i)("inventory.transfer.template.zeroQuantity.removeAll"),
|
|
775
775
|
variant: "primary",
|
|
776
776
|
size: "md",
|
|
@@ -786,7 +786,7 @@ const Ss = {
|
|
|
786
786
|
})), 1),
|
|
787
787
|
e("div", to, [
|
|
788
788
|
e("ul", so, [
|
|
789
|
-
(
|
|
789
|
+
(m(!0), g(_e, null, Qe(fe.value, (n) => (m(), g("li", {
|
|
790
790
|
key: n.sku._id,
|
|
791
791
|
class: "fm-typo-en-body-md-400"
|
|
792
792
|
}, d(n.sku.name) + " (" + d(n.sku.code) + ") ", 1))), 128))
|
|
@@ -809,50 +809,50 @@ const Ss = {
|
|
|
809
809
|
}),
|
|
810
810
|
emits: ["update:modelValue"],
|
|
811
811
|
setup(ne) {
|
|
812
|
-
const { t: k } = We(),
|
|
813
|
-
const
|
|
814
|
-
return
|
|
815
|
-
(
|
|
816
|
-
) :
|
|
817
|
-
}), oe =
|
|
818
|
-
() => Z.value.length > 0 && Z.value.every((
|
|
819
|
-
),
|
|
820
|
-
() => Z.value.some((
|
|
821
|
-
), a =
|
|
812
|
+
const { t: k } = We(), z = ne, U = Tt(ne, "modelValue"), j = w(!1), D = w(""), Z = R(() => {
|
|
813
|
+
const q = D.value.trim().toLowerCase();
|
|
814
|
+
return q ? z.locations.filter(
|
|
815
|
+
(T) => T.name.toLowerCase().includes(q) || (T.doc.profile.code ?? "").toLowerCase().includes(q)
|
|
816
|
+
) : z.locations;
|
|
817
|
+
}), oe = R(() => U.value.length), i = R(
|
|
818
|
+
() => Z.value.length > 0 && Z.value.every((q) => U.value.includes(q.dbName))
|
|
819
|
+
), S = R(
|
|
820
|
+
() => Z.value.some((q) => U.value.includes(q.dbName)) && !i.value
|
|
821
|
+
), a = R(() => {
|
|
822
822
|
if (oe.value === 0) return k("inventory.transfer.receiveRequest.bulk.noLocationsSelected");
|
|
823
823
|
if (oe.value === 1) {
|
|
824
|
-
const
|
|
825
|
-
return
|
|
824
|
+
const q = z.locations.find((T) => T.dbName === U.value[0]);
|
|
825
|
+
return q ? `${q.name} (${q.doc.profile.code ?? "--"})` : U.value[0];
|
|
826
826
|
}
|
|
827
827
|
return k("inventory.transfer.receiveRequest.bulk.locationsSelected", [oe.value]);
|
|
828
828
|
});
|
|
829
829
|
function ee() {
|
|
830
|
-
const
|
|
831
|
-
i.value ? U.value = U.value.filter((
|
|
830
|
+
const q = Z.value.map((T) => T.dbName);
|
|
831
|
+
i.value ? U.value = U.value.filter((T) => !q.includes(T)) : U.value = [.../* @__PURE__ */ new Set([...U.value, ...q])];
|
|
832
832
|
}
|
|
833
|
-
function X(
|
|
834
|
-
U.value.includes(
|
|
833
|
+
function X(q) {
|
|
834
|
+
U.value.includes(q) ? U.value = U.value.filter((T) => T !== q) : U.value = [...U.value, q];
|
|
835
835
|
}
|
|
836
|
-
function
|
|
837
|
-
return U.value.includes(
|
|
836
|
+
function we(q) {
|
|
837
|
+
return U.value.includes(q);
|
|
838
838
|
}
|
|
839
|
-
return (
|
|
840
|
-
const b =
|
|
841
|
-
return
|
|
839
|
+
return (q, T) => {
|
|
840
|
+
const b = De("FmIcon"), ue = De("FmChip"), H = De("FmTextField"), te = De("FmMenuItem"), x = De("FmMenu");
|
|
841
|
+
return m(), ie(x, {
|
|
842
842
|
"model-value": j.value,
|
|
843
843
|
placement: "bottom-end",
|
|
844
844
|
"close-on-click": !1,
|
|
845
|
-
onMenuChanged:
|
|
846
|
-
j.value = u, u || (
|
|
845
|
+
onMenuChanged: T[1] || (T[1] = (u) => {
|
|
846
|
+
j.value = u, u || (D.value = "");
|
|
847
847
|
})
|
|
848
848
|
}, {
|
|
849
849
|
"menu-button": Fe(() => [
|
|
850
|
-
|
|
850
|
+
F(ue, {
|
|
851
851
|
label: a.value,
|
|
852
852
|
class: "text-fm-color-neutral-gray-400 cursor-pointer"
|
|
853
853
|
}, {
|
|
854
854
|
default: Fe(() => [
|
|
855
|
-
|
|
855
|
+
F(b, {
|
|
856
856
|
name: "storefront",
|
|
857
857
|
outline: "",
|
|
858
858
|
size: "sm"
|
|
@@ -860,7 +860,7 @@ const Ss = {
|
|
|
860
860
|
e("div", {
|
|
861
861
|
class: O(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap max-w-[200px]", { "text-fm-color-typo-primary": oe.value > 0 }])
|
|
862
862
|
}, d(a.value), 3),
|
|
863
|
-
|
|
863
|
+
F(b, {
|
|
864
864
|
name: j.value ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
865
865
|
outline: "",
|
|
866
866
|
size: "sm"
|
|
@@ -870,32 +870,32 @@ const Ss = {
|
|
|
870
870
|
}, 8, ["label"])
|
|
871
871
|
]),
|
|
872
872
|
default: Fe(() => [
|
|
873
|
-
|
|
874
|
-
"model-value":
|
|
875
|
-
"onUpdate:modelValue":
|
|
873
|
+
F(H, {
|
|
874
|
+
"model-value": D.value,
|
|
875
|
+
"onUpdate:modelValue": T[0] || (T[0] = (u) => D.value = u),
|
|
876
876
|
placeholder: t(k)("inventory.common.table.toolbar.filterItems"),
|
|
877
877
|
class: "my-8"
|
|
878
878
|
}, null, 8, ["model-value", "placeholder"]),
|
|
879
|
-
|
|
879
|
+
F(te, {
|
|
880
880
|
"model-value": i.value,
|
|
881
881
|
label: t(k)("inventory.common.selectAll"),
|
|
882
882
|
"has-checkbox": !0,
|
|
883
|
-
indeterminate:
|
|
883
|
+
indeterminate: S.value,
|
|
884
884
|
onClick: ee
|
|
885
885
|
}, null, 8, ["model-value", "label", "indeterminate"]),
|
|
886
|
-
(
|
|
886
|
+
(m(!0), g(_e, null, Qe(Z.value, (u) => (m(), ie(te, {
|
|
887
887
|
key: u.dbName,
|
|
888
|
-
"model-value":
|
|
888
|
+
"model-value": we(u.dbName),
|
|
889
889
|
label: `${u.name} (${u.doc.profile.code ?? "--"})`,
|
|
890
890
|
sublabel: u.type === "restaurant" ? t(k)("inventory.common.restaurant") : t(k)("inventory.common.warehouse"),
|
|
891
891
|
"has-checkbox": !0,
|
|
892
|
-
onClick: (
|
|
892
|
+
onClick: (B) => X(u.dbName)
|
|
893
893
|
}, null, 8, ["model-value", "label", "sublabel", "onClick"]))), 128)),
|
|
894
|
-
Z.value.length === 0 ? (
|
|
894
|
+
Z.value.length === 0 ? (m(), ie(te, {
|
|
895
895
|
key: 0,
|
|
896
896
|
disabled: "",
|
|
897
897
|
label: t(k)("inventory.common.noResultFound")
|
|
898
|
-
}, null, 8, ["label"])) :
|
|
898
|
+
}, null, 8, ["label"])) : $("", !0)
|
|
899
899
|
]),
|
|
900
900
|
_: 1
|
|
901
901
|
}, 8, ["model-value"]);
|
|
@@ -903,17 +903,17 @@ const Ss = {
|
|
|
903
903
|
}
|
|
904
904
|
}), Ye = w(), ot = w(), at = w();
|
|
905
905
|
function lo(ne) {
|
|
906
|
-
const k = rs(),
|
|
906
|
+
const k = rs(), z = et(), U = Rt(), j = Ct(), D = kt(), Z = vs(), oe = St(), i = w(!1), S = ut(), { t: a } = We(), ee = Ft(), X = jt(), we = w([]), q = w([]), T = w(new Array()), b = w(
|
|
907
907
|
new Array()
|
|
908
908
|
), ue = w(
|
|
909
909
|
ne != null && ne.startDate && (ne != null && ne.endDate) ? ne : rt()
|
|
910
|
-
), H =
|
|
911
|
-
const
|
|
910
|
+
), H = R(() => {
|
|
911
|
+
const p = new Date(ue.value.startDate), f = new Date(ue.value.endDate);
|
|
912
912
|
return {
|
|
913
|
-
start: ks(
|
|
913
|
+
start: ks(p).toISOString(),
|
|
914
914
|
end: Cs(f).toISOString()
|
|
915
915
|
};
|
|
916
|
-
}), te = It(),
|
|
916
|
+
}), te = It(), x = w(null), u = Bt({
|
|
917
917
|
visible: !1,
|
|
918
918
|
title: "",
|
|
919
919
|
current: 0,
|
|
@@ -921,47 +921,47 @@ function lo(ne) {
|
|
|
921
921
|
done: !1,
|
|
922
922
|
cancelled: !1
|
|
923
923
|
});
|
|
924
|
-
function
|
|
925
|
-
const f =
|
|
924
|
+
function B(p) {
|
|
925
|
+
const f = z.locations.find((C) => C.dbName === p._locationDbName);
|
|
926
926
|
if (!f) return null;
|
|
927
927
|
if (f.type === "restaurant") {
|
|
928
|
-
const C =
|
|
928
|
+
const C = z.locationRestaurantFromCore(f.doc._id);
|
|
929
929
|
if (C !== null)
|
|
930
930
|
return { ...f, doc: C };
|
|
931
931
|
}
|
|
932
932
|
return f;
|
|
933
933
|
}
|
|
934
|
-
function me(
|
|
935
|
-
const f =
|
|
936
|
-
f && (
|
|
934
|
+
function me(p) {
|
|
935
|
+
const f = z.locations.find((C) => C.dbName === p._locationDbName);
|
|
936
|
+
f && (z._currentLocation = f);
|
|
937
937
|
}
|
|
938
938
|
async function ce() {
|
|
939
|
-
if (
|
|
939
|
+
if (q.value = [], T.value = [], we.value.length !== 0) {
|
|
940
940
|
i.value = !0;
|
|
941
941
|
try {
|
|
942
|
-
const f = vt(
|
|
942
|
+
const f = vt(we.value, 5), C = [];
|
|
943
943
|
for (const y of f) {
|
|
944
944
|
const M = await Promise.allSettled(
|
|
945
|
-
y.map(async (
|
|
945
|
+
y.map(async (A) => (await ee.getPurchaseOrders({
|
|
946
946
|
...H.value,
|
|
947
|
-
dbName:
|
|
948
|
-
})).map((I) => ({ ...I, _locationDbName:
|
|
947
|
+
dbName: A
|
|
948
|
+
})).map((I) => ({ ...I, _locationDbName: A })))
|
|
949
949
|
);
|
|
950
|
-
for (const
|
|
951
|
-
|
|
950
|
+
for (const A of M)
|
|
951
|
+
A.status === "fulfilled" && C.push(...A.value);
|
|
952
952
|
}
|
|
953
|
-
|
|
954
|
-
const
|
|
955
|
-
|
|
953
|
+
q.value = C.sort((y, M) => M._id.localeCompare(y._id));
|
|
954
|
+
const E = q.value.flatMap((y) => y.shipmentIds || []).filter(Boolean), l = E.length > 0 ? await X.getShipmentsByIds(E) : [];
|
|
955
|
+
T.value = l;
|
|
956
956
|
const r = await te.readCurrentLocationLastClosing(!0), c = r == null ? void 0 : r._id;
|
|
957
|
-
c && (
|
|
958
|
-
const h =
|
|
957
|
+
c && (x.value = Fs(c)), await U.awaitFeatureLoaded(() => U.mustUsePoTemplate) && await oe.fetchTemplates();
|
|
958
|
+
const h = q.value.map((y) => {
|
|
959
959
|
var M;
|
|
960
960
|
return ((M = y.request) == null ? void 0 : M.id) ?? "";
|
|
961
961
|
}).filter((y) => y);
|
|
962
962
|
h.length > 0 && (b.value = await ee.readRequestByIds(h));
|
|
963
963
|
} catch {
|
|
964
|
-
|
|
964
|
+
S.open({
|
|
965
965
|
title: "Something went wrong",
|
|
966
966
|
message: "Error at fetching purchase orders",
|
|
967
967
|
type: "error"
|
|
@@ -971,71 +971,71 @@ function lo(ne) {
|
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
|
-
function K(
|
|
975
|
-
ue.value = { startDate:
|
|
974
|
+
function K(p, f) {
|
|
975
|
+
ue.value = { startDate: p, endDate: f }, ce();
|
|
976
976
|
}
|
|
977
977
|
const ye = w();
|
|
978
|
-
async function be(
|
|
979
|
-
const f =
|
|
978
|
+
async function be(p) {
|
|
979
|
+
const f = we.value[0];
|
|
980
980
|
if (f) {
|
|
981
|
-
const l =
|
|
982
|
-
l && (
|
|
981
|
+
const l = z.locations.find((r) => r.dbName === f);
|
|
982
|
+
l && (z._currentLocation = l);
|
|
983
983
|
}
|
|
984
984
|
function C(l) {
|
|
985
985
|
const r = {
|
|
986
986
|
mode: xt.CREATE,
|
|
987
|
-
modelValue:
|
|
987
|
+
modelValue: p || void 0,
|
|
988
988
|
show: !0,
|
|
989
989
|
"onUpdate:show"(c) {
|
|
990
990
|
Ye.value.show = c;
|
|
991
991
|
},
|
|
992
992
|
templateId: l,
|
|
993
|
-
lastClosingDate:
|
|
993
|
+
lastClosingDate: x.value
|
|
994
994
|
};
|
|
995
995
|
Ye.value = r;
|
|
996
996
|
}
|
|
997
|
-
let
|
|
998
|
-
U.mustUsePoTemplate && !(
|
|
997
|
+
let E;
|
|
998
|
+
U.mustUsePoTemplate && !(p != null && p.template) ? k.open({
|
|
999
999
|
title: "Create transfer",
|
|
1000
1000
|
message: "",
|
|
1001
1001
|
primaryActions: { text: "Select a template", close: !0 },
|
|
1002
1002
|
secondaryActions: { text: "Outlet to Outlet", variant: "secondary", close: !0 }
|
|
1003
1003
|
}).onPrimary(async () => {
|
|
1004
|
-
|
|
1004
|
+
E = await Z.getTemplateId(), E && C(E);
|
|
1005
1005
|
}).onSecondary(() => {
|
|
1006
1006
|
C(void 0);
|
|
1007
|
-
}) : C(
|
|
1007
|
+
}) : C(E);
|
|
1008
1008
|
}
|
|
1009
|
-
function pe(
|
|
1010
|
-
me(
|
|
1009
|
+
function pe(p) {
|
|
1010
|
+
me(p);
|
|
1011
1011
|
const f = {
|
|
1012
1012
|
mode: xt.UPDATE,
|
|
1013
|
-
modelValue: $t(
|
|
1013
|
+
modelValue: $t(p),
|
|
1014
1014
|
show: !0,
|
|
1015
1015
|
"onUpdate:show"(C) {
|
|
1016
1016
|
Ye.value.show = C;
|
|
1017
1017
|
},
|
|
1018
|
-
lastClosingDate:
|
|
1018
|
+
lastClosingDate: x.value
|
|
1019
1019
|
};
|
|
1020
1020
|
Ye.value = f;
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1023
|
-
if (me(
|
|
1024
|
-
const f =
|
|
1022
|
+
function Be(p) {
|
|
1023
|
+
if (me(p), !D.currentBusiness.value) return;
|
|
1024
|
+
const f = B(p);
|
|
1025
1025
|
if (!f) return;
|
|
1026
1026
|
const C = nt({
|
|
1027
|
-
po:
|
|
1027
|
+
po: p,
|
|
1028
1028
|
currentLocation: f,
|
|
1029
|
-
business:
|
|
1029
|
+
business: D.currentBusiness.value,
|
|
1030
1030
|
fulfilling: !1,
|
|
1031
|
-
por:
|
|
1031
|
+
por: p.request
|
|
1032
1032
|
});
|
|
1033
1033
|
if (!C) return;
|
|
1034
|
-
const
|
|
1034
|
+
const E = gt(C.html), l = j.supplierById[p.supplier._id], r = {
|
|
1035
1035
|
recipientName: l == null ? void 0 : l.name,
|
|
1036
1036
|
email: (l == null ? void 0 : l.email) ?? "",
|
|
1037
|
-
business:
|
|
1038
|
-
modelValue:
|
|
1037
|
+
business: D.currentBusiness.value,
|
|
1038
|
+
modelValue: E,
|
|
1039
1039
|
show: !0,
|
|
1040
1040
|
"onUpdate:show"(c) {
|
|
1041
1041
|
ot.value.show = c;
|
|
@@ -1043,13 +1043,13 @@ function lo(ne) {
|
|
|
1043
1043
|
};
|
|
1044
1044
|
ot.value = r;
|
|
1045
1045
|
}
|
|
1046
|
-
async function
|
|
1047
|
-
me(
|
|
1048
|
-
const
|
|
1046
|
+
async function Oe(p, f) {
|
|
1047
|
+
me(p), f ?? (f = b.value.find((r) => r.purchaseOrderId === p._id) ?? void 0);
|
|
1048
|
+
const E = B(p), l = {
|
|
1049
1049
|
poRequest: f,
|
|
1050
|
-
purchaseOrder:
|
|
1051
|
-
transferTo:
|
|
1052
|
-
transferToDbName:
|
|
1050
|
+
purchaseOrder: p,
|
|
1051
|
+
transferTo: E == null ? void 0 : E.name,
|
|
1052
|
+
transferToDbName: E == null ? void 0 : E.dbName,
|
|
1053
1053
|
show: !0,
|
|
1054
1054
|
canResubmit: !1,
|
|
1055
1055
|
canApprove: !1,
|
|
@@ -1057,52 +1057,52 @@ function lo(ne) {
|
|
|
1057
1057
|
ye.value.show = r;
|
|
1058
1058
|
},
|
|
1059
1059
|
scope: it.RECEIVE_REQUEST,
|
|
1060
|
-
receivedMap: Ht(
|
|
1061
|
-
shipments:
|
|
1060
|
+
receivedMap: Ht(p) ?? {},
|
|
1061
|
+
shipments: T.value
|
|
1062
1062
|
};
|
|
1063
1063
|
ye.value = l;
|
|
1064
1064
|
}
|
|
1065
|
-
async function Se(
|
|
1065
|
+
async function Se(p, f, C, E, l) {
|
|
1066
1066
|
const r = Wt();
|
|
1067
1067
|
i.value = !0;
|
|
1068
1068
|
try {
|
|
1069
1069
|
await r({
|
|
1070
1070
|
operate: {
|
|
1071
1071
|
operation: f,
|
|
1072
|
-
doc:
|
|
1073
|
-
options: (f ===
|
|
1072
|
+
doc: p,
|
|
1073
|
+
options: (f === Ae.enum.confirmDraft || f === Ae.enum.completeReceive) && U.autoReceiveWarehouse ? { autoReceive: !0 } : void 0
|
|
1074
1074
|
},
|
|
1075
1075
|
operateV2: {
|
|
1076
|
-
_id:
|
|
1077
|
-
_rev:
|
|
1078
|
-
action: f ===
|
|
1076
|
+
_id: p._id,
|
|
1077
|
+
_rev: p._rev ?? "",
|
|
1078
|
+
action: f === Ae.enum.submitRequest ? Ae.enum.confirmDraft : f,
|
|
1079
1079
|
payloads: l ?? []
|
|
1080
1080
|
},
|
|
1081
|
-
transferTo:
|
|
1082
|
-
}), await new Promise((c) => setTimeout(c, 1e3)),
|
|
1081
|
+
transferTo: E
|
|
1082
|
+
}), await new Promise((c) => setTimeout(c, 1e3)), S.open({ title: "Success", message: C, type: "success" });
|
|
1083
1083
|
} catch (c) {
|
|
1084
|
-
|
|
1084
|
+
S.open({
|
|
1085
1085
|
title: "Something went wrong",
|
|
1086
1086
|
message: "Please try again.",
|
|
1087
1087
|
type: "error"
|
|
1088
|
-
}), console.error("Error when submitting PO operation", f,
|
|
1088
|
+
}), console.error("Error when submitting PO operation", f, p, c);
|
|
1089
1089
|
} finally {
|
|
1090
1090
|
i.value = !1, ce();
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
1093
|
-
async function ae(
|
|
1094
|
-
me(
|
|
1095
|
-
const
|
|
1096
|
-
if (!
|
|
1097
|
-
|
|
1093
|
+
async function ae(p, f, C) {
|
|
1094
|
+
me(p);
|
|
1095
|
+
const E = Zt[f];
|
|
1096
|
+
if (!E) {
|
|
1097
|
+
S.open({
|
|
1098
1098
|
title: "Something went wrong",
|
|
1099
1099
|
message: `Cannot process order: ${zt(f)}`,
|
|
1100
1100
|
type: "error"
|
|
1101
1101
|
});
|
|
1102
1102
|
return;
|
|
1103
1103
|
}
|
|
1104
|
-
const { successMessage: l, ...r } =
|
|
1105
|
-
if (f ===
|
|
1104
|
+
const { successMessage: l, ...r } = E;
|
|
1105
|
+
if (f === Ae.enum.rejectDraft) {
|
|
1106
1106
|
let y = "";
|
|
1107
1107
|
k.open({
|
|
1108
1108
|
title: r.title,
|
|
@@ -1114,14 +1114,14 @@ function lo(ne) {
|
|
|
1114
1114
|
onChange: (M) => y = M
|
|
1115
1115
|
}
|
|
1116
1116
|
}).onPrimary(() => {
|
|
1117
|
-
Se(
|
|
1117
|
+
Se(p, f, l, C, [
|
|
1118
1118
|
{ action: "rejectDraft", payload: { rejectReason: y } }
|
|
1119
1119
|
]);
|
|
1120
1120
|
});
|
|
1121
1121
|
return;
|
|
1122
1122
|
}
|
|
1123
1123
|
const c = [], h = Qt();
|
|
1124
|
-
h.init(
|
|
1124
|
+
h.init(p), (f === Ae.enum.confirmDraft || f === Ae.enum.submitRequest) && c.push({
|
|
1125
1125
|
action: "confirmDraft",
|
|
1126
1126
|
payload: h.controller.value.toConfirmDraftData(Lt())
|
|
1127
1127
|
}), k.open({
|
|
@@ -1130,7 +1130,7 @@ function lo(ne) {
|
|
|
1130
1130
|
primaryActions: r.primaryActions
|
|
1131
1131
|
}).onPrimary(() => {
|
|
1132
1132
|
Se(
|
|
1133
|
-
|
|
1133
|
+
p,
|
|
1134
1134
|
f,
|
|
1135
1135
|
l,
|
|
1136
1136
|
C,
|
|
@@ -1144,47 +1144,47 @@ function lo(ne) {
|
|
|
1144
1144
|
primaryActions: { text: "Xilnex transfer note", close: !0 },
|
|
1145
1145
|
secondaryActions: { text: "Cancel", close: !0 }
|
|
1146
1146
|
}).onPrimary(() => {
|
|
1147
|
-
const
|
|
1147
|
+
const p = {
|
|
1148
1148
|
show: !0,
|
|
1149
1149
|
"onUpdate:show"(f) {
|
|
1150
1150
|
at.value.show = f;
|
|
1151
1151
|
}
|
|
1152
1152
|
};
|
|
1153
|
-
at.value =
|
|
1153
|
+
at.value = p;
|
|
1154
1154
|
});
|
|
1155
1155
|
}
|
|
1156
|
-
async function Ne(
|
|
1156
|
+
async function Ne(p) {
|
|
1157
1157
|
var c, h;
|
|
1158
1158
|
const { startDate: f, endDate: C } = ue.value;
|
|
1159
1159
|
if (Te(C).diff(Te(f), "month", !0) > 2) {
|
|
1160
|
-
|
|
1160
|
+
S.open({
|
|
1161
1161
|
title: a("inventory.transfer.receiveRequest.bulk.downloadError"),
|
|
1162
1162
|
message: a("inventory.transfer.receiveRequest.bulk.downloadLimitExceeded"),
|
|
1163
1163
|
type: "error"
|
|
1164
1164
|
});
|
|
1165
1165
|
return;
|
|
1166
1166
|
}
|
|
1167
|
-
if (
|
|
1168
|
-
|
|
1167
|
+
if (p.length === 0) {
|
|
1168
|
+
S.open({
|
|
1169
1169
|
title: a("inventory.transfer.receiveRequest.bulk.downloadError"),
|
|
1170
1170
|
message: a("inventory.transfer.receiveRequest.bulk.noOrdersToDownload"),
|
|
1171
1171
|
type: "warning"
|
|
1172
1172
|
});
|
|
1173
1173
|
return;
|
|
1174
1174
|
}
|
|
1175
|
-
const
|
|
1175
|
+
const E = (await import("./jszip.min-UvNpneu6.js").then((y) => y.j)).default, l = new E();
|
|
1176
1176
|
let r = 0;
|
|
1177
|
-
u.title = a("inventory.transfer.receiveRequest.bulk.downloadProgress"), u.current = 0, u.total =
|
|
1177
|
+
u.title = a("inventory.transfer.receiveRequest.bulk.downloadProgress"), u.current = 0, u.total = p.length, u.done = !1, u.cancelled = !1, u.visible = !0, await tt(), await new Promise((y) => setTimeout(y, 150));
|
|
1178
1178
|
try {
|
|
1179
|
-
for (const v of
|
|
1179
|
+
for (const v of p) {
|
|
1180
1180
|
if (u.cancelled) break;
|
|
1181
1181
|
try {
|
|
1182
|
-
const I =
|
|
1182
|
+
const I = B(v);
|
|
1183
1183
|
if (!I) continue;
|
|
1184
1184
|
const de = nt({
|
|
1185
1185
|
po: v,
|
|
1186
1186
|
currentLocation: I,
|
|
1187
|
-
business:
|
|
1187
|
+
business: D.currentBusiness.value,
|
|
1188
1188
|
fulfilling: !1,
|
|
1189
1189
|
por: b.value.find((V) => V.purchaseOrderId === v._id)
|
|
1190
1190
|
});
|
|
@@ -1221,8 +1221,8 @@ function lo(ne) {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
}).from(Q.body).toPdf().outputPdf("blob");
|
|
1223
1223
|
document.body.removeChild(G);
|
|
1224
|
-
const
|
|
1225
|
-
l.file(`${
|
|
1224
|
+
const _ = `${((h = z.locations.find((V) => V.dbName === v._locationDbName)) == null ? void 0 : h.name) || v._locationDbName}_PO_${v.seqNumber || v._id}`.replace(/[/\\?%*:|"<>]/g, "-").slice(0, 100);
|
|
1225
|
+
l.file(`${_}.pdf`, xe);
|
|
1226
1226
|
} catch (I) {
|
|
1227
1227
|
console.error("Failed to generate PDF for PO", v._id, I);
|
|
1228
1228
|
}
|
|
@@ -1230,16 +1230,16 @@ function lo(ne) {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
if (u.cancelled) return;
|
|
1232
1232
|
u.done = !0, await new Promise((v) => setTimeout(v, 500));
|
|
1233
|
-
const y = await l.generateAsync({ type: "blob", compression: "DEFLATE" }), M = URL.createObjectURL(y),
|
|
1234
|
-
|
|
1233
|
+
const y = await l.generateAsync({ type: "blob", compression: "DEFLATE" }), M = URL.createObjectURL(y), A = document.createElement("a");
|
|
1234
|
+
A.href = M, A.download = `purchase-orders-${Te().format("YYYY-MM-DD")}.zip`, A.click(), URL.revokeObjectURL(M), S.open({
|
|
1235
1235
|
title: a("inventory.transfer.receiveRequest.bulk.downloadSuccess"),
|
|
1236
1236
|
message: a("inventory.transfer.receiveRequest.bulk.downloadSuccessMsg", [
|
|
1237
|
-
|
|
1237
|
+
p.length
|
|
1238
1238
|
]),
|
|
1239
1239
|
type: "success"
|
|
1240
1240
|
});
|
|
1241
1241
|
} catch (y) {
|
|
1242
|
-
console.error("Bulk download failed", y),
|
|
1242
|
+
console.error("Bulk download failed", y), S.open({
|
|
1243
1243
|
title: a("inventory.transfer.receiveRequest.bulk.downloadError"),
|
|
1244
1244
|
message: a("inventory.transfer.receiveRequest.bulk.downloadErrorMsg"),
|
|
1245
1245
|
type: "error"
|
|
@@ -1248,53 +1248,53 @@ function lo(ne) {
|
|
|
1248
1248
|
u.visible = !1;
|
|
1249
1249
|
}
|
|
1250
1250
|
}
|
|
1251
|
-
async function
|
|
1251
|
+
async function ke(p) {
|
|
1252
1252
|
var Ee;
|
|
1253
1253
|
const f = [
|
|
1254
1254
|
yt.enum.RECEIVING,
|
|
1255
1255
|
yt.enum.PROCESSING
|
|
1256
1256
|
// PARTIAL_RECEIVED display status maps from PROCESSING
|
|
1257
|
-
], C =
|
|
1257
|
+
], C = p.filter((_) => f.includes(_.status));
|
|
1258
1258
|
if (C.length === 0) {
|
|
1259
|
-
|
|
1259
|
+
S.open({
|
|
1260
1260
|
title: a("inventory.transfer.receiveRequest.bulk.emailSendError"),
|
|
1261
1261
|
message: a("inventory.transfer.receiveRequest.bulk.noOrdersToEmail"),
|
|
1262
1262
|
type: "warning"
|
|
1263
1263
|
});
|
|
1264
1264
|
return;
|
|
1265
1265
|
}
|
|
1266
|
-
if (!((Ee =
|
|
1267
|
-
const
|
|
1266
|
+
if (!((Ee = D.currentBusiness.value) != null && Ee._id)) return;
|
|
1267
|
+
const E = us(), l = ps(), r = /* @__PURE__ */ new Map(), c = z.locations.map((_) => _.dbName), h = `business_${D.currentBusiness.value._id}`, y = [.../* @__PURE__ */ new Set([...c, h])];
|
|
1268
1268
|
await Promise.allSettled(
|
|
1269
|
-
y.map(async (
|
|
1269
|
+
y.map(async (_) => {
|
|
1270
1270
|
try {
|
|
1271
|
-
(await l.readSuppliersByDbName(
|
|
1272
|
-
const
|
|
1273
|
-
(!
|
|
1271
|
+
(await l.readSuppliersByDbName(_)).forEach((N) => {
|
|
1272
|
+
const L = r.get(N._id);
|
|
1273
|
+
(!L || !L.email && N.email) && r.set(N._id, N);
|
|
1274
1274
|
});
|
|
1275
1275
|
} catch (V) {
|
|
1276
|
-
console.warn("[emailAll] fetch failed for",
|
|
1276
|
+
console.warn("[emailAll] fetch failed for", _, V);
|
|
1277
1277
|
}
|
|
1278
1278
|
})
|
|
1279
1279
|
);
|
|
1280
|
-
function M(
|
|
1280
|
+
function M(_) {
|
|
1281
1281
|
var N;
|
|
1282
|
-
const V = r.get(
|
|
1283
|
-
return (V == null ? void 0 : V.email) || ((N =
|
|
1282
|
+
const V = r.get(_.supplier._id);
|
|
1283
|
+
return (V == null ? void 0 : V.email) || ((N = _.supplier) == null ? void 0 : N.email);
|
|
1284
1284
|
}
|
|
1285
|
-
const
|
|
1286
|
-
for (const
|
|
1287
|
-
M(
|
|
1285
|
+
const A = [], v = [];
|
|
1286
|
+
for (const _ of C)
|
|
1287
|
+
M(_) ? A.push(_) : v.push(_);
|
|
1288
1288
|
const I = ve(
|
|
1289
1289
|
"p",
|
|
1290
1290
|
{ class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" },
|
|
1291
1291
|
a("inventory.transfer.receiveRequest.bulk.emailAllowedStatusInfo")
|
|
1292
1292
|
);
|
|
1293
1293
|
if (v.length > 0) {
|
|
1294
|
-
const
|
|
1295
|
-
for (const
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1294
|
+
const _ = /* @__PURE__ */ new Map();
|
|
1295
|
+
for (const L of v) {
|
|
1296
|
+
const P = L.supplier._id;
|
|
1297
|
+
_.has(P) || _.set(P, { supplierName: L.supplier.name, pos: [] }), _.get(P).pos.push(L);
|
|
1298
1298
|
}
|
|
1299
1299
|
const V = ve("div", { class: "flex flex-col gap-12" }, [
|
|
1300
1300
|
I,
|
|
@@ -1306,13 +1306,13 @@ function lo(ne) {
|
|
|
1306
1306
|
ve(
|
|
1307
1307
|
"div",
|
|
1308
1308
|
{ class: "flex flex-col gap-4 max-h-[320px] overflow-y-auto rounded-md border border-fm-color-neutral-gray-100 p-8" },
|
|
1309
|
-
[...
|
|
1310
|
-
({ supplierName:
|
|
1311
|
-
ve("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" },
|
|
1309
|
+
[..._.values()].map(
|
|
1310
|
+
({ supplierName: L, pos: P }) => ve("div", { class: "flex flex-col gap-2 py-6 border-b border-fm-color-neutral-gray-100 last:border-0" }, [
|
|
1311
|
+
ve("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, L),
|
|
1312
1312
|
ve(
|
|
1313
1313
|
"div",
|
|
1314
1314
|
{ class: "flex flex-wrap gap-4" },
|
|
1315
|
-
|
|
1315
|
+
P.map(
|
|
1316
1316
|
(se) => ve("span", {
|
|
1317
1317
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 rounded px-6 py-2"
|
|
1318
1318
|
}, `PO #${se.seqNumber ?? se._id}`)
|
|
@@ -1324,7 +1324,7 @@ function lo(ne) {
|
|
|
1324
1324
|
ve(
|
|
1325
1325
|
"p",
|
|
1326
1326
|
{ class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" },
|
|
1327
|
-
a("inventory.transfer.receiveRequest.bulk.emailWillSendCount", [
|
|
1327
|
+
a("inventory.transfer.receiveRequest.bulk.emailWillSendCount", [A.length, C.length])
|
|
1328
1328
|
),
|
|
1329
1329
|
ve(
|
|
1330
1330
|
"p",
|
|
@@ -1332,7 +1332,7 @@ function lo(ne) {
|
|
|
1332
1332
|
a("inventory.transfer.receiveRequest.bulk.missingEmailConfirm")
|
|
1333
1333
|
)
|
|
1334
1334
|
]);
|
|
1335
|
-
if (!await new Promise((
|
|
1335
|
+
if (!await new Promise((L) => {
|
|
1336
1336
|
k.open({
|
|
1337
1337
|
title: a("inventory.transfer.receiveRequest.bulk.missingEmailTitle"),
|
|
1338
1338
|
contentComponent: V,
|
|
@@ -1342,21 +1342,21 @@ function lo(ne) {
|
|
|
1342
1342
|
close: !0
|
|
1343
1343
|
},
|
|
1344
1344
|
secondaryActions: { text: a("inventory.common.cancel"), close: !0 }
|
|
1345
|
-
}).onPrimary(() =>
|
|
1345
|
+
}).onPrimary(() => L(!0)).onSecondary(() => L(!1));
|
|
1346
1346
|
})) return;
|
|
1347
1347
|
} else {
|
|
1348
|
-
const
|
|
1348
|
+
const _ = ve("div", { class: "flex flex-col gap-12" }, [
|
|
1349
1349
|
I,
|
|
1350
1350
|
ve(
|
|
1351
1351
|
"p",
|
|
1352
1352
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1353
|
-
a("inventory.transfer.receiveRequest.bulk.emailAllConfirmMsg", [
|
|
1353
|
+
a("inventory.transfer.receiveRequest.bulk.emailAllConfirmMsg", [A.length])
|
|
1354
1354
|
)
|
|
1355
1355
|
]);
|
|
1356
1356
|
if (!await new Promise((N) => {
|
|
1357
1357
|
k.open({
|
|
1358
1358
|
title: a("inventory.transfer.receiveRequest.bulk.missingEmailTitle"),
|
|
1359
|
-
contentComponent:
|
|
1359
|
+
contentComponent: _,
|
|
1360
1360
|
contentComponentProps: {},
|
|
1361
1361
|
primaryActions: {
|
|
1362
1362
|
text: a("inventory.transfer.receiveRequest.bulk.emailConfirm"),
|
|
@@ -1366,8 +1366,8 @@ function lo(ne) {
|
|
|
1366
1366
|
}).onPrimary(() => N(!0)).onSecondary(() => N(!1));
|
|
1367
1367
|
})) return;
|
|
1368
1368
|
}
|
|
1369
|
-
if (
|
|
1370
|
-
|
|
1369
|
+
if (A.length === 0) {
|
|
1370
|
+
S.open({
|
|
1371
1371
|
title: a("inventory.transfer.receiveRequest.bulk.emailSendError"),
|
|
1372
1372
|
message: a("inventory.transfer.receiveRequest.bulk.noEmailsToSend"),
|
|
1373
1373
|
type: "warning"
|
|
@@ -1376,94 +1376,94 @@ function lo(ne) {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
let de = [];
|
|
1378
1378
|
try {
|
|
1379
|
-
de = await
|
|
1379
|
+
de = await E.getEmailList(D.currentBusiness.value._id);
|
|
1380
1380
|
} catch {
|
|
1381
|
-
|
|
1381
|
+
S.open({
|
|
1382
1382
|
title: a("inventory.transfer.receiveRequest.bulk.emailSendError"),
|
|
1383
1383
|
message: a("inventory.transfer.receiveRequest.bulk.noEmailSender"),
|
|
1384
1384
|
type: "error"
|
|
1385
1385
|
});
|
|
1386
1386
|
return;
|
|
1387
1387
|
}
|
|
1388
|
-
const ge = de.find((
|
|
1388
|
+
const ge = de.find((_) => _.verified);
|
|
1389
1389
|
if (!ge) {
|
|
1390
|
-
|
|
1390
|
+
S.open({
|
|
1391
1391
|
title: a("inventory.transfer.receiveRequest.bulk.emailSendError"),
|
|
1392
1392
|
message: a("inventory.transfer.receiveRequest.bulk.noEmailSender"),
|
|
1393
1393
|
type: "error"
|
|
1394
1394
|
});
|
|
1395
1395
|
return;
|
|
1396
1396
|
}
|
|
1397
|
-
const Q = vt(
|
|
1397
|
+
const Q = vt(A, 2);
|
|
1398
1398
|
let re = 0;
|
|
1399
1399
|
const xe = [];
|
|
1400
|
-
u.title = a("inventory.transfer.receiveRequest.bulk.emailProgress"), u.current = 0, u.total =
|
|
1400
|
+
u.title = a("inventory.transfer.receiveRequest.bulk.emailProgress"), u.current = 0, u.total = A.length, u.done = !1, u.cancelled = !1, u.visible = !0, await tt(), await new Promise((_) => setTimeout(_, 100));
|
|
1401
1401
|
try {
|
|
1402
|
-
for (let
|
|
1403
|
-
const V = Q[
|
|
1402
|
+
for (let _ = 0; _ < Q.length; _++) {
|
|
1403
|
+
const V = Q[_];
|
|
1404
1404
|
await Promise.allSettled(
|
|
1405
1405
|
V.map(async (N) => {
|
|
1406
|
-
var
|
|
1407
|
-
const
|
|
1408
|
-
|
|
1406
|
+
var P;
|
|
1407
|
+
const L = document.createElement("div");
|
|
1408
|
+
L.style.cssText = "position:fixed;left:-99999px;top:0;width:210mm;background:white;z-index:-1;opacity:0;pointer-events:none;", document.body.appendChild(L);
|
|
1409
1409
|
try {
|
|
1410
|
-
const se =
|
|
1410
|
+
const se = B(N);
|
|
1411
1411
|
if (!se) return;
|
|
1412
1412
|
const fe = nt({
|
|
1413
1413
|
po: N,
|
|
1414
1414
|
currentLocation: se,
|
|
1415
|
-
business:
|
|
1415
|
+
business: D.currentBusiness.value,
|
|
1416
1416
|
fulfilling: !1,
|
|
1417
1417
|
por: b.value.find((Pe) => Pe.purchaseOrderId === N._id)
|
|
1418
1418
|
});
|
|
1419
1419
|
if (!fe) return;
|
|
1420
|
-
const Ie = gt(fe.html),
|
|
1421
|
-
for (;
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
const
|
|
1420
|
+
const Ie = gt(fe.html), Re = new DOMParser().parseFromString(fe.html, "text/html");
|
|
1421
|
+
for (; Re.body.firstChild; )
|
|
1422
|
+
L.appendChild(Re.body.firstChild);
|
|
1423
|
+
Re.head.querySelectorAll("style").forEach((Pe) => L.prepend(Pe.cloneNode(!0)));
|
|
1424
|
+
const Ce = await ht().set({
|
|
1425
1425
|
margin: 10,
|
|
1426
1426
|
html2canvas: { scale: 2, useCORS: !0, letterRendering: !0 },
|
|
1427
1427
|
jsPDF: { unit: "mm", format: "a4", orientation: "portrait" }
|
|
1428
|
-
}).from(
|
|
1429
|
-
if (!
|
|
1430
|
-
await
|
|
1431
|
-
businessId:
|
|
1428
|
+
}).from(L).outputPdf("blob");
|
|
1429
|
+
if (!Ce) return;
|
|
1430
|
+
await E.sendMailFormData({
|
|
1431
|
+
businessId: D.currentBusiness.value._id,
|
|
1432
1432
|
from: {
|
|
1433
|
-
name: ge.name || ((
|
|
1433
|
+
name: ge.name || ((P = D.currentBusiness.value) == null ? void 0 : P.name) || "FeedMe Inventory",
|
|
1434
1434
|
address: ge.emailAddress
|
|
1435
1435
|
},
|
|
1436
1436
|
to: [{ name: N.supplier.name, address: M(N) }],
|
|
1437
1437
|
subject: `Purchase Order #${N.seqNumber ?? N._id}`,
|
|
1438
1438
|
html: Ie,
|
|
1439
|
-
attachments: [
|
|
1439
|
+
attachments: [Ce],
|
|
1440
1440
|
usage: "Operational",
|
|
1441
1441
|
forceSend: !0
|
|
1442
1442
|
});
|
|
1443
1443
|
} catch (se) {
|
|
1444
1444
|
xe.push(`PO #${N.seqNumber ?? N._id}`), console.error("Failed to send email for PO", N._id, se);
|
|
1445
1445
|
} finally {
|
|
1446
|
-
document.body.removeChild(
|
|
1446
|
+
document.body.removeChild(L), re++, u.current = re;
|
|
1447
1447
|
}
|
|
1448
1448
|
})
|
|
1449
|
-
), await tt(),
|
|
1449
|
+
), await tt(), _ < Q.length - 1 && await new Promise((N) => setTimeout(N, 1500));
|
|
1450
1450
|
}
|
|
1451
|
-
u.done = !0, xe.length > 0 ?
|
|
1451
|
+
u.done = !0, xe.length > 0 ? S.open({
|
|
1452
1452
|
title: a("inventory.transfer.receiveRequest.bulk.emailPartialSuccess"),
|
|
1453
1453
|
message: a("inventory.transfer.receiveRequest.bulk.emailPartialSuccessMsg", [
|
|
1454
|
-
|
|
1455
|
-
|
|
1454
|
+
A.length - xe.length,
|
|
1455
|
+
A.length
|
|
1456
1456
|
]),
|
|
1457
1457
|
type: "warning"
|
|
1458
|
-
}) :
|
|
1458
|
+
}) : S.open({
|
|
1459
1459
|
title: a("inventory.transfer.receiveRequest.bulk.emailSuccess"),
|
|
1460
1460
|
message: a("inventory.transfer.receiveRequest.bulk.emailSuccessMsg", [
|
|
1461
|
-
|
|
1461
|
+
A.length
|
|
1462
1462
|
]),
|
|
1463
1463
|
type: "success"
|
|
1464
1464
|
});
|
|
1465
|
-
} catch (
|
|
1466
|
-
console.error("Bulk email failed",
|
|
1465
|
+
} catch (_) {
|
|
1466
|
+
console.error("Bulk email failed", _), S.open({
|
|
1467
1467
|
title: a("inventory.transfer.receiveRequest.bulk.emailSendError"),
|
|
1468
1468
|
message: a("inventory.transfer.receiveRequest.bulk.emailErrorMsg"),
|
|
1469
1469
|
type: "error"
|
|
@@ -1473,9 +1473,9 @@ function lo(ne) {
|
|
|
1473
1473
|
}
|
|
1474
1474
|
}
|
|
1475
1475
|
return {
|
|
1476
|
-
selectedLocationDbNames:
|
|
1477
|
-
purchaseOrders:
|
|
1478
|
-
shipments:
|
|
1476
|
+
selectedLocationDbNames: we,
|
|
1477
|
+
purchaseOrders: q,
|
|
1478
|
+
shipments: T,
|
|
1479
1479
|
purchaseRequests: b,
|
|
1480
1480
|
updateDateRange: K,
|
|
1481
1481
|
fetchData: ce,
|
|
@@ -1485,30 +1485,30 @@ function lo(ne) {
|
|
|
1485
1485
|
promptCreateTransferDialog: be,
|
|
1486
1486
|
promptUpdateTransferDialog: pe,
|
|
1487
1487
|
transferDetailsProps: ye,
|
|
1488
|
-
promptShowTransferDetails:
|
|
1488
|
+
promptShowTransferDetails: Oe,
|
|
1489
1489
|
submitAction: ae,
|
|
1490
1490
|
xilnexImportDialogProps: at,
|
|
1491
1491
|
promptUploadTransferDialog: he,
|
|
1492
1492
|
emailDialogProps: ot,
|
|
1493
|
-
promptEmailDialog:
|
|
1493
|
+
promptEmailDialog: Be,
|
|
1494
1494
|
downloadAll: Ne,
|
|
1495
|
-
emailAll:
|
|
1496
|
-
lastClosingDate:
|
|
1495
|
+
emailAll: ke,
|
|
1496
|
+
lastClosingDate: x
|
|
1497
1497
|
};
|
|
1498
1498
|
}
|
|
1499
1499
|
function io(ne, k) {
|
|
1500
|
-
const
|
|
1500
|
+
const z = et(), { t: U } = We(), j = Kt(
|
|
1501
1501
|
it.RECEIVE_REQUEST,
|
|
1502
1502
|
ne,
|
|
1503
1503
|
k
|
|
1504
1504
|
);
|
|
1505
1505
|
return {
|
|
1506
|
-
columnDefs:
|
|
1506
|
+
columnDefs: R(() => {
|
|
1507
1507
|
const Z = j.columnDefs.value, oe = {
|
|
1508
1508
|
id: "location",
|
|
1509
1509
|
header: () => U("inventory.transfer.receiveRequest.bulk.locationColumn"),
|
|
1510
|
-
cell(
|
|
1511
|
-
const a =
|
|
1510
|
+
cell(S) {
|
|
1511
|
+
const a = S.row.original._locationDbName, ee = z.locations.find((X) => X.dbName === a);
|
|
1512
1512
|
return ee ? `${ee.name} (${ee.doc.profile.code ?? "--"})` : a;
|
|
1513
1513
|
},
|
|
1514
1514
|
enableSorting: !1,
|
|
@@ -1522,34 +1522,37 @@ function io(ne, k) {
|
|
|
1522
1522
|
customPrintIsDefault: j.customPrintIsDefault
|
|
1523
1523
|
};
|
|
1524
1524
|
}
|
|
1525
|
-
const uo = {
|
|
1525
|
+
const uo = {
|
|
1526
|
+
key: 0,
|
|
1527
|
+
class: "flex flex-col items-center justify-center py-48 gap-8 text-fm-color-typo-secondary"
|
|
1528
|
+
}, co = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse sm:flex-col-reverse" }, mo = { class: "flex-1 xs:w-full sm:w-full" }, po = {
|
|
1526
1529
|
key: 0,
|
|
1527
1530
|
class: "flex-1"
|
|
1528
|
-
},
|
|
1531
|
+
}, fo = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, vo = {
|
|
1529
1532
|
key: 0,
|
|
1530
1533
|
class: "flex flex-col items-center justify-center py-48 gap-8 text-fm-color-typo-secondary"
|
|
1531
|
-
},
|
|
1534
|
+
}, yo = { class: "fm-typo-en-body-md-400" }, bo = { class: "flex flex-col py-8" }, ho = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, go = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, xo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, _o = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, wo = {
|
|
1532
1535
|
key: 0,
|
|
1533
1536
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
1534
|
-
},
|
|
1537
|
+
}, ko = { class: "pt-8" }, Co = {
|
|
1535
1538
|
key: 0,
|
|
1536
1539
|
class: "fixed inset-0 bg-black/40 z-[9999] flex items-center justify-center"
|
|
1537
|
-
},
|
|
1540
|
+
}, Fo = { class: "bg-white rounded-xl shadow-lg p-24 flex flex-col gap-12 min-w-[320px] max-w-[480px]" }, So = { class: "fm-typo-en-title-sm-600" }, Ro = { class: "flex flex-col gap-8" }, Do = { class: "flex justify-between fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Eo = { class: "w-full bg-fm-color-neutral-gray-200 rounded-full h-8" }, Po = {
|
|
1538
1541
|
key: 0,
|
|
1539
1542
|
class: "fm-typo-en-body-sm-400 text-fm-color-semantic-success-500 text-center"
|
|
1540
|
-
},
|
|
1543
|
+
}, qo = {
|
|
1541
1544
|
key: 1,
|
|
1542
1545
|
class: "flex justify-end pt-4"
|
|
1543
|
-
}, _t = "BulkReceiveRequestViewSearchCriteria",
|
|
1546
|
+
}, _t = "BulkReceiveRequestViewSearchCriteria", aa = /* @__PURE__ */ lt({
|
|
1544
1547
|
__name: "BulkReceiveRequestView",
|
|
1545
1548
|
setup(ne) {
|
|
1546
|
-
const { t: k } = We(),
|
|
1549
|
+
const { t: k } = We(), z = ut();
|
|
1547
1550
|
ws().fetchTemplates(), Ge.object({
|
|
1548
1551
|
name: Ge.string().optional().nullable(),
|
|
1549
1552
|
startDate: Ge.string().optional().nullable(),
|
|
1550
1553
|
endDate: Ge.string().optional().nullable()
|
|
1551
1554
|
});
|
|
1552
|
-
const j = ss(),
|
|
1555
|
+
const j = ss(), D = Rt(), Z = _s();
|
|
1553
1556
|
function oe() {
|
|
1554
1557
|
const l = {
|
|
1555
1558
|
name: "",
|
|
@@ -1563,25 +1566,25 @@ const uo = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse s
|
|
|
1563
1566
|
}
|
|
1564
1567
|
}
|
|
1565
1568
|
function i() {
|
|
1566
|
-
j.setItem(_t, JSON.stringify(
|
|
1569
|
+
j.setItem(_t, JSON.stringify(S.value));
|
|
1567
1570
|
}
|
|
1568
|
-
const
|
|
1569
|
-
columnDefs:
|
|
1570
|
-
showCustomPrintDialog:
|
|
1571
|
+
const S = w(oe()), a = lo(S.value), ee = w(!1), { selectedLocationDbNames: X } = a, we = R(() => B.value.filter((l) => X.value.includes(l.dbName)).map((l) => l.doc._id)), {
|
|
1572
|
+
columnDefs: q,
|
|
1573
|
+
showCustomPrintDialog: T,
|
|
1571
1574
|
customPrintHtml: b,
|
|
1572
1575
|
customPrintTemplateName: ue,
|
|
1573
1576
|
customPrintIsDefault: H
|
|
1574
|
-
} = io(a, a.shipments), te = et(),
|
|
1575
|
-
|
|
1577
|
+
} = io(a, a.shipments), te = et(), x = Mt(), u = kt(), B = w([]);
|
|
1578
|
+
Ot(() => {
|
|
1576
1579
|
const l = te.locations;
|
|
1577
|
-
l.length > 0 && (
|
|
1580
|
+
l.length > 0 && (B.value = l);
|
|
1578
1581
|
});
|
|
1579
1582
|
async function me() {
|
|
1580
1583
|
var r;
|
|
1581
1584
|
if ((r = u.currentBusiness.value) != null && r._id)
|
|
1582
1585
|
try {
|
|
1583
|
-
const c = await
|
|
1584
|
-
c.length > 0 && (
|
|
1586
|
+
const c = await x.readAllInventoryLocations();
|
|
1587
|
+
c.length > 0 && (B.value = c);
|
|
1585
1588
|
} catch {
|
|
1586
1589
|
}
|
|
1587
1590
|
}
|
|
@@ -1592,12 +1595,12 @@ const uo = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse s
|
|
|
1592
1595
|
},
|
|
1593
1596
|
{ immediate: !0 }
|
|
1594
1597
|
);
|
|
1595
|
-
const ce =
|
|
1598
|
+
const ce = R(() => a.loading.value), K = a.bulkProgress;
|
|
1596
1599
|
async function ye() {
|
|
1597
|
-
const l = `inventory-record_${Te(
|
|
1600
|
+
const l = `inventory-record_${Te(S.value.startDate).format("DD-MM-YYYY_HH-mm")}-${Te(S.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, r = a.purchaseOrders.value.flatMap(
|
|
1598
1601
|
(h) => h.items.map((y) => {
|
|
1599
1602
|
var G, Q;
|
|
1600
|
-
const M = new Date(es(h._id) ?? ""),
|
|
1603
|
+
const M = new Date(es(h._id) ?? ""), A = h.effectiveAt ? new Date(h.effectiveAt) : void 0, v = bt(
|
|
1601
1604
|
Gt(y.sku, h.deliveryOrder || [])
|
|
1602
1605
|
), I = bt(y.quantity), de = ((G = y == null ? void 0 : y.measurement) == null ? void 0 : G.abbrev) || y.sku.unit.abbrev;
|
|
1603
1606
|
return {
|
|
@@ -1605,7 +1608,7 @@ const uo = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse s
|
|
|
1605
1608
|
"SKU code": y.code,
|
|
1606
1609
|
"SKU name": y.name,
|
|
1607
1610
|
"PO #": h.seqNumber,
|
|
1608
|
-
"Effective at":
|
|
1611
|
+
"Effective at": A,
|
|
1609
1612
|
Date: M,
|
|
1610
1613
|
Status: h.status,
|
|
1611
1614
|
Reference: h.ref ?? "",
|
|
@@ -1627,7 +1630,7 @@ const uo = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse s
|
|
|
1627
1630
|
"Ordered quantity",
|
|
1628
1631
|
"Unit"
|
|
1629
1632
|
];
|
|
1630
|
-
|
|
1633
|
+
D.enableBackdatePo && c.insert("Effective at", 5), D.enableTotalCost && c.push("Total cost"), await ts([{ name: "purchases", data: r, columns: c }], l), z.open({
|
|
1631
1634
|
title: k("inventory.transfer.receiveRequest.export.success"),
|
|
1632
1635
|
message: k("inventory.transfer.receiveRequest.export.message", [l]),
|
|
1633
1636
|
type: "success"
|
|
@@ -1637,7 +1640,7 @@ const uo = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse s
|
|
|
1637
1640
|
ze([() => be.value], ([l]) => {
|
|
1638
1641
|
if (!l.startDate || !l.endDate) return;
|
|
1639
1642
|
if (Te(l.endDate).diff(Te(l.startDate), "day") > 60) {
|
|
1640
|
-
|
|
1643
|
+
z.open({
|
|
1641
1644
|
title: k("inventory.transfer.receiveRequest.bulk.dateRangeLimitTitle"),
|
|
1642
1645
|
message: k("inventory.transfer.receiveRequest.bulk.dateRangeLimitMsg"),
|
|
1643
1646
|
type: "warning"
|
|
@@ -1647,7 +1650,7 @@ const uo = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse s
|
|
|
1647
1650
|
};
|
|
1648
1651
|
return;
|
|
1649
1652
|
}
|
|
1650
|
-
|
|
1653
|
+
S.value.startDate = l.startDate, S.value.endDate = l.endDate, a.updateDateRange(S.value.startDate, S.value.endDate), i();
|
|
1651
1654
|
}), ze([() => pe.value], () => {
|
|
1652
1655
|
i();
|
|
1653
1656
|
}), ze(
|
|
@@ -1656,14 +1659,14 @@ const uo = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse s
|
|
|
1656
1659
|
a.fetchData();
|
|
1657
1660
|
}
|
|
1658
1661
|
);
|
|
1659
|
-
function
|
|
1662
|
+
function Be(l) {
|
|
1660
1663
|
if (l === "create") {
|
|
1661
1664
|
if (ce.value) {
|
|
1662
|
-
|
|
1665
|
+
z.open({ title: "Loading data...", message: "Please wait.", type: "info" });
|
|
1663
1666
|
return;
|
|
1664
1667
|
}
|
|
1665
1668
|
if (X.value.length === 0) {
|
|
1666
|
-
|
|
1669
|
+
z.open({
|
|
1667
1670
|
title: "No outlets selected",
|
|
1668
1671
|
message: "Please select at least one outlet to create a transfer.",
|
|
1669
1672
|
type: "warning"
|
|
@@ -1673,62 +1676,62 @@ const uo = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse s
|
|
|
1673
1676
|
ee.value = !0;
|
|
1674
1677
|
return;
|
|
1675
1678
|
}
|
|
1676
|
-
if (l === "upload" &&
|
|
1679
|
+
if (l === "upload" && D.enableXilnexTransferNote)
|
|
1677
1680
|
return a.promptUploadTransferDialog();
|
|
1678
1681
|
if (l === "refresh") return a.fetchData();
|
|
1679
1682
|
if (l === "export") return ye();
|
|
1680
|
-
if (l === "downloadAll") return
|
|
1683
|
+
if (l === "downloadAll") return Oe();
|
|
1681
1684
|
if (l === "emailAll") return Se();
|
|
1682
1685
|
}
|
|
1683
|
-
async function
|
|
1686
|
+
async function Oe() {
|
|
1684
1687
|
if (X.value.length === 0) {
|
|
1685
|
-
|
|
1688
|
+
z.open({
|
|
1686
1689
|
title: k("inventory.transfer.receiveRequest.bulk.noLocationsSelected"),
|
|
1687
1690
|
message: "",
|
|
1688
1691
|
type: "warning"
|
|
1689
1692
|
});
|
|
1690
1693
|
return;
|
|
1691
1694
|
}
|
|
1692
|
-
await a.downloadAll(
|
|
1695
|
+
await a.downloadAll(E.value);
|
|
1693
1696
|
}
|
|
1694
1697
|
async function Se() {
|
|
1695
|
-
if (
|
|
1698
|
+
if (D.enablePurchaseOrderEmail) {
|
|
1696
1699
|
if (X.value.length === 0) {
|
|
1697
|
-
|
|
1700
|
+
z.open({
|
|
1698
1701
|
title: k("inventory.transfer.receiveRequest.bulk.noLocationsSelected"),
|
|
1699
1702
|
message: "",
|
|
1700
1703
|
type: "warning"
|
|
1701
1704
|
});
|
|
1702
1705
|
return;
|
|
1703
1706
|
}
|
|
1704
|
-
await a.emailAll(
|
|
1707
|
+
await a.emailAll(E.value);
|
|
1705
1708
|
}
|
|
1706
1709
|
}
|
|
1707
|
-
const { breakpoints: ae } = ls(), he =
|
|
1710
|
+
const { breakpoints: ae } = ls(), he = R(() => ae.value.xs || ae.value.sm), Ne = R(() => he.value ? 10 : 20), ke = ns(), p = R(() => D.enableReceiveRequestBeta ? [
|
|
1708
1711
|
{
|
|
1709
1712
|
label: k("inventory.transfer.receiveRequest.actions.create"),
|
|
1710
1713
|
value: "create",
|
|
1711
1714
|
isPrimary: !0,
|
|
1712
1715
|
prependIcon: "add"
|
|
1713
1716
|
},
|
|
1714
|
-
...
|
|
1717
|
+
...D.enableXilnexTransferNote ? [{ label: k("inventory.common.upload"), value: "upload" }] : [],
|
|
1715
1718
|
{ label: k("inventory.common.refresh"), value: "refresh" },
|
|
1716
1719
|
{ label: k("inventory.common.export"), value: "export" },
|
|
1717
|
-
...
|
|
1720
|
+
...D.enablePrintTemplate ? [
|
|
1718
1721
|
{
|
|
1719
1722
|
label: k("inventory.transfer.receiveRequest.bulk.downloadAll"),
|
|
1720
1723
|
value: "downloadAll",
|
|
1721
1724
|
prependIcon: "download"
|
|
1722
1725
|
}
|
|
1723
1726
|
] : [],
|
|
1724
|
-
...
|
|
1727
|
+
...D.enablePurchaseOrderEmail ? [
|
|
1725
1728
|
{
|
|
1726
1729
|
label: k("inventory.transfer.receiveRequest.bulk.emailAll"),
|
|
1727
1730
|
value: "emailAll",
|
|
1728
1731
|
prependIcon: "email"
|
|
1729
1732
|
}
|
|
1730
1733
|
] : []
|
|
1731
|
-
]), f =
|
|
1734
|
+
] : []), f = R(() => {
|
|
1732
1735
|
const l = [
|
|
1733
1736
|
{
|
|
1734
1737
|
type: "string",
|
|
@@ -1785,16 +1788,16 @@ const uo = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse s
|
|
|
1785
1788
|
}
|
|
1786
1789
|
];
|
|
1787
1790
|
return [...l, ...Z.isEnabled ? r : []];
|
|
1788
|
-
}), C = w(null),
|
|
1791
|
+
}), C = w(null), E = R(() => {
|
|
1789
1792
|
if (!C.value) return a.purchaseOrders.value;
|
|
1790
1793
|
const l = hs.build(C.value);
|
|
1791
1794
|
return a.purchaseOrders.value.filter((r) => {
|
|
1792
|
-
var h, y, M,
|
|
1795
|
+
var h, y, M, A, v;
|
|
1793
1796
|
const c = ((h = te.locations.find((I) => I.dbName === r._locationDbName)) == null ? void 0 : h.name) ?? r._locationDbName;
|
|
1794
1797
|
return gs(
|
|
1795
1798
|
{
|
|
1796
1799
|
netsuiteTransactionNumber: (M = (y = r.netSuite) == null ? void 0 : y.additionalInfo) == null ? void 0 : M.transactionnumber,
|
|
1797
|
-
netsuiteOrderNo: (
|
|
1800
|
+
netsuiteOrderNo: (A = r.netSuite) == null ? void 0 : A.refNo,
|
|
1798
1801
|
netsuiteOrderId: (v = r.netSuite) == null ? void 0 : v.id,
|
|
1799
1802
|
status: r.status,
|
|
1800
1803
|
transferFrom: r.supplier.name,
|
|
@@ -1805,189 +1808,197 @@ const uo = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse s
|
|
|
1805
1808
|
});
|
|
1806
1809
|
});
|
|
1807
1810
|
return (l, r) => {
|
|
1808
|
-
const c =
|
|
1809
|
-
return
|
|
1811
|
+
const c = De("FmIcon"), h = De("FmTextField"), y = De("FmTable"), M = De("FmButton");
|
|
1812
|
+
return m(), ie(os, {
|
|
1810
1813
|
title: t(k)("inventory.transfer.receiveRequest.bulk.title"),
|
|
1811
|
-
actions:
|
|
1812
|
-
"onClick:action":
|
|
1814
|
+
actions: p.value,
|
|
1815
|
+
"onClick:action": Be
|
|
1813
1816
|
}, {
|
|
1814
1817
|
default: Fe(() => {
|
|
1815
|
-
var
|
|
1818
|
+
var A;
|
|
1816
1819
|
return [
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
+
t(D).isLoaded && !t(D).enableReceiveRequestBeta ? (m(), g("div", uo, [
|
|
1821
|
+
F(c, {
|
|
1822
|
+
name: "block",
|
|
1823
|
+
size: "xl"
|
|
1824
|
+
}),
|
|
1825
|
+
r[10] || (r[10] = e("p", { class: "fm-typo-en-body-md-400" }, "Not available", -1))
|
|
1826
|
+
])) : t(D).enableReceiveRequestBeta ? (m(), g(_e, { key: 1 }, [
|
|
1820
1827
|
e("div", {
|
|
1821
|
-
class: "flex flex-col gap-8",
|
|
1822
|
-
onVnodeMounted: r[4] || (r[4] = //@ts-ignore
|
|
1823
|
-
(...v) => t(we).onMounted && t(we).onMounted(...v)),
|
|
1824
|
-
onVnodeUnmounted: r[5] || (r[5] = //@ts-ignore
|
|
1825
|
-
(...v) => t(we).onUnmounted && t(we).onUnmounted(...v))
|
|
1828
|
+
class: O(["flex flex-col gap-8 max-h-full", { "p-0": he.value, "px-24": !he.value }])
|
|
1826
1829
|
}, [
|
|
1827
1830
|
e("div", {
|
|
1828
|
-
class:
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
]
|
|
1831
|
+
class: "flex flex-col gap-8",
|
|
1832
|
+
onVnodeMounted: r[4] || (r[4] = //@ts-ignore
|
|
1833
|
+
(...v) => t(ke).onMounted && t(ke).onMounted(...v)),
|
|
1834
|
+
onVnodeUnmounted: r[5] || (r[5] = //@ts-ignore
|
|
1835
|
+
(...v) => t(ke).onUnmounted && t(ke).onUnmounted(...v))
|
|
1832
1836
|
}, [
|
|
1833
1837
|
e("div", {
|
|
1834
|
-
class: O([
|
|
1838
|
+
class: O([
|
|
1839
|
+
"flex gap-8 items-center",
|
|
1840
|
+
{ "px-8 flex-col-reverse h-[unset]": he.value, "h-48": !he.value }
|
|
1841
|
+
])
|
|
1835
1842
|
}, [
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
"
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1843
|
+
e("div", {
|
|
1844
|
+
class: O(["flex gap-8 items-center", { "w-full overflow-x-auto": he.value }])
|
|
1845
|
+
}, [
|
|
1846
|
+
F(ro, {
|
|
1847
|
+
modelValue: t(X),
|
|
1848
|
+
"onUpdate:modelValue": r[0] || (r[0] = (v) => mt(X) ? X.value = v : null),
|
|
1849
|
+
locations: B.value
|
|
1850
|
+
}, null, 8, ["modelValue", "locations"]),
|
|
1851
|
+
F(Vt, {
|
|
1852
|
+
"model-value": be.value,
|
|
1853
|
+
"onUpdate:modelValue": r[1] || (r[1] = (v) => be.value = v)
|
|
1854
|
+
}, null, 8, ["model-value"])
|
|
1855
|
+
], 2),
|
|
1847
1856
|
e("div", co, [
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1857
|
+
e("div", mo, [
|
|
1858
|
+
F(t(xs), {
|
|
1859
|
+
modelValue: C.value,
|
|
1860
|
+
"onUpdate:modelValue": r[2] || (r[2] = (v) => C.value = v),
|
|
1861
|
+
attributes: f.value
|
|
1862
|
+
}, null, 8, ["modelValue", "attributes"])
|
|
1863
|
+
]),
|
|
1864
|
+
he.value ? $("", !0) : (m(), g("div", po)),
|
|
1865
|
+
e("div", fo, [
|
|
1866
|
+
F(h, {
|
|
1867
|
+
"model-value": pe.value,
|
|
1868
|
+
"onUpdate:modelValue": r[3] || (r[3] = (v) => pe.value = v),
|
|
1869
|
+
"prepend-icon": "search",
|
|
1870
|
+
placeholder: t(k)("inventory.common.table.toolbar.filterItems"),
|
|
1871
|
+
class: "w-full"
|
|
1872
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
1873
|
+
])
|
|
1863
1874
|
])
|
|
1864
|
-
])
|
|
1865
|
-
],
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
return [
|
|
1891
|
-
e("div", yo, [
|
|
1875
|
+
], 2)
|
|
1876
|
+
], 512),
|
|
1877
|
+
t(X).length === 0 && !ce.value ? (m(), g("div", vo, [
|
|
1878
|
+
F(c, {
|
|
1879
|
+
name: "storefront",
|
|
1880
|
+
size: "xl"
|
|
1881
|
+
}),
|
|
1882
|
+
e("p", yo, d(t(k)("inventory.transfer.receiveRequest.bulk.selectLocationsHint")), 1)
|
|
1883
|
+
])) : (m(), ie(y, {
|
|
1884
|
+
key: 1,
|
|
1885
|
+
style: pt(t(ke).tableHeight),
|
|
1886
|
+
"column-defs": t(q),
|
|
1887
|
+
"row-data": E.value,
|
|
1888
|
+
"search-value": pe.value,
|
|
1889
|
+
loading: ce.value,
|
|
1890
|
+
onRowClick: r[6] || (r[6] = (v) => t(a).promptShowTransferDetails(v.original)),
|
|
1891
|
+
"page-size": Ne.value
|
|
1892
|
+
}, {
|
|
1893
|
+
"list-row": Fe((v) => [
|
|
1894
|
+
F(bs, {
|
|
1895
|
+
row: v,
|
|
1896
|
+
onRowClick: t(a).promptShowTransferDetails
|
|
1897
|
+
}, {
|
|
1898
|
+
default: Fe((I) => {
|
|
1899
|
+
var de, ge, G, Q, re, xe, Ee, _, V, N, L, P, se, fe, Ie, Le, Re, Me, Ce, Pe, Ve, Ue, Ze, $e, Ke;
|
|
1900
|
+
return [
|
|
1892
1901
|
e("div", bo, [
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1902
|
+
e("div", ho, [
|
|
1903
|
+
F(t(He), {
|
|
1904
|
+
render: (G = (ge = (de = I._id) == null ? void 0 : de.column) == null ? void 0 : ge.columnDef) == null ? void 0 : G.cell,
|
|
1905
|
+
props: (re = (Q = I._id) == null ? void 0 : Q.getContext) == null ? void 0 : re.call(Q)
|
|
1906
|
+
}, null, 8, ["render", "props"])
|
|
1907
|
+
]),
|
|
1908
|
+
e("div", go, [
|
|
1909
|
+
F(t(He), {
|
|
1910
|
+
render: (_ = (Ee = (xe = I.location) == null ? void 0 : xe.column) == null ? void 0 : Ee.columnDef) == null ? void 0 : _.cell,
|
|
1911
|
+
props: (N = (V = I.location) == null ? void 0 : V.getContext) == null ? void 0 : N.call(V)
|
|
1912
|
+
}, null, 8, ["render", "props"])
|
|
1913
|
+
]),
|
|
1914
|
+
e("div", xo, [
|
|
1915
|
+
F(t(He), {
|
|
1916
|
+
render: (se = (P = (L = I.supplier_name) == null ? void 0 : L.column) == null ? void 0 : P.columnDef) == null ? void 0 : se.cell,
|
|
1917
|
+
props: (Ie = (fe = I.supplier_name) == null ? void 0 : fe.getContext) == null ? void 0 : Ie.call(fe)
|
|
1918
|
+
}, null, 8, ["render", "props"])
|
|
1919
|
+
]),
|
|
1920
|
+
e("div", _o, d(v.original.items.map((Je) => `${Je.name}`).join(", ")), 1),
|
|
1921
|
+
v.original.ref ? (m(), g("div", wo, [
|
|
1922
|
+
F(t(He), {
|
|
1923
|
+
render: (Me = (Re = (Le = I.ref) == null ? void 0 : Le.column) == null ? void 0 : Re.columnDef) == null ? void 0 : Me.cell,
|
|
1924
|
+
props: (Pe = (Ce = I.ref) == null ? void 0 : Ce.getContext) == null ? void 0 : Pe.call(Ce)
|
|
1925
|
+
}, null, 8, ["render", "props"])
|
|
1926
|
+
])) : $("", !0),
|
|
1927
|
+
e("div", ko, [
|
|
1928
|
+
F(t(He), {
|
|
1929
|
+
render: (Ze = (Ue = (Ve = I.status) == null ? void 0 : Ve.column) == null ? void 0 : Ue.columnDef) == null ? void 0 : Ze.cell,
|
|
1930
|
+
props: (Ke = ($e = I.status) == null ? void 0 : $e.getContext) == null ? void 0 : Ke.call($e)
|
|
1931
|
+
}, null, 8, ["render", "props"])
|
|
1932
|
+
])
|
|
1922
1933
|
])
|
|
1923
|
-
]
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
}, 1032, ["row", "onRowClick"])
|
|
1928
|
-
]),
|
|
1929
|
-
_: 1
|
|
1930
|
-
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
1931
|
-
], 2),
|
|
1932
|
-
(p(), ie(wt, { to: "body" }, [
|
|
1933
|
-
t(K).visible ? (p(), _("div", ko, [
|
|
1934
|
-
e("div", Co, [
|
|
1935
|
-
e("div", Fo, d(t(K).title), 1),
|
|
1936
|
-
e("div", So, [
|
|
1937
|
-
e("div", Do, [
|
|
1938
|
-
e("span", null, d(t(k)("inventory.transfer.receiveRequest.bulk.progressLabel")), 1),
|
|
1939
|
-
e("span", null, d(t(K).current) + " / " + d(t(K).total), 1)
|
|
1940
|
-
]),
|
|
1941
|
-
e("div", Ro, [
|
|
1942
|
-
e("div", {
|
|
1943
|
-
class: "bg-fm-color-primary h-8 rounded-full",
|
|
1944
|
-
style: pt({
|
|
1945
|
-
width: `${t(K).total > 0 ? t(K).current / t(K).total * 100 : 0}%`
|
|
1946
|
-
})
|
|
1947
|
-
}, null, 4)
|
|
1948
|
-
])
|
|
1934
|
+
];
|
|
1935
|
+
}),
|
|
1936
|
+
_: 2
|
|
1937
|
+
}, 1032, ["row", "onRowClick"])
|
|
1949
1938
|
]),
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1939
|
+
_: 1
|
|
1940
|
+
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
1941
|
+
], 2),
|
|
1942
|
+
(m(), ie(wt, { to: "body" }, [
|
|
1943
|
+
t(K).visible ? (m(), g("div", Co, [
|
|
1944
|
+
e("div", Fo, [
|
|
1945
|
+
e("div", So, d(t(K).title), 1),
|
|
1946
|
+
e("div", Ro, [
|
|
1947
|
+
e("div", Do, [
|
|
1948
|
+
e("span", null, d(t(k)("inventory.transfer.receiveRequest.bulk.progressLabel")), 1),
|
|
1949
|
+
e("span", null, d(t(K).current) + " / " + d(t(K).total), 1)
|
|
1950
|
+
]),
|
|
1951
|
+
e("div", Eo, [
|
|
1952
|
+
e("div", {
|
|
1953
|
+
class: "bg-fm-color-primary h-8 rounded-full",
|
|
1954
|
+
style: pt({
|
|
1955
|
+
width: `${t(K).total > 0 ? t(K).current / t(K).total * 100 : 0}%`
|
|
1956
|
+
})
|
|
1957
|
+
}, null, 4)
|
|
1958
|
+
])
|
|
1959
|
+
]),
|
|
1960
|
+
t(K).done ? (m(), g("div", Po, d(t(k)("inventory.transfer.receiveRequest.bulk.progressDone")), 1)) : $("", !0),
|
|
1961
|
+
t(K).done ? $("", !0) : (m(), g("div", qo, [
|
|
1962
|
+
F(M, {
|
|
1963
|
+
variant: "secondary",
|
|
1964
|
+
size: "md",
|
|
1965
|
+
label: t(k)("inventory.transfer.receiveRequest.bulk.progressCancel"),
|
|
1966
|
+
disabled: t(K).cancelled,
|
|
1967
|
+
onClick: r[7] || (r[7] = (v) => t(K).cancelled = !0)
|
|
1968
|
+
}, null, 8, ["label", "disabled"])
|
|
1969
|
+
]))
|
|
1970
|
+
])
|
|
1971
|
+
])) : $("", !0),
|
|
1972
|
+
t(D).enablePurchaseOrderEmail ? (m(), ie(cs, ft(st({ key: 1 }, t(a).emailDialogProps.value)), null, 16)) : $("", !0),
|
|
1973
|
+
F(ao, {
|
|
1974
|
+
show: ee.value,
|
|
1975
|
+
"onUpdate:show": r[8] || (r[8] = (v) => ee.value = v),
|
|
1976
|
+
"last-closing-date": t(a).lastClosingDate.value,
|
|
1977
|
+
"selected-outlet-ids": we.value,
|
|
1978
|
+
onSubmitted: t(a).fetchData
|
|
1979
|
+
}, null, 8, ["show", "last-closing-date", "selected-outlet-ids", "onSubmitted"]),
|
|
1980
|
+
F(ds, st(t(a).transferDialogProps.value, {
|
|
1981
|
+
onSubmitted: t(a).fetchData
|
|
1982
|
+
}), null, 16, ["onSubmitted"]),
|
|
1983
|
+
F(Jt, st({
|
|
1984
|
+
scope: t(it).RECEIVE_REQUEST
|
|
1985
|
+
}, {
|
|
1986
|
+
...t(a).transferDetailsProps.value,
|
|
1987
|
+
receivedMap: ((A = t(a).transferDetailsProps.value) == null ? void 0 : A.receivedMap) ?? {},
|
|
1988
|
+
shipments: t(a).shipments.value ?? []
|
|
1989
|
+
}, {
|
|
1990
|
+
onSubmitted: t(a).fetchData
|
|
1991
|
+
}), null, 16, ["scope", "onSubmitted"]),
|
|
1992
|
+
F(ms, ft(At(t(a).xilnexImportDialogProps.value)), null, 16),
|
|
1993
|
+
F(Xt, {
|
|
1994
|
+
modelValue: t(T),
|
|
1995
|
+
"onUpdate:modelValue": r[9] || (r[9] = (v) => mt(T) ? T.value = v : null),
|
|
1996
|
+
html: t(b),
|
|
1997
|
+
"template-name": t(ue),
|
|
1998
|
+
"is-default": t(H)
|
|
1999
|
+
}, null, 8, ["modelValue", "html", "template-name", "is-default"])
|
|
2000
|
+
]))
|
|
2001
|
+
], 64)) : $("", !0)
|
|
1991
2002
|
];
|
|
1992
2003
|
}),
|
|
1993
2004
|
_: 1
|
|
@@ -1996,5 +2007,5 @@ const uo = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse s
|
|
|
1996
2007
|
}
|
|
1997
2008
|
});
|
|
1998
2009
|
export {
|
|
1999
|
-
|
|
2010
|
+
aa as default
|
|
2000
2011
|
};
|