@feedmepos/mf-inventory-portal 0.0.25-dev.3 → 0.0.25-dev.30

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 (121) hide show
  1. package/dist/App-CbGTNGMK.js +280 -0
  2. package/dist/ApprovalView-C9hrKiel.js +146 -0
  3. package/dist/{BindingsDialog-DPvBW5cM.js → BindingsDialog-DIxrUmBp.js} +6 -6
  4. package/dist/{BindingsPicker-DHjUZp_W.js → BindingsPicker-DT2fCUQ7.js} +3 -3
  5. package/dist/{BindingsTable-D29VX7KG.js → BindingsTable-rpRrfxfm.js} +6 -6
  6. package/dist/ClosingDraftView-aETdobNv.js +1340 -0
  7. package/dist/ClosingTemplateView-Cl-7Agfl.js +1859 -0
  8. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js +34 -0
  9. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Ugss5lqQ.js +215 -0
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DLVeADwI.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BZoFs1-5.js} +52 -52
  11. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-uRrJNVoO.js +51 -0
  12. package/dist/{IngredientGroupView-BZGkNkrt.js → IngredientGroupView-DCtkP28-.js} +1 -1
  13. package/dist/{IngredientsView-V_vDYAho.js → IngredientsView-C4jOCqij.js} +394 -382
  14. package/dist/{IntegrationView-CK_4s6nJ.js → IntegrationView-DDAVjLV5.js} +660 -623
  15. package/dist/{InventoryBindingForm-CAWQBqr1.js → InventoryBindingForm-CbM-0GcS.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BDWmhU7C.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-uGVP8nwi.js} +99 -99
  17. package/dist/{InventoryBindingSummary-BBppQstd.js → InventoryBindingSummary-DOdGKen4.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-e54jzd1P.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CBu3pj-m.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DKUl-kuR.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BPmKDzxI.js} +15 -15
  20. package/dist/PublishView-BE8Fo2Go.js +222 -0
  21. package/dist/{PurchaseOrderPrintPreview-DiDSTpNu.js → PurchaseOrderPrintPreview-DBEfp8uZ.js} +1 -1
  22. package/dist/ReceiveRequestView-BmrpIRSM.js +2895 -0
  23. package/dist/{RecipeView-DmYWjO2j.js → RecipeView-DTFpgZwH.js} +32 -31
  24. package/dist/{index-CBXvWfSg.js → StockView-CF7VlY8S.js} +3577 -1764
  25. package/dist/{SupplierView-DKISIdqs.js → SupplierView-BZ4rA2D1.js} +12 -11
  26. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CidXuoBS.js +1831 -0
  27. package/dist/TransferTemplateView-C7bYJLit.js +1660 -0
  28. package/dist/{UnitView-CvUayQQ1.js → UnitView-1lzQaH5U.js} +14 -14
  29. package/dist/{WarehouseView-IoiXm1I8.js → WarehouseView-eRypQalS.js} +332 -314
  30. package/dist/api/closing-draft.d.ts +1 -0
  31. package/dist/api/inventory.d.ts +9 -6
  32. package/dist/api/netsuite.d.ts +17 -0
  33. package/dist/api/purchase-order.d.ts +3 -1
  34. package/dist/{app-CX6n1ion.js → app-d94DuF5R.js} +28901 -28676
  35. package/dist/app.js +1 -1
  36. package/dist/components/FmAutocompleteTextField.vue.d.ts +31 -0
  37. package/dist/components/FmCustomAttribute.vue.d.ts +3 -8
  38. package/dist/components/FmLockableField.vue.d.ts +3 -0
  39. package/dist/components/FmMultiselectDialog.d.ts +46 -0
  40. package/dist/components/FmMultiselectDialog.vue.d.ts +20 -3
  41. package/dist/components/FmMultiselectDialogProps.d.ts +2 -0
  42. package/dist/components/MountListener.vue.d.ts +15 -0
  43. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -1
  44. package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -1
  45. package/dist/{decimal-CWOfT2lu.js → decimal-BCeq_89w.js} +1 -1
  46. package/dist/feature-BiSY0JBR.js +1011 -0
  47. package/dist/{format-unit-display-9aWRoLgP.js → format-unit-display-x2P1kVbK.js} +334 -327
  48. package/dist/helper/fuzzy.d.ts +10 -0
  49. package/dist/index-DnkQqb_5.js +35546 -0
  50. package/dist/{stock-C2QEA4Bf.js → stock-BHtAAvq5.js} +3 -3
  51. package/dist/stores/feature.d.ts +7 -7
  52. package/dist/stores/integration/netsuite.d.ts +22 -0
  53. package/dist/stores/inventory.d.ts +135 -8
  54. package/dist/stores/location.d.ts +100 -0
  55. package/dist/stores/warehouse.d.ts +1 -0
  56. package/dist/style.css +1 -1
  57. package/dist/{supplier-DNuzB_6-.js → supplier-BSiJWxYO.js} +1 -1
  58. package/dist/tsconfig.app.tsbuildinfo +1 -1
  59. package/dist/use-ingredient-select-dialog-CvsCbtLc.js +51 -0
  60. package/dist/{use-inventory-binding-dialog-D4We0HnY.js → use-inventory-binding-dialog-CmiGDFT9.js} +1 -1
  61. package/dist/views/adjustment-template/wastage-template/actions.d.ts +24 -0
  62. package/dist/views/adjustment-template/wastage-template/table.d.ts +24 -0
  63. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -4
  64. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +4 -1
  65. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +48 -24
  66. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +1 -1
  67. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
  68. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +36 -12
  69. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -12
  70. package/dist/views/dev/components/AutocompleteTextField.vue.d.ts +2 -0
  71. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +3 -3
  72. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
  73. package/dist/views/ingredients/composables/use-ingredient-select-dialog.d.ts +16 -0
  74. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
  75. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -0
  76. package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +1389 -0
  77. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +5 -1
  78. package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +3 -0
  79. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -2
  80. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +48 -2
  81. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +490 -2
  82. package/dist/views/receive-request/components/transfer-form/components/TransferSubItemTable.vue.d.ts +72 -0
  83. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +25 -2
  84. package/dist/views/receive-request/components/transfer-form/helpers/calculate-sub-item-total.helper.d.ts +4 -0
  85. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +702 -35
  86. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +690 -35
  87. package/dist/views/receive-request/helper/po-to-po-template.util.d.ts +1 -0
  88. package/dist/views/receive-request/helper/print-po.d.ts +9 -2
  89. package/dist/views/receive-request/import/XilnexImportDialog.vue.d.ts +22 -0
  90. package/dist/views/receive-request/import/XilnexImportForm.vue.d.ts +17 -0
  91. package/dist/views/receive-request/import/XilnexResult.vue.d.ts +17 -0
  92. package/dist/views/receive-request/import/export.d.ts +12 -0
  93. package/dist/views/receive-request/import/props.d.ts +7 -0
  94. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  95. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +270 -2
  96. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +286 -0
  97. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateSubItem.vue.d.ts +74 -0
  98. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateSubItemTable.vue.d.ts +92 -0
  99. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +8 -0
  100. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +1 -0
  101. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +36 -2
  102. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +456 -12
  103. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +456 -12
  104. package/dist/views/transfer-template/helpers/location-to-po-supplier.util.d.ts +75 -0
  105. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -0
  106. package/dist/{vue-i18n-D1f9MmwY.js → vue-i18n-DC5cHFol.js} +153 -153
  107. package/package.json +2 -2
  108. package/dist/App-Du7DrI4b.js +0 -276
  109. package/dist/ApprovalView-CTZVmCbC.js +0 -138
  110. package/dist/ClosingDraftView-D6_mQmyF.js +0 -1225
  111. package/dist/ClosingTemplateView-DMConQNm.js +0 -1819
  112. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-DuB-gluw.js +0 -142
  113. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ttr6ec9b.js +0 -286
  114. package/dist/PublishView-BzUykEd5.js +0 -192
  115. package/dist/ReceiveRequestView-BWgm4e46.js +0 -1876
  116. package/dist/StockView--YVDLsgO.js +0 -1817
  117. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CTy65dTx.js +0 -1327
  118. package/dist/TransferTemplateView-KOeBENZz.js +0 -1284
  119. package/dist/components/FmCustomAttribute2.vue.d.ts +0 -18
  120. package/dist/index-CCWsIAQX.js +0 -29202
  121. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +0 -2628
