@feedmepos/mf-inventory-portal 0.0.25-dev.2 → 0.0.25-dev.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App-D6WBVERc.js +278 -0
- package/dist/ApprovalView-BIBoagE8.js +146 -0
- package/dist/{BindingsDialog-qeGh3ND8.js → BindingsDialog-DHRRkK1Z.js} +6 -6
- package/dist/{BindingsPicker-SfiA8fmD.js → BindingsPicker-DohvMDDF.js} +3 -3
- package/dist/{BindingsTable-BjW-eJr6.js → BindingsTable-C_JwU9ei.js} +6 -6
- package/dist/ClosingDraftView-BBebhUj-.js +1308 -0
- package/dist/ClosingTemplateView-CXRN19-D.js +1859 -0
- package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js +34 -0
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BJufUQNE.js +215 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-5rldKjyh.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C5Xk19jY.js} +52 -52
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-7HNI82u-.js +51 -0
- package/dist/{IngredientGroupView-CGyyFyvj.js → IngredientGroupView-l2bAc1Kj.js} +1 -1
- package/dist/{IngredientsView-BLKk-VxQ.js → IngredientsView-zDXt7KEx.js} +394 -382
- package/dist/{IntegrationView-C6gwvZ9b.js → IntegrationView-BYnlAPrP.js} +660 -623
- package/dist/{InventoryBindingForm-BB3ZN3Lx.js → InventoryBindingForm-BuweG4Vl.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-PT7Quw7j.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DgxN0U4N.js} +99 -99
- package/dist/{InventoryBindingSummary-yr0oie3c.js → InventoryBindingSummary-BpEo0JsK.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DjJGUE9a.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CcjzkzCt.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-O1mYRa5W.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Ej20iSHA.js} +15 -15
- package/dist/PublishView-DCZ0zIaP.js +222 -0
- package/dist/{PurchaseOrderPrintPreview-Q_9-KVNj.js → PurchaseOrderPrintPreview-Cag7UEvz.js} +1 -1
- package/dist/ReceiveRequestView-ChIJGA98.js +2319 -0
- package/dist/{RecipeView-DBfugmRY.js → RecipeView-bBshe0eF.js} +32 -31
- package/dist/{index-CgspzSQi.js → StockView-D6-oKpAC.js} +3577 -1764
- package/dist/{SupplierView-BQViPyfj.js → SupplierView-dyIcGp9Q.js} +12 -11
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-C_7wbQow.js +1771 -0
- package/dist/TransferTemplateView-D2rxV0k_.js +1660 -0
- package/dist/{UnitView-CrbFeWaB.js → UnitView-DVS5Az5c.js} +14 -14
- package/dist/{WarehouseView-Dy5GljxY.js → WarehouseView-CR03TpnA.js} +332 -314
- package/dist/api/closing-draft.d.ts +1 -0
- package/dist/api/inventory.d.ts +9 -6
- package/dist/api/purchase-order.d.ts +2 -1
- package/dist/{app-D0O4wr2X.js → app-oV9ISfFL.js} +28343 -28141
- package/dist/app.js +1 -1
- package/dist/components/FmAutocompleteTextField.vue.d.ts +31 -0
- package/dist/components/FmCustomAttribute.vue.d.ts +3 -8
- package/dist/components/FmLockableField.vue.d.ts +3 -0
- package/dist/components/FmMultiselectDialog.d.ts +46 -0
- package/dist/components/FmMultiselectDialog.vue.d.ts +20 -3
- package/dist/components/FmMultiselectDialogProps.d.ts +2 -0
- package/dist/components/MountListener.vue.d.ts +15 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -1
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -1
- package/dist/{decimal-CPGmj9BT.js → decimal-C7zgfr5G.js} +1 -1
- package/dist/feature-CDQQ-mV9.js +1003 -0
- package/dist/{format-unit-display-CMM6DZJj.js → format-unit-display-CVBzrNQ4.js} +334 -327
- package/dist/helper/fuzzy.d.ts +10 -0
- package/dist/index-0VS4cuk3.js +35546 -0
- package/dist/{stock-9nTT4Amy.js → stock-BIP_NIK_.js} +3 -3
- package/dist/stores/feature.d.ts +4 -7
- package/dist/stores/integration/netsuite.d.ts +5 -0
- package/dist/stores/inventory.d.ts +135 -8
- package/dist/stores/location.d.ts +100 -0
- package/dist/stores/warehouse.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-CH4EwBZM.js → supplier-DUQ2VSMg.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/use-ingredient-select-dialog-VkU5_Aaj.js +51 -0
- package/dist/{use-inventory-binding-dialog-Dli3xtq4.js → use-inventory-binding-dialog-BXp0z3v_.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +24 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +24 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -4
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +4 -1
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +48 -24
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +1 -1
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +36 -12
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -12
- package/dist/views/dev/components/AutocompleteTextField.vue.d.ts +2 -0
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +3 -3
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
- package/dist/views/ingredients/composables/use-ingredient-select-dialog.d.ts +16 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +1387 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +5 -1
- package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +3 -0
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -2
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +48 -2
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +490 -2
- package/dist/views/receive-request/components/transfer-form/components/TransferSubItemTable.vue.d.ts +72 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +25 -2
- package/dist/views/receive-request/components/transfer-form/helpers/calculate-sub-item-total.helper.d.ts +4 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +693 -35
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +684 -35
- package/dist/views/receive-request/helper/po-to-po-template.util.d.ts +1 -0
- package/dist/views/receive-request/helper/print-po.d.ts +9 -2
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +270 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +286 -0
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateSubItem.vue.d.ts +74 -0
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateSubItemTable.vue.d.ts +92 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +8 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +1 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +36 -2
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +456 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +456 -12
- package/dist/views/transfer-template/helpers/location-to-po-supplier.util.d.ts +75 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -0
- package/dist/{vue-i18n-BcYt8MNZ.js → vue-i18n-CCd5_SRR.js} +212 -212
- package/package.json +3 -3
- package/dist/App-oKNdl2la.js +0 -276
- package/dist/ApprovalView-hDGkcBDy.js +0 -138
- package/dist/ClosingDraftView-CEeeL7W4.js +0 -1225
- package/dist/ClosingTemplateView-CkS9e0MV.js +0 -1819
- package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-CIBSvY0s.js +0 -142
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dg_7ELeT.js +0 -286
- package/dist/PublishView-ByXdmuJL.js +0 -192
- package/dist/ReceiveRequestView-CApg7LGM.js +0 -1876
- package/dist/StockView-D6o_oUlz.js +0 -1817
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-D2skLe2M.js +0 -1327
- package/dist/TransferTemplateView-DVesObTd.js +0 -1284
- package/dist/components/FmCustomAttribute2.vue.d.ts +0 -18
- package/dist/index-P5iEcRw3.js +0 -29202
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +0 -2628
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { ref as U, onUnmounted as M, defineComponent as h, watch as y, onMounted as x, computed as g, resolveComponent as R, openBlock as S, createElementBlock as P, unref as f, createVNode as _, 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-oV9ISfFL.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-CDQQ-mV9.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 E = U(q());
|
|
16
|
+
function z() {
|
|
17
|
+
const i = w();
|
|
18
|
+
if (!E.value.loadingHookInstalled) {
|
|
19
|
+
E.value.loadingHookInstalled = !0;
|
|
20
|
+
const o = i.beforeEach(() => {
|
|
21
|
+
E.value.isLoading = !0;
|
|
22
|
+
}), u = i.afterEach(() => {
|
|
23
|
+
E.value.isLoading = !1;
|
|
24
|
+
});
|
|
25
|
+
M(() => {
|
|
26
|
+
E.value.loadingHookInstalled = !1, o(), u();
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
get isLoading() {
|
|
31
|
+
return E.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
|
+
v(r, l);
|
|
49
|
+
}
|
|
50
|
+
), x(async () => {
|
|
51
|
+
if (!s.sessionUser.value) return;
|
|
52
|
+
await b.init(), await s.readBusinesses();
|
|
53
|
+
const r = s.sessionUser.value, l = s.currentBusiness.value;
|
|
54
|
+
v(r, l);
|
|
55
|
+
});
|
|
56
|
+
function v(r, l) {
|
|
57
|
+
!r || !l || T();
|
|
58
|
+
}
|
|
59
|
+
async function T() {
|
|
60
|
+
return await o.init(), await c.readSetting().catch((r) => {
|
|
61
|
+
console.error("error on reading netsuite store", r);
|
|
62
|
+
}), await u.init();
|
|
63
|
+
}
|
|
64
|
+
const N = g(() => m.currentRoute.value.name === e.TRANSFER_TEMPLATE ? b.enablePoTemplate : !0), n = window.location.href.includes("/receive-request/print-preview");
|
|
65
|
+
return (r, l) => {
|
|
66
|
+
const I = R("FmSpacer"), V = R("FmCircularProgress"), C = R("FmButton"), F = R("RouterView");
|
|
67
|
+
return S(), P("div", null, [
|
|
68
|
+
f(t).isLoading ? (S(), P("div", J, [
|
|
69
|
+
_(I),
|
|
70
|
+
p("div", null, [
|
|
71
|
+
_(V, { size: "xl" })
|
|
72
|
+
]),
|
|
73
|
+
l[0] || (l[0] = p("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
|
|
74
|
+
_(I)
|
|
75
|
+
])) : N.value ? f(s).sessionUser.value || f(n) ? (S(), G(F, { key: 2 })) : k("", !0) : (S(), P("div", X, [
|
|
76
|
+
p("div", Y, [
|
|
77
|
+
p("div", Z, L(f(d)("inventory.common.proPlan.title")), 1),
|
|
78
|
+
p("div", ee, L(f(d)("inventory.common.proPlan.subtitle")), 1)
|
|
79
|
+
]),
|
|
80
|
+
p("div", te, [
|
|
81
|
+
p("a", oe, [
|
|
82
|
+
_(C, {
|
|
83
|
+
label: f(d)("inventory.common.proPlan.comparePlans"),
|
|
84
|
+
variant: "secondary"
|
|
85
|
+
}, null, 8, ["label"])
|
|
86
|
+
]),
|
|
87
|
+
p("a", ne, [
|
|
88
|
+
_(C, {
|
|
89
|
+
label: f(d)("inventory.common.proPlan.callUs"),
|
|
90
|
+
"prepend-icon": "call"
|
|
91
|
+
}, null, 8, ["label"])
|
|
92
|
+
])
|
|
93
|
+
])
|
|
94
|
+
]))
|
|
95
|
+
]);
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}), se = { class: "h-full flex flex-col overflow-auto py-16" }, ae = /* @__PURE__ */ h({
|
|
99
|
+
__name: "NavigationTab",
|
|
100
|
+
setup(i) {
|
|
101
|
+
const o = $(), u = w(), c = A(), s = O(), m = Q(), { t } = B();
|
|
102
|
+
y([() => c.currentBusiness.value, () => o.name], ([n, r]) => {
|
|
103
|
+
(n == null ? void 0 : n.menuVersion) === "v3" && (r === e.INGREDIENTS || r === e.RECIPE || r === e.UNIT) && u.push({ name: e.STOCK });
|
|
104
|
+
});
|
|
105
|
+
const b = g(() => {
|
|
106
|
+
var r;
|
|
107
|
+
const n = [
|
|
108
|
+
{
|
|
109
|
+
label: a(e.STOCK, t),
|
|
110
|
+
// icon: 'inventory_2',
|
|
111
|
+
children: [
|
|
112
|
+
{
|
|
113
|
+
label: "Stock balance",
|
|
114
|
+
value: e.STOCK
|
|
115
|
+
},
|
|
116
|
+
...s.enableWastageTemplate ? [
|
|
117
|
+
{
|
|
118
|
+
label: a(e.WASTAGE_TEMPLATE, t),
|
|
119
|
+
value: e.WASTAGE_TEMPLATE
|
|
120
|
+
}
|
|
121
|
+
] : []
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
...s.enableClosingTemplate ? [
|
|
125
|
+
{
|
|
126
|
+
label: "Closing",
|
|
127
|
+
children: [
|
|
128
|
+
{
|
|
129
|
+
label: a(e.CLOSING_TEMPLATE, t),
|
|
130
|
+
value: e.CLOSING_TEMPLATE
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
label: a(e.CLOSING_DRAFT, t),
|
|
134
|
+
value: e.CLOSING_DRAFT
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
] : [],
|
|
139
|
+
{
|
|
140
|
+
label: a(e.INGREDIENTS, t),
|
|
141
|
+
// icon: 'grocery',
|
|
142
|
+
value: e.INGREDIENTS
|
|
143
|
+
},
|
|
144
|
+
...s.enableIngredientGroup ? [
|
|
145
|
+
{
|
|
146
|
+
label: a(e.INGREDIENT_GROUP, t),
|
|
147
|
+
// icon: 'grocery',
|
|
148
|
+
value: e.INGREDIENT_GROUP
|
|
149
|
+
}
|
|
150
|
+
] : [],
|
|
151
|
+
{
|
|
152
|
+
label: a(e.RECIPE, t),
|
|
153
|
+
// icon: 'weight',
|
|
154
|
+
value: e.RECIPE
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
label: a(e.UNIT, t),
|
|
158
|
+
// icon: 'fastfood',
|
|
159
|
+
value: e.UNIT
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
label: t("inventory.transfer.title"),
|
|
163
|
+
// icon: 'swap_horiz',
|
|
164
|
+
children: [
|
|
165
|
+
{
|
|
166
|
+
label: a(e.RECEIVE_REQUEST, t),
|
|
167
|
+
value: e.RECEIVE_REQUEST
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
label: a(e.APPROVAL, t),
|
|
171
|
+
value: e.APPROVAL
|
|
172
|
+
},
|
|
173
|
+
...s.enablePoTemplate ? [
|
|
174
|
+
{
|
|
175
|
+
label: a(e.TRANSFER_TEMPLATE, t),
|
|
176
|
+
value: e.TRANSFER_TEMPLATE
|
|
177
|
+
}
|
|
178
|
+
] : []
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
label: a(e.SUPPLIER, t),
|
|
183
|
+
// icon: 'group',
|
|
184
|
+
value: e.SUPPLIER
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
label: a(e.WAREHOUSE, t),
|
|
188
|
+
// icon: 'warehouse',
|
|
189
|
+
value: e.WAREHOUSE
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
label: a(e.PUBLISH, t),
|
|
193
|
+
value: e.PUBLISH
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label: a(e.INTEGRATION, t),
|
|
197
|
+
// icon: 'integration_instructions',
|
|
198
|
+
value: e.INTEGRATION
|
|
199
|
+
}
|
|
200
|
+
];
|
|
201
|
+
return ((r = c.currentBusiness.value) == null ? void 0 : r.menuVersion) === "v3" ? n.filter(
|
|
202
|
+
(l) => l.value !== e.INGREDIENTS && l.value !== e.RECIPE && l.value !== e.UNIT
|
|
203
|
+
) : n;
|
|
204
|
+
}), d = g({
|
|
205
|
+
get() {
|
|
206
|
+
if (o.name)
|
|
207
|
+
return String(o.name);
|
|
208
|
+
},
|
|
209
|
+
set(n) {
|
|
210
|
+
n && u.push({ name: n });
|
|
211
|
+
}
|
|
212
|
+
}), v = g(
|
|
213
|
+
() => {
|
|
214
|
+
var n;
|
|
215
|
+
return `NavigationTab.${(n = c.currentBusiness.value) == null ? void 0 : n._id}`;
|
|
216
|
+
}
|
|
217
|
+
), T = U(!1), N = g({
|
|
218
|
+
get() {
|
|
219
|
+
return T.value;
|
|
220
|
+
},
|
|
221
|
+
set(n) {
|
|
222
|
+
T.value = n, n || m.setItem(v.value, "true");
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
return y([() => v.value], () => {
|
|
226
|
+
T.value = !1, setTimeout(() => {
|
|
227
|
+
N.value = !m.getItem(v.value);
|
|
228
|
+
}, 2e3);
|
|
229
|
+
}), (n, r) => {
|
|
230
|
+
const l = R("FmCollapsibleTabs");
|
|
231
|
+
return S(), P("div", se, [
|
|
232
|
+
_(l, {
|
|
233
|
+
modelValue: d.value,
|
|
234
|
+
"onUpdate:modelValue": r[0] || (r[0] = (I) => d.value = I),
|
|
235
|
+
items: b.value
|
|
236
|
+
}, null, 8, ["modelValue", "items"])
|
|
237
|
+
]);
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
|
|
242
|
+
let i, o;
|
|
243
|
+
return { promise: new Promise((c, s) => {
|
|
244
|
+
i = c, o = s;
|
|
245
|
+
}), resolve: i, reject: o };
|
|
246
|
+
});
|
|
247
|
+
typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(i) {
|
|
248
|
+
return await new Promise((o) => setTimeout(o, i)), Promise.resolve(this);
|
|
249
|
+
});
|
|
250
|
+
const ve = /* @__PURE__ */ h({
|
|
251
|
+
__name: "App",
|
|
252
|
+
setup(i) {
|
|
253
|
+
const o = A(), u = j(), c = K();
|
|
254
|
+
x(() => {
|
|
255
|
+
if (window.location.href.includes("print-preview")) {
|
|
256
|
+
o.setEmbedded(!0);
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
o.registerSidebarComponent(ae), u.initGoogleMap(c.appApi.googleMap).catch(() => {
|
|
260
|
+
console.error("Google map cannot be loaded");
|
|
261
|
+
});
|
|
262
|
+
}), y([() => o.currentCountry.value], () => {
|
|
263
|
+
s();
|
|
264
|
+
});
|
|
265
|
+
async function s() {
|
|
266
|
+
var m;
|
|
267
|
+
try {
|
|
268
|
+
await o.readBusinesses(), o.currentBusiness.value = (m = o.businesses.value) == null ? void 0 : m.find((t) => t);
|
|
269
|
+
} catch (t) {
|
|
270
|
+
console.error("error when trying to reset businesses:", t);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return (m, t) => (S(), G(re));
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
export {
|
|
277
|
+
ve as default
|
|
278
|
+
};
|
|
@@ -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-oV9ISfFL.js";
|
|
3
|
+
import { a as ge, P as O, b as be, _ as ye } from "./TransferDetails.vue_vue_type_script_setup_true_lang-C_7wbQow.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
|
|
2
|
-
import { _ as
|
|
3
|
-
import { a as
|
|
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-DgxN0U4N.js";
|
|
3
|
+
import { a as L, aQ as S } from "./app-oV9ISfFL.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 =
|
|
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] =
|
|
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(
|
|
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,
|
|
2
|
+
import { a as M, aQ as x, H as z } from "./app-oV9ISfFL.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
|
-
},
|
|
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
|
-
|
|
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
|
|
2
|
-
import { F as v, a as
|
|
3
|
-
import { components as
|
|
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-oV9ISfFL.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(
|
|
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 =
|
|
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] =
|
|
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,
|