@feedmepos/mf-inventory-portal 1.7.9-dev.2 → 1.7.9-dev.4

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.
Files changed (97) hide show
  1. package/dist/App-Bte0vWY7.js +1434 -0
  2. package/dist/{ApprovalView-pmI_SFo7.js → ApprovalView-B0MC_Gv4.js} +9 -9
  3. package/dist/{BindingsDialog-D902flPr.js → BindingsDialog-CUyLeRvh.js} +2 -2
  4. package/dist/{BindingsPicker-JEKsY59b.js → BindingsPicker-UkwLozYB.js} +2 -2
  5. package/dist/{BindingsTable-DqlzOIxF.js → BindingsTable-4WbqclQu.js} +4 -4
  6. package/dist/{BulkReceiveRequestView-Chw7ma2k.js → BulkReceiveRequestView-Bt_Kz7Pw.js} +894 -883
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Cct8Ko19.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-aHOlyDp1.js} +1 -1
  8. package/dist/{ClosingDraftView-D1ymRsd2.js → ClosingDraftView-BZChpOPr.js} +19 -19
  9. package/dist/{ClosingHistoryView-5yr_itIV.js → ClosingHistoryView-B8kE6kDk.js} +5 -5
  10. package/dist/{ClosingTemplateView-MDl5Zq-g.js → ClosingTemplateView-cJuk2ph0.js} +16 -16
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BcG0gWV4.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CraIMmym.js} +1 -1
  12. package/dist/{DefaultView-dOfbL3iF.js → DefaultView-2P-3baXd.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-BfVgQOx8.js → DeliveryOrderPrintPreview-JrmelmiW.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DHspOJQW.js → EmailDialog.vue_vue_type_script_setup_true_lang-DK8FWZde.js} +2250 -2250
  15. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B7NLu0us.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DSO8GPQh.js} +1 -1
  16. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C0nunKjx.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BX4lkn8x.js} +2 -2
  17. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CMst9tkA.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D4ASSJTr.js} +2 -2
  18. package/dist/{FmMultiselectDialog-Dt54hvqw.js → FmMultiselectDialog-C3KVaJ4n.js} +2 -2
  19. package/dist/{FmMultiselectDialog-BjBx94pY.js → FmMultiselectDialog-Cf2O3ZGm.js} +1 -1
  20. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DtG9Ieo_.js → FmUnitInput.vue_vue_type_script_setup_true_lang-B8Iz9egz.js} +6 -6
  21. package/dist/{ImportView-CdZN8k_Y.js → ImportView-BpcbGOsq.js} +499 -496
  22. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-iCpYEneM.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CPqxv23A.js} +1 -1
  23. package/dist/{IngredientGroupView-BBVS1mKn.js → IngredientGroupView-DGiHqjGP.js} +5 -5
  24. package/dist/{IngredientsView-BGOaAUzR.js → IngredientsView-CymfMlp3.js} +15 -15
  25. package/dist/{IntegrationExplorerView-UUBCmqdR.js → IntegrationExplorerView-B4ihljuB.js} +4 -4
  26. package/dist/{IntegrationView-B2YowH-i.js → IntegrationView-DBC5-V2I.js} +14 -14
  27. package/dist/{InventoryBindingForm-kDx6Mvhn.js → InventoryBindingForm-BrC9MQI_.js} +1 -1
  28. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-C8bktmYH.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CHTlQULY.js} +5 -5
  29. package/dist/{InventoryBindingSummary-DJrBTa8_.js → InventoryBindingSummary-DJnyHxXU.js} +1 -1
  30. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DHk9uEAP.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cu7JdR_i.js} +1 -1
  31. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Dx1VktdW.js → PremiumBadge.vue_vue_type_script_setup_true_lang-D29jHwzz.js} +1 -1
  32. package/dist/{ProductionView-CxUcsRBP.js → ProductionView-BFXAINYn.js} +7 -7
  33. package/dist/{PublishView-DtP-Ms7q.js → PublishView-C2ZKNjV0.js} +3 -3
  34. package/dist/{PurchaseOrderPrintPreview-C_qC2KF5.js → PurchaseOrderPrintPreview-DUaNv22q.js} +2 -2
  35. package/dist/{ReceiveRequestView-Dy3BpqsP.js → ReceiveRequestView-B0bHSidO.js} +14 -14
  36. package/dist/{RecipeView-DeR7pqj8.js → RecipeView-D8lfLSJW.js} +17 -17
  37. package/dist/{SettingsView-C7ZXmatO.js → SettingsView-GU0zqJPQ.js} +4 -4
  38. package/dist/{StockView-wFLnNSRr.js → StockView-KEXdcwRV.js} +21 -21
  39. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Fxh3-Nqi.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CrF431ux.js} +1 -1
  40. package/dist/{SupplierView-CeTDNDDK.js → SupplierView-J5XPtBtn.js} +12 -12
  41. package/dist/{SurchargeView-BQJnCdPA.js → SurchargeView-vbWzu1yC.js} +6 -6
  42. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-D1zxuH66.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DO3XuHWt.js} +2 -2
  43. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BFkh3Ubb.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CnATZ2gf.js} +1 -1
  44. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CZVDhXNz.js → TransferDetails.vue_vue_type_script_setup_true_lang-BekwCPEW.js} +1639 -1575
  45. package/dist/{TransferTemplateView-XaI2T5fa.js → TransferTemplateView-V4XgaVtH.js} +20 -20
  46. package/dist/{UnitCostHistoryView-DTNW7-mk.js → UnitCostHistoryView-CLC3Bk51.js} +4 -4
  47. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-vRsEjVJc.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-QfJddUKl.js} +4 -4
  48. package/dist/{UnitView-DXnyzkj3.js → UnitView-zdd28Okm.js} +7 -7
  49. package/dist/{WarehouseView-iEHFgIqh.js → WarehouseView-80yYhx0q.js} +5 -5
  50. package/dist/{WastageTemplateView-CGDUCPbr.js → WastageTemplateView-BdkoxGXU.js} +14 -14
  51. package/dist/api/changelog.d.ts +1 -1
  52. package/dist/{app-BIXJtvvD.js → app-BNb3mgP7.js} +19 -15
  53. package/dist/app.d.ts +4 -0
  54. package/dist/app.js +1 -1
  55. package/dist/{closing-template-CLY-r6Cf.js → closing-template-B0OnLwK4.js} +1 -1
  56. package/dist/{date2-DbYQycSa.js → date2-CEZilXJj.js} +1 -1
  57. package/dist/{dayjs.min-Dv7-fEed.js → dayjs.min-CM9pMep8.js} +1 -1
  58. package/dist/{decimal-B8YR17QC.js → decimal-C7T3duiU.js} +2 -2
  59. package/dist/{defineDeepModel-C5ncgNxj.js → defineDeepModel-BqXFlLTg.js} +1 -1
  60. package/dist/{duplicate-template-CAlG1nzV.js → duplicate-template-DNNNayq0.js} +1 -1
  61. package/dist/{feature-BLSNLI5y.js → feature-TVuArq91.js} +2 -2
  62. package/dist/{format-time-from-id-D5DcWpHS.js → format-time-from-id-BnKJ6XGj.js} +1 -1
  63. package/dist/{format-unit-display-Ch97dVXx.js → format-unit-display-CXPWPWDC.js} +12 -12
  64. package/dist/{import-export.helper-CvUFSOa1.js → import-export.helper-BD5ZmNlI.js} +6 -6
  65. package/dist/{index-rRPErzP4.js → index-B6exMf0H.js} +1 -1
  66. package/dist/{index-Bk8DOv4n.js → index-DB5lmTJv.js} +1 -1
  67. package/dist/{index-CXzVUrJS.js → index-HB5HxMo3.js} +3 -3
  68. package/dist/{inventory-core-dart.default-Cj7CxnpK.js → inventory-core-dart.default-DIZjn9Qf.js} +1 -1
  69. package/dist/{lz-string-DWkGPESZ.js → lz-string-Ba7A8pQ9.js} +1 -1
  70. package/dist/{netsuite-Cn0y1rH3.js → netsuite-DfDg_rIm.js} +3 -2
  71. package/dist/{number-CxbQxQwj.js → number-Da0xDyut.js} +3 -3
  72. package/dist/{predefined-templates-CrSoG3R9.js → predefined-templates-6OB7_XaD.js} +1 -1
  73. package/dist/{purchase-order-template-BmQQnrEl.js → purchase-order-template-B5tBswYT.js} +1 -1
  74. package/dist/{recalculationUtils-CSnowXma.js → recalculationUtils-De3fjfMb.js} +1 -1
  75. package/dist/{rules-CurdOAcA.js → rules-CEMsIT_O.js} +2 -2
  76. package/dist/{stock-BiqEgcgU.js → stock-B8Es7Hve.js} +3 -3
  77. package/dist/{stock-BdDR_L8p.js → stock-v1xKxzUF.js} +1 -1
  78. package/dist/style.css +1 -1
  79. package/dist/{supplier-CsjbmP_P.js → supplier-CutnfZkn.js} +2 -2
  80. package/dist/{surcharge--kBjIIst.js → surcharge-B_J4MXnT.js} +1 -1
  81. package/dist/tsconfig.app.tsbuildinfo +1 -1
  82. package/dist/{uom-rules-D8UPS06O.js → uom-rules-iPENmQml.js} +1 -1
  83. package/dist/{use-ingredient-select-dialog-BZdrpLOE.js → use-ingredient-select-dialog-pf4BGGJC.js} +2 -2
  84. package/dist/{use-inventory-binding-dialog-CkNxixT2.js → use-inventory-binding-dialog-EQZqHiBh.js} +2 -2
  85. package/dist/{use-template-enabled-locations-Dkl1_1F-.js → use-template-enabled-locations-BBWgOLck.js} +2 -2
  86. package/dist/{use-transfer-locations-Bmj4zTJj.js → use-transfer-locations-BN_jm_Uj.js} +2 -2
  87. package/dist/{useHrmPermission-DcBe_-Q6.js → useHrmPermission-C0Uv8j0R.js} +1 -1
  88. package/dist/{useNavigationMenu-CsRbtAc7.js → useNavigationMenu-DK7Fgr5l.js} +2 -2
  89. package/dist/{useSseClient-hl2SQF5b.js → useSseClient-EppRU129.js} +1 -1
  90. package/dist/views/changelog/composables/use-changelog.d.ts +2 -0
  91. package/dist/views/changelog/composables/use-changelog.spec.d.ts +1 -0
  92. package/dist/views/import/helper/submit-rows.d.ts +13 -0
  93. package/dist/views/import/helper/submit-rows.spec.d.ts +1 -0
  94. package/dist/{vue-i18n-yL99yI4f.js → vue-i18n-CKFIvxhf.js} +154 -154
  95. package/dist/{xlsx.util-B8azJxkS.js → xlsx.util-DIO7WN8q.js} +2 -2
  96. package/package.json +5 -5
  97. package/dist/App-BYCW0L94.js +0 -1403
@@ -1,34 +1,34 @@
1
- import { defineComponent as nt, ref as F, computed as I, watch as We, createElementBlock as h, openBlock as c, Fragment as _e, createBlock as ue, createVNode as N, Teleport as lt, Transition as Nt, withCtx as Oe, createCommentVNode as D, createElementVNode as e, toDisplayString as v, unref as t, normalizeClass as J, renderList as Ke, createTextVNode as ot, withModifiers as $t, mergeModels as At, useModel as Ot, resolveComponent as qe, h as Fe, onMounted as Bt, onUnmounted as Tt, normalizeStyle as ft, watchEffect as It, isRef as ht, normalizeProps as gt, mergeProps as ct, guardReactiveProps as Lt } from "vue";
2
- import { u as zt, l as Mt } from "./netsuite-Cn0y1rH3.js";
3
- import { u as it, a as Ut, G as Vt, T as _t, s as Jt, U as Ye, q as jt, c as Wt, D as at, x as Yt } from "./app-BIXJtvvD.js";
4
- import { i as pt, _ as Qt } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B7NLu0us.js";
5
- import { a as xt, d as Ht } from "./number-CxbQxQwj.js";
6
- import { b as Kt, d as Gt, c as Xt, e as Zt, f as en, P as St, h as tn, a as nn, _ as sn, g as on } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CZVDhXNz.js";
7
- import { i as an } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-Dx1VktdW.js";
8
- import { d as Qe } from "./dayjs.min-Dv7-fEed.js";
9
- import { e as rn } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-vRsEjVJc.js";
10
- import { u as ln } from "./useTabStorage-BkIVScW_.js";
11
- import { u as un, _ as cn } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DwrLsWX_.js";
1
+ import { defineComponent as nt, ref as S, computed as L, watch as Ve, createElementBlock as h, openBlock as c, Fragment as we, createBlock as de, createVNode as N, Teleport as lt, Transition as $t, withCtx as Be, createCommentVNode as E, createElementVNode as e, toDisplayString as v, unref as t, normalizeClass as j, renderList as Ke, createTextVNode as ot, withModifiers as Ot, mergeModels as At, useModel as Bt, resolveComponent as $e, h as De, onMounted as Tt, onUnmounted as It, normalizeStyle as ft, watchEffect as Lt, isRef as ht, normalizeProps as gt, mergeProps as ct, guardReactiveProps as zt } from "vue";
2
+ import { u as Mt, l as Ut } from "./netsuite-DfDg_rIm.js";
3
+ import { u as it, a as Vt, G as Jt, T as _t, s as jt, U as We, q as Wt, c as Yt, D as at, x as Qt } from "./app-BNb3mgP7.js";
4
+ import { i as pt, _ as Ht } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DSO8GPQh.js";
5
+ import { a as xt, d as Kt } from "./number-Da0xDyut.js";
6
+ import { b as Gt, d as Xt, c as Zt, e as en, f as tn, P as Rt, h as nn, a as sn, _ as on, g as an } from "./TransferDetails.vue_vue_type_script_setup_true_lang-BekwCPEW.js";
7
+ import { i as rn } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-D29jHwzz.js";
8
+ import { d as Ye } from "./dayjs.min-CM9pMep8.js";
9
+ import { e as ln } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-QfJddUKl.js";
10
+ import { u as un } from "./useTabStorage-BkIVScW_.js";
11
+ import { u as wt, _ as cn } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DwrLsWX_.js";
12
12
  import { components as dn, useSnackbar as ut, useDialog as mn, useBreakpoints as fn } from "@feedmepos/ui-library";
13
- import { c as pn, u as vn, _ as yn, a as bn, b as hn } from "./EmailDialog.vue_vue_type_script_setup_true_lang-DHspOJQW.js";
14
- import { useI18n as st, useCoreStore as Rt } from "@feedmepos/mf-common";
15
- import { u as Pt, a as gn } from "./supplier-CsjbmP_P.js";
16
- import { u as _n } from "./stock-BdDR_L8p.js";
17
- import { u as Ge } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-D1zxuH66.js";
18
- import { b as Dt, a as xn } from "./format-unit-display-Ch97dVXx.js";
19
- import { P as wn } from "./inventory-core-dart.default-Cj7CxnpK.js";
13
+ import { c as pn, u as vn, _ as yn, a as bn, b as hn } from "./EmailDialog.vue_vue_type_script_setup_true_lang-DK8FWZde.js";
14
+ import { useI18n as st, useCoreStore as Pt } from "@feedmepos/mf-common";
15
+ import { u as Dt, a as gn } from "./supplier-CutnfZkn.js";
16
+ import { u as _n } from "./stock-v1xKxzUF.js";
17
+ import { u as Ge } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-DO3XuHWt.js";
18
+ import { b as Et, a as xn } from "./format-unit-display-CXPWPWDC.js";
19
+ import { P as wn } from "./inventory-core-dart.default-DIZjn9Qf.js";
20
20
  import { _ as kn, F as et } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
21
- import { u as Et } from "./feature-BLSNLI5y.js";
21
+ import { u as qt } from "./feature-TVuArq91.js";
22
22
  import { P as Cn, J as Fn, D as Sn } from "./app-C39bYJmq.js";
23
- import { a as Rn, t as Pn } from "./date2-DbYQycSa.js";
24
- import { F as wt } from "./form-mode.enum-BKiNVH6A.js";
25
- import { p as Dn } from "./format-time-from-id-D5DcWpHS.js";
23
+ import { a as Rn, t as Pn } from "./date2-CEZilXJj.js";
24
+ import { F as kt } from "./form-mode.enum-BKiNVH6A.js";
25
+ import { p as Dn } from "./format-time-from-id-BnKJ6XGj.js";
26
26
  import { defineStore as En } from "pinia";
27
- import { u as qn } from "./useSseClient-hl2SQF5b.js";
27
+ import { u as qn } from "./useSseClient-EppRU129.js";
28
28
  import { u as Nn } from "./use-row-action-Cvq6VO38.js";
29
29
  import { R as rt, D as $n } from "./row-action.enum-ncgDYAjP.js";
