@feedmepos/mf-inventory-portal 0.0.23-dev.2 → 0.0.23-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-DRE3c1lJ.js → App-CvIvF0fg.js} +59 -51
- package/dist/{ApprovalView-B4ZYcS3B.js → ApprovalView-BOn2HDVY.js} +20 -23
- package/dist/{BindingsDialog-Df1yrWHU.js → BindingsDialog-9qfADiSA.js} +7 -7
- package/dist/{BindingsPicker-BERMWh4w.js → BindingsPicker-CpV9uOqj.js} +7 -8
- package/dist/{BindingsTable-DRIapOWW.js → BindingsTable-BYScxUTj.js} +16 -20
- package/dist/ClosingDraftView-DM7-3zOd.js +1116 -0
- package/dist/{ClosingTemplateView-CbFn3Sdy.js → ClosingTemplateView-Cye5VPAM.js} +66 -76
- package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-AIKfZo3H.js} +1 -1
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CQUsooGm.js +282 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BHSGZyJL.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CFQc-CBX.js} +121 -119
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DH5IQchQ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-2r8mut0B.js} +7 -7
- package/dist/{IngredientGroupView-DoETcEvV.js → IngredientGroupView-RNokzPJa.js} +30 -36
- package/dist/IngredientsView-M7K_GAEO.js +1660 -0
- package/dist/{IntegrationView-D1HeBiGF.js → IntegrationView-D9a8d1sO.js} +18 -20
- package/dist/{InventoryBindingForm-Dmz9BQ37.js → InventoryBindingForm-B0Gx5N1p.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoyqVBOd.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DEOudgKD.js} +15 -17
- package/dist/{InventoryBindingSummary-DrpwiRGZ.js → InventoryBindingSummary-C16Nc5aN.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-yNEswIEI.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CZiypEex.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Br4_VUza.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BbYZwclN.js} +8 -8
- package/dist/{PurchaseOrderPrintPreview-cp671yWE.js → PurchaseOrderPrintPreview-DdKF8g0J.js} +13 -14
- package/dist/ReceiveRequestView-DBPRR6fz.js +4186 -0
- package/dist/{RecipeView-CD_dAWLo.js → RecipeView-CzUgVxKz.js} +58 -63
- package/dist/{StockView-DfUzFC1b.js → StockView-DCO3N1FS.js} +1338 -1446
- package/dist/{SupplierView-DB-zrNxh.js → SupplierView-CzV6DYSj.js} +2345 -783
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-00pcY0qu.js +1228 -0
- package/dist/TransferTemplateView-uL5PId9-.js +1265 -0
- package/dist/{UnitView-BlC9-WOA.js → UnitView-d-mCs-cS.js} +40 -44
- package/dist/{WarehouseView-CgEY87Lo.js → WarehouseView-B7z8m-Hv.js} +67 -73
- package/dist/api/adjustment-template.d.ts +23 -0
- package/dist/api/bill.d.ts +2 -2
- package/dist/api/closing-draft.d.ts +6 -0
- package/dist/api/closing.d.ts +1 -0
- package/dist/api/netsuite.d.ts +69 -0
- package/dist/app-CTCC1zfY.js +58871 -0
- package/dist/app.d.ts +56 -0
- package/dist/app.js +2 -2
- package/dist/components/FmMinMaxInputRules.d.ts +4 -1
- package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
- package/dist/components/row-action.enum.d.ts +1 -0
- package/dist/composable/defineDeepModel.d.ts +1 -1
- package/dist/{decimal-D7BCubZO.js → decimal-DhUR6QsF.js} +1 -1
- package/dist/{feature-BR-MsGYt.js → feature-DiGS5Fa4.js} +23 -9
- package/dist/format-unit-display-MRARpSlY.js +1210 -0
- package/dist/index-BSN3RnCl.js +12087 -0
- package/dist/netsuite-CIibMNer.js +251 -0
- package/dist/router/name.d.ts +2 -0
- package/dist/stock-COHpOTJk.js +110 -0
- package/dist/stores/feature.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +81 -0
- package/dist/stores/inventory.d.ts +1 -4
- package/dist/style.css +1 -1
- package/dist/{supplier-aBuwVukl.js → supplier-csNwTHYl.js} +15 -15
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-CLQ0LUmW.js → use-inventory-binding-dialog-172A48Xx.js} +10 -11
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
- package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
- package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
- package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +451 -0
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +2601 -0
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
- package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +24 -192
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +24 -192
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -34
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +54 -54
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +54 -54
- package/dist/views/receive-request/helper/check-netsuite-subsidiary.helper.d.ts +1 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -8
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -96
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -96
- package/dist/{xlsx-BbtURTDy.js → xlsx-CH-bhcOL.js} +1 -1
- package/dist/{xlsx.util-zYS4OJFi.js → xlsx.util-4aHI7W-Z.js} +1 -1
- package/package.json +3 -3
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-7JYNssTm.js +0 -267
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-KbYSywk2.js +0 -436
- package/dist/FmMultiselectDialog-Da9JMCYa.js +0 -415
- package/dist/IngredientsView-DHAhj9pV.js +0 -1613
- package/dist/ReceiveRequestView-C1WBlpho.js +0 -4082
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-2mzqFGCz.js +0 -1144
- package/dist/TransferTemplateView-CaAJrqU6.js +0 -1262
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-CAyFhmAz.js +0 -33457
- package/dist/date2-D9i5izMt.js +0 -117
- package/dist/dayjs.min-SJKP9zBL.js +0 -282
- package/dist/defineDeepModel-DS4Shctf.js +0 -13
- package/dist/format-time-from-id-CUby60uW.js +0 -15
- package/dist/format-unit-display-D25Al2JZ.js +0 -1198
- package/dist/fuzzy-BryBtMz_.js +0 -41
- package/dist/index-ByJbUSIQ.js +0 -45
- package/dist/index-CFA_VFyX.js +0 -10545
- package/dist/index-CTvgBOum.js +0 -22280
- package/dist/netsuite-D0G4B60k.js +0 -146
- package/dist/normalizeArguments-DP7Hrren.js +0 -1552
- package/dist/row-action.enum-PMKMRrZR.js +0 -50
- package/dist/rules-DxVY0b7F.js +0 -198
- package/dist/use-template-enabled-locations-2-BgTiwy_3.js +0 -86
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import { defineComponent as Y, ref as E, onMounted as re, resolveComponent as
|
|
2
|
-
import { a as I, c as G, S as ye,
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { i as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { useI18n as H } from "@feedmepos/mf-common";
|
|
11
|
-
import { u as ke, _ as De, a as Ie } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-KbYSywk2.js";
|
|
12
|
-
import { _ as $e } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoyqVBOd.js";
|
|
13
|
-
import { t as Ae, d as Pe } from "./xlsx.util-zYS4OJFi.js";
|
|
14
|
-
import { f as Be } from "./date2-D9i5izMt.js";
|
|
1
|
+
import { defineComponent as Y, ref as E, onMounted as re, resolveComponent as F, openBlock as C, createElementBlock as A, Fragment as ie, createElementVNode as w, toDisplayString as ce, createVNode as g, createCommentVNode as K, computed as V, watch as ue, createBlock as T, withCtx as P, unref as y, isRef as Z, normalizeClass as de, normalizeStyle as me, Teleport as pe, normalizeProps as fe, guardReactiveProps as ve } from "vue";
|
|
2
|
+
import { a as I, c as x, d as G, S as ye, e as ge, D as ee, f as L, h as z, F as te, k as be, U as _e, A as we, m as ne, n as Re, u as he, p as xe, q as Ce, r as Ee, s as Se, v as oe } from "./app-CTCC1zfY.js";
|
|
3
|
+
import { useDialog as Fe, useSnackbar as se, useProxiedModel as ae, useBreakpoints as Ve } from "@feedmepos/ui-library";
|
|
4
|
+
import { i as ke, _ as De } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
|
+
import { _ as le } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-2r8mut0B.js";
|
|
6
|
+
import { defineStore as Ie, storeToRefs as $e } from "pinia";
|
|
7
|
+
import { useI18n as q } from "@feedmepos/mf-common";
|
|
8
|
+
import { _ as Ae } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DEOudgKD.js";
|
|
9
|
+
import { t as Pe, d as Be } from "./xlsx.util-4aHI7W-Z.js";
|
|
15
10
|
const Te = {
|
|
16
11
|
key: 0,
|
|
17
12
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
@@ -33,7 +28,7 @@ const Te = {
|
|
|
33
28
|
!r.value && ((c = p.data) != null && c._id) && (r.value = !0, v.value = await I().getAffectedMenu((i = p.data) == null ? void 0 : i._id), r.value = !1);
|
|
34
29
|
}
|
|
35
30
|
return (c, i) => {
|
|
36
|
-
const f =
|
|
31
|
+
const f = F("FmSpacer"), d = F("FmCircularProgress");
|
|
37
32
|
return C(), A(ie, null, [
|
|
38
33
|
w("p", null, ce(c.message), 1),
|
|
39
34
|
r.value ? (C(), A("div", Te, [
|
|
@@ -51,13 +46,13 @@ const Te = {
|
|
|
51
46
|
name: "Menu",
|
|
52
47
|
bindings: v.value
|
|
53
48
|
}, null, 8, ["bindings"])
|
|
54
|
-
])) :
|
|
49
|
+
])) : K("", !0)
|
|
55
50
|
]))
|
|
56
51
|
], 64);
|
|
57
52
|
};
|
|
58
53
|
}
|
|
59
|
-
}),
|
|
60
|
-
const p =
|
|
54
|
+
}), j = Ie("recipeForm", function() {
|
|
55
|
+
const p = Fe(), v = se(), r = I(), l = E(!1), c = E();
|
|
61
56
|
function i() {
|
|
62
57
|
const t = {
|
|
63
58
|
recipe: {},
|
|
@@ -89,9 +84,9 @@ const Te = {
|
|
|
89
84
|
type: "success"
|
|
90
85
|
});
|
|
91
86
|
} catch (a) {
|
|
92
|
-
a instanceof ye &&
|
|
87
|
+
a instanceof ye && ke(a) ? p.open({
|
|
93
88
|
title: "Cannot delete recipe",
|
|
94
|
-
contentComponent:
|
|
89
|
+
contentComponent: De,
|
|
95
90
|
contentComponentProps: {
|
|
96
91
|
subject: (t == null ? void 0 : t.name) ?? "",
|
|
97
92
|
items: a.errorResponse.message
|
|
@@ -139,7 +134,7 @@ const Te = {
|
|
|
139
134
|
};
|
|
140
135
|
});
|
|
141
136
|
function Le() {
|
|
142
|
-
const { updateRecipe: R, deleteRecipe: p } =
|
|
137
|
+
const { updateRecipe: R, deleteRecipe: p } = j(), v = I(), { t: r } = q();
|
|
143
138
|
async function l(d, u) {
|
|
144
139
|
const t = G(u);
|
|
145
140
|
if (d === L.Edit) {
|
|
@@ -152,7 +147,7 @@ function Le() {
|
|
|
152
147
|
}
|
|
153
148
|
}
|
|
154
149
|
function c(d, u) {
|
|
155
|
-
const t = d.filter((e) => e.type ===
|
|
150
|
+
const t = d.filter((e) => e.type === te.enum.SKU), a = d.filter((e) => e.type === te.enum.RECIPE);
|
|
156
151
|
return [
|
|
157
152
|
...t.map((e) => ({ ...e, recipeIds: [...u] })),
|
|
158
153
|
...a.filter((e) => v.recipeById[e.id] && !u.has(e.id)).flatMap(
|
|
@@ -175,8 +170,8 @@ function Le() {
|
|
|
175
170
|
id: "action",
|
|
176
171
|
header: "",
|
|
177
172
|
cell(d) {
|
|
178
|
-
return
|
|
179
|
-
[
|
|
173
|
+
return ge(
|
|
174
|
+
[ee[L.Edit], ee[L.Delete]],
|
|
180
175
|
(u) => {
|
|
181
176
|
l(u, d.row.original.original);
|
|
182
177
|
}
|
|
@@ -207,10 +202,10 @@ function Le() {
|
|
|
207
202
|
const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
208
203
|
key: 0,
|
|
209
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"
|
|
210
|
-
},
|
|
205
|
+
}, qe = {
|
|
211
206
|
key: 0,
|
|
212
207
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
213
|
-
},
|
|
208
|
+
}, He = { key: 1 }, Ke = /* @__PURE__ */ Y({
|
|
214
209
|
__name: "RecipeForm",
|
|
215
210
|
props: {
|
|
216
211
|
mode: {},
|
|
@@ -220,7 +215,7 @@ const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
220
215
|
emits: ["update:modelValue", "click:submit"],
|
|
221
216
|
setup(R, { expose: p, emit: v }) {
|
|
222
217
|
var h;
|
|
223
|
-
const r = R, l = v, { t: c } =
|
|
218
|
+
const r = R, l = v, { t: c } = q(), i = V({
|
|
224
219
|
get() {
|
|
225
220
|
var n;
|
|
226
221
|
return ((n = r.modelValue) == null ? void 0 : n.name) ?? "";
|
|
@@ -269,7 +264,7 @@ const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
269
264
|
() => t.recipes.map((n) => ({ label: n.name, value: n.name }))
|
|
270
265
|
), m = E((h = r.modelValue) == null ? void 0 : h.name);
|
|
271
266
|
return (n, o) => {
|
|
272
|
-
const k =
|
|
267
|
+
const k = F("FmTextField"), H = F("FmCard"), $ = F("FmSwitch"), D = F("FmSpacer"), M = F("FmCircularProgress"), U = F("FmForm");
|
|
273
268
|
return C(), T(U, {
|
|
274
269
|
ref_key: "formRef",
|
|
275
270
|
ref: u,
|
|
@@ -281,26 +276,26 @@ const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
281
276
|
disabled: n.disabled,
|
|
282
277
|
label: y(c)("inventory.recipe.name"),
|
|
283
278
|
"model-value": i.value,
|
|
284
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
279
|
+
"onUpdate:modelValue": o[0] || (o[0] = (S) => i.value = S),
|
|
285
280
|
rules: [
|
|
286
|
-
y(
|
|
287
|
-
y(
|
|
281
|
+
y(be)(),
|
|
282
|
+
y(_e)(s.value, m.value, (S) => `[${S.value}] already exists`)
|
|
288
283
|
],
|
|
289
284
|
"label-mark": "required"
|
|
290
285
|
}, null, 8, ["disabled", "label", "model-value", "rules"]),
|
|
291
|
-
g(
|
|
286
|
+
g(H, {
|
|
292
287
|
variant: "outlined",
|
|
293
288
|
class: "p-16"
|
|
294
289
|
}, {
|
|
295
290
|
default: P(() => {
|
|
296
|
-
var
|
|
291
|
+
var S;
|
|
297
292
|
return [
|
|
298
|
-
g(
|
|
299
|
-
id: (
|
|
293
|
+
g(Ae, {
|
|
294
|
+
id: (S = n.modelValue) == null ? void 0 : S._id,
|
|
300
295
|
disabled: n.disabled,
|
|
301
296
|
"model-value": f.value,
|
|
302
297
|
"onUpdate:modelValue": o[1] || (o[1] = (B) => f.value = B),
|
|
303
|
-
rules: [y(
|
|
298
|
+
rules: [y(we)(1)]
|
|
304
299
|
}, null, 8, ["id", "disabled", "model-value", "rules"])
|
|
305
300
|
];
|
|
306
301
|
}),
|
|
@@ -312,32 +307,32 @@ const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
312
307
|
g($, {
|
|
313
308
|
label: "Show binded items",
|
|
314
309
|
modelValue: e.value,
|
|
315
|
-
"onUpdate:modelValue": o[2] || (o[2] = (
|
|
310
|
+
"onUpdate:modelValue": o[2] || (o[2] = (S) => e.value = S),
|
|
316
311
|
"label-placement": "right",
|
|
317
312
|
disabled: b.value
|
|
318
313
|
}, null, 8, ["modelValue", "disabled"])
|
|
319
314
|
]),
|
|
320
|
-
b.value ? (C(), A("div",
|
|
315
|
+
b.value ? (C(), A("div", qe, [
|
|
321
316
|
g(D),
|
|
322
317
|
w("div", null, [
|
|
323
318
|
g(M, { size: "xl" })
|
|
324
319
|
]),
|
|
325
320
|
o[3] || (o[3] = w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1)),
|
|
326
321
|
g(D)
|
|
327
|
-
])) : (C(), A("div",
|
|
322
|
+
])) : (C(), A("div", He, [
|
|
328
323
|
e.value && a.value.length ? (C(), T(le, {
|
|
329
324
|
key: 0,
|
|
330
325
|
name: "Menu",
|
|
331
326
|
bindings: a.value
|
|
332
|
-
}, null, 8, ["bindings"])) :
|
|
327
|
+
}, null, 8, ["bindings"])) : K("", !0)
|
|
333
328
|
]))
|
|
334
|
-
])) :
|
|
329
|
+
])) : K("", !0)
|
|
335
330
|
]),
|
|
336
331
|
_: 1
|
|
337
332
|
}, 512);
|
|
338
333
|
};
|
|
339
334
|
}
|
|
340
|
-
}),
|
|
335
|
+
}), je = { class: "flex gap-4" }, Ge = /* @__PURE__ */ Y({
|
|
341
336
|
__name: "RecipeDialog",
|
|
342
337
|
props: {
|
|
343
338
|
show: { type: Boolean },
|
|
@@ -346,7 +341,7 @@ const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
346
341
|
},
|
|
347
342
|
emits: ["update:show"],
|
|
348
343
|
setup(R) {
|
|
349
|
-
const p = R, v = I(), r = se(), { t: l } =
|
|
344
|
+
const p = R, v = I(), r = se(), { t: l } = q(), c = ae(p, "show"), i = ae(p, "recipe"), f = V(() => {
|
|
350
345
|
switch (p.mode) {
|
|
351
346
|
case x.READ:
|
|
352
347
|
return "";
|
|
@@ -377,7 +372,7 @@ const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
377
372
|
type: "success"
|
|
378
373
|
});
|
|
379
374
|
} catch (s) {
|
|
380
|
-
s instanceof
|
|
375
|
+
s instanceof ne || r.open({
|
|
381
376
|
title: l("inventory.recipe.create.error.title"),
|
|
382
377
|
message: l("inventory.recipe.create.error.message"),
|
|
383
378
|
type: "error"
|
|
@@ -395,7 +390,7 @@ const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
395
390
|
type: "success"
|
|
396
391
|
});
|
|
397
392
|
} catch (s) {
|
|
398
|
-
s instanceof
|
|
393
|
+
s instanceof ne || r.open({
|
|
399
394
|
title: l("inventory.recipe.update.error.title"),
|
|
400
395
|
message: l("inventory.recipe.update.error.message"),
|
|
401
396
|
type: "error"
|
|
@@ -419,7 +414,7 @@ const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
419
414
|
}
|
|
420
415
|
}
|
|
421
416
|
return (s, m) => {
|
|
422
|
-
const h =
|
|
417
|
+
const h = F("FmButton"), n = F("FmSideSheet");
|
|
423
418
|
return C(), T(n, {
|
|
424
419
|
"model-value": y(c),
|
|
425
420
|
"onUpdate:modelValue": m[3] || (m[3] = (o) => Z(c) ? c.value = o : null),
|
|
@@ -429,7 +424,7 @@ const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
429
424
|
"max-width": 500
|
|
430
425
|
}, {
|
|
431
426
|
"side-sheet-footer": P(() => [
|
|
432
|
-
w("div",
|
|
427
|
+
w("div", je, [
|
|
433
428
|
g(h, {
|
|
434
429
|
loading: t.value,
|
|
435
430
|
label: d.value,
|
|
@@ -444,7 +439,7 @@ const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
444
439
|
])
|
|
445
440
|
]),
|
|
446
441
|
default: P(() => [
|
|
447
|
-
g(
|
|
442
|
+
g(Ke, {
|
|
448
443
|
class: "w-full",
|
|
449
444
|
ref_key: "hasValidationExpose",
|
|
450
445
|
ref: u,
|
|
@@ -499,23 +494,23 @@ function Oe() {
|
|
|
499
494
|
...d === 0 ? [] : [["", "", "", "", "", ""]],
|
|
500
495
|
[f.name, "No bindings", "", "", "", ""]
|
|
501
496
|
];
|
|
502
|
-
}), i =
|
|
503
|
-
|
|
497
|
+
}), i = Pe(l, ["Name", "Type", "Code", "Item", "Amount", "Unit"]);
|
|
498
|
+
Be(i, `RECIPE_${Re(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
|
|
504
499
|
}
|
|
505
|
-
const Je = { class: "flex flex-col py-8" }, Qe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, We = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
500
|
+
const Je = { class: "flex flex-col py-8" }, Qe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, We = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rt = /* @__PURE__ */ Y({
|
|
506
501
|
__name: "RecipeView",
|
|
507
502
|
setup(R) {
|
|
508
|
-
const p = I(), v = V(() => p.recipes), r =
|
|
503
|
+
const p = I(), v = V(() => p.recipes), r = he(), { createRecipe: l, updateRecipe: c } = j(), { recipeDialogProps: i, recipeViewLoading: f } = $e(j()), { columnDefs: d, formatRowData: u } = Le(), t = V(() => u(v.value));
|
|
509
504
|
function a(o) {
|
|
510
505
|
if (o === "add")
|
|
511
506
|
return l();
|
|
512
507
|
if (o === "export")
|
|
513
508
|
return Oe();
|
|
514
509
|
}
|
|
515
|
-
const e = E(""), b = V(() => f.value), { breakpoints: _ } =
|
|
510
|
+
const e = E(""), b = V(() => f.value), { breakpoints: _ } = Ve(), s = V(() => _.value.xs || _.value.sm), m = V(() => s.value ? 10 : 20), h = xe(), { t: n } = q();
|
|
516
511
|
return (o, k) => {
|
|
517
|
-
const
|
|
518
|
-
return C(), T(
|
|
512
|
+
const H = F("FmTable");
|
|
513
|
+
return C(), T(Ce, {
|
|
519
514
|
title: y(n)("inventory.recipe.title"),
|
|
520
515
|
actions: [
|
|
521
516
|
{
|
|
@@ -538,12 +533,12 @@ const Je = { class: "flex flex-col py-8" }, Qe = { class: "fm-typo-en-body-lg-60
|
|
|
538
533
|
}
|
|
539
534
|
])
|
|
540
535
|
}, [
|
|
541
|
-
g(
|
|
536
|
+
g(Ee, {
|
|
542
537
|
searchable: "",
|
|
543
538
|
search: e.value,
|
|
544
539
|
"onUpdate:search": k[0] || (k[0] = ($) => e.value = $)
|
|
545
540
|
}, null, 8, ["search"]),
|
|
546
|
-
(C(), T(
|
|
541
|
+
(C(), T(H, {
|
|
547
542
|
style: me(y(h).tableHeight),
|
|
548
543
|
"column-defs": y(d),
|
|
549
544
|
"row-data": t.value,
|
|
@@ -554,22 +549,22 @@ const Je = { class: "flex flex-col py-8" }, Qe = { class: "fm-typo-en-body-lg-60
|
|
|
554
549
|
"page-size": m.value
|
|
555
550
|
}, {
|
|
556
551
|
"list-row": P(($) => [
|
|
557
|
-
g(
|
|
552
|
+
g(Se, {
|
|
558
553
|
row: $,
|
|
559
554
|
onRowClick: (D) => y(c)(D.original)
|
|
560
555
|
}, {
|
|
561
556
|
default: P((D) => {
|
|
562
|
-
var M, U,
|
|
557
|
+
var M, U, S, B, O, J, Q, W, N, X;
|
|
563
558
|
return [
|
|
564
559
|
w("div", Je, [
|
|
565
560
|
w("div", Qe, [
|
|
566
|
-
g(y(
|
|
567
|
-
render: (
|
|
561
|
+
g(y(oe), {
|
|
562
|
+
render: (S = (U = (M = D.recipe) == null ? void 0 : M.column) == null ? void 0 : U.columnDef) == null ? void 0 : S.cell,
|
|
568
563
|
props: (O = (B = D.recipe) == null ? void 0 : B.getContext) == null ? void 0 : O.call(B)
|
|
569
564
|
}, null, 8, ["render", "props"])
|
|
570
565
|
]),
|
|
571
566
|
w("div", We, [
|
|
572
|
-
g(y(
|
|
567
|
+
g(y(oe), {
|
|
573
568
|
render: (W = (Q = (J = D.ingredients) == null ? void 0 : J.column) == null ? void 0 : Q.columnDef) == null ? void 0 : W.cell,
|
|
574
569
|
props: (X = (N = D.ingredients) == null ? void 0 : N.getContext) == null ? void 0 : X.call(N)
|
|
575
570
|
}, null, 8, ["render", "props"])
|
|
@@ -593,5 +588,5 @@ const Je = { class: "flex flex-col py-8" }, Qe = { class: "fm-typo-en-body-lg-60
|
|
|
593
588
|
}
|
|
594
589
|
});
|
|
595
590
|
export {
|
|
596
|
-
|
|
591
|
+
rt as default
|
|
597
592
|
};
|