@feedmepos/mf-menu 0.32.43 → 0.32.44
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-C9b4SjED.js → App-BXkiQoTM.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C1T4Ewek.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BoSL4dm7.js} +3 -3
- package/dist/{Catalog-BVrf3VaX.js → Catalog-CLFVLyor.js} +44 -44
- package/dist/{Category-BkReM5IG.js → Category-BdyouDU8.js} +24 -24
- package/dist/{Category-BMzIQqIE.js → Category-CNuVHuI3.js} +25 -25
- package/dist/{CookingGuide-CvctI1TH.js → CookingGuide-Bed7bUt1.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-bYSEp6Wb.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CZDL2xJC.js} +1 -1
- package/dist/{Group-CHkNuuHE.js → Group-D4UTsIxI.js} +3 -3
- package/dist/{Group-BQzmXagr.js → Group-TUqCPmO3.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BkruJTpL.js → Group.vue_vue_type_script_setup_true_lang-BJPT8flL.js} +19 -19
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CBz83Qd1.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D83liryu.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Dpx4meDa.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CRIRinHB.js} +10 -11
- package/dist/{Ingredient-BNsKYrQB.js → Ingredient-CcxoeuDd.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DzzwwdA_.js → InventoryBinding.vue_vue_type_script_setup_true_lang-58tyxdVh.js} +2 -2
- package/dist/{LinkProductSideSheet-C6-wef-M.js → LinkProductSideSheet-DazOkwkd.js} +45 -45
- package/dist/{MenuSetting-DRaw7b6m.js → MenuSetting-B3oLll4C.js} +47 -47
- package/dist/{PrintRoute-BKB-thVp.js → PrintRoute-D878qPu8.js} +39 -39
- package/dist/{Product-vviXmBR1.js → Product-DOC8y_mW.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-5h-k6zad.js → Product.vue_vue_type_script_setup_true_lang-tZyBhWYT.js} +140 -140
- package/dist/{ProductInternalTools-DtLk3xFR.js → ProductInternalTools-9TgIc2bR.js} +66 -66
- package/dist/Products-DfUGnHmD.js +1568 -0
- package/dist/{Publish-jx0_H_26.js → Publish-BktK_PKq.js} +29 -29
- package/dist/{Recipe-Dk04ge-_.js → Recipe-eA0xrGYk.js} +24 -24
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DaCVUn1i.js → RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js} +2 -2
- package/dist/{Scheduler-vFTvCVcY.js → Scheduler-CKSqPZLQ.js} +11 -11
- package/dist/{ServingSequence-DiBqQ_iS.js → ServingSequence-Ea20baNj.js} +44 -44
- package/dist/{Setting-CtzJ_pVM.js → Setting-u6lX_Dzg.js} +17 -17
- package/dist/{Subcategory-Cmv2W67T.js → Subcategory-C6s7OMOb.js} +51 -51
- package/dist/{Takeaway-DBW4UPFZ.js → Takeaway-B9kr-Nf4.js} +13 -13
- package/dist/{Takeaway-ChaYk0Ix.js → Takeaway-lWxS9oWe.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-C7RL3ITP.js → Takeaway.vue_vue_type_script_setup_true_lang-oA0e9oI5.js} +54 -54
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-edwJ1203.js → Thumbnail.vue_vue_type_script_setup_true_lang-T40ChY7j.js} +27 -27
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-CcIGCUwk.js +194 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B1e3d-uX.js +6130 -0
- package/dist/{Unit-BgLqPMLe.js → Unit-DkQlUg2l.js} +8 -8
- package/dist/{Variant-B8yxF5mJ.js → Variant-BF5r2WLL.js} +25 -25
- package/dist/{_id_-CDN7as0K.js → _id_-_oqk-OhC.js} +28 -28
- package/dist/app-CfCYl2pO.js +363 -0
- package/dist/{app-0AQBxO0B.js → app-DIYHNWEw.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DTIHdzDw.js → linked-status-AoXjo9FF.js} +2 -2
- package/dist/assets/{menu-export-CpcyYnR-.js → menu-export-BHcaWhM3.js} +2 -2
- package/dist/assets/{override-menu-CASoFjhZ.js → override-menu-B9xQcjuJ.js} +2 -2
- package/dist/assets/{validate-menu-C5AkexWv.js → validate-menu-D-ezd4W8.js} +2 -2
- package/dist/{catalog-BA1e4WAu.js → catalog-CvN9Wu8V.js} +1 -1
- package/dist/{catalogSetting-DE5rjVfj.js → catalogSetting-qS5Np22q.js} +1 -1
- package/dist/{currency-D5qYOpxI.js → currency-Nxod6uwl.js} +1 -1
- package/dist/dayjs.min-B1AjAGva.js +6 -0
- package/dist/index-C0Zw1cSS.js +545 -0
- package/dist/{index-vPs04fVf.js → index-Cq-czJjU.js} +31 -31
- package/dist/index-nKlYiotY.js +246 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-DSZsSghE.js → index.vue_vue_type_script_setup_true_lang-YXKayPEp.js} +103 -78
- package/dist/{item-Dp17qTYi.js → item-CUZSonzT.js} +2587 -2587
- package/dist/{jszip.min-DlpCmtaR.js → jszip.min-BnkZQ6lD.js} +6 -7
- package/dist/{menu-BOVrJ7di.js → menu-BP_ArXCI.js} +1 -1
- package/dist/{menuV2-BHnldQiM.js → menuV2-BGEYgQ8-.js} +59 -59
- package/dist/{priceTier-BRQz1GRF.js → priceTier-B-Qa0xaO.js} +1 -1
- package/dist/{rules-CO49kqfr.js → rules-Dchd_ilF.js} +12 -12
- package/dist/{scheduler-BDHjl8t7.js → scheduler-DN7ZGLk8.js} +29 -29
- package/dist/{toExcel-DGdZKSxT.js → toExcel-jHmkDqcm.js} +2 -2
- package/dist/{translation-BCZ1Ruvv.js → translation-Cdap0IVg.js} +21 -35
- package/dist/{unit-D7QVgTp_.js → unit-DgL56pkI.js} +35 -35
- package/package.json +1 -1
- package/dist/Products-BR3iBVFd.js +0 -307
- package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-I6qrPmxY.js +0 -144
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cs6s_csi.js +0 -196
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DIbjlDVn.js +0 -5767
- package/dist/app-BU6wILmn.js +0 -2286
- package/dist/dayjs.min-BFDAHpA8.js +0 -7
- package/dist/index--nQbIQ0d.js +0 -545
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createElementBlock as R, openBlock as i, createElementVNode as F, defineComponent as ae, ref as A, computed as j, resolveComponent as x, createBlock as T, unref as u, withCtx as M, createVNode as y, toDisplayString as E, Fragment as z, renderList as X, createCommentVNode as
|
|
2
|
-
import { u as le,
|
|
1
|
+
import { createElementBlock as R, openBlock as i, createElementVNode as F, defineComponent as ae, ref as A, computed as j, resolveComponent as x, createBlock as T, unref as u, withCtx as M, createVNode as y, toDisplayString as E, Fragment as z, renderList as X, createCommentVNode as J, withModifiers as oe, watch as re, renderSlot as pe } from "vue";
|
|
2
|
+
import { u as le, A as ue, I as ee, a4 as ve, J as ie } from "./index.vue_vue_type_script_setup_true_lang-YXKayPEp.js";
|
|
3
3
|
import { useI18n as se, ItemSelector as fe } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as de, FmButtonVariant as Z } from "@feedmepos/ui-library";
|
|
5
5
|
import { u as _e } from "./discardConfirm-BHni0LNu.js";
|
|
6
|
-
import { u as ye } from "./menuV2-
|
|
6
|
+
import { u as ye } from "./menuV2-BGEYgQ8-.js";
|
|
7
7
|
import { _ as ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
import { m as O, g as Re, h as be, b as ge, u as he, f as te } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { m as O, g as Re, h as be, b as ge, u as he, f as te } from "./RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js";
|
|
9
9
|
import { c as Ce } from "./check-C9mY6LiX.js";
|
|
10
10
|
/* empty css */
|
|
11
11
|
const Ae = {};
|
|
@@ -14,7 +14,7 @@ function ke(h, U) {
|
|
|
14
14
|
F("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
|
|
15
15
|
]));
|
|
16
16
|
}
|
|
17
|
-
const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]),
|
|
17
|
+
const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), Ie = { class: "flex items-center gap-24" }, we = { key: 0 }, Ve = { key: 1 }, xe = { class: "flex flex-col gap-24 h-full" }, $e = { class: "flex flex-col gap-24 overflow-y-auto flex-1" }, Se = { class: "flex flex-col gap-16" }, Ne = { class: "text-fm-color-typo-primary fm-typo-en-body-lg-600" }, Ge = { class: "flex justify-between" }, Oe = { class: "text-fm-color-neutral-gray-400 fm-typo-en-body-lg-600" }, De = { key: 0 }, Me = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "text-fm-color-neutral-gray-300 p-16 ml-16"
|
|
20
20
|
}, Be = { class: "flex justify-end gap-16" }, Le = /* @__PURE__ */ ae({
|
|
@@ -48,7 +48,7 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), we = { class: "flex items-c
|
|
|
48
48
|
(o, s) => (o[s.id] = !0, o),
|
|
49
49
|
{}
|
|
50
50
|
)
|
|
51
|
-
),
|
|
51
|
+
), w = A({}), P = j(
|
|
52
52
|
() => {
|
|
53
53
|
var o;
|
|
54
54
|
return (((o = le().state.menu.ruleGroupSettings) == null ? void 0 : o.groups) || []).map((s) => ({
|
|
@@ -68,7 +68,7 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), we = { class: "flex items-c
|
|
|
68
68
|
const p = C.value[s.value] || !1, r = C.value[n.value] || !1;
|
|
69
69
|
return p && !r ? -1 : !p && r ? 1 : 0;
|
|
70
70
|
});
|
|
71
|
-
}),
|
|
71
|
+
}), Y = j(() => {
|
|
72
72
|
var n;
|
|
73
73
|
const o = Object.entries(C.value).filter(([p, r]) => r).map(([p]) => p), s = ((n = le().state.menu.ruleGroupSettings) == null ? void 0 : n.groups) || [];
|
|
74
74
|
return o.map((p) => {
|
|
@@ -121,7 +121,7 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), we = { class: "flex items-c
|
|
|
121
121
|
}))
|
|
122
122
|
];
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function I() {
|
|
125
125
|
var k, S, N, _, W, m, t, l;
|
|
126
126
|
const o = L.groupCustomRule, s = Object.entries(C.value).filter(([e, G]) => G).map(([e]) => e), n = [], p = [], r = [], c = [];
|
|
127
127
|
d.value.length > 0 && (d.value.forEach((e) => {
|
|
@@ -183,18 +183,18 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), we = { class: "flex items-c
|
|
|
183
183
|
"close-button": !1,
|
|
184
184
|
"is-container": u(de).FmForm,
|
|
185
185
|
"is-container-props": {
|
|
186
|
-
onValidationSuccess:
|
|
186
|
+
onValidationSuccess: I,
|
|
187
187
|
blameFormChildOnValidationFailed: !0
|
|
188
188
|
}
|
|
189
189
|
}, {
|
|
190
190
|
"side-sheet-header": M(() => [
|
|
191
|
-
F("div",
|
|
191
|
+
F("div", Ie, [
|
|
192
192
|
y(n, {
|
|
193
193
|
variant: u(Z).Tertiary,
|
|
194
194
|
"prepend-icon": "arrow_back",
|
|
195
195
|
onClick: oe(f, ["stop"])
|
|
196
196
|
}, null, 8, ["variant"]),
|
|
197
|
-
h.isEditMode ? (i(), R("p",
|
|
197
|
+
h.isEditMode ? (i(), R("p", we, E(u(a)("menu.link_product.rules.edit_rule")), 1)) : (i(), R("p", Ve, E(u(a)("menu.link_product.rules.add_rule")), 1))
|
|
198
198
|
])
|
|
199
199
|
]),
|
|
200
200
|
"side-sheet-footer": M(() => [
|
|
@@ -238,7 +238,7 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), we = { class: "flex items-c
|
|
|
238
238
|
F("div", $e, [
|
|
239
239
|
F("div", Se, [
|
|
240
240
|
F("p", Ne, E(u(a)("menu.link_product.rules.use_rule_group")), 1),
|
|
241
|
-
(i(!0), R(z, null, X(
|
|
241
|
+
(i(!0), R(z, null, X(Y.value, (m) => (i(), R("div", {
|
|
242
242
|
key: m._id
|
|
243
243
|
}, [
|
|
244
244
|
y(k, {
|
|
@@ -249,11 +249,11 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), we = { class: "flex items-c
|
|
|
249
249
|
F("div", Ge, [
|
|
250
250
|
F("p", Oe, E(m.name), 1),
|
|
251
251
|
y(c, {
|
|
252
|
-
name:
|
|
253
|
-
onClick: oe((t) =>
|
|
252
|
+
name: w.value[m._id] ? "expand_less" : "expand_more",
|
|
253
|
+
onClick: oe((t) => w.value[m._id] = !w.value[m._id], ["stop", "prevent"])
|
|
254
254
|
}, null, 8, ["name", "onClick"])
|
|
255
255
|
]),
|
|
256
|
-
|
|
256
|
+
w.value[m._id] ? (i(), R("div", De, [
|
|
257
257
|
(i(!0), R(z, null, X(m.rules, (t, l) => (i(), R("div", {
|
|
258
258
|
key: t._id
|
|
259
259
|
}, [
|
|
@@ -264,9 +264,9 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), we = { class: "flex items-c
|
|
|
264
264
|
operator: e.operator,
|
|
265
265
|
value: e.value
|
|
266
266
|
}, null, 8, ["number", "property", "operator", "value"]))), 128)),
|
|
267
|
-
l < m.rules.length - 1 ? (i(), R("p", Me, E(u(a)("menu.link_product.rules.or")), 1)) :
|
|
267
|
+
l < m.rules.length - 1 ? (i(), R("p", Me, E(u(a)("menu.link_product.rules.or")), 1)) : J("", !0)
|
|
268
268
|
]))), 128))
|
|
269
|
-
])) :
|
|
269
|
+
])) : J("", !0)
|
|
270
270
|
]),
|
|
271
271
|
_: 2
|
|
272
272
|
}, 1024)
|
|
@@ -350,11 +350,11 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), we = { class: "flex items-c
|
|
|
350
350
|
function b(d) {
|
|
351
351
|
return d.flatMap((g) => {
|
|
352
352
|
var o, s;
|
|
353
|
-
const
|
|
353
|
+
const I = ((o = q.value.find((n) => n._id === g)) == null ? void 0 : o.rules) || [], f = ((s = q.value.find((n) => n._id === g)) == null ? void 0 : s.name) || "";
|
|
354
354
|
return {
|
|
355
355
|
id: g,
|
|
356
356
|
name: f,
|
|
357
|
-
rules:
|
|
357
|
+
rules: I.map((n) => {
|
|
358
358
|
var p, r, c, k;
|
|
359
359
|
return {
|
|
360
360
|
...n,
|
|
@@ -371,13 +371,13 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), we = { class: "flex items-c
|
|
|
371
371
|
};
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
-
const C = A(b(v.modelValue.ruleGroupIds ?? [])),
|
|
374
|
+
const C = A(b(v.modelValue.ruleGroupIds ?? [])), w = A({
|
|
375
375
|
_id: "customRule",
|
|
376
376
|
restaurantRule: v.modelValue.restaurantRule,
|
|
377
377
|
itemRule: v.modelValue.itemRule
|
|
378
378
|
}), P = A(v.modelValue.orderFrom);
|
|
379
379
|
re(() => v.modelValue, (d) => {
|
|
380
|
-
C.value = b(d.ruleGroupIds ?? []),
|
|
380
|
+
C.value = b(d.ruleGroupIds ?? []), w.value = {
|
|
381
381
|
_id: "customRule",
|
|
382
382
|
restaurantRule: d.restaurantRule,
|
|
383
383
|
itemRule: d.itemRule
|
|
@@ -391,27 +391,27 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), we = { class: "flex items-c
|
|
|
391
391
|
}), re(() => V.value, (d, g) => {
|
|
392
392
|
v.isDraft && g === !0 && d === !1 && $("delete-rule");
|
|
393
393
|
});
|
|
394
|
-
function
|
|
395
|
-
P.value = d.orderFrom,
|
|
394
|
+
function Y(d) {
|
|
395
|
+
P.value = d.orderFrom, w.value.restaurantRule = d.restaurantRule, w.value.itemRule = d.itemRule, C.value = b(d.ruleGroupIds ?? []), $("update:model-value", d);
|
|
396
396
|
}
|
|
397
397
|
return (d, g) => V.value ? (i(), T(Le, {
|
|
398
398
|
key: 1,
|
|
399
399
|
"is-edit-mode": !h.isDraft,
|
|
400
400
|
"order-from": P.value,
|
|
401
401
|
"existing-rule-groups": C.value,
|
|
402
|
-
"group-custom-rule":
|
|
402
|
+
"group-custom-rule": w.value,
|
|
403
403
|
"convert-category-id-to-name": h.convertCategoryIdToName,
|
|
404
|
-
onCloseForm: g[2] || (g[2] = (
|
|
405
|
-
"onUpdate:modelValue": g[3] || (g[3] = (
|
|
404
|
+
onCloseForm: g[2] || (g[2] = (I) => V.value = !1),
|
|
405
|
+
"onUpdate:modelValue": g[3] || (g[3] = (I) => Y(I))
|
|
406
406
|
}, null, 8, ["is-edit-mode", "order-from", "existing-rule-groups", "group-custom-rule", "convert-category-id-to-name"])) : (i(), T(ge, {
|
|
407
407
|
key: 0,
|
|
408
|
-
"model-value":
|
|
408
|
+
"model-value": w.value,
|
|
409
409
|
title: `${u(L)("menu.rule_groups.condition_view.rule")} ${h.index + 1}`,
|
|
410
410
|
"is-catalog-link-item-rule-view": !0,
|
|
411
|
-
"rule-group-names": C.value.map((
|
|
411
|
+
"rule-group-names": C.value.map((I) => I.name).filter((I) => I !== ""),
|
|
412
412
|
"order-from": P.value,
|
|
413
|
-
onOpenCatalogLinkItemRuleForm: g[0] || (g[0] = (
|
|
414
|
-
onDeleteRule: g[1] || (g[1] = (
|
|
413
|
+
onOpenCatalogLinkItemRuleForm: g[0] || (g[0] = (I) => V.value = !0),
|
|
414
|
+
onDeleteRule: g[1] || (g[1] = (I) => d.$emit("delete-rule"))
|
|
415
415
|
}, null, 8, ["model-value", "title", "rule-group-names", "order-from"]));
|
|
416
416
|
}
|
|
417
417
|
});
|
|
@@ -425,7 +425,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
425
425
|
}, ze = { class: "flex-1 relative border border-fm-color-neutral-gray-200 rounded-md p-16" }, Pe = { class: "absolute -top-[10px] left-[50px] bg-white px-2 fm-typo-en-body-lg-400 text-fm-color-typo-secondary select-none z-10" }, We = {
|
|
426
426
|
key: 0,
|
|
427
427
|
class: "flex items-center select-none"
|
|
428
|
-
}, He = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Qe = { class: "flex gap-8 items-center justify-start" },
|
|
428
|
+
}, He = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Qe = { class: "flex gap-8 items-center justify-start" }, Je = /* @__PURE__ */ ae({
|
|
429
429
|
__name: "LinkProductSideSheet",
|
|
430
430
|
props: {
|
|
431
431
|
initialValue: { default: () => [] },
|
|
@@ -450,18 +450,18 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
450
450
|
const b = A(!1), C = (t) => {
|
|
451
451
|
Ce.isBoolean(t) ? b.value = t : b.value = !b.value;
|
|
452
452
|
};
|
|
453
|
-
function
|
|
453
|
+
function w(t) {
|
|
454
454
|
return t.reduce((l, e) => (l[e._id] = [...l[e._id] ?? [], e], l), {});
|
|
455
455
|
}
|
|
456
|
-
const P = a.initialValue, V = A(
|
|
456
|
+
const P = a.initialValue, V = A(w(ee(P))), Y = j(() => Object.values(V.value).flatMap((t) => t)), { convertCategoryIdToName: d, convertCategoryNameToId: g } = he({
|
|
457
457
|
menuItems: j(() => a.menuItems || []),
|
|
458
458
|
categories: j(() => a.categories || [])
|
|
459
|
-
}),
|
|
459
|
+
}), I = A(
|
|
460
460
|
ee(a.linkItemRules)
|
|
461
461
|
), f = A();
|
|
462
462
|
function o() {
|
|
463
463
|
var t;
|
|
464
|
-
return (t =
|
|
464
|
+
return (t = I.value) == null ? void 0 : t.map((l) => {
|
|
465
465
|
var e, G, H, Q;
|
|
466
466
|
return {
|
|
467
467
|
...l,
|
|
@@ -497,7 +497,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
497
497
|
const n = _e(
|
|
498
498
|
() => {
|
|
499
499
|
const t = s() ?? null;
|
|
500
|
-
return !ie.isEqual(
|
|
500
|
+
return !ie.isEqual(w(a.initialValue), V.value) || !ie.isEqual(a.linkItemRules, t);
|
|
501
501
|
},
|
|
502
502
|
() => {
|
|
503
503
|
b.value = !1;
|
|
@@ -509,13 +509,13 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
509
509
|
linkItemRules: s() ?? []
|
|
510
510
|
}) : L("submit", {
|
|
511
511
|
mode: D.Normal,
|
|
512
|
-
items:
|
|
512
|
+
items: Y.value
|
|
513
513
|
}), b.value = !1;
|
|
514
514
|
}
|
|
515
515
|
re(
|
|
516
516
|
() => b.value,
|
|
517
517
|
() => {
|
|
518
|
-
V.value =
|
|
518
|
+
V.value = w(ee(a.initialValue)), I.value = ee(a.linkItemRules), f.value = o(), r.value = null, c.value = !1, $.value = a.noScheduler && a.linkItemRules && a.linkItemRules.length > 0 ? D.Rules : D.Normal;
|
|
519
519
|
}
|
|
520
520
|
);
|
|
521
521
|
const r = A(null), c = A(!1), k = () => {
|
|
@@ -569,7 +569,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
569
569
|
"onOn:clickedAway": u(n)
|
|
570
570
|
}, {
|
|
571
571
|
"side-sheet-header": M(() => [
|
|
572
|
-
t.useCloseBtn ?
|
|
572
|
+
t.useCloseBtn ? J("", !0) : (i(), T(e, {
|
|
573
573
|
key: 0,
|
|
574
574
|
variant: u(Z).Tertiary,
|
|
575
575
|
class: "cursor-pointer mr-4",
|
|
@@ -585,7 +585,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
585
585
|
"onUpdate:modelValue": l[0] || (l[0] = (B) => q(B ? u(D).Rules : u(D).Normal))
|
|
586
586
|
}, null, 8, ["label", "model-value"])
|
|
587
587
|
])
|
|
588
|
-
])) :
|
|
588
|
+
])) : J("", !0)
|
|
589
589
|
]),
|
|
590
590
|
"side-sheet-footer": M(() => [
|
|
591
591
|
F("div", Qe, [
|
|
@@ -614,7 +614,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
614
614
|
"categorized-items": t.categorizedItems,
|
|
615
615
|
data: V.value,
|
|
616
616
|
"select-variant": t.selectVariant,
|
|
617
|
-
"selected-items":
|
|
617
|
+
"selected-items": Y.value,
|
|
618
618
|
"show-variant": t.showVariant,
|
|
619
619
|
"show-addon": t.showAddon,
|
|
620
620
|
"onUpdate:data": l[1] || (l[1] = (B) => V.value = B)
|
|
@@ -650,7 +650,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
650
650
|
];
|
|
651
651
|
}),
|
|
652
652
|
_: 1
|
|
653
|
-
})) :
|
|
653
|
+
})) : J("", !0),
|
|
654
654
|
(i(!0), R(z, null, X(f.value, (B, K) => (i(), R(z, { key: K }, [
|
|
655
655
|
F("div", ze, [
|
|
656
656
|
F("span", Pe, E(u(v)("menu.rule_groups.condition_view.and")), 1),
|
|
@@ -664,14 +664,14 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
664
664
|
]),
|
|
665
665
|
f.value && f.value.length > 1 && K < f.value.length - 1 ? (i(), R("div", We, [
|
|
666
666
|
F("span", He, E(u(v)("menu.rule_groups.condition_view.or")), 1)
|
|
667
|
-
])) :
|
|
667
|
+
])) : J("", !0)
|
|
668
668
|
], 64))), 128)),
|
|
669
669
|
y(e, {
|
|
670
670
|
label: u(v)("menu.link_product.rules.add_rule"),
|
|
671
671
|
onClick: k
|
|
672
672
|
}, null, 8, ["label"])
|
|
673
673
|
]))
|
|
674
|
-
], 64)) :
|
|
674
|
+
], 64)) : J("", !0)
|
|
675
675
|
]))
|
|
676
676
|
]),
|
|
677
677
|
_: 1
|
|
@@ -679,7 +679,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
679
679
|
], 64);
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
|
-
}), at = /* @__PURE__ */ ce(
|
|
682
|
+
}), at = /* @__PURE__ */ ce(Je, [["__scopeId", "data-v-60163177"]]);
|
|
683
683
|
export {
|
|
684
684
|
Fe as H,
|
|
685
685
|
at as L,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as X, ref as C, computed as $, watch as j, resolveComponent as g, createBlock as L, openBlock as d, unref as t, withCtx as y, createElementVNode as r, createVNode as u, createElementBlock as h, Fragment as q, renderList as Y, createCommentVNode as
|
|
2
|
-
import { u as Z,
|
|
1
|
+
import { defineComponent as X, ref as C, computed as $, watch as j, resolveComponent as g, createBlock as L, openBlock as d, unref as t, withCtx as y, createElementVNode as r, createVNode as u, createElementBlock as h, Fragment as q, renderList as Y, createCommentVNode as B, toDisplayString as A, withModifiers as oe } from "vue";
|
|
2
|
+
import { u as Z, J as K, a4 as ae, G as ne, B as re, I as le } from "./index.vue_vue_type_script_setup_true_lang-YXKayPEp.js";
|
|
3
3
|
import { useI18n as ee, useCoreStore as ie } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as te, FmButtonVariant as N, useDialog as ce, useSnackbar as ue, useBreakpoints as me, FmButtonColorThemeVariant as W } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as de, m as E, _ as Q, b as pe, c as _e, f as P } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as se } from "./app-
|
|
5
|
+
import { u as de, m as E, _ as Q, b as pe, c as _e, f as P } from "./RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js";
|
|
6
|
+
import { _ as se } from "./app-CfCYl2pO.js";
|
|
7
7
|
import { u as ve } from "./discardConfirm-BHni0LNu.js";
|
|
8
8
|
import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
9
|
-
import { C as
|
|
10
|
-
import { u as ge } from "./priceTier-
|
|
9
|
+
import { C as z, a as M } from "./catalogSetting-qS5Np22q.js";
|
|
10
|
+
import { u as ge } from "./priceTier-B-Qa0xaO.js";
|
|
11
11
|
const be = {
|
|
12
12
|
class: "fm-typo-en-title-md-600 mr-auto"
|
|
13
13
|
}, ye = {
|
|
@@ -34,10 +34,10 @@ const be = {
|
|
|
34
34
|
editingGroup: {}
|
|
35
35
|
},
|
|
36
36
|
emits: ["update:modelValue", "submit"],
|
|
37
|
-
setup(
|
|
37
|
+
setup(J, {
|
|
38
38
|
emit: n
|
|
39
39
|
}) {
|
|
40
|
-
const x =
|
|
40
|
+
const x = J, G = n, {
|
|
41
41
|
t: i
|
|
42
42
|
} = ee(), T = Z(), l = C({
|
|
43
43
|
name: "",
|
|
@@ -119,7 +119,7 @@ const be = {
|
|
|
119
119
|
function D(s) {
|
|
120
120
|
l.value.rules = l.value.rules.filter((e) => e._id !== s);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function I() {
|
|
123
123
|
m.value = !1;
|
|
124
124
|
}
|
|
125
125
|
const v = ve(() => !K.isEqual(V.value, l.value), () => {
|
|
@@ -159,7 +159,7 @@ const be = {
|
|
|
159
159
|
label: t(i)("common.cancel"),
|
|
160
160
|
size: "lg",
|
|
161
161
|
variant: "tertiary",
|
|
162
|
-
onClick:
|
|
162
|
+
onClick: I
|
|
163
163
|
}, null, 8, ["label"])])]),
|
|
164
164
|
default: y(() => [r("div", ye, [u(Q, {
|
|
165
165
|
title: t(i)("menu.rule_groups.form.basic_info")
|
|
@@ -193,14 +193,14 @@ const be = {
|
|
|
193
193
|
}, {
|
|
194
194
|
default: y(() => [l.value.rules.length > 0 ? (d(!0), h(q, {
|
|
195
195
|
key: 0
|
|
196
|
-
}, Y(l.value.rules, (o,
|
|
197
|
-
key:
|
|
196
|
+
}, Y(l.value.rules, (o, O) => (d(), h(q, {
|
|
197
|
+
key: O
|
|
198
198
|
}, [r("div", xe, [r("div", ke, [u(pe, {
|
|
199
199
|
"model-value": o,
|
|
200
|
-
title: `${t(i)("menu.rule_groups.condition_view.rule")} ${
|
|
201
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
202
|
-
onDeleteRule: e[4] || (e[4] = (
|
|
203
|
-
}, null, 8, ["model-value", "title"])])]), l.value.rules.length > 1 &&
|
|
200
|
+
title: `${t(i)("menu.rule_groups.condition_view.rule")} ${O + 1}`,
|
|
201
|
+
"onUpdate:modelValue": e[3] || (e[3] = (H) => c(H)),
|
|
202
|
+
onDeleteRule: e[4] || (e[4] = (H) => D(H))
|
|
203
|
+
}, null, 8, ["model-value", "title"])])]), l.value.rules.length > 1 && O < l.value.rules.length - 1 ? (d(), h("div", Se, [r("span", we, A(t(i)("menu.rule_groups.condition_view.or")), 1)])) : B("", !0)], 64))), 128)) : (d(), L(ae, {
|
|
204
204
|
key: 1,
|
|
205
205
|
title: "",
|
|
206
206
|
subtitle: t(i)("menu.rule_groups.condition_view.empty_data.no_rule_available"),
|
|
@@ -226,7 +226,7 @@ const be = {
|
|
|
226
226
|
label: t(i)("menu.link_product.rules.add_rule"),
|
|
227
227
|
"prepend-icon": "add",
|
|
228
228
|
onClick: oe(o, ["stop"])
|
|
229
|
-
}, null, 8, ["variant", "label", "onClick"])) :
|
|
229
|
+
}, null, 8, ["variant", "label", "onClick"])) : B("", !0)]),
|
|
230
230
|
_: 1
|
|
231
231
|
}, 8, ["model-value"])])]),
|
|
232
232
|
_: 1
|
|
@@ -253,22 +253,22 @@ const be = {
|
|
|
253
253
|
}, Ue = {
|
|
254
254
|
key: 1,
|
|
255
255
|
class: "flex-1 flex flex-col min-h-0"
|
|
256
|
-
},
|
|
256
|
+
}, Ie = {
|
|
257
257
|
class: "flex items-center justify-between p-8"
|
|
258
|
-
},
|
|
258
|
+
}, Me = {
|
|
259
259
|
class: "flex-1 mr-8"
|
|
260
|
-
},
|
|
260
|
+
}, Be = {
|
|
261
261
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
262
262
|
}, Ne = ["onClick"], De = {
|
|
263
263
|
class: "flex-1 space-y-4"
|
|
264
|
-
}, ze = {
|
|
265
|
-
class: "fm-typo-en-body-lg-600"
|
|
266
264
|
}, Oe = {
|
|
265
|
+
class: "fm-typo-en-body-lg-600"
|
|
266
|
+
}, ze = {
|
|
267
267
|
key: 0,
|
|
268
268
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
269
269
|
}, Le = /* @__PURE__ */ X({
|
|
270
270
|
__name: "LinkProductRuleGroups",
|
|
271
|
-
setup(
|
|
271
|
+
setup(J) {
|
|
272
272
|
const {
|
|
273
273
|
t: n
|
|
274
274
|
} = ee(), x = ce(), G = ue(), i = ne(G), T = Z(), l = C(T.state.menu.ruleGroupSettings || {
|
|
@@ -306,7 +306,7 @@ const be = {
|
|
|
306
306
|
function D(e) {
|
|
307
307
|
v(e.original);
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function I() {
|
|
310
310
|
R.value = null, b.value = !0;
|
|
311
311
|
}
|
|
312
312
|
function v(e) {
|
|
@@ -351,7 +351,7 @@ const be = {
|
|
|
351
351
|
e || (R.value = null);
|
|
352
352
|
}), (e, a) => {
|
|
353
353
|
const _ = g("FmButton"), k = g("FmSearch"), F = g("FmTable");
|
|
354
|
-
return d(), h("div", null, [V.value ? (d(), h("div", Ue, [r("div",
|
|
354
|
+
return d(), h("div", null, [V.value ? (d(), h("div", Ue, [r("div", Ie, [r("div", Me, [u(k, {
|
|
355
355
|
modelValue: S.value,
|
|
356
356
|
"onUpdate:modelValue": a[1] || (a[1] = (f) => S.value = f),
|
|
357
357
|
autofocus: "",
|
|
@@ -360,12 +360,12 @@ const be = {
|
|
|
360
360
|
}, null, 8, ["modelValue", "placeholder"])]), u(_, {
|
|
361
361
|
icon: "add",
|
|
362
362
|
variant: t(N).Secondary,
|
|
363
|
-
onClick:
|
|
364
|
-
}, null, 8, ["variant"])]), r("div",
|
|
363
|
+
onClick: I
|
|
364
|
+
}, null, 8, ["variant"])]), r("div", Be, [(d(!0), h(q, null, Y(U.value, (f) => (d(), h("div", {
|
|
365
365
|
key: f._id,
|
|
366
366
|
class: "flex flex-row py-12 px-16 cursor-pointer",
|
|
367
367
|
onClick: (o) => v(f)
|
|
368
|
-
}, [r("div", De, [r("p",
|
|
368
|
+
}, [r("div", De, [r("p", Oe, A(f.name), 1), f.description ? (d(), h("p", ze, A(f.description), 1)) : B("", !0)]), u(_, {
|
|
369
369
|
"text-color": t(W).NeutralGray400,
|
|
370
370
|
variant: t(N).Tertiary,
|
|
371
371
|
icon: "delete",
|
|
@@ -373,7 +373,7 @@ const be = {
|
|
|
373
373
|
}, null, 8, ["text-color", "variant", "onClick"])], 8, Ne))), 128))])])) : (d(), h("div", Re, [r("div", Ve, [r("div", null, [r("h1", Fe, A(t(n)("menu.rule_groups.title")), 1), r("p", Ae, A(t(n)("menu.rule_groups.description")), 1)]), u(_, {
|
|
374
374
|
label: t(n)("menu.rule_groups.create_group"),
|
|
375
375
|
icon: "add",
|
|
376
|
-
onClick:
|
|
376
|
+
onClick: I
|
|
377
377
|
}, null, 8, ["label"])]), r("div", $e, [r("div", Ge, [u(k, {
|
|
378
378
|
modelValue: S.value,
|
|
379
379
|
"onUpdate:modelValue": a[0] || (a[0] = (f) => S.value = f),
|
|
@@ -411,16 +411,16 @@ const be = {
|
|
|
411
411
|
class: "space-y-8"
|
|
412
412
|
}, Qe = {
|
|
413
413
|
class: "flex items-center justify-between"
|
|
414
|
-
}, He = {
|
|
415
|
-
class: "fm-typo-en-title-md-600"
|
|
416
414
|
}, Je = {
|
|
415
|
+
class: "fm-typo-en-title-md-600"
|
|
416
|
+
}, He = {
|
|
417
417
|
class: "text-fm-color-typo-secondary"
|
|
418
418
|
}, We = {
|
|
419
419
|
key: 2
|
|
420
420
|
}, at = /* @__PURE__ */ X({
|
|
421
421
|
__name: "MenuSetting",
|
|
422
|
-
setup(
|
|
423
|
-
var
|
|
422
|
+
setup(J) {
|
|
423
|
+
var I;
|
|
424
424
|
const {
|
|
425
425
|
t: n
|
|
426
426
|
} = ee(), x = Z(), G = ie(), i = ue(), T = ne(i), l = $(() => ({
|
|
@@ -436,14 +436,14 @@ const be = {
|
|
|
436
436
|
}, {
|
|
437
437
|
label: n("menu.menu_setting.tabs.link_product_rule_groups"),
|
|
438
438
|
value: "link-product-rule-groups"
|
|
439
|
-
}] : []]), m = C(
|
|
439
|
+
}] : []]), m = C(z.transformTax((I = l.value.taxSetting) == null ? void 0 : I.inclusiveTaxes));
|
|
440
440
|
j(() => l.value, (v) => {
|
|
441
441
|
var c;
|
|
442
|
-
m.value =
|
|
442
|
+
m.value = z.transformTax((c = v.taxSetting) == null ? void 0 : c.inclusiveTaxes);
|
|
443
443
|
});
|
|
444
444
|
const V = $(() => {
|
|
445
445
|
if (!G.currentCountry.value) return [];
|
|
446
|
-
const v = m.value.mode ===
|
|
446
|
+
const v = m.value.mode === M.MANUAL ? m.value.inclusive ?? [] : [];
|
|
447
447
|
return re.Country.getCountry(G.currentCountry.value).taxSystems.map((p) => {
|
|
448
448
|
const s = v.find((e) => e.systemCode === p.code);
|
|
449
449
|
return {
|
|
@@ -453,7 +453,7 @@ const be = {
|
|
|
453
453
|
});
|
|
454
454
|
});
|
|
455
455
|
function S(v) {
|
|
456
|
-
const c = m.value, p = c.mode ===
|
|
456
|
+
const c = m.value, p = c.mode === M.AUTO ? z.manualTax(V.value) : le(c);
|
|
457
457
|
p.inclusive ?? (p.inclusive = []);
|
|
458
458
|
const s = p.inclusive.findIndex((e) => e.systemCode === v.systemCode);
|
|
459
459
|
s < 0 ? p.inclusive.push(v) : p.inclusive.splice(s, 1, v), m.value = p;
|
|
@@ -461,7 +461,7 @@ const be = {
|
|
|
461
461
|
async function U() {
|
|
462
462
|
if (l.value.lowStock !== null && l.value.lowStock !== void 0 && !Number.isInteger(l.value.lowStock))
|
|
463
463
|
return;
|
|
464
|
-
const v = m.value.mode ===
|
|
464
|
+
const v = m.value.mode === M.AUTO ? null : le(m.value.inclusive);
|
|
465
465
|
await T.minor(async () => {
|
|
466
466
|
const c = l.value.lowStock === null || l.value.lowStock === void 0 || l.value.lowStock === 0;
|
|
467
467
|
await x.updateMenuSetting({
|
|
@@ -509,31 +509,31 @@ const be = {
|
|
|
509
509
|
default: y(() => [u(e, {
|
|
510
510
|
"model-value": m.value.mode,
|
|
511
511
|
"onUpdate:modelValue": c[1] || (c[1] = (o) => {
|
|
512
|
-
o === t(
|
|
512
|
+
o === t(M).AUTO ? m.value = t(z).autoTax() : m.value = t(z).manualTax(V.value);
|
|
513
513
|
})
|
|
514
514
|
}, {
|
|
515
515
|
default: y(() => [u(s, {
|
|
516
|
-
value: t(
|
|
516
|
+
value: t(M).AUTO,
|
|
517
517
|
label: t(n)("menu.setting.tax.modes.auto.label"),
|
|
518
518
|
sublabel: t(n)("menu.setting.tax.modes.auto.sublabel")
|
|
519
519
|
}, null, 8, ["value", "label", "sublabel"]), u(s, {
|
|
520
|
-
value: t(
|
|
520
|
+
value: t(M).MANUAL,
|
|
521
521
|
label: t(n)("menu.setting.tax.modes.manual.label"),
|
|
522
522
|
sublabel: t(n)("menu.setting.tax.modes.manual.sublabel")
|
|
523
523
|
}, null, 8, ["value", "label", "sublabel"])]),
|
|
524
524
|
_: 1
|
|
525
|
-
}, 8, ["model-value"]), m.value.mode === t(
|
|
525
|
+
}, 8, ["model-value"]), m.value.mode === t(M).MANUAL ? (d(), h("div", Pe, [(d(!0), h(q, null, Y(V.value, (o) => (d(), L(a, {
|
|
526
526
|
key: o.systemCode,
|
|
527
527
|
"model-value": o.inclusive,
|
|
528
528
|
value: !0,
|
|
529
529
|
label: o.systemCode + " inclusive",
|
|
530
|
-
"onUpdate:modelValue": (
|
|
530
|
+
"onUpdate:modelValue": (O) => {
|
|
531
531
|
S({
|
|
532
532
|
...o,
|
|
533
|
-
inclusive:
|
|
533
|
+
inclusive: O
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
|
-
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) :
|
|
536
|
+
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) : B("", !0)]),
|
|
537
537
|
_: 1
|
|
538
538
|
}, 8, ["label"])]),
|
|
539
539
|
_: 1
|
|
@@ -557,7 +557,7 @@ const be = {
|
|
|
557
557
|
}, 8, ["title", "sub-title"]), u(F, {
|
|
558
558
|
onClick: U,
|
|
559
559
|
label: t(n)("common.save")
|
|
560
|
-
}, null, 8, ["label"])])) :
|
|
560
|
+
}, null, 8, ["label"])])) : B("", !0), b.value === "price-group" ? (d(), h("div", qe, [r("div", Ke, [r("div", Qe, [r("div", null, [r("h1", Je, A(t(n)("menu.price_tier.price_group")), 1), r("p", He, A(t(n)("menu.price_tier.description")), 1)]), u(F, {
|
|
561
561
|
label: t(n)("menu.price_tier.add_price_group"),
|
|
562
562
|
icon: "add",
|
|
563
563
|
onClick: t(w).create
|
|
@@ -569,7 +569,7 @@ const be = {
|
|
|
569
569
|
"hide-footer": !0
|
|
570
570
|
}, null, 8, ["row-data", "page-size"])]),
|
|
571
571
|
_: 1
|
|
572
|
-
})])])) :
|
|
572
|
+
})])])) : B("", !0), b.value === "link-product-rule-groups" ? (d(), h("div", We, [u(Le)])) : B("", !0)])]),
|
|
573
573
|
_: 1
|
|
574
574
|
}, 8, ["heading"]);
|
|
575
575
|
};
|