@feedmepos/mf-inventory-portal 1.0.10 → 1.0.12-dev.1

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 (124) hide show
  1. package/dist/{App-Cr9pjIYz.js → App-Cicsptfk.js} +50 -49
  2. package/dist/ApprovalView-oRqJ-z0x.js +147 -0
  3. package/dist/{BindingsDialog-BI-7NkS4.js → BindingsDialog-BOIsLkdn.js} +2 -2
  4. package/dist/{BindingsPicker-B_h_aaK8.js → BindingsPicker-Co4UtTLT.js} +5 -5
  5. package/dist/{BindingsTable-Ce6bGuBs.js → BindingsTable-DLsppTGt.js} +5 -5
  6. package/dist/ClosingDraftView-CQ0s4iL_.js +1476 -0
  7. package/dist/{ClosingTemplateView-B8pA81Cs.js → ClosingTemplateView-B0q2VTDz.js} +10 -10
  8. package/dist/{DeliveryOrderPrintPreview-UR5ExrQe.js → DeliveryOrderPrintPreview-BVR-8Wuk.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CGeHOuDV.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DozsNol6.js} +5 -5
  10. package/dist/FmMultiselectDialog-cp5Eu4lS.js +77 -0
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-noWxWAwf.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BLqmn5u9.js} +47 -47
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CSicZBSR.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Di-N8CUr.js} +1 -1
  13. package/dist/IngredientGroupView-DbkNqoE2.js +898 -0
  14. package/dist/{IngredientsView-gl_IiNeO.js → IngredientsView-Bqs24FKe.js} +352 -357
  15. package/dist/IntegrationView-B5UglyZs.js +9627 -0
  16. package/dist/{InventoryBindingForm-BSVCmP6x.js → InventoryBindingForm-CNHEIU--.js} +1 -1
  17. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CXs6G1yw.js +377 -0
  18. package/dist/{InventoryBindingSummary-2hsYaAWA.js → InventoryBindingSummary-Y_t0JvQf.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-0skdlkEl.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BtpbycMa.js} +1 -1
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-B5RfOs8a.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Bv_4XhnW.js} +10 -10
  21. package/dist/{PublishView-C2904lZT.js → PublishView-CwZCF0a5.js} +12 -12
  22. package/dist/{PurchaseOrderPrintPreview-CNNpaoIe.js → PurchaseOrderPrintPreview-CSYvISrP.js} +4 -4
  23. package/dist/{ReceiveRequestView-BYoR71hg.js → ReceiveRequestView-CTuh_NZ_.js} +870 -925
  24. package/dist/RecipeView-OMZcKOQh.js +767 -0
  25. package/dist/{StockView-ddq1M9DJ.js → StockView-Cg1jE2Zw.js} +263 -261
  26. package/dist/{SupplierView-DRxqbLwm.js → SupplierView-EknM6vks.js} +12 -11
  27. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Dkk3gKIY.js +1879 -0
  28. package/dist/{TransferTemplateView-FWE5X6yd.js → TransferTemplateView-Ciwc17PA.js} +313 -312
  29. package/dist/{UnitView-BPT4tgAB.js → UnitView-B2mpu5IV.js} +37 -37
  30. package/dist/{WarehouseView-D6GNWxob.js → WarehouseView-DpZzsLzE.js} +26 -26
  31. package/dist/api/bill.d.ts +2 -2
  32. package/dist/api/food-market-hub.d.ts +1 -1
  33. package/dist/api/inventory.d.ts +128 -215
  34. package/dist/api/netsuite.d.ts +191 -8
  35. package/dist/api/purchase-order.d.ts +8 -1
  36. package/dist/{app-RWihQSVW.js → app-C_s8CpzV.js} +26138 -25327
  37. package/dist/app-YTo31ukE.js +7888 -0
  38. package/dist/app.d.ts +63 -27
  39. package/dist/app.js +5 -5
  40. package/dist/components/FmMultiselectDialog.d.ts +37 -19
  41. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +30 -8
  42. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +2 -2
  43. package/dist/components/shell/inventory/binding-ui.vue.d.ts +27 -5
  44. package/dist/composable/defineDeepModel.d.ts +39 -1
  45. package/dist/composable/useArrayModel.d.ts +21 -0
  46. package/dist/composable/usePromise.d.ts +41 -0
  47. package/dist/{decimal-ZG0j_xwd.js → decimal-D6jyMGK9.js} +1 -1
  48. package/dist/feature-BGozj4cq.js +17479 -0
  49. package/dist/{format-unit-display-C_dQNmkk.js → format-unit-display-WWMXXaOF.js} +54 -54
  50. package/dist/{index-CJ7kpXmt.js → index-ChkhtUlV.js} +7 -6
  51. package/dist/{index-DRnOLTSD.js → index-D1dhDInI.js} +1 -1
  52. package/dist/main.d.ts +1 -0
  53. package/dist/random-CSbEbElR.js +10 -0
  54. package/dist/{stock-CwjdPnMM.js → stock-5qJE0ApW.js} +22 -21
  55. package/dist/stores/feature.d.ts +3 -20
  56. package/dist/stores/integration/foodmarkethub.d.ts +58 -15
  57. package/dist/stores/integration/netsuite.d.ts +22 -7
  58. package/dist/stores/inventory.d.ts +1308 -499
  59. package/dist/stores/location.d.ts +137 -137
  60. package/dist/{supplier-B3hgnPei.js → supplier-CxTBVGVa.js} +8 -7
  61. package/dist/tsconfig.app.tsbuildinfo +1 -1
  62. package/dist/{use-ingredient-select-dialog-QM-bAV0B.js → use-ingredient-select-dialog-Cxn_cX8W.js} +1 -1
  63. package/dist/use-inventory-binding-dialog--nqAQCSl.js +133 -0
  64. package/dist/usePromise-CbVUCxhj.js +29 -0
  65. package/dist/views/adjustment-template/wastage-template/actions.d.ts +228 -228
  66. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +2 -2
  67. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +1 -1
  68. package/dist/views/adjustment-template/wastage-template/table.d.ts +234 -234
  69. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +136 -136
  70. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +408 -408
  71. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +4 -4
  72. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +252 -252
  73. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +252 -252
  74. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +1 -3
  75. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +3 -3
  76. package/dist/views/ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +33 -0
  77. package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +26 -0
  78. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +30 -183
  79. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +2 -2
  80. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +8 -8
  81. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +3 -3
  82. package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +1 -0
  83. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +4 -4
  84. package/dist/views/integration/components/ApplyAddon.vue.d.ts +66 -16
  85. package/dist/views/integration/components/ApplyProduct.vue.d.ts +50 -14
  86. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +35 -10
  87. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +35 -10
  88. package/dist/views/integration/components/netsuite/InventoryTransfer.vue.d.ts +48 -0
  89. package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +180 -0
  90. package/dist/views/integration/components/netsuite/NetSuiteSideSheet.vue.d.ts +24 -0
  91. package/dist/views/integration/components/netsuite/NetSuiteSideSheetProps.d.ts +8 -0
  92. package/dist/views/integration/components/netsuite/{AddLocationDialog.vue.d.ts → business/AddLocationDialog.vue.d.ts} +204 -204
  93. package/dist/views/integration/components/netsuite/{LocationConfigurationDialog.vue.d.ts → business/BusinessNetSuiteSideSheet.vue.d.ts} +3 -3
  94. package/dist/views/integration/components/netsuite/{LocationConfigurationDialogProps.d.ts → business/BusinessNetSuiteSideSheetProps.d.ts} +1 -5
  95. package/dist/views/integration/components/netsuite/{NetSuiteLocationField.vue.d.ts → business/NetSuiteLocationField.vue.d.ts} +11 -9
  96. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +665 -637
  97. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +22 -22
  98. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +44 -44
  99. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +11 -11
  100. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +614 -0
  101. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1190 -1142
  102. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1192 -1144
  103. package/dist/views/receive-request/constants/po-action-to-ui-style.d.ts +6 -0
  104. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +46 -2
  105. package/dist/views/recipe/components/recipe-override-form-field/RecipeOverrideFormField.vue.d.ts +61 -0
  106. package/dist/views/recipe/composables/use-recipe-overrides-form-field.d.ts +10 -0
  107. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  108. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +14 -14
  109. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +22 -22
  110. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +17 -17
  111. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +11 -11
  112. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +805 -805
  113. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +805 -805
  114. package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +33 -33
  115. package/dist/{vue-i18n-Bp2yWmdK.js → vue-i18n-DDOrxu8s.js} +350 -350
  116. package/package.json +11 -7
  117. package/dist/ApprovalView-BXaxRWCG.js +0 -143
  118. package/dist/ClosingDraftView-Kr4PZGm3.js +0 -1414
  119. package/dist/IngredientGroupView-4paSX___.js +0 -604
  120. package/dist/IntegrationView-BOqMnOIu.js +0 -2148
  121. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-BBjySZCZ.js +0 -286
  122. package/dist/RecipeView-Be6h5e9F.js +0 -616
  123. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-T5iWLexy.js +0 -1746
  124. package/dist/use-inventory-binding-dialog-C4Rq87h9.js +0 -94