@@ -0,0 +1,280 @@
1
+ import { ref as x, onUnmounted as M, defineComponent as h, watch as y, onMounted as U, computed as g, resolveComponent as R, openBlock as T, createElementBlock as P, unref as f, createVNode as S, createElementVNode as p, toDisplayString as L, createBlock as G, createCommentVNode as k } from "vue";
2
+ import { u as D, a as H, b as W, R as e, g as a, c as K } from "./app-d94DuF5R.js";
3
+ import { useCoreStore as A, useI18n as B } from "@feedmepos/mf-common";
4
+ import { useRouter as w, useRoute as $ } from "vue-router";
5
+ import { u as O } from "./feature-BiSY0JBR.js";
6
+ import { u as Q } from "./useTabStorage-BkIVScW_.js";
7
+ import { u as j } from "./googlemap-Dm8ERVai.js";
8
+ import "./array-hChJVZLE.js";
9
+ function q() {
10
+ return {
11
+ loadingHookInstalled: !1,
12
+ isLoading: !1
13
+ };
14
+ }
15
+ const _ = x(q());
16
+ function z() {
17
+ const i = w();
18
+ if (!_.value.loadingHookInstalled) {
19
+ _.value.loadingHookInstalled = !0;
20
+ const o = i.beforeEach(() => {
21
+ _.value.isLoading = !0;
22
+ }), u = i.afterEach(() => {
23
+ _.value.isLoading = !1;
24
+ });
25
+ M(() => {
26
+ _.value.loadingHookInstalled = !1, o(), u();
27
+ });
28
+ }
29
+ return {
30
+ get isLoading() {
31
+ return _.value.isLoading;
32
+ }
33
+ };
34
+ }
35
+ const J = {
36
+ key: 0,
37
+ class: "flex flex-col items-center w-full h-full gap-24"
38
+ }, X = {
39
+ key: 1,
40
+ class: "flex flex-col pt-[200px] gap-32 items-center"
41
+ }, Y = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Z = { class: "fm-typo-en-title-lg-600" }, ee = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, te = { class: "flex gap-16" }, oe = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, ne = { href: "https://feedme.ai/form" }, re = /* @__PURE__ */ h({
42
+ __name: "InventoryView",
43
+ setup(i) {
44
+ const o = D(), u = H(), c = W(), s = A(), m = w(), t = z(), b = O(), { t: d } = B();
45
+ y(
46
+ [() => s.sessionUser.value, () => s.currentBusiness.value],
47
+ ([r, l]) => {
48
+ E(r, l);
49
+ }
50
+ );
51
+ const v = window.location.href.includes("/receive-request/print-preview");
52
+ U(async () => {
53
+ if (v) return;
54
+ await b.init(), await s.readBusinesses();
55
+ const r = s.sessionUser.value, l = s.currentBusiness.value;
56
+ E(r, l);
57
+ });
58
+ function E(r, l) {
59
+ !r || !l || N();
60
+ }
61
+ async function N() {
62
+ return await o.init(), await c.readSetting().catch((r) => {
63
+ console.error("error on reading netsuite store", r);
64
+ }), await u.init();
65
+ }
66
+ const n = g(() => m.currentRoute.value.name === e.TRANSFER_TEMPLATE ? b.enablePoTemplate : !0);
67
+ return (r, l) => {
68
+ const I = R("FmSpacer"), V = R("FmCircularProgress"), C = R("FmButton"), F = R("RouterView");
69
+ return T(), P("div", null, [
70
+ f(t).isLoading ? (T(), P("div", J, [
71
+ S(I),
72
+ p("div", null, [
73
+ S(V, { size: "xl" })
74
+ ]),
75
+ l[0] || (l[0] = p("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
76
+ S(I)
77
+ ])) : n.value ? f(s).sessionUser.value || f(v) ? (T(), G(F, { key: 2 })) : k("", !0) : (T(), P("div", X, [
78
+ p("div", Y, [
79
+ p("div", Z, L(f(d)("inventory.common.proPlan.title")), 1),
80
+ p("div", ee, L(f(d)("inventory.common.proPlan.subtitle")), 1)
81
+ ]),
82
+ p("div", te, [
83
+ p("a", oe, [
84
+ S(C, {
85
+ label: f(d)("inventory.common.proPlan.comparePlans"),
86
+ variant: "secondary"
87
+ }, null, 8, ["label"])
88
+ ]),
89
+ p("a", ne, [
90
+ S(C, {
91
+ label: f(d)("inventory.common.proPlan.callUs"),
92
+ "prepend-icon": "call"
93
+ }, null, 8, ["label"])
94
+ ])
95
+ ])
96
+ ]))
97
+ ]);
98
+ };
99
+ }
100
+ }), se = { class: "h-full flex flex-col overflow-auto py-16" }, ae = /* @__PURE__ */ h({
101
+ __name: "NavigationTab",
102
+ setup(i) {
103
+ const o = $(), u = w(), c = A(), s = O(), m = Q(), { t } = B();
104
+ y([() => c.currentBusiness.value, () => o.name], ([n, r]) => {
105
+ (n == null ? void 0 : n.menuVersion) === "v3" && (r === e.INGREDIENTS || r === e.RECIPE || r === e.UNIT) && u.push({ name: e.STOCK });
106
+ });
107
+ const b = g(() => {
108
+ var r;
109
+ const n = [
110
+ {
111
+ label: a(e.STOCK, t),
112
+ // icon: 'inventory_2',
113
+ children: [
114
+ {
115
+ label: "Stock balance",
116
+ value: e.STOCK
117
+ },
118
+ ...s.enableWastageTemplate ? [
119
+ {
120
+ label: a(e.WASTAGE_TEMPLATE, t),
121
+ value: e.WASTAGE_TEMPLATE
122
+ }
123
+ ] : []
124
+ ]
125
+ },
126
+ ...s.enableClosingTemplate ? [
127
+ {
128
+ label: "Closing",
129
+ children: [
130
+ {
131
+ label: a(e.CLOSING_TEMPLATE, t),
132
+ value: e.CLOSING_TEMPLATE
133
+ },
134
+ {
135
+ label: a(e.CLOSING_DRAFT, t),
136
+ value: e.CLOSING_DRAFT
137
+ }
138
+ ]
139
+ }
140
+ ] : [],
141
+ {
142
+ label: a(e.INGREDIENTS, t),
143
+ // icon: 'grocery',
144
+ value: e.INGREDIENTS
145
+ },
146
+ ...s.enableIngredientGroup ? [
147
+ {
148
+ label: a(e.INGREDIENT_GROUP, t),
149
+ // icon: 'grocery',
150
+ value: e.INGREDIENT_GROUP
151
+ }
152
+ ] : [],
153
+ {
154
+ label: a(e.RECIPE, t),
155
+ // icon: 'weight',
156
+ value: e.RECIPE
157
+ },
158
+ {
159
+ label: a(e.UNIT, t),
160
+ // icon: 'fastfood',
161
+ value: e.UNIT
162
+ },
163
+ {
164
+ label: t("inventory.transfer.title"),
165
+ // icon: 'swap_horiz',
166
+ children: [
167
+ {
168
+ label: a(e.RECEIVE_REQUEST, t),
169
+ value: e.RECEIVE_REQUEST
170
+ },
171
+ {
172
+ label: a(e.APPROVAL, t),
173
+ value: e.APPROVAL
174
+ },
175
+ ...s.enablePoTemplate ? [
176
+ {
177
+ label: a(e.TRANSFER_TEMPLATE, t),
178
+ value: e.TRANSFER_TEMPLATE
179
+ }
180
+ ] : []
181
+ ]
182
+ },
183
+ {
184
+ label: a(e.SUPPLIER, t),
185
+ // icon: 'group',
186
+ value: e.SUPPLIER
187
+ },
188
+ {
189
+ label: a(e.WAREHOUSE, t),
190
+ // icon: 'warehouse',
191
+ value: e.WAREHOUSE
192
+ },
193
+ {
194
+ label: a(e.PUBLISH, t),
195
+ value: e.PUBLISH
196
+ },
197
+ {
198
+ label: a(e.INTEGRATION, t),
199
+ // icon: 'integration_instructions',
200
+ value: e.INTEGRATION
201
+ }
202
+ ];
203
+ return ((r = c.currentBusiness.value) == null ? void 0 : r.menuVersion) === "v3" ? n.filter(
204
+ (l) => l.value !== e.INGREDIENTS && l.value !== e.RECIPE && l.value !== e.UNIT
205
+ ) : n;
206
+ }), d = g({
207
+ get() {
208
+ if (o.name)
209
+ return String(o.name);
210
+ },
211
+ set(n) {
212
+ n && u.push({ name: n });
213
+ }
214
+ }), v = g(
215
+ () => {
216
+ var n;
217
+ return `NavigationTab.${(n = c.currentBusiness.value) == null ? void 0 : n._id}`;
218
+ }
219
+ ), E = x(!1), N = g({
220
+ get() {
221
+ return E.value;
222
+ },
223
+ set(n) {
224
+ E.value = n, n || m.setItem(v.value, "true");
225
+ }
226
+ });
227
+ return y([() => v.value], () => {
228
+ E.value = !1, setTimeout(() => {
229
+ N.value = !m.getItem(v.value);
230
+ }, 2e3);
231
+ }), (n, r) => {
232
+ const l = R("FmCollapsibleTabs");
233
+ return T(), P("div", se, [
234
+ S(l, {
235
+ modelValue: d.value,
236
+ "onUpdate:modelValue": r[0] || (r[0] = (I) => d.value = I),
237
+ items: b.value
238
+ }, null, 8, ["modelValue", "items"])
239
+ ]);
240
+ };
241
+ }
242
+ });
243
+ typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
244
+ let i, o;
245
+ return { promise: new Promise((c, s) => {
246
+ i = c, o = s;
247
+ }), resolve: i, reject: o };
248
+ });
249
+ typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(i) {
250
+ return await new Promise((o) => setTimeout(o, i)), Promise.resolve(this);
251
+ });
252
+ const ve = /* @__PURE__ */ h({
253
+ __name: "App",
254
+ setup(i) {
255
+ const o = A(), u = j(), c = K();
256
+ U(() => {
257
+ if (window.location.href.includes("print-preview")) {
258
+ o.setEmbedded(!0);
259
+ return;
260
+ }
261
+ o.registerSidebarComponent(ae), u.initGoogleMap(c.appApi.googleMap).catch(() => {
262
+ console.error("Google map cannot be loaded");
263
+ });
264
+ }), y([() => o.currentCountry.value], () => {
265
+ s();
266
+ });
267
+ async function s() {
268
+ var m;
269
+ try {
270
+ await o.readBusinesses(), o.currentBusiness.value = (m = o.businesses.value) == null ? void 0 : m.find((t) => t);
271
+ } catch (t) {
272
+ console.error("error when trying to reset businesses:", t);
273
+ }
274
+ }
275
+ return (m, t) => (T(), G(re));
276
+ }
277
+ });
278
+ export {
279
+ ve as default
280
+ };
@@ -0,0 +1,146 @@
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 s, normalizeClass as se, createVNode as n, normalizeStyle as le, toDisplayString as ce, createElementBlock as ie, createCommentVNode as ue, Teleport as pe, mergeProps as me } from "vue";
2
+ import { u as de, az as _, aJ as fe, ab as Q, y as _e, _ as ve, z as he, B as De, E as v } from "./app-d94DuF5R.js";
3
+ import { a as ge, P as O, b as be, _ as ye } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CidXuoBS.js";
4
+ import { useBreakpoints as xe } from "@feedmepos/ui-library";
5
+ import { useI18n as Oe } from "@feedmepos/mf-common";
6
+ const Re = { 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" }, Se = {
7
+ key: 0,
8
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
9
+ }, Ce = { class: "pt-8" }, $e = /* @__PURE__ */ oe({
10
+ __name: "ApprovalView",
11
+ setup(Te) {
12
+ const o = ge(O.APPROVAL), { columnDefs: W } = be(O.APPROVAL, o), X = de();
13
+ _.object({
14
+ name: _.string().optional().nullable(),
15
+ start: _.date().optional().nullable(),
16
+ end: _.date().optional().nullable()
17
+ });
18
+ const R = g({
19
+ name: "",
20
+ ...fe()
21
+ }), a = g({
22
+ startDate: Q(R.value.start ?? /* @__PURE__ */ new Date()),
23
+ endDate: Q(R.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 c = new Date(a.value.startDate);
33
+ if (new Date(a.value.endDate).getTime() < c.getTime()) {
34
+ a.value.endDate = a.value.startDate;
35
+ return;
36
+ }
37
+ });
38
+ const h = g(""), { breakpoints: w } = xe(), D = b(() => w.value.xs || w.value.sm), Z = b(() => D.value ? 10 : 20), B = _e(), { t: P } = Oe(), I = b(() => [
39
+ {
40
+ label: P("common.refresh"),
41
+ value: "refresh"
42
+ }
43
+ ]);
44
+ function ee(c) {
45
+ switch (c) {
46
+ case "refresh":
47
+ return o.fetchData();
48
+ }
49
+ }
50
+ return (c, l) => {
51
+ const te = ne("FmTable");
52
+ return y(), K(ve, {
53
+ title: e(P)("inventory.transfer.approval.title"),
54
+ actions: I.value,
55
+ "onClick:action": ee
56
+ }, {
57
+ default: x(() => [
58
+ s("div", {
59
+ class: se([
60
+ "flex flex-col gap-8 max-h-full",
61
+ {
62
+ "p-0": D.value,
63
+ "px-24 ": !D.value
64
+ }
65
+ ])
66
+ }, [
67
+ n(he, {
68
+ searchable: "",
69
+ "change-location": "",
70
+ search: h.value,
71
+ "onUpdate:search": l[0] || (l[0] = (r) => h.value = r)
72
+ }, null, 8, ["search"]),
73
+ n(te, {
74
+ style: le(e(B).tableHeight),
75
+ "column-defs": e(W),
76
+ "row-data": e(o).purchaseRequests.value,
77
+ "search-value": h.value,
78
+ loading: !e(X)._currentLocation || e(o).loading.value,
79
+ onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(
80
+ r.original.purchaseOrder,
81
+ r.original
82
+ )),
83
+ "page-size": Z.value
84
+ }, {
85
+ "list-row": x((r) => [
86
+ n(De, {
87
+ row: r,
88
+ onRowClick: (t) => e(o).promptShowTransferDetails(
89
+ t.purchaseOrder,
90
+ t
91
+ )
92
+ }, {
93
+ default: x((t) => {
94
+ var k, S, C, i, T, A, z, V, u, L, M, p, $, m, E, F, Y, q, N, d, j, H, J, U, f, G;
95
+ return [
96
+ s("div", Re, [
97
+ s("div", we, [
98
+ n(e(v), {
99
+ render: (C = (S = (k = t.purchaseOrder__id) == null ? void 0 : k.column) == null ? void 0 : S.columnDef) == null ? void 0 : C.cell,
100
+ props: (T = (i = t.purchaseOrder__id) == null ? void 0 : i.getContext) == null ? void 0 : T.call(i)
101
+ }, null, 8, ["render", "props"])
102
+ ]),
103
+ s("div", Pe, [
104
+ n(e(v), {
105
+ render: (V = (z = (A = t.to_name) == null ? void 0 : A.column) == null ? void 0 : z.columnDef) == null ? void 0 : V.cell,
106
+ props: (L = (u = t.to_name) == null ? void 0 : u.getContext) == null ? void 0 : L.call(u)
107
+ }, null, 8, ["render", "props"])
108
+ ]),
109
+ s("div", ke, ce((E = (m = ($ = (p = (M = r.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : p.map) == null ? void 0 : $.call(p, (ae) => `${ae.name}`)) == null ? void 0 : m.join) == null ? void 0 : E.call(m, ", ")), 1),
110
+ (F = r.original.purchaseOrder) != null && F.ref ? (y(), ie("div", Se, [
111
+ n(e(v), {
112
+ render: (N = (q = (Y = t.purchaseOrder_ref) == null ? void 0 : Y.column) == null ? void 0 : q.columnDef) == null ? void 0 : N.cell,
113
+ props: (j = (d = t.purchaseOrder_ref) == null ? void 0 : d.getContext) == null ? void 0 : j.call(d)
114
+ }, null, 8, ["render", "props"])
115
+ ])) : ue("", !0),
116
+ s("div", Ce, [
117
+ n(e(v), {
118
+ render: (U = (J = (H = t.purchaseOrder_status) == null ? void 0 : H.column) == null ? void 0 : J.columnDef) == null ? void 0 : U.cell,
119
+ props: (G = (f = t.purchaseOrder_status) == null ? void 0 : f.getContext) == null ? void 0 : G.call(f)
120
+ }, null, 8, ["render", "props"])
121
+ ])
122
+ ])
123
+ ];
124
+ }),
125
+ _: 2
126
+ }, 1032, ["row", "onRowClick"])
127
+ ]),
128
+ _: 1
129
+ }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
130
+ ], 2),
131
+ (y(), K(pe, { to: "body" }, [
132
+ n(ye, me({
133
+ scope: e(O).APPROVAL
134
+ }, e(o).transferDetailsProps.value, {
135
+ onSubmitted: e(o).fetchData
136
+ }), null, 16, ["scope", "onSubmitted"])
137
+ ]))
138
+ ]),
139
+ _: 1
140
+ }, 8, ["title", "actions"]);
141
+ };
142
+ }
143
+ });
144
+ export {
145
+ $e as default
146
+ };
@@ -1,6 +1,6 @@
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 L } from "vue";
2
- import { _ as P } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BDWmhU7C.js";
3
- import { a as V, aL as S } from "./app-CX6n1ion.js";
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-uGVP8nwi.js";
3
+ import { a as L, aQ as S } from "./app-d94DuF5R.js";
4
4
  const U = {
5
5
  key: 0,
6
6
  class: "flex justify-end gap-8 items-center"
@@ -10,7 +10,7 @@ const U = {
10
10
  }, D = /* @__PURE__ */ C({
11
11
  __name: "BindingsDialog",
12
12
  setup(N) {
13
- const p = V(), d = o(!0), s = o(new Array()), u = o(), t = S(y);
13
+ const p = L(), d = o(!0), s = o(new Array()), u = o(), t = S(y);
14
14
  async function y() {
15
15
  await p.readInventory(), u.value = t.onMessage("props:inventory-bindings", (e) => {
16
16
  d.value = !1, s.value = e;
@@ -55,7 +55,7 @@ const U = {
55
55
  }, [
56
56
  d.value ? (i(), c("div", E, [
57
57
  a(h, { size: "md" }),
58
- n[2] || (n[2] = L("div", null, "Loading bindings dialog...", -1))
58
+ n[2] || (n[2] = P("div", null, "Loading bindings dialog...", -1))
59
59
  ])) : (i(), I(B, {
60
60
  key: 0,
61
61
  onValidationSuccess: n[1] || (n[1] = () => r.value ? void 0 : b()),
@@ -64,7 +64,7 @@ const U = {
64
64
  class: "flex flex-col gap-16"
65
65
  }, {
66
66
  default: R(() => [
67
- a(P, {
67
+ a(V, {
68
68
  "model-value": s.value,
69
69
  "onUpdate:modelValue": n[0] || (n[0] = (w) => s.value = w),
70
70
  "iframe-mode": "",
@@ -1,12 +1,12 @@
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, aL as x, J as z } from "./app-CX6n1ion.js";
2
+ import { a as M, aQ as x, H as z } from "./app-d94DuF5R.js";
3
3
  const F = {
4
4
  key: 0,
5
5
  class: "flex flex-col gap-16"
6
6
  }, K = { class: "flex justify-end gap-8 items-center" }, w = {
7
7
  key: 1,
8
8
  class: "p-24 flex items-center justify-center gap-16"
9
- }, N = /* @__PURE__ */ S({
9
+ }, H = /* @__PURE__ */ S({
10
10
  __name: "BindingsPicker",
11
11
  setup(L) {
12
12
  const d = M(), C = r(() => d.recipes), I = r(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = r(() => a.value === "SKU" ? I.value.map((s) => ({
@@ -119,5 +119,5 @@ const F = {
119
119
  }
120
120
  });
121
121
  export {
122
- N as default
122
+ H as default
123
123
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as _, ref as c, provide as C, computed as f, resolveComponent as b, openBlock as p, createBlock as h, h as z, onMounted as B, onUnmounted as I, createElementBlock as y, createVNode as N, createElementVNode as L } from "vue";
2
- import { F as v, a as x, aL as E } from "./app-CX6n1ion.js";
3
- import { components as F } from "@feedmepos/ui-library";
1
+ import { defineComponent as _, ref as c, provide as C, computed as f, resolveComponent as b, openBlock as p, createBlock as h, h as z, onMounted as B, onUnmounted as I, createElementBlock as y, createVNode as N, createElementVNode as x } from "vue";
2
+ import { F as v, a as E, aQ as F } from "./app-d94DuF5R.js";
3
+ import { components as L } from "@feedmepos/ui-library";
4
4
  import "@feedmepos/mf-common";
5
5
  const P = /* @__PURE__ */ _({
6
6
  __name: "binding-ui",
@@ -64,7 +64,7 @@ const P = /* @__PURE__ */ _({
64
64
  size: 24,
65
65
  cell(i) {
66
66
  const e = a.value.find((n) => n.key === i.row.original.key);
67
- return z(F.FmButton, {
67
+ return z(L.FmButton, {
68
68
  icon: "edit",
69
69
  bgColor: "white",
70
70
  textColor: "neutral-grey-400",
@@ -93,7 +93,7 @@ const P = /* @__PURE__ */ _({
93
93
  }, D = /* @__PURE__ */ _({
94
94
  __name: "BindingsTable",
95
95
  setup(k) {
96
- const d = x(), u = c(!0), o = c(new Array()), m = f(() => d.recipes), a = f(() => d.skus), g = c(""), i = E(n), e = c();
96
+ const d = E(), u = c(!0), o = c(new Array()), m = f(() => d.recipes), a = f(() => d.skus), g = c(""), i = F(n), e = c();
97
97
  async function n() {
98
98
  await d.readInventory(), e.value = i.onMessage(
99
99
  "props:grouped-bindings",
@@ -126,7 +126,7 @@ const P = /* @__PURE__ */ _({
126
126
  }, [
127
127
  u.value ? (p(), y("div", R, [
128
128
  N(w, { size: "md" }),
129
- r[0] || (r[0] = L("div", null, "Loading bindings table...", -1))
129
+ r[0] || (r[0] = x("div", null, "Loading bindings table...", -1))
130
130
  ])) : (p(), h(P, {
131
131
  key: 0,
132
132
  items: o.value,