@feedmepos/mf-inventory-portal 0.0.25-dev.9 → 0.0.26-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.
- package/dist/{App-9zSE_swt.js → App-CipfIdtR.js} +71 -72
- package/dist/ApprovalView-IC33yBg7.js +143 -0
- package/dist/{BindingsDialog-eGbOIQkw.js → BindingsDialog-EN6Kbnu7.js} +2 -2
- package/dist/{BindingsPicker-CVXrd29s.js → BindingsPicker-DQ_LEoqq.js} +3 -3
- package/dist/BindingsTable-DGXpAyM4.js +120 -0
- package/dist/ClosingDraftView-DR9xsW9I.js +1348 -0
- package/dist/ClosingTemplateView-CC1T7ovX.js +1804 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C9un0wCK.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CovzlB-s.js} +43 -43
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BRSABJnM.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BxEtsFXp.js} +29 -29
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DeRvrF7O.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-B8H6vFJ5.js} +1 -1
- package/dist/{IngredientGroupView-ZWCOAljO.js → IngredientGroupView-DRPbXH8d.js} +24 -24
- package/dist/IngredientsView-DSHcH30X.js +1731 -0
- package/dist/{IntegrationView-DO3Ambro.js → IntegrationView-BgACk-jP.js} +605 -669
- package/dist/{InventoryBindingForm-BjtFP29c.js → InventoryBindingForm-Fs-CHoT-.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CFMZ4VsK.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DVHQjAEC.js} +63 -63
- package/dist/{InventoryBindingSummary-C6DkVX-B.js → InventoryBindingSummary-CHWMtGtk.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-nb1t6u2V.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cu9V-8Cf.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BcMAXo4F.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CyVRCAqv.js} +12 -12
- package/dist/PublishView-CI7o5a0F.js +222 -0
- package/dist/{PurchaseOrderPrintPreview-_MCAsdw9.js → PurchaseOrderPrintPreview-CO4a811o.js} +1 -1
- package/dist/ReceiveRequestView-KH5wY5BA.js +2562 -0
- package/dist/{RecipeView-dmmjklwh.js → RecipeView-DxVbUxOG.js} +47 -47
- package/dist/StockView-CiHPAaYh.js +1840 -0
- package/dist/{SupplierView-CO5460uC.js → SupplierView-DPj87kld.js} +448 -461
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CfPPCFh8.js +1566 -0
- package/dist/TransferTemplateView-3W29v8hd.js +1420 -0
- package/dist/{UnitView-DbYzxCXF.js → UnitView-WCtNQFf8.js} +23 -23
- package/dist/{WarehouseView-BII4SEVC.js → WarehouseView-tgFFbQY7.js} +40 -40
- package/dist/api/bill.d.ts +12 -2
- package/dist/api/closing-draft.d.ts +1 -0
- package/dist/api/inventory.d.ts +8 -7
- package/dist/api/netsuite.d.ts +22 -5
- package/dist/api/purchase-order.d.ts +6 -1
- package/dist/api/stock.d.ts +1 -0
- package/dist/{app-IM1yJnE8.js → app-Ba80HxT3.js} +38448 -34777
- package/dist/app.d.ts +965 -120
- package/dist/app.js +1 -1
- package/dist/components/FmDroppableField.vue.d.ts +1 -1
- package/dist/components/FmMultiselectDialog.d.ts +23 -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-DQUpCN-B.js → decimal-DFqusYHB.js} +1 -1
- package/dist/{format-unit-display-COuIZISg.js → format-unit-display-Bsod5Ra6.js} +232 -238
- package/dist/helper/country.d.ts +1 -0
- package/dist/helper/fuzzy.d.ts +1 -1
- package/dist/helper/number.d.ts +1 -1
- package/dist/index-0ekVGPtB.js +12197 -0
- package/dist/index-ZAEVHtfa.js +84 -0
- package/dist/{stock-BJUTiXXk.js → stock-Cn6EQvTz.js} +29 -25
- package/dist/stores/feature.d.ts +11 -6
- package/dist/stores/helper/generate-backend-urls.d.ts +0 -1
- package/dist/stores/integration/index.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +22 -5
- package/dist/stores/inventory.d.ts +141 -8
- package/dist/stores/location.d.ts +0 -9
- package/dist/stores/stock.d.ts +5 -0
- package/dist/stores/warehouse.d.ts +4 -7
- package/dist/style.css +1 -1
- package/dist/{supplier-CM-qQVyI.js → supplier-P1gi71dg.js} +4 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Cn79xFNg.js → use-ingredient-select-dialog-BW5imbB5.js} +1 -1
- package/dist/{use-inventory-binding-dialog-zwOG19YV.js → use-inventory-binding-dialog-BYxb8nXg.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +0 -24
- package/dist/views/adjustment-template/wastage-template/table.d.ts +0 -24
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +92 -8
- 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 +552 -48
- 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 +12 -36
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +12 -36
- 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-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/TransferDetailsProps.d.ts +4 -1
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +529 -489
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +8 -4
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +382 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +5 -2
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1238 -972
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1080 -1003
- package/dist/views/receive-request/import/XilnexImportDialog.vue.d.ts +22 -0
- package/dist/views/receive-request/import/XilnexImportForm.vue.d.ts +17 -0
- package/dist/views/receive-request/import/XilnexResult.vue.d.ts +17 -0
- package/dist/views/receive-request/import/export.d.ts +14 -0
- package/dist/views/receive-request/import/props.d.ts +7 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +6 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +220 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +0 -8
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +0 -1
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +7 -2
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +530 -530
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +530 -530
- package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +305 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -14
- package/dist/vue-i18n-CjtRsQMl.js +2365 -0
- package/package.json +7 -7
- package/dist/ApprovalView-C2tg-wsm.js +0 -138
- package/dist/BindingsTable-CCsQEFnu.js +0 -145
- package/dist/ClosingDraftView-BI8b3CJ9.js +0 -1225
- package/dist/ClosingTemplateView-miJnC-ML.js +0 -1859
- package/dist/IngredientsView-5-pSX6y_.js +0 -1718
- package/dist/PublishView-DOMQdIJ7.js +0 -192
- package/dist/ReceiveRequestView-902hWGtz.js +0 -1877
- package/dist/StockView-C4lEYLXU.js +0 -7847
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-D6sZDCEY.js +0 -1328
- package/dist/TransferTemplateView-C9UwNTnY.js +0 -1371
- package/dist/components/FmAutocompleteTextField.vue.d.ts +0 -31
- package/dist/feature-DMBVVBsQ.js +0 -1005
- package/dist/index-CIrsMt6f.js +0 -35546
- package/dist/views/dev/components/AutocompleteTextField.vue.d.ts +0 -2
- package/dist/vue-i18n-CzPFJ9JY.js +0 -2365
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as A,
|
|
1
|
+
import { defineComponent as q, ref as E, onMounted as re, resolveComponent as S, openBlock as x, createElementBlock as $, Fragment as ie, createElementVNode as R, toDisplayString as ce, createVNode as v, createCommentVNode as K, computed as F, watch as ue, createBlock as T, withCtx as P, unref as b, isRef as Z, normalizeClass as de, normalizeStyle as me, Teleport as pe, normalizeProps as fe, guardReactiveProps as ve } from "vue";
|
|
2
|
+
import { a as A, e as V, f as O, S as ye, h as ge, D as ee, i as Y, j, F as te, m as be, U as _e, A as we, q as ne, r as Re, v as he, s as Ve, u as xe, B as Ce, _ as Ee, C as Se, E as Fe, G as oe } from "./app-Ba80HxT3.js";
|
|
3
3
|
import { useDialog as ke, useSnackbar as se, useProxiedModel as ae, useBreakpoints as De } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as Ae, _ as Ie } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
|
-
import { _ as le } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as le } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-B8H6vFJ5.js";
|
|
6
6
|
import { defineStore as $e, storeToRefs as Pe } from "pinia";
|
|
7
|
-
import { useI18n as
|
|
8
|
-
import { _ as Be } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { useI18n as H } from "@feedmepos/mf-common";
|
|
8
|
+
import { _ as Be } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DVHQjAEC.js";
|
|
9
9
|
import { _ as Te } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
|
|
10
10
|
const Me = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
13
|
-
}, Ue = { key: 1 }, Ne = { key: 0 },
|
|
13
|
+
}, Ue = { key: 1 }, Ne = { key: 0 }, Le = /* @__PURE__ */ q({
|
|
14
14
|
__name: "DeleteDialog",
|
|
15
15
|
props: {
|
|
16
16
|
type: {},
|
|
@@ -19,7 +19,7 @@ const Me = {
|
|
|
19
19
|
bindedItems: {}
|
|
20
20
|
},
|
|
21
21
|
setup(h) {
|
|
22
|
-
const p = h, y =
|
|
22
|
+
const p = h, y = E(p.bindedItems || []), a = E(!1);
|
|
23
23
|
re(() => {
|
|
24
24
|
s();
|
|
25
25
|
});
|
|
@@ -46,13 +46,13 @@ const Me = {
|
|
|
46
46
|
name: "Menu",
|
|
47
47
|
bindings: y.value
|
|
48
48
|
}, null, 8, ["bindings"])
|
|
49
|
-
])) :
|
|
49
|
+
])) : K("", !0)
|
|
50
50
|
]))
|
|
51
51
|
], 64);
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
}), G = $e("recipeForm", function() {
|
|
55
|
-
const p = ke(), y = se(), a = A(), s =
|
|
55
|
+
const p = ke(), y = se(), a = A(), s = E(!1), c = E();
|
|
56
56
|
function i() {
|
|
57
57
|
const n = {
|
|
58
58
|
recipe: {},
|
|
@@ -117,7 +117,7 @@ const Me = {
|
|
|
117
117
|
text: "Cancel",
|
|
118
118
|
close: !0
|
|
119
119
|
},
|
|
120
|
-
contentComponent:
|
|
120
|
+
contentComponent: Le,
|
|
121
121
|
contentComponentProps: {
|
|
122
122
|
type: "menu",
|
|
123
123
|
data: n,
|
|
@@ -133,8 +133,8 @@ const Me = {
|
|
|
133
133
|
recipeViewLoading: s
|
|
134
134
|
};
|
|
135
135
|
});
|
|
136
|
-
function
|
|
137
|
-
const { updateRecipe: h, deleteRecipe: p } = G(), y = A(), { t: a } =
|
|
136
|
+
function ze() {
|
|
137
|
+
const { updateRecipe: h, deleteRecipe: p } = G(), y = A(), { t: a } = H();
|
|
138
138
|
async function s(u, d) {
|
|
139
139
|
const n = O(d);
|
|
140
140
|
if (u === Y.Edit) {
|
|
@@ -190,22 +190,22 @@ function Le() {
|
|
|
190
190
|
return u.map((n) => ({
|
|
191
191
|
recipe: n.name,
|
|
192
192
|
ingredients: c(n.contains, /* @__PURE__ */ new Set([n._id])).map((l) => {
|
|
193
|
-
var _, g, r, m,
|
|
193
|
+
var _, g, r, m, C;
|
|
194
194
|
const t = d.skuById[l.id];
|
|
195
|
-
return t ? l.recipeIds.slice(1).length ? `(linked recipe ${(_ = d.recipeById[l.recipeIds.at(-1) ?? ""]) == null ? void 0 : _.name}) ${t.name} (${
|
|
195
|
+
return t ? l.recipeIds.slice(1).length ? `(linked recipe ${(_ = d.recipeById[l.recipeIds.at(-1) ?? ""]) == null ? void 0 : _.name}) ${t.name} (${j(l.amount)}${((g = l.measurement) == null ? void 0 : g.abbrev) ?? ((r = t == null ? void 0 : t.unit) == null ? void 0 : r.abbrev)})` : `${t.name} (${j(l.amount)}${((m = l.measurement) == null ? void 0 : m.abbrev) ?? ((C = t == null ? void 0 : t.unit) == null ? void 0 : C.abbrev)})` : null;
|
|
196
196
|
}).filter((l) => l).join(", "),
|
|
197
197
|
original: n
|
|
198
198
|
}));
|
|
199
199
|
}
|
|
200
200
|
return { columnDefs: i, formatRowData: f };
|
|
201
201
|
}
|
|
202
|
-
const Ye = { class: "flex flex-col gap-40" },
|
|
202
|
+
const Ye = { class: "flex flex-col gap-40" }, je = {
|
|
203
203
|
key: 0,
|
|
204
204
|
class: "col-span-2 mt-16 border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
|
|
205
|
-
},
|
|
205
|
+
}, qe = {
|
|
206
206
|
key: 0,
|
|
207
207
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
208
|
-
},
|
|
208
|
+
}, He = { key: 1 }, Ke = { class: "mt-32" }, Ge = /* @__PURE__ */ q({
|
|
209
209
|
__name: "RecipeForm",
|
|
210
210
|
props: {
|
|
211
211
|
mode: {},
|
|
@@ -215,7 +215,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
215
215
|
emits: ["update:modelValue", "click:submit"],
|
|
216
216
|
setup(h, { expose: p, emit: y }) {
|
|
217
217
|
var k;
|
|
218
|
-
const a = h, s = y, { t: c } =
|
|
218
|
+
const a = h, s = y, { t: c } = H(), i = F({
|
|
219
219
|
get() {
|
|
220
220
|
var e;
|
|
221
221
|
return ((e = a.modelValue) == null ? void 0 : e.name) ?? "";
|
|
@@ -248,7 +248,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
248
248
|
function d() {
|
|
249
249
|
s("click:submit");
|
|
250
250
|
}
|
|
251
|
-
const n =
|
|
251
|
+
const n = E();
|
|
252
252
|
p({
|
|
253
253
|
validateInputs: () => {
|
|
254
254
|
var e, o;
|
|
@@ -263,7 +263,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
263
263
|
(o = (e = n.value) == null ? void 0 : e.resetInputs) == null || o.call(e);
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
|
-
const l = A(), t =
|
|
266
|
+
const l = A(), t = E([]), _ = E(!1), g = E(!1);
|
|
267
267
|
ue(_, async (e) => {
|
|
268
268
|
r(e);
|
|
269
269
|
});
|
|
@@ -273,7 +273,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
273
273
|
}
|
|
274
274
|
const m = F(
|
|
275
275
|
() => l.recipes.map((e) => ({ label: e.name, value: e.name }))
|
|
276
|
-
),
|
|
276
|
+
), C = E((k = a.modelValue) == null ? void 0 : k.name);
|
|
277
277
|
return (e, o) => {
|
|
278
278
|
const B = S("FmTextField"), I = S("FmCard"), D = S("FmSwitch"), M = S("FmSpacer"), U = S("FmCircularProgress"), N = S("FmForm");
|
|
279
279
|
return x(), T(N, {
|
|
@@ -290,7 +290,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
290
290
|
"onUpdate:modelValue": o[0] || (o[0] = (w) => i.value = w),
|
|
291
291
|
rules: [
|
|
292
292
|
b(be)(),
|
|
293
|
-
b(_e)(m.value,
|
|
293
|
+
b(_e)(m.value, C.value, (w) => `[${w.value}] already exists`)
|
|
294
294
|
],
|
|
295
295
|
"label-mark": "required"
|
|
296
296
|
}, null, 8, ["disabled", "label", "model-value", "rules"]),
|
|
@@ -305,7 +305,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
305
305
|
id: (w = e.modelValue) == null ? void 0 : w._id,
|
|
306
306
|
disabled: e.disabled,
|
|
307
307
|
"model-value": f.value,
|
|
308
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
308
|
+
"onUpdate:modelValue": o[1] || (o[1] = (L) => f.value = L),
|
|
309
309
|
rules: [b(we)(1)]
|
|
310
310
|
}, null, 8, ["id", "disabled", "model-value", "rules"])
|
|
311
311
|
];
|
|
@@ -313,7 +313,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
313
313
|
_: 1
|
|
314
314
|
})
|
|
315
315
|
]),
|
|
316
|
-
e.mode !== b(V).CREATE ? (x(), $("div",
|
|
316
|
+
e.mode !== b(V).CREATE ? (x(), $("div", je, [
|
|
317
317
|
R("div", null, [
|
|
318
318
|
v(D, {
|
|
319
319
|
label: "Show binded items",
|
|
@@ -323,22 +323,22 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
323
323
|
disabled: g.value
|
|
324
324
|
}, null, 8, ["modelValue", "disabled"])
|
|
325
325
|
]),
|
|
326
|
-
g.value ? (x(), $("div",
|
|
326
|
+
g.value ? (x(), $("div", qe, [
|
|
327
327
|
v(M),
|
|
328
328
|
R("div", null, [
|
|
329
329
|
v(U, { size: "xl" })
|
|
330
330
|
]),
|
|
331
331
|
o[4] || (o[4] = R("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1)),
|
|
332
332
|
v(M)
|
|
333
|
-
])) : (x(), $("div",
|
|
333
|
+
])) : (x(), $("div", He, [
|
|
334
334
|
_.value && t.value.length ? (x(), T(le, {
|
|
335
335
|
key: 0,
|
|
336
336
|
name: "Menu",
|
|
337
337
|
bindings: t.value
|
|
338
|
-
}, null, 8, ["bindings"])) :
|
|
338
|
+
}, null, 8, ["bindings"])) : K("", !0)
|
|
339
339
|
]))
|
|
340
|
-
])) :
|
|
341
|
-
R("div",
|
|
340
|
+
])) : K("", !0),
|
|
341
|
+
R("div", Ke, [
|
|
342
342
|
v(Te, {
|
|
343
343
|
entity: "inventoryRecipe",
|
|
344
344
|
modelValue: u.value,
|
|
@@ -350,7 +350,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
350
350
|
}, 512);
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
}), Oe = { class: "flex gap-4" }, Je = /* @__PURE__ */
|
|
353
|
+
}), Oe = { class: "flex gap-4" }, Je = /* @__PURE__ */ q({
|
|
354
354
|
__name: "RecipeDialog",
|
|
355
355
|
props: {
|
|
356
356
|
show: { type: Boolean },
|
|
@@ -359,7 +359,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
359
359
|
},
|
|
360
360
|
emits: ["update:show"],
|
|
361
361
|
setup(h) {
|
|
362
|
-
const p = h, y = A(), a = se(), { t: s } =
|
|
362
|
+
const p = h, y = A(), a = se(), { t: s } = H(), c = ae(p, "show"), i = ae(p, "recipe"), f = F(() => {
|
|
363
363
|
switch (p.mode) {
|
|
364
364
|
case V.READ:
|
|
365
365
|
return "";
|
|
@@ -379,7 +379,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
379
379
|
return s("common.add");
|
|
380
380
|
}
|
|
381
381
|
return "";
|
|
382
|
-
}), d =
|
|
382
|
+
}), d = E(), n = E(!1);
|
|
383
383
|
async function l() {
|
|
384
384
|
n.value = !0;
|
|
385
385
|
try {
|
|
@@ -432,7 +432,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
return (r, m) => {
|
|
435
|
-
const
|
|
435
|
+
const C = S("FmButton"), k = S("FmSideSheet");
|
|
436
436
|
return x(), T(k, {
|
|
437
437
|
"model-value": b(c),
|
|
438
438
|
"onUpdate:modelValue": m[3] || (m[3] = (e) => Z(c) ? c.value = e : null),
|
|
@@ -443,12 +443,12 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
443
443
|
}, {
|
|
444
444
|
"side-sheet-footer": P(() => [
|
|
445
445
|
R("div", Oe, [
|
|
446
|
-
v(
|
|
446
|
+
v(C, {
|
|
447
447
|
loading: n.value,
|
|
448
448
|
label: u.value,
|
|
449
449
|
onClick: _
|
|
450
450
|
}, null, 8, ["loading", "label"]),
|
|
451
|
-
v(
|
|
451
|
+
v(C, {
|
|
452
452
|
disabled: n.value,
|
|
453
453
|
label: b(s)("common.close"),
|
|
454
454
|
variant: "tertiary",
|
|
@@ -488,21 +488,21 @@ function Qe() {
|
|
|
488
488
|
"RECIPE",
|
|
489
489
|
"",
|
|
490
490
|
(g = y[t.id]) == null ? void 0 : g.name,
|
|
491
|
-
|
|
491
|
+
j(t.amount),
|
|
492
492
|
"UNIT"
|
|
493
493
|
];
|
|
494
494
|
}
|
|
495
495
|
),
|
|
496
496
|
...l.map(
|
|
497
497
|
(t, _) => {
|
|
498
|
-
var g, r, m,
|
|
498
|
+
var g, r, m, C;
|
|
499
499
|
return [
|
|
500
500
|
!n.length && _ === 0 ? f.name : "",
|
|
501
501
|
"INGREDIENT",
|
|
502
502
|
(g = a[t.id]) == null ? void 0 : g.code,
|
|
503
503
|
(r = a[t.id]) == null ? void 0 : r.name,
|
|
504
|
-
|
|
505
|
-
t.measurement ? t.measurement.abbrev : (
|
|
504
|
+
j(t.amount),
|
|
505
|
+
t.measurement ? t.measurement.abbrev : (C = (m = a[t.id]) == null ? void 0 : m.unit) == null ? void 0 : C.abbrev
|
|
506
506
|
];
|
|
507
507
|
}
|
|
508
508
|
)
|
|
@@ -515,20 +515,20 @@ function Qe() {
|
|
|
515
515
|
}), i = Re(s, ["Name", "Type", "Code", "Item", "Amount", "Unit"]);
|
|
516
516
|
he(i, `RECIPE_${Ve(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
|
|
517
517
|
}
|
|
518
|
-
const We = { class: "flex flex-col py-8" }, Xe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ze = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ct = /* @__PURE__ */
|
|
518
|
+
const We = { class: "flex flex-col py-8" }, Xe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ze = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ct = /* @__PURE__ */ q({
|
|
519
519
|
__name: "RecipeView",
|
|
520
520
|
setup(h) {
|
|
521
|
-
const p = A(), y = F(() => p.recipes), a = xe(), { createRecipe: s, updateRecipe: c } = G(), { recipeDialogProps: i, recipeViewLoading: f } = Pe(G()), { columnDefs: u, formatRowData: d } =
|
|
521
|
+
const p = A(), y = F(() => p.recipes), a = xe(), { createRecipe: s, updateRecipe: c } = G(), { recipeDialogProps: i, recipeViewLoading: f } = Pe(G()), { columnDefs: u, formatRowData: d } = ze(), n = F(() => d(y.value));
|
|
522
522
|
function l(e) {
|
|
523
523
|
if (e === "add")
|
|
524
524
|
return s();
|
|
525
525
|
if (e === "export")
|
|
526
526
|
return Qe();
|
|
527
527
|
}
|
|
528
|
-
const t =
|
|
528
|
+
const t = E(""), _ = F(() => f.value), { breakpoints: g } = De(), r = F(() => g.value.xs || g.value.sm), m = F(() => r.value ? 10 : 20), C = Ce(), { t: k } = H();
|
|
529
529
|
return (e, o) => {
|
|
530
530
|
const B = S("FmTable");
|
|
531
|
-
return x(), T(
|
|
531
|
+
return x(), T(Ee, {
|
|
532
532
|
title: b(k)("inventory.recipe.title"),
|
|
533
533
|
actions: [
|
|
534
534
|
{
|
|
@@ -557,7 +557,7 @@ const We = { class: "flex flex-col py-8" }, Xe = { class: "fm-typo-en-body-lg-60
|
|
|
557
557
|
"onUpdate:search": o[0] || (o[0] = (I) => t.value = I)
|
|
558
558
|
}, null, 8, ["search"]),
|
|
559
559
|
(x(), T(B, {
|
|
560
|
-
style: me(b(
|
|
560
|
+
style: me(b(C).tableHeight),
|
|
561
561
|
"column-defs": b(u),
|
|
562
562
|
"row-data": n.value,
|
|
563
563
|
"search-value": t.value,
|
|
@@ -572,19 +572,19 @@ const We = { class: "flex flex-col py-8" }, Xe = { class: "fm-typo-en-body-lg-60
|
|
|
572
572
|
onRowClick: (D) => b(c)(D.original)
|
|
573
573
|
}, {
|
|
574
574
|
default: P((D) => {
|
|
575
|
-
var M, U, N, w,
|
|
575
|
+
var M, U, N, w, L, J, Q, W, z, X;
|
|
576
576
|
return [
|
|
577
577
|
R("div", We, [
|
|
578
578
|
R("div", Xe, [
|
|
579
579
|
v(b(oe), {
|
|
580
580
|
render: (N = (U = (M = D.recipe) == null ? void 0 : M.column) == null ? void 0 : U.columnDef) == null ? void 0 : N.cell,
|
|
581
|
-
props: (
|
|
581
|
+
props: (L = (w = D.recipe) == null ? void 0 : w.getContext) == null ? void 0 : L.call(w)
|
|
582
582
|
}, null, 8, ["render", "props"])
|
|
583
583
|
]),
|
|
584
584
|
R("div", Ze, [
|
|
585
585
|
v(b(oe), {
|
|
586
586
|
render: (W = (Q = (J = D.ingredients) == null ? void 0 : J.column) == null ? void 0 : Q.columnDef) == null ? void 0 : W.cell,
|
|
587
|
-
props: (X = (
|
|
587
|
+
props: (X = (z = D.ingredients) == null ? void 0 : z.getContext) == null ? void 0 : X.call(z)
|
|
588
588
|
}, null, 8, ["render", "props"])
|
|
589
589
|
])
|
|
590
590
|
])
|