@@ -1,7 +1,8 @@
1
1
  import { ref as U, onUnmounted as F, defineComponent as h, watch as P, onMounted as x, computed as g, resolveComponent as b, openBlock as S, createElementBlock as I, unref as v, createVNode as _, createElementVNode as p, toDisplayString as w, createBlock as B, createCommentVNode as k } from "vue";
2
- import { u as M, a as D, b as H, R as e, c as G, g as r, d as W } from "./app-RWihQSVW.js";
3
- import { useCoreStore as A, useI18n as O } from "@feedmepos/mf-common";
2
+ import { u as M, a as D, b as H, R as e, g as s, c as W } from "./app-C_s8CpzV.js";
3
+ import { useCoreStore as A, useI18n as G } from "@feedmepos/mf-common";
4
4
  import { useRouter as L, useRoute as K } from "vue-router";
5
+ import { u as O } from "./feature-BGozj4cq.js";
5
6
  import { u as $ } from "./useTabStorage-BkIVScW_.js";
6
7
  import { u as Q } from "./googlemap-Dm8ERVai.js";
7
8
  import "./array-hChJVZLE.js";
@@ -40,19 +41,19 @@ const q = {
40
41
  }, X = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Y = { class: "fm-typo-en-title-lg-600" }, Z = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, ee = { class: "flex gap-16" }, te = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, oe = { href: "https://feedme.ai/form" }, ne = /* @__PURE__ */ h({
41
42
  __name: "InventoryView",
42
43
  setup(l) {
43
- const n = M(), i = D(), u = H(), s = A(), m = L(), o = z(), R = G(), { t: d } = O();
44
+ const n = M(), i = D(), u = H(), a = A(), m = L(), o = z(), R = O(), { t: d } = G();
44
45
  P(
45
- [() => s.sessionUser.value, () => s.currentBusiness.value],
46
- ([t, a]) => {
47
- f(t, a);
46
+ [() => a.sessionUser.value, () => a.currentBusiness.value],
47
+ ([t, r]) => {
48
+ f(t, r);
48
49
  }
49
50
  ), x(async () => {
50
- await R.init(), await s.readBusinesses();
51
- const t = s.sessionUser.value, a = s.currentBusiness.value;
52
- f(t, a);
51
+ await R.init(), await a.readBusinesses();
52
+ const t = a.sessionUser.value, r = a.currentBusiness.value;
53
+ f(t, r);
53
54
  });
54
- function f(t, a) {
55
- !t || !a || T();
55
+ function f(t, r) {
56
+ !t || !r || T();
56
57
  }
57
58
  async function T() {
58
59
  return await n.init(), await u.readSetting().catch((t) => {
@@ -60,7 +61,7 @@ const q = {
60
61
  }), await i.init();
61
62
  }
62
63
  const y = g(() => m.currentRoute.value.name === e.TRANSFER_TEMPLATE ? R.enablePoTemplate : !0);
63
- return (t, a) => {
64
+ return (t, r) => {
64
65
  const c = b("FmSpacer"), N = b("FmCircularProgress"), C = b("FmButton"), V = b("RouterView");
65
66
  return S(), I("div", null, [
66
67
  v(o).isLoading ? (S(), I("div", q, [
@@ -68,9 +69,9 @@ const q = {
68
69
  p("div", null, [
69
70
  _(N, { size: "xl" })
70
71
  ]),
71
- a[0] || (a[0] = p("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
72
+ r[0] || (r[0] = p("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
72
73
  _(c)
73
- ])) : y.value ? v(s).sessionUser.value ? (S(), B(V, { key: 2 })) : k("", !0) : (S(), I("div", J, [
74
+ ])) : y.value ? v(a).sessionUser.value ? (S(), B(V, { key: 2 })) : k("", !0) : (S(), I("div", J, [
74
75
  p("div", X, [
75
76
  p("div", Y, w(v(d)("inventory.common.proPlan.title")), 1),
76
77
  p("div", Z, w(v(d)("inventory.common.proPlan.subtitle")), 1)
@@ -93,66 +94,66 @@ const q = {
93
94
  ]);
94
95
  };
95
96
  }
96
- }), ae = { class: "h-full flex flex-col overflow-auto py-16" }, se = /* @__PURE__ */ h({
97
+ }), re = { class: "h-full flex flex-col overflow-auto py-16" }, ae = /* @__PURE__ */ h({
97
98
  __name: "NavigationTab",
98
99
  setup(l) {
99
- const n = K(), i = L(), u = A(), s = G(), m = $(), { t: o } = O();
100
- P([() => u.currentBusiness.value, () => n.name], ([t, a]) => {
101
- (t == null ? void 0 : t.menuVersion) === "v3" && (a === e.INGREDIENTS || a === e.RECIPE || a === e.UNIT) && i.push({ name: e.STOCK });
100
+ const n = K(), i = L(), u = A(), a = O(), m = $(), { t: o } = G();
101
+ P([() => u.currentBusiness.value, () => n.name], ([t, r]) => {
102
+ (t == null ? void 0 : t.menuVersion) === "v3" && (r === e.INGREDIENTS || r === e.RECIPE || r === e.UNIT) && i.push({ name: e.STOCK });
102
103
  });
103
104
  const R = g(() => {
104
- var a;
105
+ var r;
105
106
  const t = [
106
107
  {
107
- label: r(e.STOCK, o),
108
+ label: s(e.STOCK, o),
108
109
  // icon: 'inventory_2',
109
110
  children: [
110
111
  {
111
112
  label: o("inventory.stock.stock_balance.title"),
112
113
  value: e.STOCK
113
114
  },
114
- ...s.enableWastageTemplate ? [
115
+ ...a.enableWastageTemplate ? [
115
116
  {
116
- label: r(e.WASTAGE_TEMPLATE, o),
117
+ label: s(e.WASTAGE_TEMPLATE, o),
117
118
  value: e.WASTAGE_TEMPLATE
118
119
  }
119
120
  ] : []
120
121
  ]
121
122
  },
122
- ...s.enableClosingTemplate ? [
123
+ ...a.enableClosingTemplate ? [
123
124
  {
124
125
  label: "Closing",
125
126
  children: [
126
127
  {
127
- label: r(e.CLOSING_TEMPLATE, o),
128
+ label: s(e.CLOSING_TEMPLATE, o),
128
129
  value: e.CLOSING_TEMPLATE
129
130
  },
130
131
  {
131
- label: r(e.CLOSING_DRAFT, o),
132
+ label: s(e.CLOSING_DRAFT, o),
132
133
  value: e.CLOSING_DRAFT
133
134
  }
134
135
  ]
135
136
  }
136
137
  ] : [],
137
138
  {
138
- label: r(e.INGREDIENTS, o),
139
+ label: s(e.INGREDIENTS, o),
139
140
  // icon: 'grocery',
140
141
  value: e.INGREDIENTS
141
142
  },
142
- ...s.enableIngredientGroup ? [
143
+ ...a.enableIngredientGroup ? [
143
144
  {
144
- label: r(e.INGREDIENT_GROUP, o),
145
+ label: s(e.INGREDIENT_GROUP, o),
145
146
  // icon: 'grocery',
146
147
  value: e.INGREDIENT_GROUP
147
148
  }
148
149
  ] : [],
149
150
  {
150
- label: r(e.RECIPE, o),
151
+ label: s(e.RECIPE, o),
151
152
  // icon: 'weight',
152
153
  value: e.RECIPE
153
154
  },
154
155
  {
155
- label: r(e.UNIT, o),
156
+ label: s(e.UNIT, o),
156
157
  // icon: 'fastfood',
157
158
  value: e.UNIT
158
159
  },
@@ -161,42 +162,42 @@ const q = {
161
162
  // icon: 'swap_horiz',
162
163
  children: [
163
164
  {
164
- label: r(e.RECEIVE_REQUEST, o),
165
+ label: s(e.RECEIVE_REQUEST, o),
165
166
  value: e.RECEIVE_REQUEST
166
167
  },
167
168
  {
168
- label: r(e.APPROVAL, o),
169
+ label: s(e.APPROVAL, o),
169
170
  value: e.APPROVAL
170
171
  },
171
- ...s.enablePoTemplate ? [
172
+ ...a.enablePoTemplate ? [
172
173
  {
173
- label: r(e.TRANSFER_TEMPLATE, o),
174
+ label: s(e.TRANSFER_TEMPLATE, o),
174
175
  value: e.TRANSFER_TEMPLATE
175
176
  }
176
177
  ] : []
177
178
  ]
178
179
  },
179
180
  {
180
- label: r(e.SUPPLIER, o),
181
+ label: s(e.SUPPLIER, o),
181
182
  // icon: 'group',
182
183
  value: e.SUPPLIER
183
184
  },
184
185
  {
185
- label: r(e.WAREHOUSE, o),
186
+ label: s(e.WAREHOUSE, o),
186
187
  // icon: 'warehouse',
187
188
  value: e.WAREHOUSE
188
189
  },
189
190
  {
190
- label: r(e.PUBLISH, o),
191
+ label: s(e.PUBLISH, o),
191
192
  value: e.PUBLISH
192
193
  },
193
194
  {
194
- label: r(e.INTEGRATION, o),
195
+ label: s(e.INTEGRATION, o),
195
196
  // icon: 'integration_instructions',
196
197
  value: e.INTEGRATION
197
198
  }
198
199
  ];
199
- return ((a = u.currentBusiness.value) == null ? void 0 : a.menuVersion) === "v3" ? t.filter(
200
+ return ((r = u.currentBusiness.value) == null ? void 0 : r.menuVersion) === "v3" ? t.filter(
200
201
  (c) => c.value !== e.INGREDIENTS && c.value !== e.RECIPE && c.value !== e.UNIT && c.value !== e.PUBLISH
201
202
  ) : t;
202
203
  }), d = g({
@@ -224,12 +225,12 @@ const q = {
224
225
  T.value = !1, setTimeout(() => {
225
226
  y.value = !m.getItem(f.value);
226
227
  }, 2e3);
227
- }), (t, a) => {
228
+ }), (t, r) => {
228
229
  const c = b("FmCollapsibleTabs");
229
- return S(), I("div", ae, [
230
+ return S(), I("div", re, [
230
231
  _(c, {
231
232
  modelValue: d.value,
232
- "onUpdate:modelValue": a[0] || (a[0] = (N) => d.value = N),
233
+ "onUpdate:modelValue": r[0] || (r[0] = (N) => d.value = N),
233
234
  items: R.value
234
235
  }, null, 8, ["modelValue", "items"])
235
236
  ]);
@@ -238,14 +239,14 @@ const q = {
238
239
  });
239
240
  typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
240
241
  let l, n;
241
- return { promise: new Promise((u, s) => {
242
- l = u, n = s;
242
+ return { promise: new Promise((u, a) => {
243
+ l = u, n = a;
243
244
  }), resolve: l, reject: n };
244
245
  });
245
246
  typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(l) {
246
247
  return await new Promise((n) => setTimeout(n, l)), Promise.resolve(this);
247
248
  });
248
- const de = /* @__PURE__ */ h({
249
+ const fe = /* @__PURE__ */ h({
249
250
  __name: "App",
250
251
  setup(l) {
251
252
  const n = A(), i = Q(), u = W();
@@ -254,13 +255,13 @@ const de = /* @__PURE__ */ h({
254
255
  n.setEmbedded(!0);
255
256
  return;
256
257
  }
257
- n.registerSidebarComponent(se), i.initGoogleMap(u.appApi.googleMap).catch(() => {
258
+ n.registerSidebarComponent(ae), i.initGoogleMap(u.appApi.googleMap).catch(() => {
258
259
  console.error("Google map cannot be loaded");
259
260
  });
260
261
  }), P([() => n.currentCountry.value], () => {
261
- s();
262
+ a();
262
263
  });
263
- async function s() {
264
+ async function a() {
264
265
  var m;
265
266
  try {
266
267
  await n.readBusinesses(), n.currentBusiness.value = (m = n.businesses.value) == null ? void 0 : m.find((o) => o);
@@ -272,5 +273,5 @@ const de = /* @__PURE__ */ h({
272
273
  }
273
274
  });
274
275
  export {
275
- de as default
276
+ fe as default
276
277
  };
@@ -0,0 +1,147 @@
1
+ import { defineComponent as oe, ref as g, watch as re, computed as b, resolveComponent as ne, openBlock as y, createBlock as K, unref as e, withCtx as x, createElementVNode as l, normalizeClass as se, createVNode as n, normalizeStyle as le, toDisplayString as ie, createElementBlock as ce, createCommentVNode as ue, Teleport as pe, mergeProps as me } from "vue";
2
+ import { u as de, av as v, aG as fe, a8 as Q, z as ve, _ as _e, B as De, C as he, E as _ } from "./app-C_s8CpzV.js";
3
+ import { a as ge, P as R, b as be, _ as ye } from "./TransferDetails.vue_vue_type_script_setup_true_lang-Dkk3gKIY.js";
4
+ import { useBreakpoints as xe } from "@feedmepos/ui-library";
5
+ import { useI18n as Re } from "@feedmepos/mf-common";
6
+ const Oe = { class: "flex flex-col py-8" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Ce = {
7
+ key: 0,
8
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
9
+ }, Se = { class: "pt-8" }, $e = /* @__PURE__ */ oe({
10
+ __name: "ApprovalView",
11
+ setup(Te) {
12
+ const r = ge(R.APPROVAL), { columnDefs: W } = be(R.APPROVAL, r), X = de();
13
+ v.object({
14
+ name: v.string().optional().nullable(),
15
+ start: v.date().optional().nullable(),
16
+ end: v.date().optional().nullable()
17
+ });
18
+ const O = g({
19
+ name: "",
20
+ ...fe()
21
+ }), a = g({
22
+ startDate: Q(O.value.start ?? /* @__PURE__ */ new Date()),
23
+ endDate: Q(O.value.end ?? /* @__PURE__ */ new Date())
24
+ });
25
+ re([() => a.value.startDate], () => {
26
+ if (!a.value.startDate)
27
+ return;
28
+ if (!a.value.endDate) {
29
+ a.value.endDate = a.value.startDate;
30
+ return;
31
+ }
32
+ const i = new Date(a.value.startDate);
33
+ if (new Date(a.value.endDate).getTime() < i.getTime()) {
34
+ a.value.endDate = a.value.startDate;
35
+ return;
36
+ }
37
+ r.updateDateRange(a.value.startDate, a.value.endDate);
38
+ });
39
+ const D = g(""), { breakpoints: w } = xe(), h = b(() => w.value.xs || w.value.sm), Z = b(() => h.value ? 10 : 20), B = ve(), { t: P } = Re(), I = b(() => [
40
+ {
41
+ label: P("inventory.common.refresh"),
42
+ value: "refresh"
43
+ }
44
+ ]);
45
+ function ee(i) {
46
+ switch (i) {
47
+ case "refresh":
48
+ return r.fetchData();
49
+ }
50
+ }
51
+ return (i, s) => {
52
+ const ae = ne("FmTable");
53
+ return y(), K(_e, {
54
+ title: e(P)("inventory.transfer.approval.title"),
55
+ actions: I.value,
56
+ "onClick:action": ee
57
+ }, {
58
+ default: x(() => [
59
+ l("div", {
60
+ class: se([
61
+ "flex flex-col gap-8 max-h-full",
62
+ {
63
+ "p-0": h.value,
64
+ "px-24 ": !h.value
65
+ }
66
+ ])
67
+ }, [
68
+ n(De, {
69
+ "date-range-query": "",
70
+ "date-range": a.value,
71
+ "onUpdate:dateRange": s[0] || (s[0] = (o) => a.value = o),
72
+ searchable: "",
73
+ "change-location": "",
74
+ search: D.value,
75
+ "onUpdate:search": s[1] || (s[1] = (o) => D.value = o)
76
+ }, null, 8, ["date-range", "search"]),
77
+ n(ae, {
78
+ style: le(e(B).tableHeight),
79
+ "column-defs": e(W),
80
+ "row-data": e(r).purchaseRequests.value,
81
+ "search-value": D.value,
82
+ loading: !e(X)._currentLocation || e(r).loading.value,
83
+ onRowClick: s[2] || (s[2] = (o) => e(r).promptShowTransferDetails(
84
+ o.original.purchaseOrder,
85
+ o.original
86
+ )),
87
+ "page-size": Z.value
88
+ }, {
89
+ "list-row": x((o) => [
90
+ n(he, {
91
+ row: o,
92
+ onRowClick: (t) => e(r).promptShowTransferDetails(t.purchaseOrder, t)
93
+ }, {
94
+ default: x((t) => {
95
+ var k, C, S, c, T, A, V, z, u, L, M, p, $, m, q, E, F, Y, N, d, j, H, U, G, f, J;
96
+ return [
97
+ l("div", Oe, [
98
+ l("div", we, [
99
+ n(e(_), {
100
+ render: (S = (C = (k = t.purchaseOrder__id) == null ? void 0 : k.column) == null ? void 0 : C.columnDef) == null ? void 0 : S.cell,
101
+ props: (T = (c = t.purchaseOrder__id) == null ? void 0 : c.getContext) == null ? void 0 : T.call(c)
102
+ }, null, 8, ["render", "props"])
103
+ ]),
104
+ l("div", Pe, [
105
+ n(e(_), {
106
+ render: (z = (V = (A = t.to_name) == null ? void 0 : A.column) == null ? void 0 : V.columnDef) == null ? void 0 : z.cell,
107
+ props: (L = (u = t.to_name) == null ? void 0 : u.getContext) == null ? void 0 : L.call(u)
108
+ }, null, 8, ["render", "props"])
109
+ ]),
110
+ l("div", ke, ie((q = (m = ($ = (p = (M = o.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : p.map) == null ? void 0 : $.call(p, (te) => `${te.name}`)) == null ? void 0 : m.join) == null ? void 0 : q.call(m, ", ")), 1),
111
+ (E = o.original.purchaseOrder) != null && E.ref ? (y(), ce("div", Ce, [
112
+ n(e(_), {
113
+ render: (N = (Y = (F = t.purchaseOrder_ref) == null ? void 0 : F.column) == null ? void 0 : Y.columnDef) == null ? void 0 : N.cell,
114
+ props: (j = (d = t.purchaseOrder_ref) == null ? void 0 : d.getContext) == null ? void 0 : j.call(d)
115
+ }, null, 8, ["render", "props"])
116
+ ])) : ue("", !0),
117
+ l("div", Se, [
118
+ n(e(_), {
119
+ render: (G = (U = (H = t.purchaseOrder_status) == null ? void 0 : H.column) == null ? void 0 : U.columnDef) == null ? void 0 : G.cell,
120
+ props: (J = (f = t.purchaseOrder_status) == null ? void 0 : f.getContext) == null ? void 0 : J.call(f)
121
+ }, null, 8, ["render", "props"])
122
+ ])
123
+ ])
124
+ ];
125
+ }),
126
+ _: 2
127
+ }, 1032, ["row", "onRowClick"])
128
+ ]),
129
+ _: 1
130
+ }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
131
+ ], 2),
132
+ (y(), K(pe, { to: "body" }, [
133
+ n(ye, me({
134
+ scope: e(R).APPROVAL
135
+ }, e(r).transferDetailsProps.value, {
136
+ onSubmitted: e(r).fetchData
137
+ }), null, 16, ["scope", "onSubmitted"])
138
+ ]))
139
+ ]),
140
+ _: 1
141
+ }, 8, ["title", "actions"]);
142
+ };
143
+ }
144
+ });
145
+ export {
146
+ $e as default
147
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as c, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
2
- import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BBjySZCZ.js";
3
- import { a as L, aR as S } from "./app-RWihQSVW.js";
2
+ import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-CXs6G1yw.js";
3
+ import { a as L, b6 as S } from "./app-C_s8CpzV.js";
4
4
  const U = {
5
5
  key: 0,
6
6
  class: "flex justify-end gap-8 items-center"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as S, computed as r, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as u, createElementVNode as k } from "vue";
2
- import { a as M, aR as x, J as z } from "./app-RWihQSVW.js";
2
+ import { a as M, b6 as x, W as z } from "./app-C_s8CpzV.js";
3
3
  const F = {
4
4
  key: 0,
5
5
  class: "flex flex-col gap-16"
@@ -71,10 +71,10 @@ const F = {
71
71
  }
72
72
  ), o.sendMessage("props:binding-items");
73
73
  }
74
- function R() {
74
+ function P() {
75
75
  o.sendMessage("@close");
76
76
  }
77
- function P() {
77
+ function R() {
78
78
  o.sendMessage("@submit:items", i.value);
79
79
  }
80
80
  const y = l();
@@ -106,11 +106,11 @@ const F = {
106
106
  u(n, {
107
107
  variant: "tertiary",
108
108
  label: "Close",
109
- onClick: R
109
+ onClick: P
110
110
  }),
111
111
  u(n, {
112
112
  label: "Submit",
113
- onClick: P
113
+ onClick: R
114
114
  })
115
115
  ])
116
116
  ]))
@@ -1,5 +1,5 @@
1
- import { defineComponent as x, ref as r, provide as C, computed as g, resolveComponent as h, openBlock as l, createElementBlock as u, createStaticVNode as F, Fragment as L, renderList as I, createElementVNode as p, toDisplayString as v, createVNode as w, withModifiers as N, onMounted as E, onUnmounted as R, createBlock as z } from "vue";
2
- import { F as b, a as M, aR as P } from "./app-RWihQSVW.js";
1
+ import { defineComponent as x, ref as r, provide as C, computed as g, resolveComponent as h, openBlock as l, createElementBlock as u, createStaticVNode as F, Fragment as L, renderList as I, createElementVNode as p, toDisplayString as v, createVNode as w, withModifiers as N, onMounted as E, onUnmounted as z, createBlock as M } from "vue";
2
+ import { F as b, a as P, b6 as R } from "./app-C_s8CpzV.js";
3
3
  import "@feedmepos/ui-library";
4
4
  import "@feedmepos/mf-common";
5
5
  const U = { class: "" }, D = ["onClick"], O = { class: "flex-grow-0 flex-shrink-0 basis-5/12 py-8 pl-8" }, V = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, S = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, $ = { class: "flex-grow-0 flex-shrink-0 basis-1/12 py-4" }, T = /* @__PURE__ */ x({
@@ -68,7 +68,7 @@ const U = { class: "" }, D = ["onClick"], O = { class: "flex-grow-0 flex-shrink-
68
68
  }, K = /* @__PURE__ */ x({
69
69
  __name: "BindingsTable",
70
70
  setup(_) {
71
- const a = M(), d = r(!0), i = r(new Array()), f = g(() => a.recipes), m = g(() => a.skus), k = r(""), s = P(e), t = r();
71
+ const a = P(), d = r(!0), i = r(new Array()), f = g(() => a.recipes), m = g(() => a.skus), k = r(""), s = R(e), t = r();
72
72
  async function e() {
73
73
  await a.readInventory(), t.value = s.onMessage(
74
74
  "props:grouped-bindings",
@@ -89,7 +89,7 @@ const U = { class: "" }, D = ["onClick"], O = { class: "flex-grow-0 flex-shrink-
89
89
  n && new ResizeObserver(() => {
90
90
  s.sendMessage("resize", n.scrollHeight);
91
91
  }).observe(n);
92
- }), R(() => {
92
+ }), z(() => {
93
93
  var n, o;
94
94
  (o = (n = t.value) == null ? void 0 : n.removeEventListener) == null || o.call(n);
95
95
  }), (n, o) => {
@@ -102,7 +102,7 @@ const U = { class: "" }, D = ["onClick"], O = { class: "flex-grow-0 flex-shrink-
102
102
  d.value ? (l(), u("div", A, [
103
103
  w(B, { size: "md" }),
104
104
  o[0] || (o[0] = p("div", null, "Loading bindings table...", -1))
105
- ])) : (l(), z(T, {
105
+ ])) : (l(), M(T, {
106
106
  key: 0,
107
107
  items: i.value,
108
108
  recipes: f.value,