@feedmepos/mf-inventory-portal 1.2.22-dev.1 → 1.2.22-dev.3
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-CVo40hoN.js → App-aHs88TEq.js} +1 -1
- package/dist/{ApprovalView-B99YGXOt.js → ApprovalView-DBZQsKg9.js} +9 -9
- package/dist/{BindingsDialog-DGFYmVX9.js → BindingsDialog-arTYvJn2.js} +2 -2
- package/dist/{BindingsPicker-CVWxRkDE.js → BindingsPicker-Bm0s6sKE.js} +9 -9
- package/dist/{BindingsTable-Cxs_cQrM.js → BindingsTable-DXlM-qDU.js} +1 -1
- package/dist/ClosingDraftView-DVB02I09.js +1888 -0
- package/dist/ClosingTemplateView-k8EkjlIJ.js +2001 -0
- package/dist/{DeliveryOrderPrintPreview-D-H7S-4t.js → DeliveryOrderPrintPreview-CSv5FOby.js} +8 -8
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BsPMd4IE.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D0BKSSSp.js} +33 -33
- package/dist/{FmMultiselectDialog-DXVvibUU.js → FmMultiselectDialog-DOf8rbVD.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Dq8lMkNV.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BZX05ToS.js} +49 -49
- package/dist/{ImportView-DUPfQshy.js → ImportView-6ckPf1Ll.js} +27 -27
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DxLVS1Ar.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-QK12Klz5.js} +8 -8
- package/dist/{IngredientGroupView-CqPl6RZI.js → IngredientGroupView-D2RuwnJ3.js} +17 -17
- package/dist/{IngredientsView--7ro7P7J.js → IngredientsView-CZIyrGJ0.js} +72 -73
- package/dist/{IntegrationView-BZnq8gYp.js → IntegrationView-D9JrR8Hb.js} +3 -3
- package/dist/{InventoryBindingForm-DASUGZuO.js → InventoryBindingForm-6QGOGZlB.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-l_EgNW0u.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DG_WKGVU.js} +12 -12
- package/dist/{InventoryBindingSummary-BoUAsK9S.js → InventoryBindingSummary-CoeODKLp.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DimqJCjO.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Ovi_bWlF.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C_wNgXUC.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CaKjg0eV.js} +7 -7
- package/dist/{PublishView-B-Zal--Y.js → PublishView-BLtshSks.js} +10 -10
- package/dist/{PurchaseOrderPrintPreview-CoXu4VO-.js → PurchaseOrderPrintPreview-DCLjVNlh.js} +13 -13
- package/dist/{ReceiveRequestView-B7rprDy7.js → ReceiveRequestView-DdJ3_qMY.js} +115 -115
- package/dist/{RecipeView-BbMlUt0v.js → RecipeView-DYFDguU9.js} +50 -50
- package/dist/{StockView-Bko2-Rzd.js → StockView-DyUrO7Y0.js} +7 -7
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DONtcweN.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bj05qEWl.js} +1 -1
- package/dist/{SupplierView-D4hAT4CW.js → SupplierView-BYDbDGfd.js} +93 -93
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DuaHM-Wk.js +3233 -0
- package/dist/{TransferTemplateView-BLWYhdZG.js → TransferTemplateView-db5L1CIZ.js} +140 -140
- package/dist/{UnitView-Boi_sRGP.js → UnitView-4ygzmFTY.js} +44 -44
- package/dist/{WarehouseView-B1aAyncU.js → WarehouseView-D-b-t21n.js} +66 -66
- package/dist/api/adjustment-template.d.ts +1 -0
- package/dist/api/closing-template.d.ts +1 -0
- package/dist/{app-C4dN86_k.js → app-BDiHcGqi.js} +30052 -30029
- package/dist/app.js +4 -4
- package/dist/{decimal-Cf4voIJl.js → decimal-C-phHxE7.js} +1 -1
- package/dist/{format-unit-display-CjsVuoHS.js → format-unit-display-MVZRrkkD.js} +33 -33
- package/dist/{import-export.helper-DmouV6nF.js → import-export.helper-C3camZX5.js} +6 -6
- package/dist/{index-DK93lkR_.js → index-B60G756h.js} +1 -1
- package/dist/{index-D2C87f4k.js → index-B6zknB--.js} +1 -1
- package/dist/{purchase-order-template-CQcIyT35.js → purchase-order-template-Bkz_Xjv5.js} +1 -1
- package/dist/{stock-CRKwCBhd.js → stock-DnawcaKQ.js} +1 -1
- package/dist/{supplier-BGeDlnSm.js → supplier-Bq0fMcn0.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Dg3hbUaX.js → use-ingredient-select-dialog-BH2O0eEN.js} +1 -1
- package/dist/{use-inventory-binding-dialog-DRCiAYUs.js → use-inventory-binding-dialog-CI_pMWSk.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +60 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +60 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +56 -0
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +468 -0
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +8 -1
- package/dist/views/receive-request/components/delivery-order-form/SystemTrailDialog.vue.d.ts +8 -4
- package/package.json +3 -3
- package/dist/ClosingDraftView-gBO5Icdy.js +0 -1739
- package/dist/ClosingTemplateView-C61_1m3k.js +0 -1970
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Cr30q-Ft.js +0 -3394
- package/dist/closing-template-CNtgIoiQ.js +0 -53
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as De, ref as F, computed as J, watch as ze, resolveComponent as Y, openBlock as N, createElementBlock as D, createVNode as A, normalizeClass as ce, unref as i, createSlots as Ke, withCtx as Q, createElementVNode as n, createBlock as se, toDisplayString as a, createCommentVNode as Z, Fragment as Be, renderList as Pe, shallowRef as $e, h as Ie, createTextVNode as k } from "vue";
|
|
2
|
-
import { a as ie,
|
|
2
|
+
import { a as ie, as as je, a0 as Fe, aq as Ve, X as We, n as pe, ap as Re, C as Le, E as Je, G as Xe, I as ke, c as qe } from "./app-BDiHcGqi.js";
|
|
3
3
|
import { useCoreStore as Ce, useI18n as Oe } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as Qe, useSnackbar as He, useDialog as Ye, useBreakpoints as Ze } from "@feedmepos/ui-library";
|
|
5
|
-
import { s as et, g as tt, b as nt, d as Ae } from "./import-export.helper-
|
|
5
|
+
import { s as et, g as tt, b as nt, d as Ae } from "./import-export.helper-C3camZX5.js";
|
|
6
6
|
import { r as ot } from "./random-CSbEbElR.js";
|
|
7
7
|
function Ee() {
|
|
8
8
|
return `measurement_${(/* @__PURE__ */ new Date()).toISOString()}_${ot()}`;
|
|
@@ -415,12 +415,12 @@ function ut() {
|
|
|
415
415
|
return Re(E, x);
|
|
416
416
|
}
|
|
417
417
|
function dt() {
|
|
418
|
-
const U =
|
|
418
|
+
const U = Ve({
|
|
419
419
|
unit: lt(),
|
|
420
420
|
ingredient: mt(),
|
|
421
421
|
recipe: ut()
|
|
422
422
|
}), e = "FeedMe comprehensive template.xlsx";
|
|
423
|
-
return
|
|
423
|
+
return We(U, e), e;
|
|
424
424
|
}
|
|
425
425
|
async function ct(U) {
|
|
426
426
|
if (!U) return null;
|
|
@@ -602,10 +602,10 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
602
602
|
}, Kt = {
|
|
603
603
|
key: 1,
|
|
604
604
|
class: "text-orange-600"
|
|
605
|
-
},
|
|
605
|
+
}, Vt = {
|
|
606
606
|
key: 2,
|
|
607
607
|
class: "text-green-600"
|
|
608
|
-
},
|
|
608
|
+
}, Wt = { class: "flex gap-8" }, Lt = { class: "p-16" }, Jt = {
|
|
609
609
|
key: 2,
|
|
610
610
|
class: "bg-white rounded-lg shadow"
|
|
611
611
|
}, Xt = { class: "flex items-center justify-between p-16 border-b" }, qt = { class: "fm-typo-en-title-md-600 text-red-800" }, Qt = { class: "fm-typo-en-body-sm-400 text-gray-600 mt-4" }, Yt = { class: "flex gap-8" }, Zt = { class: "p-16" }, en = {
|
|
@@ -621,7 +621,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
621
621
|
const l = F(!1), s = F(null), u = F(!1), v = F(null), p = F(!1), b = F([]), f = F(null), d = F([]), o = F(!1), y = J(() => E.value.xs || E.value.sm), _ = J(() => y.value ? 10 : 20), G = J(() => {
|
|
622
622
|
const m = s.value;
|
|
623
623
|
if (!m) return [];
|
|
624
|
-
const t = [], { units: C, skus: B, recipes:
|
|
624
|
+
const t = [], { units: C, skus: B, recipes: W, _invalidExcel: z, _invalidExcelMessage: X } = m, q = (M) => {
|
|
625
625
|
var j;
|
|
626
626
|
return ((j = M.errors) == null ? void 0 : j.length) > 0 ? Array.isArray(M.errors) ? M.errors.join(", ") : M.errors || e("inventory.common.validationFailed") : z ? X || e("inventory.common.invalidExcelFormat") : e("inventory.common.readyToImport");
|
|
627
627
|
}, H = (M, O) => {
|
|
@@ -640,7 +640,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
640
640
|
});
|
|
641
641
|
}
|
|
642
642
|
};
|
|
643
|
-
return H(C, e("inventory.common.unit")), H(B, e("inventory.common.ingredient")), H(
|
|
643
|
+
return H(C, e("inventory.common.unit")), H(B, e("inventory.common.ingredient")), H(W, e("inventory.common.recipe")), t;
|
|
644
644
|
}), w = J(() => G.value.some(
|
|
645
645
|
(m) => m.errors && m.errors.length > 0
|
|
646
646
|
)), I = J(() => G.value.some(
|
|
@@ -707,7 +707,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
707
707
|
f.value = m.workbook, b.value = [...m.availableSheets], s.value = {}, d.value = [], await ae();
|
|
708
708
|
}
|
|
709
709
|
async function ae() {
|
|
710
|
-
var t, C, B,
|
|
710
|
+
var t, C, B, W, z, X, q, H, M, O, j, K, P, me, ue;
|
|
711
711
|
if (!f.value || b.value.length === 0) {
|
|
712
712
|
u.value = !0;
|
|
713
713
|
return;
|
|
@@ -726,7 +726,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
726
726
|
...$.unit,
|
|
727
727
|
errors: $.errors
|
|
728
728
|
}))) || [],
|
|
729
|
-
update: ((
|
|
729
|
+
update: ((W = S.importUpdateResult) == null ? void 0 : W.map(($) => ({
|
|
730
730
|
...$.unit,
|
|
731
731
|
errors: $.errors
|
|
732
732
|
}))) || []
|
|
@@ -783,7 +783,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
785
|
async function be() {
|
|
786
|
-
var m, t, C, B,
|
|
786
|
+
var m, t, C, B, W, z, X, q, H, M, O, j, K, P, me, ue, L, S, $, Ue, Ge, Ne, Te, Me;
|
|
787
787
|
if (s.value) {
|
|
788
788
|
if (I.value) {
|
|
789
789
|
g.open({
|
|
@@ -803,7 +803,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
803
803
|
}
|
|
804
804
|
l.value = !0;
|
|
805
805
|
try {
|
|
806
|
-
let
|
|
806
|
+
let V = 0, oe = "";
|
|
807
807
|
if (s.value.units && ((m = s.value.units.create) != null && m.length || (t = s.value.units.update) != null && t.length)) {
|
|
808
808
|
const T = {
|
|
809
809
|
create: ((C = s.value.units.create) == null ? void 0 : C.filter((c) => !c.errors || c.errors.length === 0)) || [],
|
|
@@ -811,12 +811,12 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
811
811
|
};
|
|
812
812
|
if (T.create.length || T.update.length) {
|
|
813
813
|
const c = await x.importUnits(T);
|
|
814
|
-
((
|
|
814
|
+
((W = c == null ? void 0 : c.errors) == null ? void 0 : W.length) > 0 && d.value.push(...c.errors.map((re) => ({
|
|
815
815
|
type: "units",
|
|
816
816
|
error: re
|
|
817
817
|
})));
|
|
818
818
|
const te = T.create.length + T.update.length, ne = ((z = c == null ? void 0 : c.errors) == null ? void 0 : z.length) || 0;
|
|
819
|
-
|
|
819
|
+
V = te - ne, oe = "units", s.value = {
|
|
820
820
|
...s.value,
|
|
821
821
|
units: null
|
|
822
822
|
};
|
|
@@ -833,7 +833,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
833
833
|
error: re
|
|
834
834
|
})));
|
|
835
835
|
const te = T.create.length + T.update.length, ne = ((j = c == null ? void 0 : c.errors) == null ? void 0 : j.length) || 0;
|
|
836
|
-
|
|
836
|
+
V = te - ne, oe = "ingredients", s.value = {
|
|
837
837
|
...s.value,
|
|
838
838
|
skus: null
|
|
839
839
|
};
|
|
@@ -850,21 +850,21 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
850
850
|
error: re
|
|
851
851
|
})));
|
|
852
852
|
const te = T.create.length + T.update.length, ne = ((S = c == null ? void 0 : c.errors) == null ? void 0 : S.length) || 0;
|
|
853
|
-
|
|
853
|
+
V = te - ne, oe = "recipes", s.value = {
|
|
854
854
|
...s.value,
|
|
855
855
|
recipes: null
|
|
856
856
|
};
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
|
-
if (
|
|
859
|
+
if (V > 0) {
|
|
860
860
|
const T = d.value.filter((c) => c.type === oe);
|
|
861
861
|
T.length > 0 ? g.open({
|
|
862
862
|
title: e("inventory.common.importCompletedWithIssues"),
|
|
863
|
-
message: e("inventory.common.successfullyImported", [
|
|
863
|
+
message: e("inventory.common.successfullyImported", [V, oe, T.length, oe]),
|
|
864
864
|
type: "warning"
|
|
865
865
|
}) : g.open({
|
|
866
866
|
title: e("inventory.ingredient.import.success"),
|
|
867
|
-
message: e("inventory.common.successfullyImported", [
|
|
867
|
+
message: e("inventory.common.successfullyImported", [V, oe, "0", ""]),
|
|
868
868
|
type: "success"
|
|
869
869
|
});
|
|
870
870
|
}
|
|
@@ -884,12 +884,12 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
884
884
|
message: e("inventory.common.allDataSuccessfullyImported"),
|
|
885
885
|
type: "success"
|
|
886
886
|
});
|
|
887
|
-
} catch (
|
|
887
|
+
} catch (V) {
|
|
888
888
|
g.open({
|
|
889
889
|
title: e("inventory.ingredient.import.error.failed"),
|
|
890
|
-
message: (
|
|
890
|
+
message: (V == null ? void 0 : V.message) || e("inventory.common.unknownErrorOccurred"),
|
|
891
891
|
type: "error"
|
|
892
|
-
}), console.error("Error during import:",
|
|
892
|
+
}), console.error("Error during import:", V);
|
|
893
893
|
} finally {
|
|
894
894
|
l.value = !1;
|
|
895
895
|
}
|
|
@@ -969,7 +969,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
969
969
|
}
|
|
970
970
|
]);
|
|
971
971
|
return (m, t) => {
|
|
972
|
-
const C = Y("FmIcon"), B = Y("FmButton"),
|
|
972
|
+
const C = Y("FmIcon"), B = Y("FmButton"), W = Y("FmTable"), z = Y("FmCard"), X = Y("FmSideSheet"), q = Y("FmSpinner");
|
|
973
973
|
return i(h).isLoaded && i(h).enableBulkImport ? (N(), se(ke, {
|
|
974
974
|
key: 0,
|
|
975
975
|
title: i(e)("inventory.common.import"),
|
|
@@ -1099,10 +1099,10 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
1099
1099
|
n("div", null, [
|
|
1100
1100
|
n("div", Ot, a(i(e)("inventory.common.importPreview")), 1),
|
|
1101
1101
|
n("div", Ht, [
|
|
1102
|
-
I.value ? (N(), D("span", zt, a(i(e)("inventory.common.errorExist")) + ": " + a(ee.value), 1)) : w.value ? (N(), D("span", Kt, a(i(e)("inventory.common.someItemsValidationErrors")), 1)) : (N(), D("span",
|
|
1102
|
+
I.value ? (N(), D("span", zt, a(i(e)("inventory.common.errorExist")) + ": " + a(ee.value), 1)) : w.value ? (N(), D("span", Kt, a(i(e)("inventory.common.someItemsValidationErrors")), 1)) : (N(), D("span", Vt, a(i(e)("inventory.common.allItemsValidReadyImport")), 1))
|
|
1103
1103
|
])
|
|
1104
1104
|
]),
|
|
1105
|
-
n("div",
|
|
1105
|
+
n("div", Wt, [
|
|
1106
1106
|
A(B, {
|
|
1107
1107
|
variant: "secondary",
|
|
1108
1108
|
onClick: le,
|
|
@@ -1118,7 +1118,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
1118
1118
|
])
|
|
1119
1119
|
]),
|
|
1120
1120
|
n("div", Lt, [
|
|
1121
|
-
A(
|
|
1121
|
+
A(W, {
|
|
1122
1122
|
"column-defs": we.value,
|
|
1123
1123
|
"row-data": G.value,
|
|
1124
1124
|
"page-size": _.value,
|
|
@@ -1143,7 +1143,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
|
|
|
1143
1143
|
])
|
|
1144
1144
|
]),
|
|
1145
1145
|
n("div", Zt, [
|
|
1146
|
-
A(
|
|
1146
|
+
A(W, {
|
|
1147
1147
|
"column-defs": Se.value,
|
|
1148
1148
|
"row-data": ve.value,
|
|
1149
1149
|
"page-size": _.value,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as p, openBlock as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as p, openBlock as n, createElementBlock as s, createElementVNode as r, toDisplayString as o, unref as l, Fragment as d, renderList as x } from "vue";
|
|
2
|
+
import { n as a, Z as y } from "./app-BDiHcGqi.js";
|
|
3
3
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
4
|
const v = { class: "flex flex-col" }, g = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, h = { class: "flex-1 py-8 px-16" }, b = {
|
|
5
5
|
class: "flex-0 py-8 px-16",
|
|
@@ -20,28 +20,28 @@ const v = { class: "flex flex-col" }, g = { class: "flex flex-row fm-typo-en-bod
|
|
|
20
20
|
},
|
|
21
21
|
setup($) {
|
|
22
22
|
const { t: m } = _();
|
|
23
|
-
function c(e,
|
|
23
|
+
function c(e, i) {
|
|
24
24
|
var t;
|
|
25
25
|
if (e.measurement) {
|
|
26
26
|
const u = y(e.amount, e.measurement.conversion);
|
|
27
27
|
return `${a(u, !1)} ${(t = e.measurement) == null ? void 0 : t.abbrev}`;
|
|
28
28
|
}
|
|
29
|
-
return `${a(e.amount, !1)} ${
|
|
29
|
+
return `${a(e.amount, !1)} ${i.abbrev}`;
|
|
30
30
|
}
|
|
31
31
|
function f(e) {
|
|
32
32
|
return e.unit !== void 0;
|
|
33
33
|
}
|
|
34
|
-
return (e,
|
|
34
|
+
return (e, i) => (n(), s("div", v, [
|
|
35
35
|
r("div", g, [
|
|
36
36
|
r("div", h, o(e.name), 1),
|
|
37
|
-
r("div", b, o(
|
|
37
|
+
r("div", b, o(l(m)("inventory.ingredient.bindedItems.amount")), 1)
|
|
38
38
|
]),
|
|
39
|
-
(
|
|
39
|
+
(n(!0), s(d, null, x(e.bindings, (t) => (n(), s("div", {
|
|
40
40
|
key: t.id,
|
|
41
41
|
class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
|
|
42
42
|
}, [
|
|
43
43
|
r("div", k, o(t.name), 1),
|
|
44
|
-
f(t) ? (
|
|
44
|
+
f(t) ? (n(), s("div", B, o(c(t, t.unit)), 1)) : (n(), s("div", I, o(l(a)(t.amount, !1)), 1))
|
|
45
45
|
]))), 128))
|
|
46
46
|
]));
|
|
47
47
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as A, computed as F, h as C, defineComponent as j, watch as re, resolveComponent as R, openBlock as G, createElementBlock as B, createVNode as b, unref as l, createElementVNode as c, toDisplayString as $, createBlock as M, withCtx as T, Fragment as pe, renderList as ve, createTextVNode as ye, createCommentVNode as se, isRef as ge, normalizeClass as _e, normalizeStyle as be, createSlots as ke, Teleport as xe, normalizeProps as he, guardReactiveProps as we } from "vue";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as P, e as S, f as L, i as Re, D as oe, j as K, P as Ie, A as Se, U as Ge, Q as ue, T as Fe, N as Ve, r as de, V as Ce, y as ae, u as De, G as Ae, I as $e, J as Te, K as Ee, L as le } from "./app-BDiHcGqi.js";
|
|
3
3
|
import { useDialog as Me, useSnackbar as J, components as U, useProxiedModel as Ue, useBreakpoints as Be } from "@feedmepos/ui-library";
|
|
4
|
-
import { useI18n as
|
|
4
|
+
import { useI18n as z, useCoreStore as Le } from "@feedmepos/mf-common";
|
|
5
5
|
import { defineStore as ce, storeToRefs as ie } from "pinia";
|
|
6
|
-
import { u as
|
|
6
|
+
import { u as Pe } from "./FmMultiselectDialog-DOf8rbVD.js";
|
|
7
7
|
import { r as me } from "./random-CSbEbElR.js";
|
|
8
|
-
import { u as
|
|
8
|
+
import { u as ze, R as Ne } from "./usePromise-CbVUCxhj.js";
|
|
9
9
|
const H = ce(
|
|
10
10
|
"ingredientGroupactions",
|
|
11
11
|
function() {
|
|
12
|
-
const _ = Me(), f = J(), k =
|
|
12
|
+
const _ = Me(), f = J(), k = P(), { t: i } = z(), v = A();
|
|
13
13
|
function e() {
|
|
14
14
|
const u = {
|
|
15
15
|
modelValue: {},
|
|
@@ -23,7 +23,7 @@ const H = ce(
|
|
|
23
23
|
}
|
|
24
24
|
async function a(u) {
|
|
25
25
|
const m = {
|
|
26
|
-
modelValue:
|
|
26
|
+
modelValue: L(u),
|
|
27
27
|
mode: S.UPDATE,
|
|
28
28
|
show: !0,
|
|
29
29
|
"onUpdate:show"(r) {
|
|
@@ -82,7 +82,7 @@ const H = ce(
|
|
|
82
82
|
), Oe = ce(
|
|
83
83
|
"ingredientGroupTable",
|
|
84
84
|
function() {
|
|
85
|
-
const _ = A(!1), f = J(), k =
|
|
85
|
+
const _ = A(!1), f = J(), k = P(), i = H();
|
|
86
86
|
async function v() {
|
|
87
87
|
_.value = !0;
|
|
88
88
|
try {
|
|
@@ -98,7 +98,7 @@ const H = ce(
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
function e(t, n) {
|
|
101
|
-
switch (n =
|
|
101
|
+
switch (n = L(n), t) {
|
|
102
102
|
case K.Edit:
|
|
103
103
|
return i.updateIngredientGroup(n);
|
|
104
104
|
case K.Delete:
|
|
@@ -165,7 +165,7 @@ function qe(o) {
|
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
167
|
function fe(o) {
|
|
168
|
-
const _ =
|
|
168
|
+
const _ = Pe(), f = P(), k = F(() => [
|
|
169
169
|
{
|
|
170
170
|
id: "delete",
|
|
171
171
|
header: "",
|
|
@@ -403,7 +403,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
403
403
|
modelValue: {}
|
|
404
404
|
},
|
|
405
405
|
setup(o) {
|
|
406
|
-
const _ = o, { t: f } =
|
|
406
|
+
const _ = o, { t: f } = z(), k = Le(), i = F(() => {
|
|
407
407
|
var g;
|
|
408
408
|
const n = /* @__PURE__ */ new Map(), s = k.restaurants.value.map((u) => u.customAttributes ?? {});
|
|
409
409
|
for (const u of s)
|
|
@@ -525,7 +525,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
525
525
|
setup(o, { expose: _, emit: f }) {
|
|
526
526
|
const k = o, i = ue("modelValue", {
|
|
527
527
|
watchProps: !0
|
|
528
|
-
}), v = f, { t: e } =
|
|
528
|
+
}), v = f, { t: e } = z(), a = qe({
|
|
529
529
|
get items() {
|
|
530
530
|
return i.rules ?? [];
|
|
531
531
|
},
|
|
@@ -717,9 +717,9 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
717
717
|
},
|
|
718
718
|
emits: ["update:show"],
|
|
719
719
|
setup(o) {
|
|
720
|
-
const _ = o, f =
|
|
720
|
+
const _ = o, f = P(), k = ze(() => f.readCachedMenu()), i = F(
|
|
721
721
|
() => k.result.value.state === Ne.success ? k.result.value.data : void 0
|
|
722
|
-
), v = J(), { t: e } =
|
|
722
|
+
), v = J(), { t: e } = z(), a = Ue(_, "show");
|
|
723
723
|
function t() {
|
|
724
724
|
return {
|
|
725
725
|
_id: "",
|
|
@@ -732,7 +732,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
732
732
|
() => _.show,
|
|
733
733
|
(d) => {
|
|
734
734
|
if (!d) return;
|
|
735
|
-
let p =
|
|
735
|
+
let p = L(_.modelValue ?? t());
|
|
736
736
|
p.defaultSkuRefs && (p.defaultSkuRefs = p.defaultSkuRefs.map((h, V) => ({
|
|
737
737
|
...h,
|
|
738
738
|
priority: h.priority ?? V + 1
|
|
@@ -770,7 +770,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
770
770
|
}), m = A(), r = A(!1);
|
|
771
771
|
async function y() {
|
|
772
772
|
r.value = !0;
|
|
773
|
-
const d =
|
|
773
|
+
const d = L(n.value);
|
|
774
774
|
try {
|
|
775
775
|
await f.createSkuGroup(d), a.value = !1, v.open({
|
|
776
776
|
title: e("inventory.common.success"),
|
|
@@ -789,7 +789,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
789
789
|
}
|
|
790
790
|
async function w() {
|
|
791
791
|
r.value = !0;
|
|
792
|
-
const d =
|
|
792
|
+
const d = L(n.value);
|
|
793
793
|
try {
|
|
794
794
|
await f.updateSkuGroup(d), r.value = !1, a.value = !1, v.open({
|
|
795
795
|
title: e("inventory.common.success"),
|
|
@@ -866,7 +866,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
866
866
|
}), kt = { class: "flex flex-col py-8" }, xt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ht = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Dt = /* @__PURE__ */ j({
|
|
867
867
|
__name: "IngredientGroupView",
|
|
868
868
|
setup(o) {
|
|
869
|
-
const _ =
|
|
869
|
+
const _ = P(), f = F(() => _.skuGroups), k = De(), { t: i } = z(), {
|
|
870
870
|
createIngredientGroup: v,
|
|
871
871
|
updateIngredientGroup: e,
|
|
872
872
|
importIngredientGroups: a,
|