30
- import { u as An } from "./vue-i18n-yL99yI4f.js";
31
- const On = {
30
+ import { u as On } from "./vue-i18n-CKFIvxhf.js";
31
+ const An = {
32
32
  key: 0,
33
33
  class: "fixed inset-0 z-[200] bg-white flex flex-col overflow-hidden",
34
34
  style: { "font-family": "Inter, sans-serif" }
@@ -59,10 +59,10 @@ const On = {
59
59
  }, qs = {
60
60
  key: 0,
61
61
  class: "py-32 text-center text-[#B2B3B6] fm-typo-en-body-md-400"
62
- }, Ns = { class: "fm-typo-en-body-md-700 text-[#1C1C1E] mb-12" }, $s = { class: "mb-12" }, As = {
62
+ }, Ns = { class: "fm-typo-en-body-md-700 text-[#1C1C1E] mb-12" }, $s = { class: "mb-12" }, Os = {
63
63
  key: 0,
64
64
  class: "py-32 flex justify-center"
65
- }, Os = {
65
+ }, As = {
66
66
  key: 1,
67
67
  class: "py-32 text-center text-[#B2B3B6] fm-typo-en-body-md-400"
68
68
  }, Bs = {
@@ -88,91 +88,91 @@ const On = {
88
88
  selectedOutletIds: {}
89
89
  },
90
90
  emits: ["update:show", "submitted"],
91
- setup(w, { emit: _ }) {
92
- const { FmButton: C, FmDialog: A, FmIcon: $, FmTextField: L } = dn, j = w, V = _, { t: i } = st(), a = ut(), b = it(), U = Pt(), ge = Ut(), f = _n(), d = Ge(), y = Dt(), s = F(0), x = F(!1), p = F(null), m = F(""), E = F(null), P = F(null), B = F(null), ce = F(""), G = F(""), Z = F(!1), ee = F(!1), fe = F(!1), Be = F(!1), Se = F(!1), ze = F(/* @__PURE__ */ new Map()), Te = F(), ve = F([]), xe = I(() => !!p.value), Me = I(() => E.value === "transfer" ? !!P.value : E.value === "template" ? !!B.value : !1), Ne = I(() => (ve.value.length ? ve.value : O.value.items ?? []).some((l) => l.quantity.amount > 0)), Xe = I(() => Z.value), Ie = I(
93
- () => Ne.value && ee.value && fe.value && !Z.value
94
- ), Ue = I(() => s.value === 0 ? xe.value : s.value === 1 ? Me.value : s.value === 2 ? Ie.value : !1), Le = I(
91
+ setup(k, { emit: _ }) {
92
+ const { FmButton: C, FmDialog: B, FmIcon: $, FmTextField: z } = dn, W = k, V = _, { t: i } = st(), a = ut(), b = it(), U = Dt(), he = Vt(), f = _n(), d = Ge(), y = Et(), s = S(0), x = S(!1), p = S(null), m = S(""), q = S(null), D = S(null), T = S(null), me = S(""), K = S(""), Z = S(!1), oe = S(!1), pe = S(!1), ke = S(!1), Ee = S(!1), ze = S(/* @__PURE__ */ new Map()), Te = S(), ge = S([]), Je = L(() => !!p.value), ve = L(() => q.value === "transfer" ? !!D.value : q.value === "template" ? !!T.value : !1), Qe = L(() => (ge.value.length ? ge.value : A.value.items ?? []).some((l) => l.quantity.amount > 0)), Ie = L(() => Z.value), Ce = L(
93
+ () => Qe.value && oe.value && pe.value && !Z.value
94
+ ), Xe = L(() => s.value === 0 ? Je.value : s.value === 1 ? ve.value : s.value === 2 ? Ce.value : !1), je = L(
95
95
  () => s.value === 2 ? i("inventory.transfer.receiveRequest.bulk.wizard.createTransferBtn") : i("inventory.transfer.receiveRequest.bulk.wizard.continueBtn")
96
- ), q = I(
97
- () => ne.value === "Purchase" ? "Purchase method" : "Transfer method"
98
- ), S = I(
99
- () => ne.value === "Purchase" ? "Purchase details" : "Transfer details"
100
- ), z = I(() => {
96
+ ), Le = L(
97
+ () => Y.value === "Purchase" ? "Purchase method" : "Transfer method"
98
+ ), Me = L(
99
+ () => Y.value === "Purchase" ? "Purchase details" : "Transfer details"
100
+ ), P = L(() => {
101
101
  const n = m.value.trim().toLowerCase();
102
102
  let l = b.locations;
103
- return j.selectedOutletIds && j.selectedOutletIds.length > 0 && (l = l.filter((r) => j.selectedOutletIds.includes(r.doc._id))), n ? l.filter(
103
+ return W.selectedOutletIds && W.selectedOutletIds.length > 0 && (l = l.filter((r) => W.selectedOutletIds.includes(r.doc._id))), n ? l.filter(
104
104
  (r) => r.name.toLowerCase().includes(n) || (r.doc.profile.code ?? "").toLowerCase().includes(n)
105
105
  ) : l;
106
- }), Q = I(() => {
107
- var he;
108
- const n = (he = p.value) == null ? void 0 : he.doc._id, l = U.suppliers.map((le) => ({
109
- doc: le,
110
- name: le.name,
106
+ }), w = L(() => {
107
+ var be;
108
+ const n = (be = p.value) == null ? void 0 : be.doc._id, l = U.suppliers.map((re) => ({
109
+ doc: re,
110
+ name: re.name,
111
111
  dbName: "",
112
112
  type: "supplier",
113
113
  acceptRequest: !0
114
114
  })), X = [
115
115
  ...b.allLocations ?? b.locations,
116
116
  ...l
117
- ].filter((le) => le.doc._id !== n), ae = ce.value.trim().toLowerCase();
118
- return ae ? X.filter((le) => {
117
+ ].filter((re) => re.doc._id !== n), se = me.value.trim().toLowerCase();
118
+ return se ? X.filter((re) => {
119
119
  var Ze;
120
- const je = le.type === "supplier" ? "" : ((Ze = le.doc.profile) == null ? void 0 : Ze.code) ?? "";
121
- return le.name.toLowerCase().includes(ae) || je.toLowerCase().includes(ae);
120
+ const Ue = re.type === "supplier" ? "" : ((Ze = re.doc.profile) == null ? void 0 : Ze.code) ?? "";
121
+ return re.name.toLowerCase().includes(se) || Ue.toLowerCase().includes(se);
122
122
  }) : X;
123
- }), H = I(() => {
124
- const n = G.value.trim().toLowerCase(), l = y.templates;
123
+ }), M = L(() => {
124
+ const n = K.value.trim().toLowerCase(), l = y.templates;
125
125
  return n ? l.filter((r) => r.name.toLowerCase().includes(n)) : l;
126
- }), ne = I(() => {
126
+ }), Y = L(() => {
127
127
  var n;
128
- if (O.value.supplier)
129
- return typeof O.value.supplier.internal == "string" ? "Transfer" : "Purchase";
130
- if (E.value === "transfer" && P.value)
131
- return P.value.type === "supplier" ? "Purchase" : "Transfer";
132
- if (E.value === "template" && B.value) {
128
+ if (A.value.supplier)
129
+ return typeof A.value.supplier.internal == "string" ? "Transfer" : "Purchase";
130
+ if (q.value === "transfer" && D.value)
131
+ return D.value.type === "supplier" ? "Purchase" : "Transfer";
132
+ if (q.value === "template" && T.value) {
133
133
  const l = y.templates.find(
134
- (r) => r._id === B.value
134
+ (r) => r._id === T.value
135
135
  );
136
136
  if ((n = l == null ? void 0 : l.purchaseOrder) != null && n.supplier)
137
137
  return typeof l.purchaseOrder.supplier.internal == "string" ? "Transfer" : "Purchase";
138
138
  }
139
139
  return "Transfer";
140
- }), $e = I(() => p.value ? p.value.name : i("inventory.transfer.receiveRequest.bulk.wizard.notSelected")), Re = I(() => E.value === "transfer" ? ne.value === "Purchase" ? "Purchase from Supplier" : i("inventory.transfer.receiveRequest.bulk.wizard.outletToOutletMethod") : E.value === "template" ? i("inventory.transfer.receiveRequest.bulk.wizard.fromTemplateMethod") : i("inventory.transfer.receiveRequest.bulk.wizard.notChosen")), W = I(() => {
140
+ }), G = L(() => p.value ? p.value.name : i("inventory.transfer.receiveRequest.bulk.wizard.notSelected")), le = L(() => q.value === "transfer" ? Y.value === "Purchase" ? "Purchase from Supplier" : i("inventory.transfer.receiveRequest.bulk.wizard.outletToOutletMethod") : q.value === "template" ? i("inventory.transfer.receiveRequest.bulk.wizard.fromTemplateMethod") : i("inventory.transfer.receiveRequest.bulk.wizard.notChosen")), Oe = L(() => {
141
141
  var n;
142
- if (E.value === "transfer" && P.value)
143
- return P.value.name;
144
- if (E.value === "template" && B.value) {
145
- const l = y.templates.find((r) => r._id === B.value);
146
- return (n = l == null ? void 0 : l.purchaseOrder) != null && n.supplier ? l.purchaseOrder.supplier.name || B.value : (l == null ? void 0 : l.name) ?? B.value;
142
+ if (q.value === "transfer" && D.value)
143
+ return D.value.name;
144
+ if (q.value === "template" && T.value) {
145
+ const l = y.templates.find((r) => r._id === T.value);
146
+ return (n = l == null ? void 0 : l.purchaseOrder) != null && n.supplier ? l.purchaseOrder.supplier.name || T.value : (l == null ? void 0 : l.name) ?? T.value;
147
147
  }
148
148
  return i("inventory.transfer.receiveRequest.bulk.wizard.noneYet");
149
149
  });
150
- function ie(n) {
151
- var X, ae, he, le, je;
152
- const l = (X = n.doc.profile) != null && X.code ? `#${n.doc.profile.code}` : "", r = [(he = (ae = n.doc.profile) == null ? void 0 : ae.address) == null ? void 0 : he.line1, (je = (le = n.doc.profile) == null ? void 0 : le.address) == null ? void 0 : je.city].filter(Boolean).join(" · ");
150
+ function _e(n) {
151
+ var X, se, be, re, Ue;
152
+ const l = (X = n.doc.profile) != null && X.code ? `#${n.doc.profile.code}` : "", r = [(be = (se = n.doc.profile) == null ? void 0 : se.address) == null ? void 0 : be.line1, (Ue = (re = n.doc.profile) == null ? void 0 : re.address) == null ? void 0 : Ue.city].filter(Boolean).join(" · ");
153
153
  return [l, r].filter(Boolean).join(" · ");
154
154
  }
155
- function Ve(n) {
155
+ function J(n) {
156
156
  var r, X;
157
157
  return [(r = n.doc.address) == null ? void 0 : r.line1, (X = n.doc.address) == null ? void 0 : X.city].filter(Boolean).join(" · ");
158
158
  }
159
- function Je(n) {
159
+ function ce(n) {
160
160
  var l;
161
161
  return n.type === "supplier" ? "" : ((l = n.doc.profile) == null ? void 0 : l.code) ?? "";
162
162
  }
163
163
  function o(n) {
164
- var l, r, X, ae, he, le;
165
- return n.type === "supplier" ? [(l = n.doc.address) == null ? void 0 : l.line1, (r = n.doc.address) == null ? void 0 : r.city].filter(Boolean).join(" · ") : [(ae = (X = n.doc.profile) == null ? void 0 : X.address) == null ? void 0 : ae.line1, (le = (he = n.doc.profile) == null ? void 0 : he.address) == null ? void 0 : le.city].filter(Boolean).join(" · ");
166
- }
167
- const u = I(
168
- () => p.value ? ie(p.value) : ""
169
- ), g = I(
170
- () => E.value === "transfer" && P.value ? P.value.type === "supplier" ? Ve(P.value) : ie(P.value) : ""
171
- ), T = I(() => {
172
- const l = (ve.value.length ? ve.value : O.value.items ?? []).filter((r) => r.quantity.amount > 0).length;
164
+ var l, r, X, se, be, re;
165
+ return n.type === "supplier" ? [(l = n.doc.address) == null ? void 0 : l.line1, (r = n.doc.address) == null ? void 0 : r.city].filter(Boolean).join(" · ") : [(se = (X = n.doc.profile) == null ? void 0 : X.address) == null ? void 0 : se.line1, (re = (be = n.doc.profile) == null ? void 0 : be.address) == null ? void 0 : re.city].filter(Boolean).join(" · ");
166
+ }
167
+ const u = L(
168
+ () => p.value ? _e(p.value) : ""
169
+ ), g = L(
170
+ () => q.value === "transfer" && D.value ? D.value.type === "supplier" ? J(D.value) : _e(D.value) : ""
171
+ ), O = L(() => {
172
+ const l = (ge.value.length ? ge.value : A.value.items ?? []).filter((r) => r.quantity.amount > 0).length;
173
173
  return l === 0 ? i("inventory.transfer.receiveRequest.bulk.wizard.noneYet") : `${l} ${l === 1 ? "item" : "items"}`;
174
174
  });
175
- function M(n) {
175
+ function I(n) {
176
176
  var r;
177
177
  const l = (r = n.purchaseOrder) == null ? void 0 : r.supplier;
178
178
  return l ? l.internal === "warehouse" ? `Transfer from ${l.name}` : l.internal === "restaurant" ? `Transfer from ${l.name}` : `Purchase from ${l.name}` : "";
@@ -195,7 +195,7 @@ const On = {
195
195
  }
196
196
  };
197
197
  }
198
- function Y(n) {
198
+ function Q(n) {
199
199
  return {
200
200
  _id: n._id,
201
201
  internal: void 0,
@@ -216,9 +216,9 @@ const On = {
216
216
  }
217
217
  };
218
218
  }
219
- function K() {
219
+ function H() {
220
220
  var X;
221
- const n = B.value ? y.templates.find((ae) => ae._id === B.value) : void 0, l = {
221
+ const n = T.value ? y.templates.find((se) => se._id === T.value) : void 0, l = {
222
222
  _rev: void 0,
223
223
  email: void 0,
224
224
  internal: void 0,
@@ -229,75 +229,75 @@ const On = {
229
229
  _id: "",
230
230
  name: "",
231
231
  address: { line2: void 0, line1: "", state: "", city: "", postcode: "", country: "" }
232
- }, r = E.value === "transfer" && P.value ? P.value.type === "supplier" ? Y(P.value.doc) : R(P.value) : E.value === "template" && (n != null && n.purchaseOrder.supplier) ? n.purchaseOrder.supplier : l;
232
+ }, r = q.value === "transfer" && D.value ? D.value.type === "supplier" ? Q(D.value.doc) : R(D.value) : q.value === "template" && (n != null && n.purchaseOrder.supplier) ? n.purchaseOrder.supplier : l;
233
233
  return {
234
234
  remark: void 0,
235
235
  ref: void 0,
236
236
  stockSnapshotId: void 0,
237
237
  effectiveAt: void 0,
238
- items: E.value === "template" && ((X = n == null ? void 0 : n.purchaseOrder) != null && X.items) ? n.purchaseOrder.items : [],
238
+ items: q.value === "template" && ((X = n == null ? void 0 : n.purchaseOrder) != null && X.items) ? n.purchaseOrder.items : [],
239
239
  supplier: r,
240
240
  status: "DRAFT",
241
241
  _id: "",
242
242
  seqNumber: 0,
243
243
  deliveryOrder: [],
244
- template: B.value ?? void 0,
244
+ template: T.value ?? void 0,
245
245
  templateDoc: n
246
246
  };
247
247
  }
248
- const O = F(K()), se = F(`${Math.random()}`), oe = I(
248
+ const A = S(H()), te = S(`${Math.random()}`), ne = L(
249
249
  () => {
250
250
  var n;
251
- return ((n = O.value.items) == null ? void 0 : n.filter((l) => l.quantity.amount === 0)) ?? [];
251
+ return ((n = A.value.items) == null ? void 0 : n.filter((l) => l.quantity.amount === 0)) ?? [];
252
252
  }
253
253
  );
254
- We(
255
- () => j.show,
254
+ Ve(
255
+ () => W.show,
256
256
  (n) => {
257
- if (n && (s.value = 0, x.value = !1, p.value = null, E.value = null, P.value = null, B.value = null, m.value = "", ce.value = "", G.value = "", ee.value = !1, fe.value = !1, ve.value = [], O.value = K(), se.value = `${Math.random()}`, y.fetchTemplates(), j.selectedOutletIds && j.selectedOutletIds.length === 1)) {
257
+ if (n && (s.value = 0, x.value = !1, p.value = null, q.value = null, D.value = null, T.value = null, m.value = "", me.value = "", K.value = "", oe.value = !1, pe.value = !1, ge.value = [], A.value = H(), te.value = `${Math.random()}`, y.fetchTemplates(), W.selectedOutletIds && W.selectedOutletIds.length === 1)) {
258
258
  const l = b.locations.find(
259
- (r) => r.doc._id === j.selectedOutletIds[0]
259
+ (r) => r.doc._id === W.selectedOutletIds[0]
260
260
  );
261
- l && (p.value = l, b._currentLocation = l, te(), be(), s.value = 1);
261
+ l && (p.value = l, b._currentLocation = l, ee(), fe(), s.value = 1);
262
262
  }
263
263
  }
264
264
  );
265
- function de() {
265
+ function ye() {
266
266
  if (s.value === 0) {
267
267
  if (!p.value) return;
268
- b._currentLocation = p.value, te(), be(), s.value = 1;
268
+ b._currentLocation = p.value, ee(), fe(), s.value = 1;
269
269
  } else if (s.value === 1) {
270
- if (!Me.value) return;
271
- O.value = K(), se.value = `${Math.random()}`, ve.value = [], s.value = 2;
272
- } else s.value === 2 && Ce();
270
+ if (!ve.value) return;
271
+ A.value = H(), te.value = `${Math.random()}`, ge.value = [], s.value = 2;
272
+ } else s.value === 2 && Pe();
273
273
  }
274
- function we() {
274
+ function Fe() {
275
275
  s.value > 0 && s.value--;
276
276
  }
277
- function Pe(n) {
277
+ function xe(n) {
278
278
  n < s.value && (s.value = n);
279
279
  }
280
- function De() {
280
+ function qe() {
281
281
  V("update:show", !1);
282
282
  }
283
- function ke(n) {
284
- E.value !== n && (E.value = n, P.value = null, B.value = null, ve.value = [], O.value = {
285
- ...O.value,
283
+ function Se(n) {
284
+ q.value !== n && (q.value = n, D.value = null, T.value = null, ge.value = [], A.value = {
285
+ ...A.value,
286
286
  items: [],
287
287
  template: void 0,
288
288
  templateDoc: void 0
289
289
  });
290
290
  }
291
- function ye(n) {
292
- ve.value = n ?? [];
291
+ function Re(n) {
292
+ ge.value = n ?? [];
293
293
  }
294
- We(B, (n) => {
295
- E.value === "template" && n && (O.value = K(), se.value = `${Math.random()}`);
294
+ Ve(T, (n) => {
295
+ q.value === "template" && n && (A.value = H(), te.value = `${Math.random()}`);
296
296
  });
297
- async function te() {
298
- ee.value = !1;
297
+ async function ee() {
298
+ oe.value = !1;
299
299
  try {
300
- await U.readSuppliers(), ee.value = !0;
300
+ await U.readSuppliers(), oe.value = !0;
301
301
  } catch {
302
302
  a.open({
303
303
  title: i("inventory.transfer.form.unableToFetchListOfSuppliers.title"),
@@ -306,8 +306,8 @@ const On = {
306
306
  });
307
307
  }
308
308
  }
309
- async function be() {
310
- Se.value = !0, ze.value = /* @__PURE__ */ new Map();
309
+ async function fe() {
310
+ Ee.value = !0, ze.value = /* @__PURE__ */ new Map();
311
311
  try {
312
312
  const n = await f.readStockBalance(), l = /* @__PURE__ */ new Map();
313
313
  for (const r of n.skus ?? [])
@@ -315,43 +315,43 @@ const On = {
315
315
  ze.value = l;
316
316
  } catch {
317
317
  } finally {
318
- Se.value = !1;
318
+ Ee.value = !1;
319
319
  }
320
320
  }
321
321
  function Ae() {
322
322
  var n;
323
- (n = Te.value) != null && n.getFormData && (O.value = { ...O.value, ...Te.value.getFormData() });
323
+ (n = Te.value) != null && n.getFormData && (A.value = { ...A.value, ...Te.value.getFormData() });
324
324
  }
325
- function Ce() {
326
- if (Ae(), oe.value.length > 0) {
327
- Be.value = !0;
325
+ function Pe() {
326
+ if (Ae(), ne.value.length > 0) {
327
+ ke.value = !0;
328
328
  return;
329
329
  }
330
- re();
330
+ ae();
331
331
  }
332
- function k() {
332
+ function F() {
333
333
  var n;
334
- O.value.items = ((n = O.value.items) == null ? void 0 : n.filter((l) => l.quantity.amount > 0)) ?? [], Be.value = !1, re();
334
+ A.value.items = ((n = A.value.items) == null ? void 0 : n.filter((l) => l.quantity.amount > 0)) ?? [], ke.value = !1, ae();
335
335
  }
336
- function re() {
336
+ function ae() {
337
337
  var r, X;
338
338
  const n = wn.validatePurchaseOrderItems({
339
- skusById: ge.skuById ?? {},
340
- items: O.value.items ?? []
339
+ skusById: he.skuById ?? {},
340
+ items: A.value.items ?? []
341
341
  }), l = Object.values(n).flat();
342
342
  if (l.length > 0) {
343
- const ae = l[0];
343
+ const se = l[0];
344
344
  a.open({
345
- title: `[Row ${ae.index + 1}] "${ae.poItem.sku.name}"`,
346
- message: `${ae.message}`,
345
+ title: `[Row ${se.index + 1}] "${se.poItem.sku.name}"`,
346
+ message: `${se.message}`,
347
347
  type: "error"
348
348
  });
349
349
  return;
350
350
  }
351
351
  (X = (r = Te.value) == null ? void 0 : r.validateInputs) == null || X.call(r);
352
352
  }
353
- async function me() {
354
- const n = O.value;
353
+ async function ie() {
354
+ const n = A.value;
355
355
  if (Z.value = !0, n.items = n.items.filter((l) => l.quantity.amount > 0), !n.items.length) {
356
356
  a.open({
357
357
  title: "Cannot create order",
@@ -366,7 +366,7 @@ const On = {
366
366
  title: i("inventory.transfer.receiveRequest.create.success"),
367
367
  message: i("inventory.transfer.receiveRequest.create.successMessage"),
368
368
  type: "success"
369
- }), V("submitted"), V("update:show", !1), pe();
369
+ }), V("submitted"), V("update:show", !1), ue();
370
370
  } catch (l) {
371
371
  a.open({
372
372
  title: i("inventory.transfer.receiveRequest.create.error.title"),
@@ -377,12 +377,12 @@ const On = {
377
377
  Z.value = !1;
378
378
  }
379
379
  }
380
- function pe() {
381
- s.value = 0, x.value = !1, p.value = null, E.value = null, P.value = null, B.value = null, m.value = "", ce.value = "", G.value = "", ee.value = !1, fe.value = !1, ve.value = [], O.value = K(), se.value = `${Math.random()}`;
380
+ function ue() {
381
+ s.value = 0, x.value = !1, p.value = null, q.value = null, D.value = null, T.value = null, m.value = "", me.value = "", K.value = "", oe.value = !1, pe.value = !1, ge.value = [], A.value = H(), te.value = `${Math.random()}`;
382
382
  }
383
- return (n, l) => (c(), h(_e, null, [
384
- (c(), ue(lt, { to: "body" }, [
385
- N(Nt, {
383
+ return (n, l) => (c(), h(we, null, [
384
+ (c(), de(lt, { to: "body" }, [
385
+ N($t, {
386
386
  "enter-active-class": "transition-opacity duration-150 ease-out",
387
387
  "enter-from-class": "opacity-0",
388
388
  "enter-to-class": "opacity-100",
@@ -390,87 +390,87 @@ const On = {
390
390
  "leave-from-class": "opacity-100",
391
391
  "leave-to-class": "opacity-0"
392
392
  }, {
393
- default: Oe(() => [
394
- n.show ? (c(), h("div", On, [
395
- x.value ? D("", !0) : (c(), h("div", Bn, [
393
+ default: Be(() => [
394
+ n.show ? (c(), h("div", An, [
395
+ x.value ? E("", !0) : (c(), h("div", Bn, [
396
396
  e("span", Tn, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.title")), 1),
397
397
  e("div", In, [
398
398
  N(t(C), {
399
399
  variant: "tertiary",
400
400
  size: "md",
401
401
  label: t(i)("inventory.transfer.receiveRequest.bulk.wizard.cancelBtn"),
402
- onClick: De
402
+ onClick: qe
403
403
  }, null, 8, ["label"]),
404
- s.value > 0 ? (c(), ue(t(C), {
404
+ s.value > 0 ? (c(), de(t(C), {
405
405
  key: 0,
406
406
  variant: "secondary",
407
407
  size: "md",
408
408
  "prepend-icon": "arrow_back",
409
409
  label: t(i)("inventory.transfer.receiveRequest.bulk.wizard.backBtn"),
410
- onClick: we
411
- }, null, 8, ["label"])) : D("", !0),
410
+ onClick: Fe
411
+ }, null, 8, ["label"])) : E("", !0),
412
412
  N(t(C), {
413
413
  size: "md",
414
- disabled: !Ue.value,
414
+ disabled: !Xe.value,
415
415
  loading: Z.value,
416
- label: Le.value,
417
- onClick: de
416
+ label: je.value,
417
+ onClick: ye
418
418
  }, null, 8, ["disabled", "loading", "label"])
419
419
  ])
420
420
  ])),
421
- x.value ? D("", !0) : (c(), h("div", Ln, [
421
+ x.value ? E("", !0) : (c(), h("div", Ln, [
422
422
  e("div", zn, [
423
423
  e("button", {
424
424
  class: "flex flex-col items-center gap-4 min-w-0 group",
425
425
  disabled: s.value <= 0,
426
- onClick: l[0] || (l[0] = (r) => Pe(0))
426
+ onClick: l[0] || (l[0] = (r) => xe(0))
427
427
  }, [
428
428
  e("div", {
429
- class: J([
429
+ class: j([
430
430
  "w-32 h-32 rounded-full flex items-center justify-center text-sm font-semibold transition-colors duration-150",
431
431
  s.value > 0 || s.value === 0 ? "bg-[#FF7823] text-white" : "bg-[#F0F0F0] text-[#6B6C70]"
432
432
  ])
433
433
  }, [
434
- s.value > 0 ? (c(), ue(t($), {
434
+ s.value > 0 ? (c(), de(t($), {
435
435
  key: 0,
436
436
  name: "check",
437
437
  size: "sm"
438
438
  })) : (c(), h("span", Un, "1"))
439
439
  ], 2),
440
440
  e("span", {
441
- class: J(["fm-typo-en-body-xs-500 whitespace-nowrap transition-colors duration-150", s.value >= 0 ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
441
+ class: j(["fm-typo-en-body-xs-500 whitespace-nowrap transition-colors duration-150", s.value >= 0 ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
442
442
  }, " Select destination ", 2)
443
443
  ], 8, Mn),
444
444
  e("div", {
445
- class: J(["flex-1 h-1 mx-8 transition-colors duration-200", s.value > 0 ? "bg-[#FF7823]" : "bg-[#E0E0E0]"])
445
+ class: j(["flex-1 h-1 mx-8 transition-colors duration-200", s.value > 0 ? "bg-[#FF7823]" : "bg-[#E0E0E0]"])
446
446
  }, null, 2),
447
447
  e("button", {
448
448
  class: "flex flex-col items-center gap-4 min-w-0 group",
449
449
  disabled: s.value <= 1,
450
- onClick: l[1] || (l[1] = (r) => Pe(1))
450
+ onClick: l[1] || (l[1] = (r) => xe(1))
451
451
  }, [
452
452
  e("div", {
453
- class: J([
453
+ class: j([
454
454
  "w-32 h-32 rounded-full flex items-center justify-center text-sm font-semibold transition-colors duration-150",
455
455
  s.value > 1 || s.value === 1 ? "bg-[#FF7823] text-white" : "bg-[#F0F0F0] text-[#6B6C70]"
456
456
  ])
457
457
  }, [
458
- s.value > 1 ? (c(), ue(t($), {
458
+ s.value > 1 ? (c(), de(t($), {
459
459
  key: 0,
460
460
  name: "check",
461
461
  size: "sm"
462
462
  })) : (c(), h("span", Jn, "2"))
463
463
  ], 2),
464
464
  e("span", {
465
- class: J(["fm-typo-en-body-xs-500 whitespace-nowrap transition-colors duration-150", s.value >= 1 ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
466
- }, v(q.value), 3)
465
+ class: j(["fm-typo-en-body-xs-500 whitespace-nowrap transition-colors duration-150", s.value >= 1 ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
466
+ }, v(Le.value), 3)
467
467
  ], 8, Vn),
468
468
  e("div", {
469
- class: J(["flex-1 h-1 mx-8 transition-colors duration-200", s.value > 1 ? "bg-[#FF7823]" : "bg-[#E0E0E0]"])
469
+ class: j(["flex-1 h-1 mx-8 transition-colors duration-200", s.value > 1 ? "bg-[#FF7823]" : "bg-[#E0E0E0]"])
470
470
  }, null, 2),
471
471
  e("button", jn, [
472
472
  e("div", {
473
- class: J([
473
+ class: j([
474
474
  "w-32 h-32 rounded-full flex items-center justify-center text-sm font-semibold transition-colors duration-150",
475
475
  s.value === 2 ? "bg-[#FF7823] text-white" : "bg-[#F0F0F0] text-[#6B6C70]"
476
476
  ])
@@ -478,8 +478,8 @@ const On = {
478
478
  e("span", null, "3", -1)
479
479
  ]), 2),
480
480
  e("span", {
481
- class: J(["fm-typo-en-body-xs-500 whitespace-nowrap transition-colors duration-150", s.value >= 2 ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
482
- }, v(S.value), 3)
481
+ class: j(["fm-typo-en-body-xs-500 whitespace-nowrap transition-colors duration-150", s.value >= 2 ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
482
+ }, v(Me.value), 3)
483
483
  ])
484
484
  ])
485
485
  ])),
@@ -491,7 +491,7 @@ const On = {
491
491
  e("p", Gn, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.step1Desc")), 1)
492
492
  ]),
493
493
  e("div", Xn, [
494
- N(t(L), {
494
+ N(t(z), {
495
495
  "model-value": m.value,
496
496
  "onUpdate:modelValue": l[2] || (l[2] = (r) => m.value = r),
497
497
  "prepend-icon": "search",
@@ -499,12 +499,12 @@ const On = {
499
499
  }, null, 8, ["model-value", "placeholder"])
500
500
  ]),
501
501
  e("div", Zn, [
502
- (c(!0), h(_e, null, Ke(z.value, (r, X) => {
503
- var ae, he, le, je, Ze, yt, bt;
502
+ (c(!0), h(we, null, Ke(P.value, (r, X) => {
503
+ var se, be, re, Ue, Ze, yt, bt;
504
504
  return c(), h("div", {
505
505
  key: r.dbName,
506
- class: J(["flex items-center gap-8 px-12 h-[67px] cursor-pointer transition-colors duration-150", [
507
- ((ae = p.value) == null ? void 0 : ae.dbName) === r.dbName ? "bg-[#FFF5EE]" : "hover:bg-[#FAFAFA]",
506
+ class: j(["flex items-center gap-8 px-12 h-[67px] cursor-pointer transition-colors duration-150", [
507
+ ((se = p.value) == null ? void 0 : se.dbName) === r.dbName ? "bg-[#FFF5EE]" : "hover:bg-[#FAFAFA]",
508
508
  X > 0 ? "border-t border-[#F0F0F0]" : ""
509
509
  ]]),
510
510
  onClick: (Ra) => p.value = r
@@ -516,25 +516,25 @@ const On = {
516
516
  e("div", os, v(r.name), 1),
517
517
  e("div", as, [
518
518
  ot(v(r.doc.profile.code ? `#${r.doc.profile.code}` : t(i)("inventory.transfer.receiveRequest.bulk.wizard.noCode")) + " ", 1),
519
- (he = r.doc.profile.address) != null && he.line1 || (le = r.doc.profile.address) != null && le.city ? (c(), h(_e, { key: 0 }, [
520
- ot(" · " + v([(je = r.doc.profile.address) == null ? void 0 : je.line1, (Ze = r.doc.profile.address) == null ? void 0 : Ze.city].filter(Boolean).join(" · ")), 1)
521
- ], 64)) : D("", !0)
519
+ (be = r.doc.profile.address) != null && be.line1 || (re = r.doc.profile.address) != null && re.city ? (c(), h(we, { key: 0 }, [
520
+ ot(" · " + v([(Ue = r.doc.profile.address) == null ? void 0 : Ue.line1, (Ze = r.doc.profile.address) == null ? void 0 : Ze.city].filter(Boolean).join(" · ")), 1)
521
+ ], 64)) : E("", !0)
522
522
  ])
523
523
  ]),
524
524
  e("span", rs, v(r.type === "warehouse" ? "Warehouse" : "Restaurant"), 1),
525
525
  e("div", {
526
- class: J([
526
+ class: j([
527
527
  "w-[18px] h-[18px] rounded-full border flex items-center justify-center shrink-0 transition-colors duration-150",
528
528
  ((yt = p.value) == null ? void 0 : yt.dbName) === r.dbName ? "border-[#FF7823]" : "border-[#CCCCCC]"
529
529
  ])
530
530
  }, [
531
- ((bt = p.value) == null ? void 0 : bt.dbName) === r.dbName ? (c(), h("div", ls)) : D("", !0)
531
+ ((bt = p.value) == null ? void 0 : bt.dbName) === r.dbName ? (c(), h("div", ls)) : E("", !0)
532
532
  ], 2)
533
533
  ], 10, es);
534
534
  }), 128)),
535
- z.value.length === 0 ? (c(), h("div", is, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.noOutletsAvailable")), 1)) : D("", !0)
535
+ P.value.length === 0 ? (c(), h("div", is, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.noOutletsAvailable")), 1)) : E("", !0)
536
536
  ])
537
- ])) : D("", !0),
537
+ ])) : E("", !0),
538
538
  s.value === 1 ? (c(), h("div", us, [
539
539
  e("div", cs, [
540
540
  e("h3", ds, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.step2Heading")), 1),
@@ -542,74 +542,74 @@ const On = {
542
542
  ]),
543
543
  e("div", fs, [
544
544
  e("div", {
545
- class: J([
545
+ class: j([
546
546
  "border rounded-xl p-16 cursor-pointer transition-all duration-150 flex flex-col",
547
- E.value === "transfer" ? "border-[#FF7823] bg-[#FFF5EE]" : "border-[#E0E0E0] bg-white hover:bg-[#FAFAFA]"
547
+ q.value === "transfer" ? "border-[#FF7823] bg-[#FFF5EE]" : "border-[#E0E0E0] bg-white hover:bg-[#FAFAFA]"
548
548
  ]),
549
- onClick: l[3] || (l[3] = (r) => ke("transfer"))
549
+ onClick: l[3] || (l[3] = (r) => Se("transfer"))
550
550
  }, [
551
551
  e("div", ps, [
552
552
  e("div", {
553
- class: J(["w-36 h-36 rounded-xl flex items-center justify-center shrink-0", E.value === "transfer" ? "bg-[#FF7823]" : "bg-[#F0F0F0]"])
553
+ class: j(["w-36 h-36 rounded-xl flex items-center justify-center shrink-0", q.value === "transfer" ? "bg-[#FF7823]" : "bg-[#F0F0F0]"])
554
554
  }, [
555
555
  N(t($), {
556
556
  name: "swap_horiz",
557
557
  size: "md",
558
- class: J(E.value === "transfer" ? "text-white" : "text-[#6B6C70]")
558
+ class: j(q.value === "transfer" ? "text-white" : "text-[#6B6C70]")
559
559
  }, null, 8, ["class"])
560
560
  ], 2),
561
561
  e("div", {
562
- class: J(["w-16 h-16 rounded-full flex items-center justify-center shrink-0", E.value === "transfer" ? "bg-[#FF7823]" : "border border-[#CCCCCC]"])
562
+ class: j(["w-16 h-16 rounded-full flex items-center justify-center shrink-0", q.value === "transfer" ? "bg-[#FF7823]" : "border border-[#CCCCCC]"])
563
563
  }, [
564
- E.value === "transfer" ? (c(), ue(t($), {
564
+ q.value === "transfer" ? (c(), de(t($), {
565
565
  key: 0,
566
566
  name: "check",
567
567
  size: "sm",
568
568
  class: "text-white"
569
- })) : D("", !0)
569
+ })) : E("", !0)
570
570
  ], 2)
571
571
  ]),
572
572
  e("div", vs, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.outletToOutlet")), 1),
573
573
  e("div", ys, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.outletToOutletDesc")), 1)
574
574
  ], 2),
575
575
  e("div", {
576
- class: J([
576
+ class: j([
577
577
  "border rounded-xl p-16 cursor-pointer transition-all duration-150 flex flex-col",
578
- E.value === "template" ? "border-[#FF7823] bg-[#FFF5EE]" : "border-[#E0E0E0] bg-white hover:bg-[#FAFAFA]"
578
+ q.value === "template" ? "border-[#FF7823] bg-[#FFF5EE]" : "border-[#E0E0E0] bg-white hover:bg-[#FAFAFA]"
579
579
  ]),
580
- onClick: l[4] || (l[4] = (r) => ke("template"))
580
+ onClick: l[4] || (l[4] = (r) => Se("template"))
581
581
  }, [
582
582
  e("div", bs, [
583
583
  e("div", {
584
- class: J(["w-36 h-36 rounded-xl flex items-center justify-center shrink-0", E.value === "template" ? "bg-[#FF7823]" : "bg-[#F0F0F0]"])
584
+ class: j(["w-36 h-36 rounded-xl flex items-center justify-center shrink-0", q.value === "template" ? "bg-[#FF7823]" : "bg-[#F0F0F0]"])
585
585
  }, [
586
586
  N(t($), {
587
587
  name: "description",
588
588
  size: "md",
589
- class: J(E.value === "template" ? "text-white" : "text-[#6B6C70]")
589
+ class: j(q.value === "template" ? "text-white" : "text-[#6B6C70]")
590
590
  }, null, 8, ["class"])
591
591
  ], 2),
592
592
  e("div", {
593
- class: J(["w-16 h-16 rounded-full flex items-center justify-center shrink-0", E.value === "template" ? "bg-[#FF7823]" : "border border-[#CCCCCC]"])
593
+ class: j(["w-16 h-16 rounded-full flex items-center justify-center shrink-0", q.value === "template" ? "bg-[#FF7823]" : "border border-[#CCCCCC]"])
594
594
  }, [
595
- E.value === "template" ? (c(), ue(t($), {
595
+ q.value === "template" ? (c(), de(t($), {
596
596
  key: 0,
597
597
  name: "check",
598
598
  size: "sm",
599
599
  class: "text-white"
600
- })) : D("", !0)
600
+ })) : E("", !0)
601
601
  ], 2)
602
602
  ]),
603
603
  e("div", hs, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.fromTemplate")), 1),
604
604
  e("div", gs, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.fromTemplateDesc")), 1)
605
605
  ], 2)
606
606
  ]),
607
- E.value === "transfer" ? (c(), h(_e, { key: 0 }, [
607
+ q.value === "transfer" ? (c(), h(we, { key: 0 }, [
608
608
  e("div", _s, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.step2SourceHeading")), 1),
609
609
  e("div", xs, [
610
- N(t(L), {
611
- "model-value": ce.value,
612
- "onUpdate:modelValue": l[5] || (l[5] = (r) => ce.value = r),
610
+ N(t(z), {
611
+ "model-value": me.value,
612
+ "onUpdate:modelValue": l[5] || (l[5] = (r) => me.value = r),
613
613
  "prepend-icon": "search",
614
614
  placeholder: t(i)(
615
615
  "inventory.transfer.receiveRequest.bulk.wizard.step2SearchSourcePlaceholder"
@@ -617,15 +617,15 @@ const On = {
617
617
  }, null, 8, ["model-value", "placeholder"])
618
618
  ]),
619
619
  e("div", ws, [
620
- (c(!0), h(_e, null, Ke(Q.value, (r, X) => {
621
- var ae, he, le;
620
+ (c(!0), h(we, null, Ke(w.value, (r, X) => {
621
+ var se, be, re;
622
622
  return c(), h("div", {
623
623
  key: r.dbName,
624
- class: J(["flex items-center gap-8 px-12 h-[67px] cursor-pointer transition-colors duration-150", [
625
- ((ae = P.value) == null ? void 0 : ae.doc._id) === r.doc._id ? "bg-[#FFF5EE]" : "hover:bg-[#FAFAFA]",
624
+ class: j(["flex items-center gap-8 px-12 h-[67px] cursor-pointer transition-colors duration-150", [
625
+ ((se = D.value) == null ? void 0 : se.doc._id) === r.doc._id ? "bg-[#FFF5EE]" : "hover:bg-[#FAFAFA]",
626
626
  X > 0 ? "border-t border-[#F0F0F0]" : ""
627
627
  ]]),
628
- onClick: (je) => P.value = r
628
+ onClick: (Ue) => D.value = r
629
629
  }, [
630
630
  e("div", Cs, [
631
631
  e("span", Fs, v(r.name.slice(0, 2).toUpperCase()), 1)
@@ -633,91 +633,91 @@ const On = {
633
633
  e("div", Ss, [
634
634
  e("div", Rs, v(r.name), 1),
635
635
  e("div", Ps, [
636
- ot(v(Je(r) ? `#${Je(r)}` : t(i)("inventory.transfer.receiveRequest.bulk.wizard.noCode")) + " ", 1),
637
- o(r) ? (c(), h(_e, { key: 0 }, [
636
+ ot(v(ce(r) ? `#${ce(r)}` : t(i)("inventory.transfer.receiveRequest.bulk.wizard.noCode")) + " ", 1),
637
+ o(r) ? (c(), h(we, { key: 0 }, [
638
638
  ot(" · " + v(o(r)), 1)
639
- ], 64)) : D("", !0)
639
+ ], 64)) : E("", !0)
640
640
  ])
641
641
  ]),
642
642
  e("span", Ds, v(r.type === "warehouse" ? "Warehouse" : r.type === "supplier" ? "Supplier" : "Restaurant"), 1),
643
643
  e("div", {
644
- class: J([
644
+ class: j([
645
645
  "w-[18px] h-[18px] rounded-full border flex items-center justify-center shrink-0 transition-colors duration-150",
646
- ((he = P.value) == null ? void 0 : he.doc._id) === r.doc._id ? "border-[#FF7823]" : "border-[#CCCCCC]"
646
+ ((be = D.value) == null ? void 0 : be.doc._id) === r.doc._id ? "border-[#FF7823]" : "border-[#CCCCCC]"
647
647
  ])
648
648
  }, [
649
- ((le = P.value) == null ? void 0 : le.doc._id) === r.doc._id ? (c(), h("div", Es)) : D("", !0)
649
+ ((re = D.value) == null ? void 0 : re.doc._id) === r.doc._id ? (c(), h("div", Es)) : E("", !0)
650
650
  ], 2)
651
651
  ], 10, ks);
652
652
  }), 128)),
653
- Q.value.length === 0 ? (c(), h("div", qs, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.noOutletsAvailable")), 1)) : D("", !0)
653
+ w.value.length === 0 ? (c(), h("div", qs, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.noOutletsAvailable")), 1)) : E("", !0)
654
654
  ])
655
- ], 64)) : D("", !0),
656
- E.value === "template" ? (c(), h(_e, { key: 1 }, [
655
+ ], 64)) : E("", !0),
656
+ q.value === "template" ? (c(), h(we, { key: 1 }, [
657
657
  e("div", Ns, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.step2TemplateHeading")), 1),
658
658
  e("div", $s, [
659
- N(t(L), {
660
- "model-value": G.value,
661
- "onUpdate:modelValue": l[6] || (l[6] = (r) => G.value = r),
659
+ N(t(z), {
660
+ "model-value": K.value,
661
+ "onUpdate:modelValue": l[6] || (l[6] = (r) => K.value = r),
662
662
  "prepend-icon": "search",
663
663
  placeholder: t(i)(
664
664
  "inventory.transfer.receiveRequest.bulk.wizard.step2SearchTemplatePlaceholder"
665
665
  )
666
666
  }, null, 8, ["model-value", "placeholder"])
667
667
  ]),
668
- t(y).loading ? (c(), h("div", As, [
668
+ t(y).loading ? (c(), h("div", Os, [
669
669
  N(t($), {
670
670
  name: "progress_activity",
671
671
  class: "text-[#FF7823] animate-spin"
672
672
  })
673
- ])) : H.value.length === 0 ? (c(), h("div", Os, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.noTemplatesAvailable")), 1)) : (c(), h("div", Bs, [
674
- (c(!0), h(_e, null, Ke(H.value, (r) => (c(), h("div", {
673
+ ])) : M.value.length === 0 ? (c(), h("div", As, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.noTemplatesAvailable")), 1)) : (c(), h("div", Bs, [
674
+ (c(!0), h(we, null, Ke(M.value, (r) => (c(), h("div", {
675
675
  key: r._id,
676
- class: J([
676
+ class: j([
677
677
  "border rounded-lg px-16 py-12 cursor-pointer transition-all duration-150 flex items-center gap-12",
678
- B.value === r._id ? "border-[#FF7823] bg-[#FFF5EE]" : "border-[#E0E0E0] bg-white hover:bg-[#FAFAFA]"
678
+ T.value === r._id ? "border-[#FF7823] bg-[#FFF5EE]" : "border-[#E0E0E0] bg-white hover:bg-[#FAFAFA]"
679
679
  ]),
680
- onClick: (X) => B.value = r._id
680
+ onClick: (X) => T.value = r._id
681
681
  }, [
682
682
  e("div", Is, [
683
683
  e("div", Ls, v(r.name), 1),
684
- e("div", zs, v(M(r)) + " · " + v(r.purchaseOrder.items.length) + " items ", 1)
684
+ e("div", zs, v(I(r)) + " · " + v(r.purchaseOrder.items.length) + " items ", 1)
685
685
  ]),
686
686
  e("div", {
687
- class: J([
687
+ class: j([
688
688
  "w-[18px] h-[18px] rounded-full border flex items-center justify-center shrink-0 transition-colors duration-150",
689
- B.value === r._id ? "border-[#FF7823]" : "border-[#CCCCCC]"
689
+ T.value === r._id ? "border-[#FF7823]" : "border-[#CCCCCC]"
690
690
  ])
691
691
  }, [
692
- B.value === r._id ? (c(), h("div", Ms)) : D("", !0)
692
+ T.value === r._id ? (c(), h("div", Ms)) : E("", !0)
693
693
  ], 2)
694
694
  ], 10, Ts))), 128))
695
695
  ]))
696
- ], 64)) : D("", !0)
697
- ])) : D("", !0),
696
+ ], 64)) : E("", !0)
697
+ ])) : E("", !0),
698
698
  s.value === 2 ? (c(), h("div", Us, [
699
699
  e("div", Vs, [
700
- e("h3", Js, v(S.value), 1)
700
+ e("h3", Js, v(Me.value), 1)
701
701
  ]),
702
- (c(), ue(pn, {
702
+ (c(), de(pn, {
703
703
  ref_key: "formRef",
704
704
  ref: Te,
705
705
  class: "w-full",
706
- "onForm:ready": l[7] || (l[7] = () => fe.value = !0),
707
- "onForm:dataChange": ye,
708
- onValidationSuccess: me,
709
- modelValue: O.value,
710
- "onUpdate:modelValue": l[8] || (l[8] = (r) => O.value = r),
711
- disabled: Xe.value,
712
- "locked-supplier": O.value.supplier,
706
+ "onForm:ready": l[7] || (l[7] = () => pe.value = !0),
707
+ "onForm:dataChange": Re,
708
+ onValidationSuccess: ie,
709
+ modelValue: A.value,
710
+ "onUpdate:modelValue": l[8] || (l[8] = (r) => A.value = r),
711
+ disabled: Ie.value,
712
+ "locked-supplier": A.value.supplier,
713
713
  suppliers: t(U).suppliers,
714
- skus: t(ge).skus,
715
- key: se.value,
714
+ skus: t(he).skus,
715
+ key: te.value,
716
716
  "last-closing-date": n.lastClosingDate,
717
717
  "sku-balance-map": ze.value,
718
- "is-balance-loading": Se.value
718
+ "is-balance-loading": Ee.value
719
719
  }, null, 8, ["modelValue", "disabled", "locked-supplier", "suppliers", "skus", "last-closing-date", "sku-balance-map", "is-balance-loading"]))
720
- ])) : D("", !0)
720
+ ])) : E("", !0)
721
721
  ]),
722
722
  e("div", js, [
723
723
  e("div", Ws, [
@@ -728,74 +728,74 @@ const On = {
728
728
  e("div", Ks, [
729
729
  e("span", Gs, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.summaryDestination")), 1),
730
730
  e("span", {
731
- class: J(["text-[15px] leading-[20px] font-semibold transition-colors duration-200", p.value ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
732
- }, v($e.value), 3),
733
- u.value ? (c(), h("span", Xs, v(u.value), 1)) : D("", !0)
731
+ class: j(["text-[15px] leading-[20px] font-semibold transition-colors duration-200", p.value ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
732
+ }, v(G.value), 3),
733
+ u.value ? (c(), h("span", Xs, v(u.value), 1)) : E("", !0)
734
734
  ]),
735
735
  e("div", Zs, [
736
736
  e("span", eo, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.summaryMethod")), 1),
737
737
  e("span", {
738
- class: J(["text-[15px] leading-[20px] font-semibold transition-colors duration-200", E.value ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
739
- }, v(Re.value), 3)
738
+ class: j(["text-[15px] leading-[20px] font-semibold transition-colors duration-200", q.value ? "text-[#1C1C1E]" : "text-[#B2B3B6]"])
739
+ }, v(le.value), 3)
740
740
  ]),
741
741
  e("div", to, [
742
742
  e("span", no, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.summarySource")), 1),
743
743
  e("span", {
744
- class: J([
744
+ class: j([
745
745
  "text-[15px] leading-[20px] font-semibold transition-colors duration-200",
746
- P.value || B.value ? "text-[#1C1C1E]" : "text-[#B2B3B6]"
746
+ D.value || T.value ? "text-[#1C1C1E]" : "text-[#B2B3B6]"
747
747
  ])
748
- }, v(W.value), 3),
749
- g.value ? (c(), h("span", so, v(g.value), 1)) : D("", !0)
748
+ }, v(Oe.value), 3),
749
+ g.value ? (c(), h("span", so, v(g.value), 1)) : E("", !0)
750
750
  ]),
751
751
  e("div", oo, [
752
752
  e("span", ao, v(t(i)("inventory.transfer.receiveRequest.bulk.wizard.summaryItems")), 1),
753
753
  e("span", {
754
- class: J(["text-[15px] leading-[20px] font-medium transition-colors duration-200", Ne.value ? "text-[#1C1C1E]" : "text-[#6B6C70]"])
755
- }, v(T.value), 3)
754
+ class: j(["text-[15px] leading-[20px] font-medium transition-colors duration-200", Qe.value ? "text-[#1C1C1E]" : "text-[#6B6C70]"])
755
+ }, v(O.value), 3)
756
756
  ])
757
757
  ])
758
758
  ])
759
759
  ])
760
760
  ])
761
- ])) : D("", !0)
761
+ ])) : E("", !0)
762
762
  ]),
763
763
  _: 1
764
764
  })
765
765
  ])),
766
- N(t(A), {
767
- modelValue: Be.value,
768
- "onUpdate:modelValue": l[10] || (l[10] = (r) => Be.value = r),
766
+ N(t(B), {
767
+ modelValue: ke.value,
768
+ "onUpdate:modelValue": l[10] || (l[10] = (r) => ke.value = r),
769
769
  overlay: !0
770
770
  }, {
771
- "dialog-header": Oe(() => [
771
+ "dialog-header": Be(() => [
772
772
  e("div", ro, v(t(i)("inventory.transfer.template.zeroQuantity.title")), 1)
773
773
  ]),
774
- "dialog-footer": Oe(() => [
774
+ "dialog-footer": Be(() => [
775
775
  e("div", fo, [
776
776
  N(t(C), {
777
777
  label: t(i)("common.cancel"),
778
778
  variant: "tertiary",
779
779
  size: "md",
780
- onClick: l[9] || (l[9] = (r) => Be.value = !1)
780
+ onClick: l[9] || (l[9] = (r) => ke.value = !1)
781
781
  }, null, 8, ["label"]),
782
782
  N(t(C), {
783
783
  label: t(i)("inventory.transfer.template.zeroQuantity.removeAll"),
784
784
  variant: "primary",
785
785
  size: "md",
786
786
  "prepend-icon": "delete",
787
- onClick: k
787
+ onClick: F
788
788
  }, null, 8, ["label"])
789
789
  ])
790
790
  ]),
791
- default: Oe(() => [
791
+ default: Be(() => [
792
792
  e("div", lo, [
793
793
  e("div", io, v(t(i)("inventory.transfer.template.zeroQuantity.message", {
794
- count: oe.value.length
794
+ count: ne.value.length
795
795
  })), 1),
796
796
  e("div", uo, [
797
797
  e("ul", co, [
798
- (c(!0), h(_e, null, Ke(oe.value, (r) => (c(), h("li", {
798
+ (c(!0), h(we, null, Ke(ne.value, (r) => (c(), h("li", {
799
799
  key: r.sku._id,
800
800
  class: "fm-typo-en-body-md-400"
801
801
  }, v(r.sku.name) + " (" + v(r.sku.code) + ") ", 1))), 128))
@@ -819,12 +819,12 @@ const On = {
819
819
  blobUrl: {}
820
820
  },
821
821
  emits: ["update:modelValue"],
822
- setup(w, { emit: _ }) {
823
- const C = w, A = _, $ = F(null);
824
- function L() {
825
- A("update:modelValue", !1);
822
+ setup(k, { emit: _ }) {
823
+ const C = k, B = _, $ = S(null);
824
+ function z() {
825
+ B("update:modelValue", !1);
826
826
  }
827
- function j() {
827
+ function W() {
828
828
  var V, i;
829
829
  if (C.blobUrl)
830
830
  try {
@@ -834,11 +834,11 @@ const On = {
834
834
  a.href = C.blobUrl, a.download = "purchase-order.pdf", document.body.appendChild(a), a.click(), document.body.removeChild(a);
835
835
  }
836
836
  }
837
- return (V, i) => (c(), ue(lt, { to: "body" }, [
837
+ return (V, i) => (c(), de(lt, { to: "body" }, [
838
838
  V.modelValue ? (c(), h("div", {
839
839
  key: 0,
840
840
  class: "fixed inset-0 z-[9999] bg-black/50 flex justify-center items-center",
841
- onClick: $t(L, ["self"])
841
+ onClick: Ot(z, ["self"])
842
842
  }, [
843
843
  e("div", vo, [
844
844
  e("div", yo, [
@@ -847,11 +847,11 @@ const On = {
847
847
  e("button", {
848
848
  disabled: V.loading || !V.blobUrl,
849
849
  class: "px-8 py-1.5 bg-blue-500 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",
850
- onClick: j
850
+ onClick: W
851
851
  }, " Print ", 8, ho),
852
852
  e("button", {
853
853
  class: "px-2.5 py-1 bg-transparent border border-gray-300 rounded text-xl leading-none cursor-pointer text-gray-500 hover:bg-gray-100",
854
- onClick: L
854
+ onClick: z
855
855
  }, " × ")
856
856
  ])
857
857
  ]),
@@ -884,10 +884,10 @@ const On = {
884
884
  ref: $,
885
885
  src: V.blobUrl,
886
886
  class: "w-full h-full border-none"
887
- }, null, 8, xo)) : D("", !0)
887
+ }, null, 8, xo)) : E("", !0)
888
888
  ])
889
889
  ])
890
- ])) : D("", !0)
890
+ ])) : E("", !0)
891
891
  ]));
892
892
  }
893
893
  }), ko = /* @__PURE__ */ nt({
@@ -899,57 +899,57 @@ const On = {
899
899
  modelModifiers: {}
900
900
  }),
901
901
  emits: ["update:modelValue"],
902
- setup(w) {
903
- const { t: _ } = st(), C = w, A = Ot(w, "modelValue"), $ = F(!1), L = F(""), j = I(() => {
904
- const d = L.value.trim().toLowerCase();
902
+ setup(k) {
903
+ const { t: _ } = st(), C = k, B = Bt(k, "modelValue"), $ = S(!1), z = S(""), W = L(() => {
904
+ const d = z.value.trim().toLowerCase();
905
905
  return d ? C.locations.filter(
906
906
  (y) => y.name.toLowerCase().includes(d) || (y.doc.profile.code ?? "").toLowerCase().includes(d)
907
907
  ) : C.locations;
908
- }), V = I(() => A.value.length), i = I(
909
- () => j.value.length > 0 && j.value.every((d) => A.value.includes(d.dbName))
910
- ), a = I(
911
- () => j.value.some((d) => A.value.includes(d.dbName)) && !i.value
912
- ), b = I(() => {
908
+ }), V = L(() => B.value.length), i = L(
909
+ () => W.value.length > 0 && W.value.every((d) => B.value.includes(d.dbName))
910
+ ), a = L(
911
+ () => W.value.some((d) => B.value.includes(d.dbName)) && !i.value
912
+ ), b = L(() => {
913
913
  if (V.value === 0) return _("inventory.transfer.receiveRequest.bulk.noLocationsSelected");
914
914
  if (V.value === 1) {
915
- const d = C.locations.find((y) => y.dbName === A.value[0]);
916
- return d ? `${d.name} (${d.doc.profile.code ?? "--"})` : A.value[0];
915
+ const d = C.locations.find((y) => y.dbName === B.value[0]);
916
+ return d ? `${d.name} (${d.doc.profile.code ?? "--"})` : B.value[0];
917
917
  }
918
918
  return _("inventory.transfer.receiveRequest.bulk.locationsSelected", [V.value]);
919
919
  });
920
920
  function U() {
921
- const d = j.value.map((y) => y.dbName);
922
- i.value ? A.value = A.value.filter((y) => !d.includes(y)) : A.value = [.../* @__PURE__ */ new Set([...A.value, ...d])];
921
+ const d = W.value.map((y) => y.dbName);
922
+ i.value ? B.value = B.value.filter((y) => !d.includes(y)) : B.value = [.../* @__PURE__ */ new Set([...B.value, ...d])];
923
923
  }
924
- function ge(d) {
925
- A.value.includes(d) ? A.value = A.value.filter((y) => y !== d) : A.value = [...A.value, d];
924
+ function he(d) {
925
+ B.value.includes(d) ? B.value = B.value.filter((y) => y !== d) : B.value = [...B.value, d];
926
926
  }
927
927
  function f(d) {
928
- return A.value.includes(d);
928
+ return B.value.includes(d);
929
929
  }
930
930
  return (d, y) => {
931
- const s = qe("FmIcon"), x = qe("FmChip"), p = qe("FmTextField"), m = qe("FmMenuItem"), E = qe("FmMenu");
932
- return c(), ue(E, {
931
+ const s = $e("FmIcon"), x = $e("FmChip"), p = $e("FmTextField"), m = $e("FmMenuItem"), q = $e("FmMenu");
932
+ return c(), de(q, {
933
933
  "model-value": $.value,
934
934
  placement: "bottom-end",
935
935
  "close-on-click": !1,
936
- onMenuChanged: y[1] || (y[1] = (P) => {
937
- $.value = P, P || (L.value = "");
936
+ onMenuChanged: y[1] || (y[1] = (D) => {
937
+ $.value = D, D || (z.value = "");
938
938
  })
939
939
  }, {
940
- "menu-button": Oe(() => [
940
+ "menu-button": Be(() => [
941
941
  N(x, {
942
942
  label: b.value,
943
943
  class: "text-fm-color-neutral-gray-400 cursor-pointer"
944
944
  }, {
945
- default: Oe(() => [
945
+ default: Be(() => [
946
946
  N(s, {
947
947
  name: "storefront",
948
948
  outline: "",
949
949
  size: "sm"
950
950
  }),
951
951
  e("div", {
952
- class: J(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap max-w-[200px]", { "text-fm-color-typo-primary": V.value > 0 }])
952
+ class: j(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap max-w-[200px]", { "text-fm-color-typo-primary": V.value > 0 }])
953
953
  }, v(b.value), 3),
954
954
  N(s, {
955
955
  name: $.value ? "keyboard_arrow_up" : "keyboard_arrow_down",
@@ -960,10 +960,10 @@ const On = {
960
960
  _: 1
961
961
  }, 8, ["label"])
962
962
  ]),
963
- default: Oe(() => [
963
+ default: Be(() => [
964
964
  N(p, {
965
- "model-value": L.value,
966
- "onUpdate:modelValue": y[0] || (y[0] = (P) => L.value = P),
965
+ "model-value": z.value,
966
+ "onUpdate:modelValue": y[0] || (y[0] = (D) => z.value = D),
967
967
  placeholder: t(_)("inventory.common.table.toolbar.filterItems"),
968
968
  class: "my-8"
969
969
  }, null, 8, ["model-value", "placeholder"]),
@@ -974,57 +974,57 @@ const On = {
974
974
  indeterminate: a.value,
975
975
  onClick: U
976
976
  }, null, 8, ["model-value", "label", "indeterminate"]),
977
- (c(!0), h(_e, null, Ke(j.value, (P) => (c(), ue(m, {
978
- key: P.dbName,
979
- "model-value": f(P.dbName),
980
- label: `${P.name} (${P.doc.profile.code ?? "--"})`,
981
- sublabel: P.type === "restaurant" ? t(_)("inventory.common.restaurant") : t(_)("inventory.common.warehouse"),
977
+ (c(!0), h(we, null, Ke(W.value, (D) => (c(), de(m, {
978
+ key: D.dbName,
979
+ "model-value": f(D.dbName),
980
+ label: `${D.name} (${D.doc.profile.code ?? "--"})`,
981
+ sublabel: D.type === "restaurant" ? t(_)("inventory.common.restaurant") : t(_)("inventory.common.warehouse"),
982
982
  "has-checkbox": !0,
983
- onClick: (B) => ge(P.dbName)
983
+ onClick: (T) => he(D.dbName)
984
984
  }, null, 8, ["model-value", "label", "sublabel", "onClick"]))), 128)),
985
- j.value.length === 0 ? (c(), ue(m, {
985
+ W.value.length === 0 ? (c(), de(m, {
986
986
  key: 0,
987
987
  disabled: "",
988
988
  label: t(_)("inventory.common.noResultFound")
989
- }, null, 8, ["label"])) : D("", !0)
989
+ }, null, 8, ["label"])) : E("", !0)
990
990
  ]),
991
991
  _: 1
992
992
  }, 8, ["model-value"]);
993
993
  };
994
994
  }
995
- }), qt = "bulk-jobs-v1";
995
+ }), Nt = "bulk-jobs-v1";
996
996
  function Co() {
997
997
  try {
998
- const w = localStorage.getItem(qt);
999
- return w ? JSON.parse(w) : [];
998
+ const k = localStorage.getItem(Nt);
999
+ return k ? JSON.parse(k) : [];
1000
1000
  } catch {
1001
1001
  return [];
1002
1002
  }
1003
1003
  }
1004
- function Fo(w) {
1004
+ function Fo(k) {
1005
1005
  try {
1006
- localStorage.setItem(qt, JSON.stringify(w));
1006
+ localStorage.setItem(Nt, JSON.stringify(k));
1007
1007
  } catch {
1008
1008
  }
1009
1009
  }
1010
- const kt = 5e3, Ct = 3e3, So = 300, He = ["completed", "failed", "cancelled"];
1011
- function Ro(w, _) {
1010
+ const Ct = 5e3, Ft = 3e3, So = 300, He = ["completed", "failed", "cancelled"];
1011
+ function Ro(k, _) {
1012
1012
  var C;
1013
- return w.cancelled ? "cancelled" : w.message === "completed" ? "completed" : w.message === "error" || (C = w.message) != null && C.startsWith("error:") ? "failed" : w.message === "processing" ? "active" : "waiting";
1013
+ return k.cancelled ? "cancelled" : k.message === "completed" ? "completed" : k.message === "error" || (C = k.message) != null && C.startsWith("error:") ? "failed" : k.message === "processing" ? "active" : "waiting";
1014
1014
  }
1015
1015
  const vt = En("bulkJob", () => {
1016
- const w = F(Co()), _ = /* @__PURE__ */ new Map();
1016
+ const k = S(Co()), _ = /* @__PURE__ */ new Map();
1017
1017
  let C = null;
1018
- We(w, (f) => {
1018
+ Ve(k, (f) => {
1019
1019
  C && clearTimeout(C), C = setTimeout(() => Fo(f), So);
1020
1020
  }, { deep: !0 });
1021
- function A(f, d) {
1022
- var B;
1023
- const y = w.value.find((ce) => ce.jobId === f);
1021
+ function B(f, d) {
1022
+ var T;
1023
+ const y = k.value.find((me) => me.jobId === f);
1024
1024
  let s = Ro(d, y == null ? void 0 : y.type);
1025
1025
  const x = d.errorCount ?? 0;
1026
1026
  s === "completed" && x > 0 && (y == null ? void 0 : y.type) === "download" && (s = "failed");
1027
- const p = d.total ?? 0, m = d.current ?? 0, E = s === "failed" || s === "completed" && x > 0, P = (y == null ? void 0 : y.hidden) && E;
1027
+ const p = d.total ?? 0, m = d.current ?? 0, q = s === "failed" || s === "completed" && x > 0, D = (y == null ? void 0 : y.hidden) && q;
1028
1028
  V(f, {
1029
1029
  status: s,
1030
1030
  progress: p > 0 ? Math.round(m / p * 100) : 0,
@@ -1035,59 +1035,59 @@ const vt = En("bulkJob", () => {
1035
1035
  // Only expose the download button when the job fully succeeded.
1036
1036
  downloadReady: s === "completed" ? d.downloadReady : !1,
1037
1037
  zipSizeBytes: d.zipSizeBytes ?? void 0,
1038
- stalePoIds: (B = d.stalePoIds) != null && B.length ? d.stalePoIds : void 0,
1039
- ...P ? { hidden: !1 } : {}
1040
- }), He.includes(s) && (L(f), y != null && y.hidden && !P && i(f));
1038
+ stalePoIds: (T = d.stalePoIds) != null && T.length ? d.stalePoIds : void 0,
1039
+ ...D ? { hidden: !1 } : {}
1040
+ }), He.includes(s) && (z(f), y != null && y.hidden && !D && i(f));
1041
1041
  }
1042
1042
  function $(f) {
1043
- if (_.has(f) || !w.value.find((G) => G.jobId === f)) return;
1043
+ if (_.has(f) || !k.value.find((K) => K.jobId === f)) return;
1044
1044
  const y = Ge();
1045
1045
  let s = !1, x = null, p = !1;
1046
1046
  async function m() {
1047
1047
  if (p || s) return;
1048
- const G = w.value.find((Z) => Z.jobId === f);
1049
- if (!(!G || He.includes(G.status)))
1048
+ const K = k.value.find((Z) => Z.jobId === f);
1049
+ if (!(!K || He.includes(K.status)))
1050
1050
  try {
1051
- const Z = await y.getBulkJobStatus(G.dbName, f);
1051
+ const Z = await y.getBulkJobStatus(K.dbName, f);
1052
1052
  if (Z && !p && !s) {
1053
- A(f, Z);
1054
- const ee = w.value.find((fe) => fe.jobId === f);
1055
- ee && !He.includes(ee.status) && (x = setTimeout(m, Ct));
1053
+ B(f, Z);
1054
+ const oe = k.value.find((pe) => pe.jobId === f);
1055
+ oe && !He.includes(oe.status) && (x = setTimeout(m, Ft));
1056
1056
  }
1057
1057
  } catch {
1058
- !p && !s && (x = setTimeout(m, Ct));
1058
+ !p && !s && (x = setTimeout(m, Ft));
1059
1059
  }
1060
1060
  }
1061
- const E = qn(), { unsubscribe: P, initialState: B } = E.subscribe(
1061
+ const q = qn(), { unsubscribe: D, initialState: T } = q.subscribe(
1062
1062
  { type: "bulkPo", params: { jobId: f } },
1063
- (G) => {
1064
- s = !0, x && (clearTimeout(x), x = null), A(f, G);
1063
+ (K) => {
1064
+ s = !0, x && (clearTimeout(x), x = null), B(f, K);
1065
1065
  }
1066
- ), ce = () => {
1067
- p = !0, P(), x && (clearTimeout(x), x = null);
1066
+ ), me = () => {
1067
+ p = !0, D(), x && (clearTimeout(x), x = null);
1068
1068
  };
1069
- _.set(f, ce), B.then((G) => {
1070
- const Z = G == null ? void 0 : G.initialState;
1071
- Z && A(f, Z);
1069
+ _.set(f, me), T.then((K) => {
1070
+ const Z = K == null ? void 0 : K.initialState;
1071
+ Z && B(f, Z);
1072
1072
  }).catch(() => {
1073
1073
  }), setTimeout(() => {
1074
- !s && !p && (console.warn(`[bulkJob] SSE silent for job ${f} after ${kt}ms — starting polling fallback`), m());
1075
- }, kt);
1074
+ !s && !p && (console.warn(`[bulkJob] SSE silent for job ${f} after ${Ct}ms — starting polling fallback`), m());
1075
+ }, Ct);
1076
1076
  }
1077
- function L(f) {
1077
+ function z(f) {
1078
1078
  const d = _.get(f);
1079
1079
  d !== void 0 && (d(), _.delete(f));
1080
1080
  }
1081
- function j(f) {
1082
- w.value = [f, ...w.value], $(f.jobId);
1081
+ function W(f) {
1082
+ k.value = [f, ...k.value], $(f.jobId);
1083
1083
  }
1084
- for (const f of w.value)
1084
+ for (const f of k.value)
1085
1085
  He.includes(f.status) || $(f.jobId);
1086
1086
  function V(f, d) {
1087
- const y = w.value.findIndex((s) => s.jobId === f);
1087
+ const y = k.value.findIndex((s) => s.jobId === f);
1088
1088
  if (y !== -1) {
1089
- const s = w.value[y], x = d.status ?? s.status, p = He.includes(x) && !He.includes(s.status) && !s.completedAt;
1090
- w.value[y] = {
1089
+ const s = k.value[y], x = d.status ?? s.status, p = He.includes(x) && !He.includes(s.status) && !s.completedAt;
1090
+ k.value[y] = {
1091
1091
  ...s,
1092
1092
  ...d,
1093
1093
  ...p ? { completedAt: Date.now() } : {}
@@ -1095,10 +1095,10 @@ const vt = En("bulkJob", () => {
1095
1095
  }
1096
1096
  }
1097
1097
  function i(f) {
1098
- L(f), w.value = w.value.filter((d) => d.jobId !== f);
1098
+ z(f), k.value = k.value.filter((d) => d.jobId !== f);
1099
1099
  }
1100
1100
  async function a(f) {
1101
- const d = w.value.find((y) => y.jobId === f);
1101
+ const d = k.value.find((y) => y.jobId === f);
1102
1102
  if (d)
1103
1103
  try {
1104
1104
  await Ge().cancelBulkJob(d.dbName, f);
@@ -1107,7 +1107,7 @@ const vt = En("bulkJob", () => {
1107
1107
  }
1108
1108
  }
1109
1109
  function b(f, d) {
1110
- return w.value.find((y) => y.jobId === f) || j({
1110
+ return k.value.find((y) => y.jobId === f) || W({
1111
1111
  jobId: f,
1112
1112
  type: "download",
1113
1113
  dbName: d,
@@ -1120,8 +1120,8 @@ const vt = En("bulkJob", () => {
1120
1120
  startedAt: Date.now(),
1121
1121
  hidden: !0
1122
1122
  }), new Promise((y, s) => {
1123
- const x = We(
1124
- () => w.value.find((p) => p.jobId === f),
1123
+ const x = Ve(
1124
+ () => k.value.find((p) => p.jobId === f),
1125
1125
  (p) => {
1126
1126
  if (!p) {
1127
1127
  x(), s(new Error("PDF generation job not found"));
@@ -1144,30 +1144,30 @@ const vt = En("bulkJob", () => {
1144
1144
  );
1145
1145
  });
1146
1146
  }
1147
- const U = I(
1148
- () => w.value.filter((f) => !f.hidden && (f.status === "waiting" || f.status === "active"))
1149
- ), ge = I(() => U.value.length > 0);
1150
- return { jobs: w, addJob: j, updateJob: V, removeJob: i, cancelJob: a, waitForPdfJob: b, activeJobs: U, hasActiveJobs: ge };
1151
- }), tt = F(), Ee = F();
1147
+ const U = L(
1148
+ () => k.value.filter((f) => !f.hidden && (f.status === "waiting" || f.status === "active"))
1149
+ ), he = L(() => U.value.length > 0);
1150
+ return { jobs: k, addJob: W, updateJob: V, removeJob: i, cancelJob: a, waitForPdfJob: b, activeJobs: U, hasActiveJobs: he };
1151
+ }), tt = S(), Ne = S();
1152
1152
  let dt = 0;
1153
- const mt = F();
1154
- function Po(w) {
1155
- const _ = mn(), C = it(), A = Et(), $ = Pt(), L = Rt(), j = xn(), V = Dt(), i = F(!1), a = ut(), { t: b } = st(), U = Ge(), ge = Kt(), f = vt(), d = F([]), y = F([]), s = F(new Array()), x = F(
1153
+ const mt = S();
1154
+ function Po(k) {
1155
+ const _ = mn(), C = it(), B = qt(), $ = Dt(), z = Pt(), W = xn(), V = Et(), i = S(!1), a = ut(), { t: b } = st(), U = Ge(), he = Gt(), f = vt(), d = S([]), y = S([]), s = S(new Array()), x = S(
1156
1156
  new Array()
1157
- ), p = F(
1158
- w != null && w.startDate && (w != null && w.endDate) ? w : pt()
1159
- ), m = I(() => {
1157
+ ), p = S(
1158
+ k != null && k.startDate && (k != null && k.endDate) ? k : pt()
1159
+ ), m = L(() => {
1160
1160
  const o = new Date(p.value.startDate), u = new Date(p.value.endDate);
1161
1161
  return {
1162
1162
  start: Pn(o).toISOString(),
1163
1163
  end: Rn(u).toISOString()
1164
1164
  };
1165
- }), E = Vt(), P = F(null), B = F([]), ce = F(), G = F(!1), Z = F(null);
1166
- let ee = null;
1167
- function fe() {
1168
- ee && (ee.abort(), ee = null, i.value = !1, G.value = !1, Z.value = null);
1165
+ }), q = Jt(), D = S(null), T = S([]), me = S(), K = S(!1), Z = S(null);
1166
+ let oe = null;
1167
+ function pe() {
1168
+ oe && (oe.abort(), oe = null, i.value = !1, K.value = !1, Z.value = null);
1169
1169
  }
1170
- function Be(o) {
1170
+ function ke(o) {
1171
1171
  const u = C.locations.find((g) => g.dbName === o._locationDbName);
1172
1172
  if (!u) return null;
1173
1173
  if (u.type === "restaurant") {
@@ -1177,70 +1177,70 @@ function Po(w) {
1177
1177
  }
1178
1178
  return u;
1179
1179
  }
1180
- function Se(o) {
1180
+ function Ee(o) {
1181
1181
  const u = C.locations.find((g) => g.dbName === o._locationDbName);
1182
1182
  u && (C._currentLocation = u);
1183
1183
  }
1184
1184
  async function ze(o, u, g) {
1185
- const T = d.value.map((O) => ({ dbName: O })), M = T.length;
1186
- Z.value = { done: 0, total: M };
1187
- let R = u.cursor, Y = u.retryFailed, K = !0;
1188
- for (; K && !g.aborted; ) {
1189
- const O = await U.getBulkPaginatedPurchaseOrders(
1185
+ const O = d.value.map((A) => ({ dbName: A })), I = O.length;
1186
+ Z.value = { done: 0, total: I };
1187
+ let R = u.cursor, Q = u.retryFailed, H = !0;
1188
+ for (; H && !g.aborted; ) {
1189
+ const A = await U.getBulkPaginatedPurchaseOrders(
1190
1190
  {
1191
- locations: T,
1191
+ locations: O,
1192
1192
  ...m.value,
1193
1193
  pageSize: 100,
1194
1194
  cursor: R,
1195
- retryFailed: Y
1195
+ retryFailed: Q
1196
1196
  },
1197
1197
  g
1198
1198
  );
1199
1199
  if (g.aborted) return;
1200
- Y = void 0, Z.value = {
1201
- done: Math.max(0, M - O.pendingLocations),
1202
- total: M
1200
+ Q = void 0, Z.value = {
1201
+ done: Math.max(0, I - A.pendingLocations),
1202
+ total: I
1203
1203
  }, o.push(
1204
- ...O.data.map(
1205
- ({ locationDbName: se, ...oe }) => ({ ...oe, _locationDbName: se })
1204
+ ...A.data.map(
1205
+ ({ locationDbName: te, ...ne }) => ({ ...ne, _locationDbName: te })
1206
1206
  )
1207
- ), y.value = [...o].sort((se, oe) => oe._id.localeCompare(se._id)), B.value = O.failed, ce.value = O.cursor, K = O.hasNext, R = O.cursor;
1207
+ ), y.value = [...o].sort((te, ne) => ne._id.localeCompare(te._id)), T.value = A.failed, me.value = A.cursor, H = A.hasNext, R = A.cursor;
1208
1208
  }
1209
1209
  }
1210
1210
  async function Te() {
1211
1211
  const o = y.value.flatMap((u) => u.shipmentIds || []).filter(Boolean);
1212
- s.value = o.length > 0 ? await ge.getShipmentsByIds(o) : [];
1212
+ s.value = o.length > 0 ? await he.getShipmentsByIds(o) : [];
1213
1213
  }
1214
- async function ve(o) {
1214
+ async function ge(o) {
1215
1215
  const u = o.map((g) => {
1216
- var T;
1217
- return ((T = g.request) == null ? void 0 : T.id) ?? "";
1216
+ var O;
1217
+ return ((O = g.request) == null ? void 0 : O.id) ?? "";
1218
1218
  }).filter((g) => g);
1219
1219
  x.value = u.length > 0 ? await U.readRequestByIds(u) : [];
1220
1220
  }
1221
- const xe = 25;
1222
- async function Me() {
1223
- if (y.value = [], s.value = [], B.value = [], ce.value = void 0, d.value.length === 0)
1221
+ const Je = 25;
1222
+ async function ve() {
1223
+ if (y.value = [], s.value = [], T.value = [], me.value = void 0, d.value.length === 0)
1224
1224
  return;
1225
- if (d.value.length > xe) {
1225
+ if (d.value.length > Je) {
1226
1226
  a.open({
1227
1227
  title: "Too many locations selected",
1228
- message: `Select at most ${xe} locations`,
1228
+ message: `Select at most ${Je} locations`,
1229
1229
  type: "warning"
1230
1230
  });
1231
1231
  return;
1232
1232
  }
1233
- fe();
1233
+ pe();
1234
1234
  const o = new AbortController();
1235
- ee = o, i.value = !0;
1235
+ oe = o, i.value = !0;
1236
1236
  try {
1237
- await ze([], {}, o.signal), B.value.length > 0 && a.open({
1237
+ await ze([], {}, o.signal), T.value.length > 0 && a.open({
1238
1238
  title: "Some locations failed to load",
1239
- message: `Purchase orders could not be loaded for ${B.value.length} location(s)`,
1239
+ message: `Purchase orders could not be loaded for ${T.value.length} location(s)`,
1240
1240
  type: "error"
1241
1241
  }), await Te();
1242
- const g = await E.readCurrentLocationLastClosing(!0), T = g == null ? void 0 : g._id;
1243
- T && (P.value = Dn(T)), await A.awaitFeatureLoaded(() => A.mustUsePoTemplate) && await V.fetchTemplates();
1242
+ const g = await q.readCurrentLocationLastClosing(!0), O = g == null ? void 0 : g._id;
1243
+ O && (D.value = Dn(O)), await B.awaitFeatureLoaded(() => B.mustUsePoTemplate) && await V.fetchTemplates();
1244
1244
  } catch (u) {
1245
1245
  if (o.signal.aborted) return;
1246
1246
  a.open({
@@ -1250,17 +1250,17 @@ function Po(w) {
1250
1250
  type: "error"
1251
1251
  });
1252
1252
  } finally {
1253
- ee === o && (ee = null, i.value = !1, Z.value = null);
1253
+ oe === o && (oe = null, i.value = !1, Z.value = null);
1254
1254
  }
1255
1255
  }
1256
- async function Ne() {
1257
- if (!ce.value || !B.value.some((u) => u.retryable)) return;
1258
- fe();
1256
+ async function Qe() {
1257
+ if (!me.value || !T.value.some((u) => u.retryable)) return;
1258
+ pe();
1259
1259
  const o = new AbortController();
1260
- ee = o, G.value = !0;
1260
+ oe = o, K.value = !0;
1261
1261
  try {
1262
1262
  const u = [...y.value];
1263
- if (await ze(u, { cursor: ce.value, retryFailed: !0 }, o.signal), o.signal.aborted) return;
1263
+ if (await ze(u, { cursor: me.value, retryFailed: !0 }, o.signal), o.signal.aborted) return;
1264
1264
  await Te();
1265
1265
  } catch (u) {
1266
1266
  if (o.signal.aborted) return;
@@ -1270,68 +1270,68 @@ function Po(w) {
1270
1270
  type: "error"
1271
1271
  });
1272
1272
  } finally {
1273
- ee === o && (ee = null, G.value = !1, Z.value = null);
1273
+ oe === o && (oe = null, K.value = !1, Z.value = null);
1274
1274
  }
1275
1275
  }
1276
- function Xe(o, u) {
1277
- p.value = { startDate: o, endDate: u }, Me();
1276
+ function Ie(o, u) {
1277
+ p.value = { startDate: o, endDate: u }, ve();
1278
1278
  }
1279
- const Ie = F();
1280
- async function Ue(o) {
1279
+ const Ce = S();
1280
+ async function Xe(o) {
1281
1281
  const u = d.value[0];
1282
1282
  if (u) {
1283
- const M = C.locations.find((R) => R.dbName === u);
1284
- M && (C._currentLocation = M);
1283
+ const I = C.locations.find((R) => R.dbName === u);
1284
+ I && (C._currentLocation = I);
1285
1285
  }
1286
- function g(M) {
1286
+ function g(I) {
1287
1287
  const R = {
1288
- mode: wt.CREATE,
1288
+ mode: kt.CREATE,
1289
1289
  modelValue: o || void 0,
1290
1290
  show: !0,
1291
- "onUpdate:show"(Y) {
1292
- tt.value.show = Y;
1291
+ "onUpdate:show"(Q) {
1292
+ tt.value.show = Q;
1293
1293
  },
1294
- templateId: M,
1295
- lastClosingDate: P.value
1294
+ templateId: I,
1295
+ lastClosingDate: D.value
1296
1296
  };
1297
1297
  tt.value = R;
1298
1298
  }
1299
- let T;
1300
- A.mustUsePoTemplate && !(o != null && o.template) ? _.open({
1299
+ let O;
1300
+ B.mustUsePoTemplate && !(o != null && o.template) ? _.open({
1301
1301
  title: "Create transfer",
1302
1302
  message: "",
1303
1303
  primaryActions: { text: "Select a template", close: !0 },
1304
1304
  secondaryActions: { text: "Outlet to Outlet", variant: "secondary", close: !0 }
1305
1305
  }).onPrimary(async () => {
1306
- T = await j.getTemplateId(), T && g(T);
1306
+ O = await W.getTemplateId(), O && g(O);
1307
1307
  }).onSecondary(() => {
1308
1308
  g(void 0);
1309
- }) : g(T);
1309
+ }) : g(O);
1310
1310
  }
1311
- const Le = Nn();
1312
- async function q(o, u) {
1311
+ const je = Nn();
1312
+ async function Le(o, u) {
1313
1313
  return o.items != null ? o : await U.getPurchaseOrderById(o._id, void 0, u);
1314
1314
  }
1315
- async function S(o) {
1316
- await Le.run(async (u) => {
1317
- Se(o);
1318
- const g = await q(o, u), T = {
1319
- mode: wt.UPDATE,
1320
- modelValue: Wt(g),
1315
+ async function Me(o) {
1316
+ await je.run(async (u) => {
1317
+ Ee(o);
1318
+ const g = await Le(o, u), O = {
1319
+ mode: kt.UPDATE,
1320
+ modelValue: Yt(g),
1321
1321
  show: !0,
1322
- "onUpdate:show"(M) {
1323
- tt.value.show = M;
1322
+ "onUpdate:show"(I) {
1323
+ tt.value.show = I;
1324
1324
  },
1325
- lastClosingDate: P.value
1325
+ lastClosingDate: D.value
1326
1326
  };
1327
- tt.value = T;
1327
+ tt.value = O;
1328
1328
  });
1329
1329
  }
1330
- async function z(o) {
1331
- var Pe, De, ke, ye;
1332
- if (Se(o), !L.currentBusiness.value) return;
1333
- const u = o, g = $.supplierById[o.supplier._id], T = (g == null ? void 0 : g.name) ?? o.supplier.name, M = (g == null ? void 0 : g.email) ?? ((Pe = o.supplier) == null ? void 0 : Pe.email) ?? "";
1334
- if (!M) {
1330
+ async function P(o) {
1331
+ var xe, qe, Se, Re;
1332
+ if (Ee(o), !z.currentBusiness.value) return;
1333
+ const u = o, g = $.supplierById[o.supplier._id], O = (g == null ? void 0 : g.name) ?? o.supplier.name, I = (g == null ? void 0 : g.email) ?? ((xe = o.supplier) == null ? void 0 : xe.email) ?? "";
1334
+ if (!I) {
1335
1335
  a.open({
1336
1336
  title: b("inventory.transfer.receiveRequest.bulk.emailSendError"),
1337
1337
  message: b("inventory.transfer.receiveRequest.bulk.singleEmailNoSupplierEmail"),
@@ -1339,35 +1339,35 @@ function Po(w) {
1339
1339
  });
1340
1340
  return;
1341
1341
  }
1342
- const R = u._locationDbName, Y = o._rev, O = (((De = C.locations.find((te) => te.dbName === R)) == null ? void 0 : De.name) || R).replace(/[/\\?%*:|"<>]/g, "-").trim().slice(0, 50), se = `PO_${o.seqNumber ?? o._id}`.replace(/[/\\?%*:|"<>]/g, "-").slice(0, 50), oe = `${O}/${se}`, de = ++dt;
1343
- let we = null;
1344
- Ee.value = {
1345
- recipientName: T,
1346
- email: M,
1347
- business: L.currentBusiness.value,
1342
+ const R = u._locationDbName, Q = o._rev, A = (((qe = C.locations.find((ee) => ee.dbName === R)) == null ? void 0 : qe.name) || R).replace(/[/\\?%*:|"<>]/g, "-").trim().slice(0, 50), te = `PO_${o.seqNumber ?? o._id}`.replace(/[/\\?%*:|"<>]/g, "-").slice(0, 50), ne = `${A}/${te}`, ye = ++dt;
1343
+ let Fe = null;
1344
+ Ne.value = {
1345
+ recipientName: O,
1346
+ email: I,
1347
+ business: z.currentBusiness.value,
1348
1348
  pdfLoading: !0,
1349
1349
  show: !0,
1350
- "onUpdate:show"(te) {
1351
- !te && we && (URL.revokeObjectURL(we), we = null), Ee.value && (Ee.value = { ...Ee.value, show: te });
1350
+ "onUpdate:show"(ee) {
1351
+ !ee && Fe && (URL.revokeObjectURL(Fe), Fe = null), Ne.value && (Ne.value = { ...Ne.value, show: ee });
1352
1352
  },
1353
- async onDispatch({ sender: te, message: be }) {
1353
+ async onDispatch({ sender: ee, message: fe }) {
1354
1354
  var Ae;
1355
1355
  try {
1356
- const { jobId: Ce } = await U.enqueueBulkEmail(R, {
1357
- senderEmail: te.emailAddress,
1358
- senderName: te.name || ((Ae = L.currentBusiness.value) == null ? void 0 : Ae.name) || "FeedMe Inventory",
1356
+ const { jobId: Pe } = await U.enqueueBulkEmail(R, {
1357
+ senderEmail: ee.emailAddress,
1358
+ senderName: ee.name || ((Ae = z.currentBusiness.value) == null ? void 0 : Ae.name) || "FeedMe Inventory",
1359
1359
  items: [
1360
1360
  {
1361
1361
  subject: `Purchase Order #${o.seqNumber ?? o._id}`,
1362
- recipientName: T,
1363
- recipientEmail: M,
1364
- message: be.trim() || void 0,
1365
- pos: [{ poId: o._id, dbName: R, filename: oe }]
1362
+ recipientName: O,
1363
+ recipientEmail: I,
1364
+ message: fe.trim() || void 0,
1365
+ pos: [{ poId: o._id, dbName: R, filename: ne }]
1366
1366
  }
1367
1367
  ]
1368
1368
  });
1369
1369
  f.addJob({
1370
- jobId: Ce,
1370
+ jobId: Pe,
1371
1371
  type: "email",
1372
1372
  dbName: R,
1373
1373
  title: `Email PO #${o.seqNumber ?? o._id}`,
@@ -1383,30 +1383,30 @@ function Po(w) {
1383
1383
  message: b("inventory.transfer.receiveRequest.bulk.emailQueued"),
1384
1384
  type: "success"
1385
1385
  });
1386
- } catch (Ce) {
1387
- throw console.error("Single email enqueue failed", Ce), a.open({
1386
+ } catch (Pe) {
1387
+ throw console.error("Single email enqueue failed", Pe), a.open({
1388
1388
  title: b("inventory.transfer.receiveRequest.bulk.emailSendError"),
1389
1389
  message: b("inventory.transfer.receiveRequest.bulk.emailErrorMsg"),
1390
1390
  type: "error"
1391
- }), Ce;
1391
+ }), Pe;
1392
1392
  }
1393
1393
  }
1394
1394
  };
1395
1395
  try {
1396
- let te = await U.getPurchaseOrderPdf(o._id, R, Y);
1397
- "pending" in te && (await f.waitForPdfJob(te.jobId, R), te = await U.getPurchaseOrderPdf(o._id, R, Y));
1398
- const be = URL.createObjectURL(te);
1399
- de === dt && ((ke = Ee.value) != null && ke.show) ? (we = be, Ee.value = {
1400
- ...Ee.value,
1401
- pdfBlobUrl: be,
1396
+ let ee = await U.getPurchaseOrderPdf(o._id, R, Q);
1397
+ "pending" in ee && (await f.waitForPdfJob(ee.jobId, R), ee = await U.getPurchaseOrderPdf(o._id, R, Q));
1398
+ const fe = URL.createObjectURL(ee);
1399
+ ye === dt && ((Se = Ne.value) != null && Se.show) ? (Fe = fe, Ne.value = {
1400
+ ...Ne.value,
1401
+ pdfBlobUrl: fe,
1402
1402
  pdfLoading: !1
1403
- }) : URL.revokeObjectURL(be);
1404
- } catch (te) {
1405
- console.error("[promptEmailDialog] PDF preview fetch failed:", te), de === dt && ((ye = Ee.value) != null && ye.show) && (Ee.value = { ...Ee.value, pdfLoading: !1 });
1403
+ }) : URL.revokeObjectURL(fe);
1404
+ } catch (ee) {
1405
+ console.error("[promptEmailDialog] PDF preview fetch failed:", ee), ye === dt && ((Re = Ne.value) != null && Re.show) && (Ne.value = { ...Ne.value, pdfLoading: !1 });
1406
1406
  }
1407
1407
  }
1408
- async function Q(o) {
1409
- if (Se(o), o.items != null)
1408
+ async function w(o) {
1409
+ if (Ee(o), o.items != null)
1410
1410
  return o;
1411
1411
  try {
1412
1412
  return { ...await U.getPurchaseOrderById(o._id), _locationDbName: o._locationDbName };
@@ -1414,111 +1414,111 @@ function Po(w) {
1414
1414
  throw console.error(`Failed to hydrate PO ${o._id} for action`, u), u;
1415
1415
  }
1416
1416
  }
1417
- async function H(o, u) {
1418
- var Y;
1419
- Se(o);
1420
- const g = await Le.run((K) => q(o, K));
1417
+ async function M(o, u) {
1418
+ var Q;
1419
+ Ee(o);
1420
+ const g = await je.run((H) => Le(o, H));
1421
1421
  if (!g) return;
1422
- if (u === void 0 && ((Y = o.request) != null && Y.id))
1422
+ if (u === void 0 && ((Q = o.request) != null && Q.id))
1423
1423
  try {
1424
1424
  u = await U.getLatestPurchaseOrderRequest(o._id);
1425
- } catch (K) {
1426
- console.warn("[transfer-details] POR fetch failed for", o._id, K);
1425
+ } catch (H) {
1426
+ console.warn("[transfer-details] POR fetch failed for", o._id, H);
1427
1427
  }
1428
- const M = Be(o), R = {
1428
+ const I = ke(o), R = {
1429
1429
  poRequest: u,
1430
1430
  purchaseOrder: g,
1431
- transferTo: M == null ? void 0 : M.name,
1432
- transferToDbName: M == null ? void 0 : M.dbName,
1431
+ transferTo: I == null ? void 0 : I.name,
1432
+ transferToDbName: I == null ? void 0 : I.dbName,
1433
1433
  show: !0,
1434
1434
  canResubmit: !1,
1435
1435
  canApprove: !1,
1436
- "onUpdate:show"(K) {
1437
- Ie.value && (Ie.value = { ...Ie.value, show: K });
1436
+ "onUpdate:show"(H) {
1437
+ Ce.value && (Ce.value = { ...Ce.value, show: H });
1438
1438
  },
1439
- scope: St.RECEIVE_REQUEST,
1440
- receivedMap: en(g) ?? {},
1439
+ scope: Rt.RECEIVE_REQUEST,
1440
+ receivedMap: tn(g) ?? {},
1441
1441
  shipments: s.value
1442
1442
  };
1443
- Ie.value = R;
1443
+ Ce.value = R;
1444
1444
  }
1445
- async function ne(o, u, g, T, M) {
1446
- const R = tn();
1445
+ async function Y(o, u, g, O, I) {
1446
+ const R = nn();
1447
1447
  i.value = !0;
1448
1448
  try {
1449
1449
  await R({
1450
1450
  operate: {
1451
1451
  operation: u,
1452
1452
  doc: o,
1453
- options: (u === Ye.enum.confirmDraft || u === Ye.enum.completeReceive) && A.autoReceiveWarehouse ? { autoReceive: !0 } : void 0
1453
+ options: (u === We.enum.confirmDraft || u === We.enum.completeReceive) && B.autoReceiveWarehouse ? { autoReceive: !0 } : void 0
1454
1454
  },
1455
1455
  operateV2: {
1456
1456
  _id: o._id,
1457
1457
  _rev: o._rev ?? "",
1458
- action: u === Ye.enum.submitRequest ? Ye.enum.confirmDraft : u,
1459
- payloads: M ?? []
1458
+ action: u === We.enum.submitRequest ? We.enum.confirmDraft : u,
1459
+ payloads: I ?? []
1460
1460
  },
1461
- transferTo: T
1462
- }), await new Promise((Y) => setTimeout(Y, 1e3)), a.open({ title: "Success", message: g, type: "success" });
1463
- } catch (Y) {
1461
+ transferTo: O
1462
+ }), await new Promise((Q) => setTimeout(Q, 1e3)), a.open({ title: "Success", message: g, type: "success" });
1463
+ } catch (Q) {
1464
1464
  a.open({
1465
1465
  title: "Something went wrong",
1466
1466
  message: "Please try again.",
1467
1467
  type: "error"
1468
- }), console.error("Error when submitting PO operation", u, o, Y);
1468
+ }), console.error("Error when submitting PO operation", u, o, Q);
1469
1469
  } finally {
1470
- i.value = !1, Me();
1470
+ i.value = !1, ve();
1471
1471
  }
1472
1472
  }
1473
- async function $e(o, u, g) {
1474
- Se(o);
1475
- const T = Gt[u];
1476
- if (!T) {
1473
+ async function G(o, u, g) {
1474
+ Ee(o);
1475
+ const O = Xt[u];
1476
+ if (!O) {
1477
1477
  a.open({
1478
1478
  title: "Something went wrong",
1479
- message: `Cannot process order: ${Jt(u)}`,
1479
+ message: `Cannot process order: ${jt(u)}`,
1480
1480
  type: "error"
1481
1481
  });
1482
1482
  return;
1483
1483
  }
1484
- const { successMessage: M, ...R } = T;
1485
- if (u === Ye.enum.rejectDraft) {
1486
- let O = "";
1484
+ const { successMessage: I, ...R } = O;
1485
+ if (u === We.enum.rejectDraft) {
1486
+ let A = "";
1487
1487
  _.open({
1488
1488
  title: R.title,
1489
1489
  message: R.message,
1490
1490
  primaryActions: R.primaryActions,
1491
- contentComponent: Xt,
1491
+ contentComponent: Zt,
1492
1492
  contentComponentProps: {
1493
1493
  message: R.message,
1494
- onChange: (se) => O = se
1494
+ onChange: (te) => A = te
1495
1495
  }
1496
1496
  }).onPrimary(() => {
1497
- ne(o, u, M, g, [
1498
- { action: "rejectDraft", payload: { rejectReason: O } }
1497
+ Y(o, u, I, g, [
1498
+ { action: "rejectDraft", payload: { rejectReason: A } }
1499
1499
  ]);
1500
1500
  });
1501
1501
  return;
1502
1502
  }
1503
- const Y = [], K = Zt();
1504
- K.init(o), (u === Ye.enum.confirmDraft || u === Ye.enum.submitRequest) && Y.push({
1503
+ const Q = [], H = en();
1504
+ H.init(o), (u === We.enum.confirmDraft || u === We.enum.submitRequest) && Q.push({
1505
1505
  action: "confirmDraft",
1506
- payload: K.controller.value.toConfirmDraftData(jt())
1506
+ payload: H.controller.value.toConfirmDraftData(Wt())
1507
1507
  }), _.open({
1508
1508
  title: R.title,
1509
1509
  message: R.message,
1510
1510
  primaryActions: R.primaryActions
1511
1511
  }).onPrimary(() => {
1512
- ne(
1512
+ Y(
1513
1513
  o,
1514
1514
  u,
1515
- M,
1515
+ I,
1516
1516
  g,
1517
- Y
1517
+ Q
1518
1518
  );
1519
1519
  });
1520
1520
  }
1521
- async function Re() {
1521
+ async function le() {
1522
1522
  _.open({
1523
1523
  title: "Upload Transfer",
1524
1524
  primaryActions: { text: "Xilnex transfer note", close: !0 },
@@ -1533,13 +1533,13 @@ function Po(w) {
1533
1533
  mt.value = o;
1534
1534
  });
1535
1535
  }
1536
- async function W() {
1536
+ async function Oe() {
1537
1537
  const { start: o, end: u } = m.value;
1538
1538
  return (await Promise.allSettled(
1539
- d.value.map(async (T) => (await U.getPurchaseOrders({ start: o, end: u, dbName: T })).map((R) => ({ ...R, _locationDbName: T })))
1540
- )).flatMap((T) => T.status === "fulfilled" ? T.value : []);
1539
+ d.value.map(async (O) => (await U.getPurchaseOrders({ start: o, end: u, dbName: O })).map((R) => ({ ...R, _locationDbName: O })))
1540
+ )).flatMap((O) => O.status === "fulfilled" ? O.value : []);
1541
1541
  }
1542
- async function ie(o) {
1542
+ async function _e(o) {
1543
1543
  return f.activeJobs.find((g) => g.type === o) ? new Promise((g) => {
1544
1544
  _.open({
1545
1545
  title: b("inventory.transfer.receiveRequest.bulk.activeJobWarningTitle"),
@@ -1549,10 +1549,10 @@ function Po(w) {
1549
1549
  }).onPrimary(() => g(!0)).onSecondary(() => g(!1));
1550
1550
  }) : !0;
1551
1551
  }
1552
- async function Ve(o) {
1553
- if (!await ie("download")) return;
1552
+ async function J(o) {
1553
+ if (!await _e("download")) return;
1554
1554
  const { startDate: u, endDate: g } = p.value;
1555
- if (Qe(g).diff(Qe(u), "month", !0) > 2) {
1555
+ if (Ye(g).diff(Ye(u), "month", !0) > 2) {
1556
1556
  a.open({
1557
1557
  title: b("inventory.transfer.receiveRequest.bulk.downloadError"),
1558
1558
  message: b("inventory.transfer.receiveRequest.bulk.downloadLimitExceeded"),
@@ -1568,17 +1568,17 @@ function Po(w) {
1568
1568
  });
1569
1569
  return;
1570
1570
  }
1571
- const T = o.map((R) => {
1572
- var oe;
1573
- const K = (((oe = C.locations.find((de) => de.dbName === R._locationDbName)) == null ? void 0 : oe.name) || R._locationDbName).replace(/[/\\?%*:|"<>]/g, "-").trim().slice(0, 50), O = `PO_${R.seqNumber || R._id}`.replace(/[/\\?%*:|"<>]/g, "-").slice(0, 50), se = `${K}/${O}`;
1574
- return { poId: R._id, dbName: R._locationDbName, filename: se, rev: R._rev };
1575
- }), M = d.value[0];
1571
+ const O = o.map((R) => {
1572
+ var ne;
1573
+ const H = (((ne = C.locations.find((ye) => ye.dbName === R._locationDbName)) == null ? void 0 : ne.name) || R._locationDbName).replace(/[/\\?%*:|"<>]/g, "-").trim().slice(0, 50), A = `PO_${R.seqNumber || R._id}`.replace(/[/\\?%*:|"<>]/g, "-").slice(0, 50), te = `${H}/${A}`;
1574
+ return { poId: R._id, dbName: R._locationDbName, filename: te, rev: R._rev };
1575
+ }), I = d.value[0];
1576
1576
  try {
1577
- const { jobId: R, fromCache: Y } = await U.enqueueBulkDownload(M, { items: T });
1577
+ const { jobId: R, fromCache: Q } = await U.enqueueBulkDownload(I, { items: O });
1578
1578
  f.addJob({
1579
1579
  jobId: R,
1580
1580
  type: "download",
1581
- dbName: M,
1581
+ dbName: I,
1582
1582
  title: `Download All (${o.length} POs)`,
1583
1583
  status: "waiting",
1584
1584
  progress: 0,
@@ -1586,7 +1586,7 @@ function Po(w) {
1586
1586
  total: o.length,
1587
1587
  errorCount: 0,
1588
1588
  startedAt: Date.now()
1589
- }), Y ? a.open({
1589
+ }), Q ? a.open({
1590
1590
  title: b("inventory.transfer.receiveRequest.bulk.downloadCachedTitle"),
1591
1591
  message: b("inventory.transfer.receiveRequest.bulk.downloadCachedMsg"),
1592
1592
  type: "info"
@@ -1603,14 +1603,14 @@ function Po(w) {
1603
1603
  });
1604
1604
  }
1605
1605
  }
1606
- async function Je(o) {
1607
- var be, Ae, Ce;
1608
- if (!await ie("email")) return;
1606
+ async function ce(o) {
1607
+ var fe, Ae, Pe;
1608
+ if (!await _e("email")) return;
1609
1609
  const u = [
1610
1610
  _t.enum.RECEIVING,
1611
1611
  _t.enum.PROCESSING
1612
1612
  // PARTIAL_RECEIVED display status maps from PROCESSING
1613
- ], g = o.filter((k) => u.includes(k.status));
1613
+ ], g = o.filter((F) => u.includes(F.status));
1614
1614
  if (g.length === 0) {
1615
1615
  a.open({
1616
1616
  title: b("inventory.transfer.receiveRequest.bulk.emailSendError"),
@@ -1619,58 +1619,58 @@ function Po(w) {
1619
1619
  });
1620
1620
  return;
1621
1621
  }
1622
- if (!((be = L.currentBusiness.value) != null && be._id)) return;
1623
- await ve(g);
1624
- const T = vn(), M = gn(), R = /* @__PURE__ */ new Map(), Y = C.locations.map((k) => k.dbName), K = `business_${L.currentBusiness.value._id}`, O = [.../* @__PURE__ */ new Set([...Y, K])];
1622
+ if (!((fe = z.currentBusiness.value) != null && fe._id)) return;
1623
+ await ge(g);
1624
+ const O = vn(), I = gn(), R = /* @__PURE__ */ new Map(), Q = C.locations.map((F) => F.dbName), H = `business_${z.currentBusiness.value._id}`, A = [.../* @__PURE__ */ new Set([...Q, H])];
1625
1625
  await Promise.allSettled(
1626
- O.map(async (k) => {
1626
+ A.map(async (F) => {
1627
1627
  try {
1628
- (await M.readSuppliersByDbName(k)).forEach((me) => {
1629
- const pe = R.get(me._id);
1630
- (!pe || !pe.email && me.email) && R.set(me._id, me);
1628
+ (await I.readSuppliersByDbName(F)).forEach((ie) => {
1629
+ const ue = R.get(ie._id);
1630
+ (!ue || !ue.email && ie.email) && R.set(ie._id, ie);
1631
1631
  });
1632
- } catch (re) {
1633
- console.warn("[emailAll] fetch failed for", k, re);
1632
+ } catch (ae) {
1633
+ console.warn("[emailAll] fetch failed for", F, ae);
1634
1634
  }
1635
1635
  })
1636
1636
  );
1637
- function se(k) {
1638
- var me;
1639
- const re = R.get(k.supplier._id);
1640
- return (re == null ? void 0 : re.email) || ((me = k.supplier) == null ? void 0 : me.email);
1641
- }
1642
- const oe = [], de = [];
1643
- for (const k of g)
1644
- se(k) ? oe.push(k) : de.push(k);
1645
- const we = Fe(
1637
+ function te(F) {
1638
+ var ie;
1639
+ const ae = R.get(F.supplier._id);
1640
+ return (ae == null ? void 0 : ae.email) || ((ie = F.supplier) == null ? void 0 : ie.email);
1641
+ }
1642
+ const ne = [], ye = [];
1643
+ for (const F of g)
1644
+ te(F) ? ne.push(F) : ye.push(F);
1645
+ const Fe = De(
1646
1646
  "p",
1647
1647
  { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" },
1648
1648
  b("inventory.transfer.receiveRequest.bulk.emailAllowedStatusInfo")
1649
1649
  );
1650
- if (de.length > 0) {
1651
- const k = /* @__PURE__ */ new Map();
1652
- for (const pe of de) {
1653
- const n = pe.supplier._id;
1654
- k.has(n) || k.set(n, { supplierName: pe.supplier.name, pos: [] }), k.get(n).pos.push(pe);
1650
+ if (ye.length > 0) {
1651
+ const F = /* @__PURE__ */ new Map();
1652
+ for (const ue of ye) {
1653
+ const n = ue.supplier._id;
1654
+ F.has(n) || F.set(n, { supplierName: ue.supplier.name, pos: [] }), F.get(n).pos.push(ue);
1655
1655
  }
1656
- const re = Fe("div", { class: "flex flex-col gap-12" }, [
1657
- we,
1658
- Fe(
1656
+ const ae = De("div", { class: "flex flex-col gap-12" }, [
1657
+ Fe,
1658
+ De(
1659
1659
  "p",
1660
1660
  { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
1661
- b("inventory.transfer.receiveRequest.bulk.missingEmailMsg", [de.length])
1661
+ b("inventory.transfer.receiveRequest.bulk.missingEmailMsg", [ye.length])
1662
1662
  ),
1663
- Fe(
1663
+ De(
1664
1664
  "div",
1665
1665
  { class: "flex flex-col gap-4 max-h-[320px] overflow-y-auto rounded-md border border-fm-color-neutral-gray-100 p-8" },
1666
- [...k.values()].map(
1667
- ({ supplierName: pe, pos: n }) => Fe("div", { class: "flex flex-col gap-2 py-6 border-b border-fm-color-neutral-gray-100 last:border-0" }, [
1668
- Fe("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, pe),
1669
- Fe(
1666
+ [...F.values()].map(
1667
+ ({ supplierName: ue, pos: n }) => De("div", { class: "flex flex-col gap-2 py-6 border-b border-fm-color-neutral-gray-100 last:border-0" }, [
1668
+ De("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, ue),
1669
+ De(
1670
1670
  "div",
1671
1671
  { class: "flex flex-wrap gap-4" },
1672
1672
  n.map(
1673
- (l) => Fe("span", {
1673
+ (l) => De("span", {
1674
1674
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 rounded px-6 py-2"
1675
1675
  }, `PO #${l.seqNumber ?? l._id}`)
1676
1676
  )
@@ -1678,52 +1678,52 @@ function Po(w) {
1678
1678
  ])
1679
1679
  )
1680
1680
  ),
1681
- Fe(
1681
+ De(
1682
1682
  "p",
1683
1683
  { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" },
1684
- b("inventory.transfer.receiveRequest.bulk.emailWillSendCount", [oe.length, g.length])
1684
+ b("inventory.transfer.receiveRequest.bulk.emailWillSendCount", [ne.length, g.length])
1685
1685
  ),
1686
- Fe(
1686
+ De(
1687
1687
  "p",
1688
1688
  { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" },
1689
1689
  b("inventory.transfer.receiveRequest.bulk.missingEmailConfirm")
1690
1690
  )
1691
1691
  ]);
1692
- if (!await new Promise((pe) => {
1692
+ if (!await new Promise((ue) => {
1693
1693
  _.open({
1694
1694
  title: b("inventory.transfer.receiveRequest.bulk.missingEmailTitle"),
1695
- contentComponent: re,
1695
+ contentComponent: ae,
1696
1696
  contentComponentProps: {},
1697
1697
  primaryActions: {
1698
1698
  text: b("inventory.transfer.receiveRequest.bulk.skipAndContinue"),
1699
1699
  close: !0
1700
1700
  },
1701
1701
  secondaryActions: { text: b("inventory.common.cancel"), close: !0 }
1702
- }).onPrimary(() => pe(!0)).onSecondary(() => pe(!1));
1702
+ }).onPrimary(() => ue(!0)).onSecondary(() => ue(!1));
1703
1703
  })) return;
1704
1704
  } else {
1705
- const k = Fe("div", { class: "flex flex-col gap-12" }, [
1706
- we,
1707
- Fe(
1705
+ const F = De("div", { class: "flex flex-col gap-12" }, [
1706
+ Fe,
1707
+ De(
1708
1708
  "p",
1709
1709
  { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
1710
- b("inventory.transfer.receiveRequest.bulk.emailAllConfirmMsg", [oe.length])
1710
+ b("inventory.transfer.receiveRequest.bulk.emailAllConfirmMsg", [ne.length])
1711
1711
  )
1712
1712
  ]);
1713
- if (!await new Promise((me) => {
1713
+ if (!await new Promise((ie) => {
1714
1714
  _.open({
1715
1715
  title: b("inventory.transfer.receiveRequest.bulk.missingEmailTitle"),
1716
- contentComponent: k,
1716
+ contentComponent: F,
1717
1717
  contentComponentProps: {},
1718
1718
  primaryActions: {
1719
1719
  text: b("inventory.transfer.receiveRequest.bulk.emailConfirm"),
1720
1720
  close: !0
1721
1721
  },
1722
1722
  secondaryActions: { text: b("inventory.common.cancel"), close: !0 }
1723
- }).onPrimary(() => me(!0)).onSecondary(() => me(!1));
1723
+ }).onPrimary(() => ie(!0)).onSecondary(() => ie(!1));
1724
1724
  })) return;
1725
1725
  }
1726
- if (oe.length === 0) {
1726
+ if (ne.length === 0) {
1727
1727
  a.open({
1728
1728
  title: b("inventory.transfer.receiveRequest.bulk.emailSendError"),
1729
1729
  message: b("inventory.transfer.receiveRequest.bulk.noEmailsToSend"),
@@ -1731,9 +1731,9 @@ function Po(w) {
1731
1731
  });
1732
1732
  return;
1733
1733
  }
1734
- let Pe = [];
1734
+ let xe = [];
1735
1735
  try {
1736
- Pe = await T.getEmailList(L.currentBusiness.value._id);
1736
+ xe = await O.getEmailList(z.currentBusiness.value._id);
1737
1737
  } catch {
1738
1738
  a.open({
1739
1739
  title: b("inventory.transfer.receiveRequest.bulk.emailSendError"),
@@ -1742,8 +1742,8 @@ function Po(w) {
1742
1742
  });
1743
1743
  return;
1744
1744
  }
1745
- const De = Pe.find((k) => k.verified);
1746
- if (!De) {
1745
+ const qe = xe.find((F) => F.verified);
1746
+ if (!qe) {
1747
1747
  a.open({
1748
1748
  title: b("inventory.transfer.receiveRequest.bulk.emailSendError"),
1749
1749
  message: b("inventory.transfer.receiveRequest.bulk.noEmailSender"),
@@ -1751,39 +1751,39 @@ function Po(w) {
1751
1751
  });
1752
1752
  return;
1753
1753
  }
1754
- const ke = /* @__PURE__ */ new Map();
1755
- for (const k of oe) {
1756
- const re = se(k);
1757
- if (!re) continue;
1758
- const pe = (((Ae = C.locations.find((X) => X.dbName === k._locationDbName)) == null ? void 0 : Ae.name) || k._locationDbName).replace(/[/\\?%*:|"<>]/g, "-").trim().slice(0, 50), n = `PO_${k.seqNumber || k._id}`.replace(/[/\\?%*:|"<>]/g, "-").slice(0, 50), l = { poId: k._id, dbName: k._locationDbName, filename: `${pe}/${n}` }, r = ke.get(re);
1759
- r ? (r.pos.push(l), r.seqNumbers.push(k.seqNumber ?? k._id)) : ke.set(re, {
1760
- recipientName: k.supplier.name,
1761
- recipientEmail: re,
1754
+ const Se = /* @__PURE__ */ new Map();
1755
+ for (const F of ne) {
1756
+ const ae = te(F);
1757
+ if (!ae) continue;
1758
+ const ue = (((Ae = C.locations.find((X) => X.dbName === F._locationDbName)) == null ? void 0 : Ae.name) || F._locationDbName).replace(/[/\\?%*:|"<>]/g, "-").trim().slice(0, 50), n = `PO_${F.seqNumber || F._id}`.replace(/[/\\?%*:|"<>]/g, "-").slice(0, 50), l = { poId: F._id, dbName: F._locationDbName, filename: `${ue}/${n}` }, r = Se.get(ae);
1759
+ r ? (r.pos.push(l), r.seqNumbers.push(F.seqNumber ?? F._id)) : Se.set(ae, {
1760
+ recipientName: F.supplier.name,
1761
+ recipientEmail: ae,
1762
1762
  pos: [l],
1763
- seqNumbers: [k.seqNumber ?? k._id]
1763
+ seqNumbers: [F.seqNumber ?? F._id]
1764
1764
  });
1765
1765
  }
1766
- const ye = [...ke.values()].map((k) => ({
1767
- subject: k.pos.length > 1 ? `Purchase Orders (${k.pos.length})` : `Purchase Order #${k.seqNumbers[0]}`,
1768
- recipientName: k.recipientName,
1769
- recipientEmail: k.recipientEmail,
1770
- pos: k.pos
1771
- })), te = d.value[0];
1766
+ const Re = [...Se.values()].map((F) => ({
1767
+ subject: F.pos.length > 1 ? `Purchase Orders (${F.pos.length})` : `Purchase Order #${F.seqNumbers[0]}`,
1768
+ recipientName: F.recipientName,
1769
+ recipientEmail: F.recipientEmail,
1770
+ pos: F.pos
1771
+ })), ee = d.value[0];
1772
1772
  try {
1773
- const { jobId: k } = await U.enqueueBulkEmail(te, {
1774
- senderEmail: De.emailAddress,
1775
- senderName: De.name || ((Ce = L.currentBusiness.value) == null ? void 0 : Ce.name) || "FeedMe Inventory",
1776
- items: ye
1773
+ const { jobId: F } = await U.enqueueBulkEmail(ee, {
1774
+ senderEmail: qe.emailAddress,
1775
+ senderName: qe.name || ((Pe = z.currentBusiness.value) == null ? void 0 : Pe.name) || "FeedMe Inventory",
1776
+ items: Re
1777
1777
  });
1778
1778
  f.addJob({
1779
- jobId: k,
1779
+ jobId: F,
1780
1780
  type: "email",
1781
- dbName: te,
1782
- title: `Email All (${ye.length} supplier${ye.length === 1 ? "" : "s"}, ${oe.length} POs)`,
1781
+ dbName: ee,
1782
+ title: `Email All (${Re.length} supplier${Re.length === 1 ? "" : "s"}, ${ne.length} POs)`,
1783
1783
  status: "waiting",
1784
1784
  progress: 0,
1785
1785
  current: 0,
1786
- total: ye.length,
1786
+ total: Re.length,
1787
1787
  errorCount: 0,
1788
1788
  startedAt: Date.now()
1789
1789
  }), a.open({
@@ -1791,8 +1791,8 @@ function Po(w) {
1791
1791
  message: b("inventory.transfer.receiveRequest.bulk.emailQueued"),
1792
1792
  type: "success"
1793
1793
  });
1794
- } catch (k) {
1795
- console.error("Bulk email enqueue failed", k), a.open({
1794
+ } catch (F) {
1795
+ console.error("Bulk email enqueue failed", F), a.open({
1796
1796
  title: b("inventory.transfer.receiveRequest.bulk.emailSendError"),
1797
1797
  message: b("inventory.transfer.receiveRequest.bulk.emailErrorMsg"),
1798
1798
  type: "error"
@@ -1804,59 +1804,59 @@ function Po(w) {
1804
1804
  purchaseOrders: y,
1805
1805
  shipments: s,
1806
1806
  purchaseRequests: x,
1807
- rowAction: Le,
1808
- updateDateRange: Xe,
1809
- fetchData: Me,
1810
- failedLocations: B,
1811
- retryFailedLocations: Ne,
1812
- retryingFailed: G,
1807
+ rowAction: je,
1808
+ updateDateRange: Ie,
1809
+ fetchData: ve,
1810
+ failedLocations: T,
1811
+ retryFailedLocations: Qe,
1812
+ retryingFailed: K,
1813
1813
  fetchProgress: Z,
1814
- abortOngoingBrowse: fe,
1815
- fetchFullPurchaseOrders: W,
1814
+ abortOngoingBrowse: pe,
1815
+ fetchFullPurchaseOrders: Oe,
1816
1816
  loading: i,
1817
1817
  transferDialogProps: tt,
1818
- promptCreateTransferDialog: Ue,
1819
- promptUpdateTransferDialog: S,
1820
- transferDetailsProps: Ie,
1821
- promptShowTransferDetails: H,
1822
- resolvePO: Q,
1823
- submitAction: $e,
1818
+ promptCreateTransferDialog: Xe,
1819
+ promptUpdateTransferDialog: Me,
1820
+ transferDetailsProps: Ce,
1821
+ promptShowTransferDetails: M,
1822
+ resolvePO: w,
1823
+ submitAction: G,
1824
1824
  xilnexImportDialogProps: mt,
1825
- promptUploadTransferDialog: Re,
1826
- emailDialogProps: Ee,
1827
- promptEmailDialog: z,
1828
- downloadAll: Ve,
1829
- emailAll: Je,
1830
- lastClosingDate: P
1825
+ promptUploadTransferDialog: le,
1826
+ emailDialogProps: Ne,
1827
+ promptEmailDialog: P,
1828
+ downloadAll: J,
1829
+ emailAll: ce,
1830
+ lastClosingDate: D
1831
1831
  };
1832
1832
  }
1833
- function Do(w, _, C) {
1834
- const A = w._locationDbName;
1835
- if (!A) return null;
1836
- const $ = _.find((L) => L.dbName === A);
1833
+ function Do(k, _, C) {
1834
+ const B = k._locationDbName;
1835
+ if (!B) return null;
1836
+ const $ = _.find((z) => z.dbName === B);
1837
1837
  if (!$) return null;
1838
1838
  if ($.type === "restaurant") {
1839
- const L = C($.doc._id);
1840
- if (L !== null) return { ...$, doc: L };
1839
+ const z = C($.doc._id);
1840
+ if (z !== null) return { ...$, doc: z };
1841
1841
  }
1842
1842
  return $;
1843
1843
  }
1844
- function Eo(w, _) {
1845
- return _.find((C) => C.purchaseOrderId === w._id);
1844
+ function Eo(k, _) {
1845
+ return _.find((C) => C.purchaseOrderId === k._id);
1846
1846
  }
1847
- function qo(w, _) {
1848
- const C = it(), { t: A } = st(), $ = Ge(), L = ut(), j = vt(), V = F(!1), i = F(!1), a = F(null);
1847
+ function qo(k, _) {
1848
+ const C = it(), { t: B } = st(), $ = Ge(), z = ut(), W = vt(), V = S(!1), i = S(!1), a = S(null);
1849
1849
  async function b(f, d) {
1850
1850
  if (f !== rt.PrintPdf) return !1;
1851
1851
  const s = d._locationDbName, x = d._rev;
1852
1852
  a.value && (URL.revokeObjectURL(a.value), a.value = null), i.value = !0, V.value = !0;
1853
1853
  try {
1854
1854
  let p = await $.getPurchaseOrderPdf(d._id, s, x);
1855
- "pending" in p && (await j.waitForPdfJob(p.jobId, s), p = await $.getPurchaseOrderPdf(d._id, s, x)), a.value = URL.createObjectURL(p);
1855
+ "pending" in p && (await W.waitForPdfJob(p.jobId, s), p = await $.getPurchaseOrderPdf(d._id, s, x)), a.value = URL.createObjectURL(p);
1856
1856
  } catch {
1857
- V.value = !1, L.open({
1858
- title: A("inventory.common.somethingWentWrong"),
1859
- message: A("inventory.transfer.receiveRequest.bulk.pdfUnavailableMsg"),
1857
+ V.value = !1, z.open({
1858
+ title: B("inventory.common.somethingWentWrong"),
1859
+ message: B("inventory.transfer.receiveRequest.bulk.pdfUnavailableMsg"),
1860
1860
  type: "error"
1861
1861
  });
1862
1862
  } finally {
@@ -1864,9 +1864,9 @@ function qo(w, _) {
1864
1864
  }
1865
1865
  return !0;
1866
1866
  }
1867
- const U = nn(
1868
- St.RECEIVE_REQUEST,
1869
- w,
1867
+ const U = sn(
1868
+ Rt.RECEIVE_REQUEST,
1869
+ k,
1870
1870
  _,
1871
1871
  {
1872
1872
  // Bulk rows are summaries (no items) — print needs the full doc from the
@@ -1875,7 +1875,7 @@ function qo(w, _) {
1875
1875
  // cancelled) becomes null, which aborts the print.
1876
1876
  fetchFullPo: async (f) => {
1877
1877
  const d = f._locationDbName;
1878
- return await w.rowAction.run(
1878
+ return await k.rowAction.run(
1879
1879
  (s) => $.getPurchaseOrderById(f._id, d, s)
1880
1880
  ) ?? null;
1881
1881
  },
@@ -1884,7 +1884,7 @@ function qo(w, _) {
1884
1884
  C.locations,
1885
1885
  C.locationRestaurantFromCore
1886
1886
  ),
1887
- resolvePurchaseRequest: (f) => Eo(f, w.purchaseRequests.value),
1887
+ resolvePurchaseRequest: (f) => Eo(f, k.purchaseRequests.value),
1888
1888
  // Exclude both legacy Print and Print (Beta) — the bulk listing uses
1889
1889
  // Lambda-generated PDF via PrintPdf instead.
1890
1890
  excludeRowActions: [rt.Print, rt.PrintCustom],
@@ -1895,10 +1895,10 @@ function qo(w, _) {
1895
1895
  }
1896
1896
  );
1897
1897
  return {
1898
- columnDefs: I(() => {
1898
+ columnDefs: L(() => {
1899
1899
  const f = U.columnDefs.value, d = {
1900
1900
  id: "location",
1901
- header: () => A("inventory.transfer.receiveRequest.bulk.locationColumn"),
1901
+ header: () => B("inventory.transfer.receiveRequest.bulk.locationColumn"),
1902
1902
  cell(s) {
1903
1903
  const x = s.row.original._locationDbName, p = C.locations.find((m) => m.dbName === x);
1904
1904
  return p ? `${p.name} (${p.doc.profile.code ?? "--"})` : x;
@@ -1919,7 +1919,7 @@ const No = {
1919
1919
  }, $o = {
1920
1920
  key: 1,
1921
1921
  class: "bg-white rounded-lg shadow-xl border border-fm-color-neutral-gray-100 w-[360px] max-h-[480px] flex flex-col overflow-hidden"
1922
- }, Ao = { class: "flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, Oo = { class: "fm-typo-en-title-sm-600" }, Bo = { class: "overflow-y-auto flex-1 divide-y divide-fm-color-neutral-gray-100" }, To = { class: "flex items-start justify-between gap-8" }, Io = { class: "flex flex-col gap-2" }, Lo = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary line-clamp-1" }, zo = { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary capitalize" }, Mo = { class: "flex items-center gap-4" }, Uo = ["disabled", "onClick"], Vo = ["disabled", "onClick"], Jo = ["onClick"], jo = {
1922
+ }, Oo = { class: "flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, Ao = { class: "fm-typo-en-title-sm-600" }, Bo = { class: "overflow-y-auto flex-1 divide-y divide-fm-color-neutral-gray-100" }, To = { class: "flex items-start justify-between gap-8" }, Io = { class: "flex flex-col gap-2" }, Lo = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary line-clamp-1" }, zo = { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary capitalize" }, Mo = { class: "flex items-center gap-4" }, Uo = ["disabled", "onClick"], Vo = ["disabled", "onClick"], Jo = ["onClick"], jo = {
1923
1923
  key: 0,
1924
1924
  class: "flex flex-col gap-4"
1925
1925
  }, Wo = { class: "w-full bg-fm-color-neutral-gray-200 rounded-full h-[3px]" }, Yo = { class: "flex justify-between fm-typo-en-body-xs-400 text-fm-color-typo-secondary" }, Qo = {
@@ -1942,17 +1942,17 @@ const No = {
1942
1942
  class: "flex items-center gap-[5px] text-[11px] leading-none text-fm-color-typo-secondary"
1943
1943
  }, sa = /* @__PURE__ */ nt({
1944
1944
  __name: "BulkJobProgressPanel",
1945
- setup(w) {
1946
- const { t: _ } = An(), C = vt(), A = I(() => C.jobs.filter((s) => !s.hidden)), $ = Ge(), L = F(!1), j = F(null);
1945
+ setup(k) {
1946
+ const { t: _ } = On(), C = vt(), B = L(() => C.jobs.filter((s) => !s.hidden)), $ = Ge(), z = S(!1), W = S(null);
1947
1947
  function V(s) {
1948
- L.value && j.value && !j.value.contains(s.target) && (L.value = !1);
1948
+ z.value && W.value && !W.value.contains(s.target) && (z.value = !1);
1949
1949
  }
1950
- Bt(() => {
1950
+ Tt(() => {
1951
1951
  document.addEventListener("click", V, !0);
1952
- }), Tt(() => {
1952
+ }), It(() => {
1953
1953
  document.removeEventListener("click", V, !0);
1954
1954
  });
1955
- const i = F(/* @__PURE__ */ new Set()), a = F(/* @__PURE__ */ new Set());
1955
+ const i = S(/* @__PURE__ */ new Set()), a = S(/* @__PURE__ */ new Set());
1956
1956
  async function b(s) {
1957
1957
  if (!i.value.has(s.jobId)) {
1958
1958
  i.value = /* @__PURE__ */ new Set([...i.value, s.jobId]);
@@ -1976,7 +1976,7 @@ const No = {
1976
1976
  }
1977
1977
  }
1978
1978
  }
1979
- function ge(s) {
1979
+ function he(s) {
1980
1980
  C.removeJob(s);
1981
1981
  }
1982
1982
  function f(s) {
@@ -1990,32 +1990,32 @@ const No = {
1990
1990
  return s < 1024 ? `${s} B` : s < 1024 * 1024 ? `${(s / 1024).toFixed(1)} KB` : `${(s / (1024 * 1024)).toFixed(1)} MB`;
1991
1991
  }
1992
1992
  return (s, x) => {
1993
- const p = qe("FmIcon");
1994
- return c(), ue(lt, { to: "body" }, [
1995
- A.value.length > 0 ? (c(), h("div", {
1993
+ const p = $e("FmIcon");
1994
+ return c(), de(lt, { to: "body" }, [
1995
+ B.value.length > 0 ? (c(), h("div", {
1996
1996
  key: 0,
1997
1997
  ref_key: "panelRef",
1998
- ref: j,
1998
+ ref: W,
1999
1999
  class: "fixed bottom-24 right-24 z-[9998] flex flex-col items-end gap-8"
2000
2000
  }, [
2001
- L.value ? D("", !0) : (c(), h("button", {
2001
+ z.value ? E("", !0) : (c(), h("button", {
2002
2002
  key: 0,
2003
2003
  class: "flex items-center gap-8 bg-fm-color-primary text-white rounded-full px-16 py-[6px] shadow-lg fm-typo-en-body-sm-600 cursor-pointer",
2004
- onClick: x[0] || (x[0] = (m) => L.value = !0)
2004
+ onClick: x[0] || (x[0] = (m) => z.value = !0)
2005
2005
  }, [
2006
2006
  N(p, {
2007
2007
  name: "cloud_upload",
2008
2008
  size: "sm"
2009
2009
  }),
2010
2010
  e("span", null, v(t(_)("inventory.transfer.receiveRequest.bulk.backgroundJobsTitle")), 1),
2011
- t(C).activeJobs.length > 0 ? (c(), h("span", No, v(t(C).activeJobs.length), 1)) : D("", !0)
2011
+ t(C).activeJobs.length > 0 ? (c(), h("span", No, v(t(C).activeJobs.length), 1)) : E("", !0)
2012
2012
  ])),
2013
- L.value ? (c(), h("div", $o, [
2014
- e("div", Ao, [
2015
- e("span", Oo, v(t(_)("inventory.transfer.receiveRequest.bulk.backgroundJobsTitle")), 1),
2013
+ z.value ? (c(), h("div", $o, [
2014
+ e("div", Oo, [
2015
+ e("span", Ao, v(t(_)("inventory.transfer.receiveRequest.bulk.backgroundJobsTitle")), 1),
2016
2016
  e("button", {
2017
2017
  "aria-label": "Collapse",
2018
- onClick: x[1] || (x[1] = (m) => L.value = !1),
2018
+ onClick: x[1] || (x[1] = (m) => z.value = !1),
2019
2019
  class: "text-fm-color-typo-secondary hover:text-fm-color-typo-primary"
2020
2020
  }, [
2021
2021
  N(p, {
@@ -2025,8 +2025,8 @@ const No = {
2025
2025
  ])
2026
2026
  ]),
2027
2027
  e("div", Bo, [
2028
- (c(!0), h(_e, null, Ke(A.value, (m) => {
2029
- var E;
2028
+ (c(!0), h(we, null, Ke(B.value, (m) => {
2029
+ var q;
2030
2030
  return c(), h("div", {
2031
2031
  key: m.jobId,
2032
2032
  class: "px-16 py-12 flex flex-col gap-8"
@@ -2043,38 +2043,38 @@ const No = {
2043
2043
  disabled: i.value.has(m.jobId),
2044
2044
  title: "Download",
2045
2045
  "aria-label": "Download",
2046
- onClick: (P) => b(m)
2046
+ onClick: (D) => b(m)
2047
2047
  }, [
2048
2048
  N(p, {
2049
2049
  name: i.value.has(m.jobId) ? "progress_activity" : "download",
2050
2050
  size: "sm"
2051
2051
  }, null, 8, ["name"])
2052
- ], 8, Uo)) : D("", !0),
2052
+ ], 8, Uo)) : E("", !0),
2053
2053
  m.status === "waiting" || m.status === "active" ? (c(), h("button", {
2054
2054
  key: 1,
2055
2055
  class: "text-fm-color-semantic-error-500 hover:opacity-80 disabled:opacity-40",
2056
2056
  disabled: a.value.has(m.jobId),
2057
2057
  title: "Cancel",
2058
2058
  "aria-label": "Cancel",
2059
- onClick: (P) => U(m)
2059
+ onClick: (D) => U(m)
2060
2060
  }, [
2061
2061
  N(p, {
2062
2062
  name: a.value.has(m.jobId) ? "progress_activity" : "cancel",
2063
2063
  size: "sm"
2064
2064
  }, null, 8, ["name"])
2065
- ], 8, Vo)) : D("", !0),
2065
+ ], 8, Vo)) : E("", !0),
2066
2066
  f(m.status) ? (c(), h("button", {
2067
2067
  key: 2,
2068
2068
  class: "text-fm-color-typo-secondary hover:text-fm-color-typo-primary",
2069
2069
  title: "Dismiss",
2070
2070
  "aria-label": "Dismiss",
2071
- onClick: (P) => ge(m.jobId)
2071
+ onClick: (D) => he(m.jobId)
2072
2072
  }, [
2073
2073
  N(p, {
2074
2074
  name: "close",
2075
2075
  size: "sm"
2076
2076
  })
2077
- ], 8, Jo)) : D("", !0)
2077
+ ], 8, Jo)) : E("", !0)
2078
2078
  ])
2079
2079
  ]),
2080
2080
  m.status === "active" || m.status === "waiting" ? (c(), h("div", jo, [
@@ -2085,50 +2085,50 @@ const No = {
2085
2085
  }, null, 4)
2086
2086
  ]),
2087
2087
  e("div", Yo, [
2088
- m.currentItem ? (c(), h("span", Qo, v(m.currentItem), 1)) : D("", !0),
2088
+ m.currentItem ? (c(), h("span", Qo, v(m.currentItem), 1)) : E("", !0),
2089
2089
  e("span", Ho, v(m.current) + " / " + v(m.total), 1)
2090
2090
  ])
2091
- ])) : D("", !0),
2091
+ ])) : E("", !0),
2092
2092
  m.status === "completed" && m.errorCount === 0 ? (c(), h("div", Ko, [
2093
2093
  N(p, {
2094
2094
  name: "check_circle",
2095
2095
  size: "sm"
2096
2096
  }),
2097
2097
  e("span", null, v(t(_)("inventory.transfer.receiveRequest.bulk.jobDone")), 1)
2098
- ])) : D("", !0),
2099
- m.status === "completed" && (((E = m.stalePoIds) == null ? void 0 : E.length) ?? 0) > 0 ? (c(), h("div", Go, [
2098
+ ])) : E("", !0),
2099
+ m.status === "completed" && (((q = m.stalePoIds) == null ? void 0 : q.length) ?? 0) > 0 ? (c(), h("div", Go, [
2100
2100
  N(p, {
2101
2101
  name: "warning",
2102
2102
  size: "sm"
2103
2103
  }),
2104
2104
  e("span", null, v(t(_)("inventory.transfer.receiveRequest.bulk.jobStalePos", [m.stalePoIds.length])), 1)
2105
- ])) : D("", !0),
2105
+ ])) : E("", !0),
2106
2106
  m.status === "cancelled" ? (c(), h("div", Xo, [
2107
2107
  N(p, {
2108
2108
  name: "do_not_disturb_on",
2109
2109
  size: "sm"
2110
2110
  }),
2111
2111
  e("span", null, v(t(_)("inventory.transfer.receiveRequest.bulk.jobCancelled")), 1)
2112
- ])) : D("", !0),
2112
+ ])) : E("", !0),
2113
2113
  m.status === "failed" ? (c(), h("div", Zo, [
2114
2114
  N(p, {
2115
2115
  name: "cancel",
2116
2116
  size: "sm"
2117
2117
  }),
2118
2118
  m.errorCount > 0 ? (c(), h("span", ea, v(t(_)("inventory.transfer.receiveRequest.bulk.jobDoneWithErrors", [m.errorCount])), 1)) : (c(), h("span", ta, v(t(_)("inventory.transfer.receiveRequest.bulk.jobFailed")), 1))
2119
- ])) : D("", !0),
2119
+ ])) : E("", !0),
2120
2120
  f(m.status) && m.completedAt ? (c(), h("div", na, [
2121
2121
  e("span", null, v(t(_)("inventory.transfer.receiveRequest.bulk.jobCompletedIn", [d(m.completedAt - m.startedAt)])), 1),
2122
- m.zipSizeBytes ? (c(), h(_e, { key: 0 }, [
2122
+ m.zipSizeBytes ? (c(), h(we, { key: 0 }, [
2123
2123
  x[2] || (x[2] = e("span", null, "·", -1)),
2124
2124
  e("span", null, v(y(m.zipSizeBytes)), 1)
2125
- ], 64)) : D("", !0)
2126
- ])) : D("", !0)
2125
+ ], 64)) : E("", !0)
2126
+ ])) : E("", !0)
2127
2127
  ]);
2128
2128
  }), 128))
2129
2129
  ])
2130
- ])) : D("", !0)
2131
- ], 512)) : D("", !0)
2130
+ ])) : E("", !0)
2131
+ ], 512)) : E("", !0)
2132
2132
  ]);
2133
2133
  };
2134
2134
  }
@@ -2154,72 +2154,76 @@ const No = {
2154
2154
  key: 0,
2155
2155
  class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
2156
2156
  }, ka = { class: "pt-8" }, Ca = {
2157
- key: 2,
2157
+ key: 0,
2158
2158
  class: "absolute inset-0 z-10 flex items-center justify-center bg-fm-color-opacity-sm"
2159
- }, Fa = { class: "flex items-center gap-12 rounded-md bg-white px-16 py-8 shadow-lg" }, Sa = { class: "fm-typo-en-body-md-400" }, Ft = "BulkReceiveRequestViewSearchCriteria", or = /* @__PURE__ */ nt({
2159
+ }, Fa = { class: "flex items-center gap-12 rounded-md bg-white px-16 py-8 shadow-lg" }, Sa = { class: "fm-typo-en-body-md-400" }, St = "BulkReceiveRequestViewSearchCriteria", or = /* @__PURE__ */ nt({
2160
2160
  __name: "BulkReceiveRequestView",
2161
- setup(w) {
2161
+ setup(k) {
2162
2162
  const { t: _ } = st(), C = ut();
2163
2163
  at.object({
2164
2164
  name: at.string().optional().nullable(),
2165
2165
  startDate: at.string().optional().nullable(),
2166
2166
  endDate: at.string().optional().nullable()
2167
2167
  });
2168
- const A = ln(), $ = Et(), L = zt();
2169
- function j() {
2170
- const q = {
2168
+ const B = un(), $ = qt(), z = Mt();
2169
+ function W() {
2170
+ const P = {
2171
2171
  name: "",
2172
2172
  ...pt()
2173
- }, S = A.getItem(Ft);
2174
- if (!S) return q;
2173
+ }, w = B.getItem(St);
2174
+ if (!w) return P;
2175
2175
  try {
2176
- return JSON.parse(S);
2176
+ return JSON.parse(w);
2177
2177
  } catch {
2178
- return q;
2178
+ return P;
2179
2179
  }
2180
2180
  }
2181
2181
  function V() {
2182
- A.setItem(Ft, JSON.stringify(i.value));
2182
+ B.setItem(St, JSON.stringify(i.value));
2183
2183
  }
2184
- const i = F(j()), a = Po(i.value), b = F(!1), { selectedLocationDbNames: U } = a, ge = I(() => E.value.filter((q) => U.value.includes(q.dbName)).map((q) => q.doc._id)), {
2184
+ const i = S(W()), a = Po(i.value), b = S(!1), { selectedLocationDbNames: U } = a, he = L(() => q.value.filter((P) => U.value.includes(P.dbName)).map((P) => P.doc._id)), {
2185
2185
  columnDefs: f,
2186
2186
  showPdfDialog: d,
2187
2187
  pdfPreviewLoading: y,
2188
2188
  pdfPreviewBlobUrl: s
2189
- } = qo(a, a.shipments), x = it(), p = Yt(), m = Rt(), E = F([]);
2190
- It(() => {
2191
- const q = x.locations;
2192
- q.length > 0 && (E.value = q);
2189
+ } = qo(a, a.shipments), x = it(), p = Qt(), m = Pt(), q = S([]);
2190
+ Lt(() => {
2191
+ const P = x.locations;
2192
+ P.length > 0 && (q.value = P);
2193
2193
  });
2194
- async function P() {
2195
- var S;
2196
- if ((S = m.currentBusiness.value) != null && S._id)
2194
+ async function D() {
2195
+ var w;
2196
+ if ((w = m.currentBusiness.value) != null && w._id)
2197
2197
  try {
2198
- const z = await p.readAllInventoryLocations();
2199
- z.length > 0 && (E.value = z);
2198
+ const M = await p.readAllInventoryLocations();
2199
+ M.length > 0 && (q.value = M);
2200
2200
  } catch {
2201
2201
  }
2202
2202
  }
2203
- We(
2203
+ Ve(
2204
2204
  [() => m.sessionUser.value, () => m.currentBusiness.value],
2205
- ([q, S]) => {
2206
- q && S && P();
2205
+ ([P, w]) => {
2206
+ P && w && D();
2207
2207
  },
2208
2208
  { immediate: !0 }
2209
2209
  );
2210
- const B = I(() => a.loading.value), ce = I(
2211
- () => a.failedLocations.value.map((q) => {
2212
- var S;
2213
- return ((S = x.locations.find((z) => z.dbName === q.dbName)) == null ? void 0 : S.name) ?? q.dbName;
2210
+ const T = L(() => a.loading.value), me = L(
2211
+ () => a.failedLocations.value.map((P) => {
2212
+ var w;
2213
+ return ((w = x.locations.find((M) => M.dbName === P.dbName)) == null ? void 0 : w.name) ?? P.dbName;
2214
2214
  }).join(", ")
2215
- ), G = I(
2216
- () => a.failedLocations.value.some((q) => q.retryable)
2215
+ ), K = L(
2216
+ () => a.failedLocations.value.some((P) => P.retryable)
2217
2217
  );
2218
- async function Z() {
2219
- const q = `inventory-record_${Qe(i.value.startDate).format("DD-MM-YYYY_HH-mm")}-${Qe(i.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`;
2220
- let S = [];
2218
+ function Z(P) {
2219
+ var w;
2220
+ return P.itemCount ?? ((w = P.items) == null ? void 0 : w.length) ?? 0;
2221
+ }
2222
+ async function oe() {
2223
+ const P = `inventory-record_${Ye(i.value.startDate).format("DD-MM-YYYY_HH-mm")}-${Ye(i.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`;
2224
+ let w = [];
2221
2225
  try {
2222
- S = await a.fetchFullPurchaseOrders();
2226
+ w = await a.fetchFullPurchaseOrders();
2223
2227
  } catch {
2224
2228
  C.open({
2225
2229
  title: _("inventory.transfer.receiveRequest.export.error"),
@@ -2228,28 +2232,28 @@ const No = {
2228
2232
  });
2229
2233
  return;
2230
2234
  }
2231
- const z = S.flatMap(
2232
- (H) => H.items.map((ne) => {
2233
- var o, u;
2234
- const $e = new Date(an(H._id) ?? ""), Re = H.effectiveAt ? new Date(H.effectiveAt) : void 0, W = xt(
2235
- on(ne.sku, H.deliveryOrder || [])
2236
- ), ie = xt(ne.quantity), Ve = ((o = ne == null ? void 0 : ne.measurement) == null ? void 0 : o.abbrev) || ne.sku.unit.abbrev;
2235
+ const M = w.flatMap(
2236
+ (G) => G.items.map((le) => {
2237
+ var g, O;
2238
+ const Oe = new Date(rn(G._id) ?? ""), _e = G.effectiveAt ? new Date(G.effectiveAt) : void 0, J = xt(
2239
+ an(le.sku, G.deliveryOrder || [])
2240
+ ), ce = xt(le.quantity), o = ((g = le == null ? void 0 : le.measurement) == null ? void 0 : g.abbrev) || le.sku.unit.abbrev;
2237
2241
  return {
2238
- Location: ((u = x.locations.find((g) => g.dbName === H._locationDbName)) == null ? void 0 : u.name) ?? "",
2239
- "SKU code": ne.code,
2240
- "SKU name": ne.name,
2241
- "PO #": H.seqNumber,
2242
- "Effective at": Re,
2243
- Date: $e,
2244
- Status: H.status,
2245
- Reference: H.ref ?? "",
2246
- "Received quantity": W,
2247
- "Ordered quantity": ie,
2248
- Unit: Ve,
2249
- "Total cost": ne.totalCost ? Ht(ne.totalCost) : null
2242
+ Location: ((O = x.locations.find((I) => I.dbName === G._locationDbName)) == null ? void 0 : O.name) ?? "",
2243
+ "SKU code": le.code,
2244
+ "SKU name": le.name,
2245
+ "PO #": G.seqNumber,
2246
+ "Effective at": _e,
2247
+ Date: Oe,
2248
+ Status: G.status,
2249
+ Reference: G.ref ?? "",
2250
+ "Received quantity": J,
2251
+ "Ordered quantity": ce,
2252
+ Unit: o,
2253
+ "Total cost": le.totalCost ? Kt(le.totalCost) : null
2250
2254
  };
2251
2255
  })
2252
- ), Q = [
2256
+ ), Y = [
2253
2257
  "Location",
2254
2258
  "SKU code",
2255
2259
  "SKU name",
@@ -2261,40 +2265,40 @@ const No = {
2261
2265
  "Ordered quantity",
2262
2266
  "Unit"
2263
2267
  ];
2264
- $.enableBackdatePo && Q.insert("Effective at", 5), $.enableTotalCost && Q.push("Total cost"), await rn([{ name: "purchases", data: z, columns: Q }], q), C.open({
2268
+ $.enableBackdatePo && Y.insert("Effective at", 5), $.enableTotalCost && Y.push("Total cost"), await ln([{ name: "purchases", data: M, columns: Y }], P), C.open({
2265
2269
  title: _("inventory.transfer.receiveRequest.export.success"),
2266
- message: _("inventory.transfer.receiveRequest.export.message", [q]),
2270
+ message: _("inventory.transfer.receiveRequest.export.message", [P]),
2267
2271
  type: "success"
2268
2272
  });
2269
2273
  }
2270
- const ee = F(pt()), fe = F("");
2271
- We([() => ee.value], ([q]) => {
2272
- if (!q.startDate || !q.endDate) return;
2273
- if (Qe(q.endDate).diff(Qe(q.startDate), "day") > 60) {
2274
+ const pe = S(pt()), ke = S("");
2275
+ Ve([() => pe.value], ([P]) => {
2276
+ if (!P.startDate || !P.endDate) return;
2277
+ if (Ye(P.endDate).diff(Ye(P.startDate), "day") > 60) {
2274
2278
  C.open({
2275
2279
  title: _("inventory.transfer.receiveRequest.bulk.dateRangeLimitTitle"),
2276
2280
  message: _("inventory.transfer.receiveRequest.bulk.dateRangeLimitMsg"),
2277
2281
  type: "warning"
2278
- }), ee.value = {
2279
- startDate: q.startDate,
2280
- endDate: Qe(q.startDate).add(60, "day").format("YYYY-MM-DD")
2282
+ }), pe.value = {
2283
+ startDate: P.startDate,
2284
+ endDate: Ye(P.startDate).add(60, "day").format("YYYY-MM-DD")
2281
2285
  };
2282
2286
  return;
2283
2287
  }
2284
- i.value.startDate = q.startDate, i.value.endDate = q.endDate, a.updateDateRange(i.value.startDate, i.value.endDate), V();
2285
- }), We([() => fe.value], () => {
2288
+ i.value.startDate = P.startDate, i.value.endDate = P.endDate, a.updateDateRange(i.value.startDate, i.value.endDate), V();
2289
+ }), Ve([() => ke.value], () => {
2286
2290
  V();
2287
2291
  });
2288
- const Be = Mt.debounce(() => a.fetchData(), 1500);
2289
- We(
2292
+ const Ee = Ut.debounce(() => a.fetchData(), 1500);
2293
+ Ve(
2290
2294
  () => U.value,
2291
2295
  () => {
2292
- a.abortOngoingBrowse(), Be();
2296
+ a.abortOngoingBrowse(), Ee();
2293
2297
  }
2294
2298
  );
2295
- function Se(q) {
2296
- if (q === "create") {
2297
- if (B.value) {
2299
+ function ze(P) {
2300
+ if (P === "create") {
2301
+ if (T.value) {
2298
2302
  C.open({ title: "Loading data...", message: "Please wait.", type: "info" });
2299
2303
  return;
2300
2304
  }
@@ -2309,14 +2313,14 @@ const No = {
2309
2313
  b.value = !0;
2310
2314
  return;
2311
2315
  }
2312
- if (q === "upload" && $.enableXilnexTransferNote)
2316
+ if (P === "upload" && $.enableXilnexTransferNote)
2313
2317
  return a.promptUploadTransferDialog();
2314
- if (q === "refresh") return a.fetchData();
2315
- if (q === "export") return Z();
2316
- if (q === "downloadAll") return ze();
2317
- if (q === "emailAll") return Te();
2318
+ if (P === "refresh") return a.fetchData();
2319
+ if (P === "export") return oe();
2320
+ if (P === "downloadAll") return Te();
2321
+ if (P === "emailAll") return ge();
2318
2322
  }
2319
- async function ze() {
2323
+ async function Te() {
2320
2324
  if (U.value.length === 0) {
2321
2325
  C.open({
2322
2326
  title: _("inventory.transfer.receiveRequest.bulk.noLocationsSelected"),
@@ -2325,9 +2329,9 @@ const No = {
2325
2329
  });
2326
2330
  return;
2327
2331
  }
2328
- await a.downloadAll(Le.value);
2332
+ await a.downloadAll(Me.value);
2329
2333
  }
2330
- async function Te() {
2334
+ async function ge() {
2331
2335
  if ($.enablePurchaseOrderEmail) {
2332
2336
  if (U.value.length === 0) {
2333
2337
  C.open({
@@ -2337,10 +2341,10 @@ const No = {
2337
2341
  });
2338
2342
  return;
2339
2343
  }
2340
- await a.emailAll(Le.value);
2344
+ await a.emailAll(Me.value);
2341
2345
  }
2342
2346
  }
2343
- const { breakpoints: ve } = fn(), xe = I(() => ve.value.xs || ve.value.sm), Me = I(() => xe.value ? 10 : 20), Ne = un(), Xe = I(() => $.enableReceiveRequestBeta ? [
2347
+ const { breakpoints: Je } = fn(), ve = L(() => Je.value.xs || Je.value.sm), Qe = L(() => ve.value ? 10 : 20), Ie = wt(), Ce = wt(), Xe = L(() => $.enableReceiveRequestBeta ? [
2344
2348
  {
2345
2349
  label: _("inventory.transfer.receiveRequest.actions.create"),
2346
2350
  value: "create",
@@ -2350,33 +2354,33 @@ const No = {
2350
2354
  ...$.enableXilnexTransferNote ? [{ label: _("inventory.common.upload"), value: "upload" }] : [],
2351
2355
  { label: _("inventory.common.refresh"), value: "refresh" },
2352
2356
  { label: _("inventory.common.export"), value: "export" },
2353
- ...$.enablePrintTemplate && !B.value ? [
2357
+ ...$.enablePrintTemplate && !T.value ? [
2354
2358
  {
2355
2359
  label: _("inventory.transfer.receiveRequest.bulk.downloadAll"),
2356
2360
  value: "downloadAll",
2357
2361
  prependIcon: "download"
2358
2362
  }
2359
2363
  ] : [],
2360
- ...$.enablePurchaseOrderEmail && !B.value ? [
2364
+ ...$.enablePurchaseOrderEmail && !T.value ? [
2361
2365
  {
2362
2366
  label: _("inventory.transfer.receiveRequest.bulk.emailAll"),
2363
2367
  value: "emailAll",
2364
2368
  prependIcon: "email"
2365
2369
  }
2366
2370
  ] : []
2367
- ] : []), Ie = I(() => {
2368
- const q = [
2371
+ ] : []), je = L(() => {
2372
+ const P = [
2369
2373
  {
2370
2374
  type: "string",
2371
2375
  key: "status",
2372
2376
  entity: "purchaseOrder",
2373
- values: Array.from(new Set(a.purchaseOrders.value.map((z) => z.status)))
2377
+ values: Array.from(new Set(a.purchaseOrders.value.map((M) => M.status)))
2374
2378
  },
2375
2379
  {
2376
2380
  type: "string",
2377
2381
  key: "transferFrom",
2378
2382
  entity: "purchaseOrder",
2379
- values: Array.from(new Set(a.purchaseOrders.value.map((z) => z.supplier.name)))
2383
+ values: Array.from(new Set(a.purchaseOrders.value.map((M) => M.supplier.name)))
2380
2384
  },
2381
2385
  {
2382
2386
  type: "string",
@@ -2384,121 +2388,121 @@ const No = {
2384
2388
  entity: "purchaseOrder",
2385
2389
  values: Array.from(
2386
2390
  new Set(
2387
- a.purchaseOrders.value.map((z) => {
2388
- const Q = x.locations.find((H) => H.dbName === z._locationDbName);
2389
- return (Q == null ? void 0 : Q.name) ?? z._locationDbName;
2391
+ a.purchaseOrders.value.map((M) => {
2392
+ const Y = x.locations.find((G) => G.dbName === M._locationDbName);
2393
+ return (Y == null ? void 0 : Y.name) ?? M._locationDbName;
2390
2394
  })
2391
2395
  )
2392
2396
  )
2393
2397
  }
2394
- ], S = [
2398
+ ], w = [
2395
2399
  {
2396
2400
  type: "string",
2397
2401
  key: "netsuiteTransactionNumber",
2398
2402
  entity: "purchaseOrder",
2399
- values: a.purchaseOrders.value.map((z) => {
2400
- var Q, H;
2401
- return (H = (Q = z.netSuite) == null ? void 0 : Q.additionalInfo) == null ? void 0 : H.transactionnumber;
2402
- }).filter((z) => z != null)
2403
+ values: a.purchaseOrders.value.map((M) => {
2404
+ var Y, G;
2405
+ return (G = (Y = M.netSuite) == null ? void 0 : Y.additionalInfo) == null ? void 0 : G.transactionnumber;
2406
+ }).filter((M) => M != null)
2403
2407
  },
2404
2408
  {
2405
2409
  type: "string",
2406
2410
  key: "netsuiteOrderNo",
2407
2411
  entity: "purchaseOrder",
2408
- values: a.purchaseOrders.value.map((z) => {
2409
- var Q;
2410
- return (Q = z.netSuite) == null ? void 0 : Q.refNo;
2411
- }).filter((z) => z != null)
2412
+ values: a.purchaseOrders.value.map((M) => {
2413
+ var Y;
2414
+ return (Y = M.netSuite) == null ? void 0 : Y.refNo;
2415
+ }).filter((M) => M != null)
2412
2416
  },
2413
2417
  {
2414
2418
  type: "string",
2415
2419
  key: "netsuiteOrderId",
2416
2420
  entity: "purchaseOrder",
2417
- values: a.purchaseOrders.value.map((z) => {
2418
- var Q;
2419
- return (Q = z.netSuite) == null ? void 0 : Q.id;
2420
- }).filter((z) => z != null)
2421
+ values: a.purchaseOrders.value.map((M) => {
2422
+ var Y;
2423
+ return (Y = M.netSuite) == null ? void 0 : Y.id;
2424
+ }).filter((M) => M != null)
2421
2425
  }
2422
2426
  ];
2423
- return [...q, ...L.isEnabled ? S : []];
2424
- }), Ue = F(null), Le = I(() => {
2425
- if (!Ue.value) return a.purchaseOrders.value;
2426
- const q = Cn.build(Ue.value);
2427
- return a.purchaseOrders.value.filter((S) => {
2428
- var Q, H, ne, $e, Re;
2429
- const z = ((Q = x.locations.find((W) => W.dbName === S._locationDbName)) == null ? void 0 : Q.name) ?? S._locationDbName;
2427
+ return [...P, ...z.isEnabled ? w : []];
2428
+ }), Le = S(null), Me = L(() => {
2429
+ if (!Le.value) return a.purchaseOrders.value;
2430
+ const P = Cn.build(Le.value);
2431
+ return a.purchaseOrders.value.filter((w) => {
2432
+ var Y, G, le, Oe, _e;
2433
+ const M = ((Y = x.locations.find((J) => J.dbName === w._locationDbName)) == null ? void 0 : Y.name) ?? w._locationDbName;
2430
2434
  return Fn(
2431
2435
  {
2432
- netsuiteTransactionNumber: (ne = (H = S.netSuite) == null ? void 0 : H.additionalInfo) == null ? void 0 : ne.transactionnumber,
2433
- netsuiteOrderNo: ($e = S.netSuite) == null ? void 0 : $e.refNo,
2434
- netsuiteOrderId: (Re = S.netSuite) == null ? void 0 : Re.id,
2435
- status: S.status,
2436
- transferFrom: S.supplier.name,
2437
- location: z
2436
+ netsuiteTransactionNumber: (le = (G = w.netSuite) == null ? void 0 : G.additionalInfo) == null ? void 0 : le.transactionnumber,
2437
+ netsuiteOrderNo: (Oe = w.netSuite) == null ? void 0 : Oe.refNo,
2438
+ netsuiteOrderId: (_e = w.netSuite) == null ? void 0 : _e.id,
2439
+ status: w.status,
2440
+ transferFrom: w.supplier.name,
2441
+ location: M
2438
2442
  },
2439
- q
2443
+ P
2440
2444
  );
2441
2445
  });
2442
2446
  });
2443
- return (q, S) => {
2444
- const z = qe("FmIcon"), Q = qe("FmTextField"), H = qe("FmButton"), ne = qe("FmTable"), $e = qe("FmCircularProgress");
2445
- return c(), ue(cn, {
2447
+ return (P, w) => {
2448
+ const M = $e("FmIcon"), Y = $e("FmTextField"), G = $e("FmButton"), le = $e("FmTable"), Oe = $e("FmCircularProgress");
2449
+ return c(), de(cn, {
2446
2450
  title: t(_)("inventory.transfer.receiveRequest.bulk.title"),
2447
2451
  actions: Xe.value,
2448
- "onClick:action": Se
2452
+ "onClick:action": ze
2449
2453
  }, {
2450
- default: Oe(() => {
2451
- var Re;
2454
+ default: Be(() => {
2455
+ var _e;
2452
2456
  return [
2453
2457
  t($).isLoaded && !t($).enableReceiveRequestBeta ? (c(), h("div", oa, [
2454
- N(z, {
2458
+ N(M, {
2455
2459
  name: "block",
2456
2460
  size: "xl"
2457
2461
  }),
2458
- S[9] || (S[9] = e("p", { class: "fm-typo-en-body-md-400" }, "Not available", -1))
2459
- ])) : t($).enableReceiveRequestBeta ? (c(), h(_e, { key: 1 }, [
2462
+ w[11] || (w[11] = e("p", { class: "fm-typo-en-body-md-400" }, "Not available", -1))
2463
+ ])) : t($).enableReceiveRequestBeta ? (c(), h(we, { key: 1 }, [
2460
2464
  e("div", {
2461
- class: J(["flex flex-col gap-8 max-h-full", { "p-0": xe.value, "px-24": !xe.value }])
2465
+ class: j(["flex flex-col gap-8 max-h-full", { "p-0": ve.value, "px-24": !ve.value }])
2462
2466
  }, [
2463
2467
  e("div", {
2464
2468
  class: "flex flex-col gap-8",
2465
- onVnodeMounted: S[4] || (S[4] = //@ts-ignore
2466
- (...W) => t(Ne).onMounted && t(Ne).onMounted(...W)),
2467
- onVnodeUnmounted: S[5] || (S[5] = //@ts-ignore
2468
- (...W) => t(Ne).onUnmounted && t(Ne).onUnmounted(...W))
2469
+ onVnodeMounted: w[4] || (w[4] = //@ts-ignore
2470
+ (...J) => t(Ie).onMounted && t(Ie).onMounted(...J)),
2471
+ onVnodeUnmounted: w[5] || (w[5] = //@ts-ignore
2472
+ (...J) => t(Ie).onUnmounted && t(Ie).onUnmounted(...J))
2469
2473
  }, [
2470
2474
  e("div", {
2471
- class: J([
2475
+ class: j([
2472
2476
  "flex gap-8 items-center",
2473
- { "px-8 flex-col-reverse h-[unset]": xe.value, "h-48": !xe.value }
2477
+ { "px-8 flex-col-reverse h-[unset]": ve.value, "h-48": !ve.value }
2474
2478
  ])
2475
2479
  }, [
2476
2480
  e("div", {
2477
- class: J(["flex gap-8 items-center", { "w-full overflow-x-auto": xe.value }])
2481
+ class: j(["flex gap-8 items-center", { "w-full overflow-x-auto": ve.value }])
2478
2482
  }, [
2479
2483
  N(ko, {
2480
2484
  modelValue: t(U),
2481
- "onUpdate:modelValue": S[0] || (S[0] = (W) => ht(U) ? U.value = W : null),
2482
- locations: E.value
2485
+ "onUpdate:modelValue": w[0] || (w[0] = (J) => ht(U) ? U.value = J : null),
2486
+ locations: q.value
2483
2487
  }, null, 8, ["modelValue", "locations"]),
2484
- N(Qt, {
2485
- "model-value": ee.value,
2486
- "onUpdate:modelValue": S[1] || (S[1] = (W) => ee.value = W)
2488
+ N(Ht, {
2489
+ "model-value": pe.value,
2490
+ "onUpdate:modelValue": w[1] || (w[1] = (J) => pe.value = J)
2487
2491
  }, null, 8, ["model-value"])
2488
2492
  ], 2),
2489
2493
  e("div", aa, [
2490
2494
  e("div", ra, [
2491
2495
  N(t(Sn), {
2492
- modelValue: Ue.value,
2493
- "onUpdate:modelValue": S[2] || (S[2] = (W) => Ue.value = W),
2494
- attributes: Ie.value
2496
+ modelValue: Le.value,
2497
+ "onUpdate:modelValue": w[2] || (w[2] = (J) => Le.value = J),
2498
+ attributes: je.value
2495
2499
  }, null, 8, ["modelValue", "attributes"])
2496
2500
  ]),
2497
- xe.value ? D("", !0) : (c(), h("div", la)),
2501
+ ve.value ? E("", !0) : (c(), h("div", la)),
2498
2502
  e("div", ia, [
2499
- N(Q, {
2500
- "model-value": fe.value,
2501
- "onUpdate:modelValue": S[3] || (S[3] = (W) => fe.value = W),
2503
+ N(Y, {
2504
+ "model-value": ke.value,
2505
+ "onUpdate:modelValue": w[3] || (w[3] = (J) => ke.value = J),
2502
2506
  "prepend-icon": "search",
2503
2507
  placeholder: t(_)("inventory.common.table.toolbar.filterItems"),
2504
2508
  class: "w-full"
@@ -2507,81 +2511,88 @@ const No = {
2507
2511
  ])
2508
2512
  ], 2)
2509
2513
  ], 512),
2510
- t(U).length === 0 && !B.value ? (c(), h("div", ua, [
2511
- N(z, {
2514
+ t(U).length === 0 && !T.value ? (c(), h("div", ua, [
2515
+ N(M, {
2512
2516
  name: "storefront",
2513
2517
  size: "xl"
2514
2518
  }),
2515
2519
  e("p", ca, v(t(_)("inventory.transfer.receiveRequest.bulk.selectLocationsHint")), 1)
2516
2520
  ])) : (c(), h("div", da, [
2517
- (B.value || t(a).retryingFailed.value) && t(a).fetchProgress.value ? (c(), h("div", ma, [
2518
- e("div", fa, [
2519
- e("div", {
2520
- class: "h-full rounded-full bg-fm-color-primary transition-all duration-300",
2521
- style: ft({
2522
- width: `${t(a).fetchProgress.value.done / t(a).fetchProgress.value.total * 100}%`
2523
- })
2524
- }, null, 4)
2525
- ]),
2526
- e("span", pa, v(t(a).fetchProgress.value.done) + "/" + v(t(a).fetchProgress.value.total) + " locations ", 1)
2527
- ])) : D("", !0),
2528
- t(a).failedLocations.value.length > 0 ? (c(), h("div", va, [
2529
- e("span", ya, " Failed to load: " + v(ce.value), 1),
2530
- G.value ? (c(), ue(H, {
2531
- key: 0,
2532
- variant: "secondary",
2533
- disabled: t(a).retryingFailed.value || B.value,
2534
- label: t(a).retryingFailed.value ? "Retrying…" : "Retry failed locations",
2535
- onClick: t(a).retryFailedLocations
2536
- }, null, 8, ["disabled", "label", "onClick"])) : D("", !0)
2537
- ])) : D("", !0),
2538
- N(ne, {
2539
- style: ft(t(Ne).tableHeight),
2521
+ e("div", {
2522
+ onVnodeMounted: w[6] || (w[6] = //@ts-ignore
2523
+ (...J) => t(Ce).onMounted && t(Ce).onMounted(...J)),
2524
+ onVnodeUnmounted: w[7] || (w[7] = //@ts-ignore
2525
+ (...J) => t(Ce).onUnmounted && t(Ce).onUnmounted(...J))
2526
+ }, [
2527
+ (T.value || t(a).retryingFailed.value) && t(a).fetchProgress.value ? (c(), h("div", ma, [
2528
+ e("div", fa, [
2529
+ e("div", {
2530
+ class: "h-full rounded-full bg-fm-color-primary transition-all duration-300",
2531
+ style: ft({
2532
+ width: `${t(a).fetchProgress.value.done / t(a).fetchProgress.value.total * 100}%`
2533
+ })
2534
+ }, null, 4)
2535
+ ]),
2536
+ e("span", pa, v(t(a).fetchProgress.value.done) + "/" + v(t(a).fetchProgress.value.total) + " locations ", 1)
2537
+ ])) : E("", !0),
2538
+ t(a).failedLocations.value.length > 0 ? (c(), h("div", va, [
2539
+ e("span", ya, " Failed to load: " + v(me.value), 1),
2540
+ K.value ? (c(), de(G, {
2541
+ key: 0,
2542
+ variant: "secondary",
2543
+ disabled: t(a).retryingFailed.value || T.value,
2544
+ label: t(a).retryingFailed.value ? "Retrying…" : "Retry failed locations",
2545
+ onClick: t(a).retryFailedLocations
2546
+ }, null, 8, ["disabled", "label", "onClick"])) : E("", !0)
2547
+ ])) : E("", !0)
2548
+ ], 512),
2549
+ N(le, {
2550
+ style: ft(t(Ie).tableHeight),
2540
2551
  "column-defs": t(f),
2541
- "row-data": Le.value,
2542
- "search-value": fe.value,
2543
- loading: B.value,
2544
- onRowClick: S[6] || (S[6] = (W) => t(a).promptShowTransferDetails(W.original)),
2545
- "page-size": Me.value
2552
+ "row-data": Me.value,
2553
+ "search-value": ke.value,
2554
+ loading: T.value,
2555
+ onRowClick: w[8] || (w[8] = (J) => t(a).promptShowTransferDetails(J.original)),
2556
+ "page-size": Qe.value
2546
2557
  }, {
2547
- "list-row": Oe((W) => [
2558
+ "list-row": Be((J) => [
2548
2559
  N(kn, {
2549
- row: W,
2560
+ row: J,
2550
2561
  onRowClick: t(a).promptShowTransferDetails
2551
2562
  }, {
2552
- default: Oe((ie) => {
2553
- var Ve, Je, o, u, g, T, M, R, Y, K, O, se, oe, de, we, Pe, De, ke, ye, te, be, Ae, Ce, k, re;
2563
+ default: Be((ce) => {
2564
+ var o, u, g, O, I, R, Q, H, A, te, ne, ye, Fe, xe, qe, Se, Re, ee, fe, Ae, Pe, F, ae, ie, ue;
2554
2565
  return [
2555
2566
  e("div", ba, [
2556
2567
  e("div", ha, [
2557
2568
  N(t(et), {
2558
- render: (o = (Je = (Ve = ie._id) == null ? void 0 : Ve.column) == null ? void 0 : Je.columnDef) == null ? void 0 : o.cell,
2559
- props: (g = (u = ie._id) == null ? void 0 : u.getContext) == null ? void 0 : g.call(u)
2569
+ render: (g = (u = (o = ce._id) == null ? void 0 : o.column) == null ? void 0 : u.columnDef) == null ? void 0 : g.cell,
2570
+ props: (I = (O = ce._id) == null ? void 0 : O.getContext) == null ? void 0 : I.call(O)
2560
2571
  }, null, 8, ["render", "props"])
2561
2572
  ]),
2562
2573
  e("div", ga, [
2563
2574
  N(t(et), {
2564
- render: (R = (M = (T = ie.location) == null ? void 0 : T.column) == null ? void 0 : M.columnDef) == null ? void 0 : R.cell,
2565
- props: (K = (Y = ie.location) == null ? void 0 : Y.getContext) == null ? void 0 : K.call(Y)
2575
+ render: (H = (Q = (R = ce.location) == null ? void 0 : R.column) == null ? void 0 : Q.columnDef) == null ? void 0 : H.cell,
2576
+ props: (te = (A = ce.location) == null ? void 0 : A.getContext) == null ? void 0 : te.call(A)
2566
2577
  }, null, 8, ["render", "props"])
2567
2578
  ]),
2568
2579
  e("div", _a, [
2569
2580
  N(t(et), {
2570
- render: (oe = (se = (O = ie.supplier_name) == null ? void 0 : O.column) == null ? void 0 : se.columnDef) == null ? void 0 : oe.cell,
2571
- props: (we = (de = ie.supplier_name) == null ? void 0 : de.getContext) == null ? void 0 : we.call(de)
2581
+ render: (Fe = (ye = (ne = ce.supplier_name) == null ? void 0 : ne.column) == null ? void 0 : ye.columnDef) == null ? void 0 : Fe.cell,
2582
+ props: (qe = (xe = ce.supplier_name) == null ? void 0 : xe.getContext) == null ? void 0 : qe.call(xe)
2572
2583
  }, null, 8, ["render", "props"])
2573
2584
  ]),
2574
- e("div", xa, v(W.original.items.map((me) => `${me.name}`).join(", ")), 1),
2575
- W.original.ref ? (c(), h("div", wa, [
2585
+ e("div", xa, v(t(_)("inventory.transfer.table.noOfItems")) + ": " + v(Z(J.original)), 1),
2586
+ J.original.ref ? (c(), h("div", wa, [
2576
2587
  N(t(et), {
2577
- render: (ke = (De = (Pe = ie.ref) == null ? void 0 : Pe.column) == null ? void 0 : De.columnDef) == null ? void 0 : ke.cell,
2578
- props: (te = (ye = ie.ref) == null ? void 0 : ye.getContext) == null ? void 0 : te.call(ye)
2588
+ render: (ee = (Re = (Se = ce.ref) == null ? void 0 : Se.column) == null ? void 0 : Re.columnDef) == null ? void 0 : ee.cell,
2589
+ props: (Ae = (fe = ce.ref) == null ? void 0 : fe.getContext) == null ? void 0 : Ae.call(fe)
2579
2590
  }, null, 8, ["render", "props"])
2580
- ])) : D("", !0),
2591
+ ])) : E("", !0),
2581
2592
  e("div", ka, [
2582
2593
  N(t(et), {
2583
- render: (Ce = (Ae = (be = ie.status) == null ? void 0 : be.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : Ce.cell,
2584
- props: (re = (k = ie.status) == null ? void 0 : k.getContext) == null ? void 0 : re.call(k)
2594
+ render: (ae = (F = (Pe = ce.status) == null ? void 0 : Pe.column) == null ? void 0 : F.columnDef) == null ? void 0 : ae.cell,
2595
+ props: (ue = (ie = ce.status) == null ? void 0 : ie.getContext) == null ? void 0 : ue.call(ie)
2585
2596
  }, null, 8, ["render", "props"])
2586
2597
  ])
2587
2598
  ])
@@ -2594,46 +2605,46 @@ const No = {
2594
2605
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]),
2595
2606
  t(a).rowAction.pending.value ? (c(), h("div", Ca, [
2596
2607
  e("div", Fa, [
2597
- N($e, { size: "md" }),
2608
+ N(Oe, { size: "md" }),
2598
2609
  e("span", Sa, v(t(_)("inventory.common.loading")), 1),
2599
- N(H, {
2610
+ N(G, {
2600
2611
  variant: "secondary",
2601
2612
  label: t(_)("inventory.common.cancel"),
2602
2613
  onClick: t(a).rowAction.cancel
2603
2614
  }, null, 8, ["label", "onClick"])
2604
2615
  ])
2605
- ])) : D("", !0)
2616
+ ])) : E("", !0)
2606
2617
  ]))
2607
2618
  ], 2),
2608
- (c(), ue(lt, { to: "body" }, [
2619
+ (c(), de(lt, { to: "body" }, [
2609
2620
  N(sa),
2610
- t($).enablePurchaseOrderEmail ? (c(), ue(yn, gt(ct({ key: 0 }, t(a).emailDialogProps.value)), null, 16)) : D("", !0),
2621
+ t($).enablePurchaseOrderEmail ? (c(), de(yn, gt(ct({ key: 0 }, t(a).emailDialogProps.value)), null, 16)) : E("", !0),
2611
2622
  N(po, {
2612
2623
  show: b.value,
2613
- "onUpdate:show": S[7] || (S[7] = (W) => b.value = W),
2624
+ "onUpdate:show": w[9] || (w[9] = (J) => b.value = J),
2614
2625
  "last-closing-date": t(a).lastClosingDate.value,
2615
- "selected-outlet-ids": ge.value,
2626
+ "selected-outlet-ids": he.value,
2616
2627
  onSubmitted: t(a).fetchData
2617
2628
  }, null, 8, ["show", "last-closing-date", "selected-outlet-ids", "onSubmitted"]),
2618
2629
  N(bn, ct(t(a).transferDialogProps.value, {
2619
2630
  onSubmitted: t(a).fetchData
2620
2631
  }), null, 16, ["onSubmitted"]),
2621
- t(a).transferDetailsProps.value != null ? (c(), ue(sn, ct({ key: 1 }, {
2632
+ t(a).transferDetailsProps.value != null ? (c(), de(on, ct({ key: 1 }, {
2622
2633
  ...t(a).transferDetailsProps.value,
2623
- receivedMap: ((Re = t(a).transferDetailsProps.value) == null ? void 0 : Re.receivedMap) ?? {},
2634
+ receivedMap: ((_e = t(a).transferDetailsProps.value) == null ? void 0 : _e.receivedMap) ?? {},
2624
2635
  shipments: t(a).shipments.value ?? []
2625
2636
  }, {
2626
2637
  onSubmitted: t(a).fetchData
2627
- }), null, 16, ["onSubmitted"])) : D("", !0),
2628
- N(hn, gt(Lt(t(a).xilnexImportDialogProps.value)), null, 16),
2638
+ }), null, 16, ["onSubmitted"])) : E("", !0),
2639
+ N(hn, gt(zt(t(a).xilnexImportDialogProps.value)), null, 16),
2629
2640
  N(wo, {
2630
2641
  modelValue: t(d),
2631
- "onUpdate:modelValue": S[8] || (S[8] = (W) => ht(d) ? d.value = W : null),
2642
+ "onUpdate:modelValue": w[10] || (w[10] = (J) => ht(d) ? d.value = J : null),
2632
2643
  loading: t(y),
2633
2644
  "blob-url": t(s)
2634
2645
  }, null, 8, ["modelValue", "loading", "blob-url"])
2635
2646
  ]))
2636
- ], 64)) : D("", !0)
2647
+ ], 64)) : E("", !0)
2637
2648
  ];
2638
2649
  }),
2639
2650
  _: 1