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

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 (117) hide show
  1. package/dist/App-9X9XkRz2.js +280 -0
  2. package/dist/ApprovalView-CoIwMOje.js +146 -0
  3. package/dist/{BindingsDialog-DPvBW5cM.js → BindingsDialog-B3ul7-vn.js} +6 -6
  4. package/dist/{BindingsPicker-DHjUZp_W.js → BindingsPicker-CWMHp2sY.js} +7 -7
  5. package/dist/{BindingsTable-D29VX7KG.js → BindingsTable-BqST2NOr.js} +10 -10
  6. package/dist/ClosingDraftView-CeN0MagA.js +1340 -0
  7. package/dist/ClosingTemplateView-BmTacXGq.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-CigELrfY.js +215 -0
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DLVeADwI.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Bp2oPPMX.js} +37 -37
  11. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-CbTEp_-D.js +51 -0
  12. package/dist/{IngredientGroupView-BZGkNkrt.js → IngredientGroupView-DPpznEXs.js} +1 -1
  13. package/dist/{IngredientsView-V_vDYAho.js → IngredientsView-D2RCvzFX.js} +394 -382
  14. package/dist/{IntegrationView-CK_4s6nJ.js → IntegrationView-Qxv2pvF6.js} +660 -623
  15. package/dist/{InventoryBindingForm-CAWQBqr1.js → InventoryBindingForm-Do7ElpgS.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BDWmhU7C.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-veh3riBN.js} +99 -99
  17. package/dist/{InventoryBindingSummary-BBppQstd.js → InventoryBindingSummary-By58hpzm.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-e54jzd1P.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dx3lo70J.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-E3HiIawC.js} +17 -17
  20. package/dist/PublishView-C7Sk1xx_.js +222 -0
  21. package/dist/{PurchaseOrderPrintPreview-DiDSTpNu.js → PurchaseOrderPrintPreview-Dm6VK50g.js} +1 -1
  22. package/dist/ReceiveRequestView-OjIHRXR0.js +2654 -0
  23. package/dist/{RecipeView-DmYWjO2j.js → RecipeView-DvUxMPcE.js} +32 -31
  24. package/dist/{index-CBXvWfSg.js → StockView-BmWtH5o7.js} +3577 -1764
  25. package/dist/{SupplierView-DKISIdqs.js → SupplierView-CSRJiF0L.js} +12 -11
  26. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BQ1zIGI5.js +1831 -0
  27. package/dist/TransferTemplateView-DVZ-l-Qd.js +1524 -0
  28. package/dist/{UnitView-CvUayQQ1.js → UnitView-KxXsoPf-.js} +14 -14
  29. package/dist/{WarehouseView-IoiXm1I8.js → WarehouseView-pP_XFBL6.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 +21 -4
  33. package/dist/api/purchase-order.d.ts +3 -1
  34. package/dist/{app-CX6n1ion.js → app-qP-te2rC.js} +28560 -28529
  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-CNwkFnUQ.js} +1 -1
  46. package/dist/feature-D4R2fV5-.js +1011 -0
  47. package/dist/{format-unit-display-9aWRoLgP.js → format-unit-display-BmyzOzt2.js} +335 -328
  48. package/dist/helper/fuzzy.d.ts +10 -0
  49. package/dist/index-B6w232vo.js +35546 -0
  50. package/dist/{stock-C2QEA4Bf.js → stock-XRT7HXo1.js} +3 -3
  51. package/dist/stores/feature.d.ts +7 -7
  52. package/dist/stores/integration/netsuite.d.ts +26 -4
  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-BcKjL7Tk.js} +1 -1
  58. package/dist/tsconfig.app.tsbuildinfo +1 -1
  59. package/dist/use-ingredient-select-dialog-BjX2siCb.js +51 -0
  60. package/dist/{use-inventory-binding-dialog-D4We0HnY.js → use-inventory-binding-dialog-BypYql87.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 +1197 -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 +6 -2
  81. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +382 -2
  82. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +4 -2
  83. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +126 -35
  84. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +114 -35
  85. package/dist/views/receive-request/helper/po-to-po-template.util.d.ts +1 -0
  86. package/dist/views/receive-request/helper/print-po.d.ts +9 -2
  87. package/dist/views/receive-request/import/XilnexImportDialog.vue.d.ts +22 -0
  88. package/dist/views/receive-request/import/XilnexImportForm.vue.d.ts +17 -0
  89. package/dist/views/receive-request/import/XilnexResult.vue.d.ts +17 -0
  90. package/dist/views/receive-request/import/export.d.ts +12 -0
  91. package/dist/views/receive-request/import/props.d.ts +7 -0
  92. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +4 -2
  93. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +220 -0
  94. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +8 -0
  95. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +1 -0
  96. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +6 -2
  97. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +60 -12
  98. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +60 -12
  99. package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +305 -0
  100. package/dist/views/transfer-template/helpers/location-to-po-supplier.util.d.ts +75 -0
  101. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -0
  102. package/dist/{vue-i18n-D1f9MmwY.js → vue-i18n-BRVI-fYl.js} +194 -194
  103. package/package.json +2 -2
  104. package/dist/App-Du7DrI4b.js +0 -276
  105. package/dist/ApprovalView-CTZVmCbC.js +0 -138
  106. package/dist/ClosingDraftView-D6_mQmyF.js +0 -1225
  107. package/dist/ClosingTemplateView-DMConQNm.js +0 -1819
  108. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-DuB-gluw.js +0 -142
  109. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ttr6ec9b.js +0 -286
  110. package/dist/PublishView-BzUykEd5.js +0 -192
  111. package/dist/ReceiveRequestView-BWgm4e46.js +0 -1876
  112. package/dist/StockView--YVDLsgO.js +0 -1817
  113. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CTy65dTx.js +0 -1327
  114. package/dist/TransferTemplateView-KOeBENZz.js +0 -1284
  115. package/dist/components/FmCustomAttribute2.vue.d.ts +0 -18
  116. package/dist/index-CCWsIAQX.js +0 -29202
  117. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +0 -2628
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-inventory-portal",
3
- "version": "0.0.25-dev.3",
3
+ "version": "0.0.25-dev.31",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -44,7 +44,7 @@
44
44
  "zod": "3.17.9",
45
45
  "@feedmepos/inventory-core": "^0.2.18",
46
46
  "@feedmepos/inventory-core-js": "^1.0.1",
47
- "@feedmepos/zod-inventory": "^1.0.10"
47
+ "@feedmepos/zod-inventory": "^1.0.12"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@rushstack/eslint-patch": "^1.10.3",
@@ -1,276 +0,0 @@
1
- import { ref as x, onUnmounted as F, defineComponent as h, watch as P, onMounted as U, 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 G, createCommentVNode as M } from "vue";
2
- import { u as k, a as D, b as H, R as e, c as B, g as s, d as W } from "./app-CX6n1ion.js";
3
- import { useCoreStore as A, useI18n as O } from "@feedmepos/mf-common";
4
- import { useRouter as C, useRoute as K } from "vue-router";
5
- import { u as $ } from "./useTabStorage-BkIVScW_.js";
6
- import { u as Q } from "./googlemap-Dm8ERVai.js";
7
- import "./array-hChJVZLE.js";
8
- function j() {
9
- return {
10
- loadingHookInstalled: !1,
11
- isLoading: !1
12
- };
13
- }
14
- const E = x(j());
15
- function z() {
16
- const l = C();
17
- if (!E.value.loadingHookInstalled) {
18
- E.value.loadingHookInstalled = !0;
19
- const n = l.beforeEach(() => {
20
- E.value.isLoading = !0;
21
- }), i = l.afterEach(() => {
22
- E.value.isLoading = !1;
23
- });
24
- F(() => {
25
- E.value.loadingHookInstalled = !1, n(), i();
26
- });
27
- }
28
- return {
29
- get isLoading() {
30
- return E.value.isLoading;
31
- }
32
- };
33
- }
34
- const q = {
35
- key: 0,
36
- class: "flex flex-col items-center w-full h-full gap-24"
37
- }, J = {
38
- key: 1,
39
- class: "flex flex-col pt-[200px] gap-32 items-center"
40
- }, 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
- __name: "InventoryView",
42
- setup(l) {
43
- const n = k(), i = D(), u = H(), r = A(), c = C(), o = z(), R = B(), { t: d } = O();
44
- P(
45
- [() => r.sessionUser.value, () => r.currentBusiness.value],
46
- ([t, a]) => {
47
- f(t, a);
48
- }
49
- ), U(async () => {
50
- await R.init(), await r.readBusinesses();
51
- const t = r.sessionUser.value, a = r.currentBusiness.value;
52
- f(t, a);
53
- });
54
- function f(t, a) {
55
- !t || !a || T();
56
- }
57
- async function T() {
58
- return await n.init(), await u.readSetting().catch((t) => {
59
- console.error("error on reading netsuite store", t);
60
- }), await i.init();
61
- }
62
- const y = g(() => c.currentRoute.value.name === e.TRANSFER_TEMPLATE ? R.enablePoTemplate : !0);
63
- return (t, a) => {
64
- const m = b("FmSpacer"), N = b("FmCircularProgress"), L = b("FmButton"), V = b("RouterView");
65
- return S(), I("div", null, [
66
- v(o).isLoading ? (S(), I("div", q, [
67
- _(m),
68
- p("div", null, [
69
- _(N, { size: "xl" })
70
- ]),
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
- _(m)
73
- ])) : y.value ? v(r).sessionUser.value ? (S(), G(V, { key: 2 })) : M("", !0) : (S(), I("div", J, [
74
- p("div", X, [
75
- p("div", Y, w(v(d)("inventory.common.proPlan.title")), 1),
76
- p("div", Z, w(v(d)("inventory.common.proPlan.subtitle")), 1)
77
- ]),
78
- p("div", ee, [
79
- p("a", te, [
80
- _(L, {
81
- label: v(d)("inventory.common.proPlan.comparePlans"),
82
- variant: "secondary"
83
- }, null, 8, ["label"])
84
- ]),
85
- p("a", oe, [
86
- _(L, {
87
- label: v(d)("inventory.common.proPlan.callUs"),
88
- "prepend-icon": "call"
89
- }, null, 8, ["label"])
90
- ])
91
- ])
92
- ]))
93
- ]);
94
- };
95
- }
96
- }), ae = { class: "h-full flex flex-col overflow-auto py-16" }, re = /* @__PURE__ */ h({
97
- __name: "NavigationTab",
98
- setup(l) {
99
- const n = K(), i = C(), u = A(), r = B(), c = $(), { 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 });
102
- });
103
- const R = g(() => {
104
- var a;
105
- const t = [
106
- {
107
- label: s(e.STOCK, o),
108
- // icon: 'inventory_2',
109
- children: [
110
- {
111
- label: "Stock balance",
112
- value: e.STOCK
113
- },
114
- ...r.enableWastageTemplate ? [
115
- {
116
- label: s(e.WASTAGE_TEMPLATE, o),
117
- value: e.WASTAGE_TEMPLATE
118
- }
119
- ] : []
120
- ]
121
- },
122
- ...r.enableClosingTemplate ? [
123
- {
124
- label: "Closing",
125
- children: [
126
- {
127
- label: s(e.CLOSING_TEMPLATE, o),
128
- value: e.CLOSING_TEMPLATE
129
- },
130
- {
131
- label: s(e.CLOSING_DRAFT, o),
132
- value: e.CLOSING_DRAFT
133
- }
134
- ]
135
- }
136
- ] : [],
137
- {
138
- label: s(e.INGREDIENTS, o),
139
- // icon: 'grocery',
140
- value: e.INGREDIENTS
141
- },
142
- ...r.enableIngredientGroup ? [
143
- {
144
- label: s(e.INGREDIENT_GROUP, o),
145
- // icon: 'grocery',
146
- value: e.INGREDIENT_GROUP
147
- }
148
- ] : [],
149
- {
150
- label: s(e.RECIPE, o),
151
- // icon: 'weight',
152
- value: e.RECIPE
153
- },
154
- {
155
- label: s(e.UNIT, o),
156
- // icon: 'fastfood',
157
- value: e.UNIT
158
- },
159
- {
160
- label: o("inventory.transfer.title"),
161
- // icon: 'swap_horiz',
162
- children: [
163
- {
164
- label: s(e.RECEIVE_REQUEST, o),
165
- value: e.RECEIVE_REQUEST
166
- },
167
- {
168
- label: s(e.APPROVAL, o),
169
- value: e.APPROVAL
170
- },
171
- ...r.enablePoTemplate ? [
172
- {
173
- label: s(e.TRANSFER_TEMPLATE, o),
174
- value: e.TRANSFER_TEMPLATE
175
- }
176
- ] : []
177
- ]
178
- },
179
- {
180
- label: s(e.SUPPLIER, o),
181
- // icon: 'group',
182
- value: e.SUPPLIER
183
- },
184
- {
185
- label: s(e.WAREHOUSE, o),
186
- // icon: 'warehouse',
187
- value: e.WAREHOUSE
188
- },
189
- {
190
- label: s(e.PUBLISH, o),
191
- value: e.PUBLISH
192
- },
193
- {
194
- label: s(e.INTEGRATION, o),
195
- // icon: 'integration_instructions',
196
- value: e.INTEGRATION
197
- }
198
- ];
199
- return ((a = u.currentBusiness.value) == null ? void 0 : a.menuVersion) === "v3" ? t.filter(
200
- (m) => m.value !== e.INGREDIENTS && m.value !== e.RECIPE && m.value !== e.UNIT
201
- ) : t;
202
- }), d = g({
203
- get() {
204
- if (n.name)
205
- return String(n.name);
206
- },
207
- set(t) {
208
- t && i.push({ name: t });
209
- }
210
- }), f = g(
211
- () => {
212
- var t;
213
- return `NavigationTab.${(t = u.currentBusiness.value) == null ? void 0 : t._id}`;
214
- }
215
- ), T = x(!1), y = g({
216
- get() {
217
- return T.value;
218
- },
219
- set(t) {
220
- T.value = t, t || c.setItem(f.value, "true");
221
- }
222
- });
223
- return P([() => f.value], () => {
224
- T.value = !1, setTimeout(() => {
225
- y.value = !c.getItem(f.value);
226
- }, 2e3);
227
- }), (t, a) => {
228
- const m = b("FmCollapsibleTabs");
229
- return S(), I("div", ae, [
230
- _(m, {
231
- modelValue: d.value,
232
- "onUpdate:modelValue": a[0] || (a[0] = (N) => d.value = N),
233
- items: R.value
234
- }, null, 8, ["modelValue", "items"])
235
- ]);
236
- };
237
- }
238
- });
239
- typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
240
- let l, n;
241
- return { promise: new Promise((u, r) => {
242
- l = u, n = r;
243
- }), resolve: l, reject: n };
244
- });
245
- typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(l) {
246
- return await new Promise((n) => setTimeout(n, l)), Promise.resolve(this);
247
- });
248
- const de = /* @__PURE__ */ h({
249
- __name: "App",
250
- setup(l) {
251
- const n = A(), i = Q(), u = W();
252
- U(() => {
253
- if (window.location.href.includes("print-preview")) {
254
- n.setEmbedded(!0);
255
- return;
256
- }
257
- n.registerSidebarComponent(re), i.initGoogleMap(u.appApi.googleMap).catch(() => {
258
- console.error("Google map cannot be loaded");
259
- });
260
- }), P([() => n.currentCountry.value], () => {
261
- r();
262
- });
263
- async function r() {
264
- var c;
265
- try {
266
- await n.readBusinesses(), n.currentBusiness.value = (c = n.businesses.value) == null ? void 0 : c.find((o) => o);
267
- } catch (o) {
268
- console.error("error when trying to reset businesses:", o);
269
- }
270
- }
271
- return (c, o) => (S(), G(ne));
272
- }
273
- });
274
- export {
275
- de as default
276
- };
@@ -1,138 +0,0 @@
1
- import { defineComponent as ae, ref as g, watch as oe, computed as b, resolveComponent as re, openBlock as x, createBlock as J, unref as e, withCtx as y, createElementVNode as s, normalizeClass as ne, createVNode as n, normalizeStyle as se, toDisplayString as le, createElementBlock as ce, createCommentVNode as ie, Teleport as ue, mergeProps as pe } from "vue";
2
- import { u as me, av as v, aF as de, a8 as K, z as fe, _ as ve, B as _e, E as he, G as _ } from "./app-CX6n1ion.js";
3
- import { a as De, b as ge, _ as be } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CTy65dTx.js";
4
- import { useBreakpoints as xe } from "@feedmepos/ui-library";
5
- import { useI18n as ye } from "@feedmepos/mf-common";
6
- const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Oe = { 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
- }, Te = { class: "pt-8" }, Ye = /* @__PURE__ */ ae({
10
- __name: "ApprovalView",
11
- setup(Ce) {
12
- const o = De("approval"), { columnDefs: Q } = ge("approval", o), W = me();
13
- v.object({
14
- name: v.string().optional().nullable(),
15
- start: v.date().optional().nullable(),
16
- end: v.date().optional().nullable()
17
- });
18
- const w = g({
19
- name: "",
20
- ...de()
21
- }), a = g({
22
- startDate: K(w.value.start ?? /* @__PURE__ */ new Date()),
23
- endDate: K(w.value.end ?? /* @__PURE__ */ new Date())
24
- });
25
- oe([() => 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: R } = xe(), D = b(() => R.value.xs || R.value.sm), X = b(() => D.value ? 10 : 20), Z = fe(), { t: k } = ye(), B = b(() => [
39
- {
40
- label: k("common.refresh"),
41
- value: "refresh"
42
- }
43
- ]);
44
- function I(c) {
45
- switch (c) {
46
- case "refresh":
47
- return o.fetchData();
48
- }
49
- }
50
- return (c, l) => {
51
- const ee = re("FmTable");
52
- return x(), J(ve, {
53
- title: e(k)("inventory.transfer.approval.title"),
54
- actions: B.value,
55
- "onClick:action": I
56
- }, {
57
- default: y(() => [
58
- s("div", {
59
- class: ne([
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(_e, {
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(ee, {
74
- style: se(e(Z).tableHeight),
75
- "column-defs": e(Q),
76
- "row-data": e(o).purchaseRequests.value,
77
- "search-value": h.value,
78
- loading: !e(W)._currentLocation || e(o).loading.value,
79
- onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(r.original.purchaseOrder, r.original)),
80
- "page-size": X.value
81
- }, {
82
- "list-row": y((r) => [
83
- n(he, {
84
- row: r,
85
- onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
86
- }, {
87
- default: y((t) => {
88
- var O, S, T, i, C, z, F, M, u, $, V, p, Y, m, q, E, L, N, P, d, j, A, H, G, f, U;
89
- return [
90
- s("div", we, [
91
- s("div", Re, [
92
- n(e(_), {
93
- render: (T = (S = (O = t.purchaseOrder__id) == null ? void 0 : O.column) == null ? void 0 : S.columnDef) == null ? void 0 : T.cell,
94
- props: (C = (i = t.purchaseOrder__id) == null ? void 0 : i.getContext) == null ? void 0 : C.call(i)
95
- }, null, 8, ["render", "props"])
96
- ]),
97
- s("div", ke, [
98
- n(e(_), {
99
- render: (M = (F = (z = t.to_name) == null ? void 0 : z.column) == null ? void 0 : F.columnDef) == null ? void 0 : M.cell,
100
- props: ($ = (u = t.to_name) == null ? void 0 : u.getContext) == null ? void 0 : $.call(u)
101
- }, null, 8, ["render", "props"])
102
- ]),
103
- s("div", Oe, le((q = (m = (Y = (p = (V = r.original.purchaseOrder) == null ? void 0 : V.items) == null ? void 0 : p.map) == null ? void 0 : Y.call(p, (te) => `${te.name}`)) == null ? void 0 : m.join) == null ? void 0 : q.call(m, ", ")), 1),
104
- (E = r.original.purchaseOrder) != null && E.ref ? (x(), ce("div", Se, [
105
- n(e(_), {
106
- render: (P = (N = (L = t.purchaseOrder_ref) == null ? void 0 : L.column) == null ? void 0 : N.columnDef) == null ? void 0 : P.cell,
107
- props: (j = (d = t.purchaseOrder_ref) == null ? void 0 : d.getContext) == null ? void 0 : j.call(d)
108
- }, null, 8, ["render", "props"])
109
- ])) : ie("", !0),
110
- s("div", Te, [
111
- n(e(_), {
112
- render: (G = (H = (A = t.purchaseOrder_status) == null ? void 0 : A.column) == null ? void 0 : H.columnDef) == null ? void 0 : G.cell,
113
- props: (U = (f = t.purchaseOrder_status) == null ? void 0 : f.getContext) == null ? void 0 : U.call(f)
114
- }, null, 8, ["render", "props"])
115
- ])
116
- ])
117
- ];
118
- }),
119
- _: 2
120
- }, 1032, ["row", "onRowClick"])
121
- ]),
122
- _: 1
123
- }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
124
- ], 2),
125
- (x(), J(ue, { to: "body" }, [
126
- n(be, pe(e(o).transferDetailsProps.value, {
127
- onSubmitted: e(o).fetchData
128
- }), null, 16, ["onSubmitted"])
129
- ]))
130
- ]),
131
- _: 1
132
- }, 8, ["title", "actions"]);
133
- };
134
- }
135
- });
136
- export {
137
- Ye as default
138
- };