@feedmepos/mf-inventory-portal 1.4.3 → 1.4.4-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-_rrlFpzI.js +309 -0
- package/dist/{ApprovalView-CNOCl4mX.js → ApprovalView-BA13wbQ-.js} +7 -7
- package/dist/{BindingsDialog-B0PgB4Cs.js → BindingsDialog-DMzMv881.js} +2 -2
- package/dist/{BindingsPicker--W9Eg5Ap.js → BindingsPicker-BGxYZDn_.js} +2 -2
- package/dist/{BindingsTable-C-agzjic.js → BindingsTable-D7I6KyIQ.js} +3 -3
- package/dist/ClosingDraftView-osqh-QJ1.js +3649 -0
- package/dist/{ClosingHistoryView-BPeGKSEh.js → ClosingHistoryView-DQoNfb5z.js} +5 -5
- package/dist/{ClosingTemplateView-BVx5h0F7.js → ClosingTemplateView-Ckq2Veyq.js} +14 -14
- package/dist/{DefaultView-0FZ3OQLU.js → DefaultView-BYIk34PR.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-CMOkyuzi.js → DeliveryOrderPrintPreview-BgHL-gvt.js} +2 -2
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ClftSLje.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-yqA2fgtH.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BxMcG0Ax.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Bvma2A4K.js} +2 -2
- package/dist/{FmMultiselectDialog-C3-00IIX.js → FmMultiselectDialog-BmTCvmlw.js} +2 -2
- package/dist/{FmMultiselectDialog-Ss9rWtos.js → FmMultiselectDialog-VPcV-FQV.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CE3Jpoeq.js → FmUnitInput.vue_vue_type_script_setup_true_lang-7dkCTYcT.js} +4 -4
- package/dist/{ImportView-DJEMtxVs.js → ImportView-gzF9CWtM.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-aj9zLCzH.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BJKxFdjv.js} +1 -1
- package/dist/{IngredientGroupView-BKhIGbN6.js → IngredientGroupView-DkoVLdIi.js} +5 -5
- package/dist/{IngredientsView-C7EPODnW.js → IngredientsView-NBpaVLDo.js} +15 -15
- package/dist/{IntegrationExplorerView-bdLIvclu.js → IntegrationExplorerView-D4P5Sxcm.js} +5 -5
- package/dist/{IntegrationView-V-t6hU4q.js → IntegrationView-B5YN8TEE.js} +13 -13
- package/dist/{InventoryBindingForm-BVZO0vNV.js → InventoryBindingForm-B7VMypYy.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Db6IcYrc.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DziCetjY.js} +5 -5
- package/dist/{InventoryBindingSummary-B5KkO0uG.js → InventoryBindingSummary-B9Vy49tr.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DGcWZ2Ca.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DXbiPSqB.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Bwujn2QJ.js → PremiumBadge.vue_vue_type_script_setup_true_lang-7ikbnzXX.js} +1 -1
- package/dist/{PublishView-D0gsF5Ik.js → PublishView-BwmWveBB.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-CaXh0u7Y.js → PurchaseOrderPrintPreview-kajF_P0m.js} +2 -2
- package/dist/{ReceiveRequestView-dLszwsmy.js → ReceiveRequestView-DHYEENEf.js} +2286 -2286
- package/dist/{RecipeView-DuYfwAVT.js → RecipeView-BHwVXfLJ.js} +17 -17
- package/dist/{SettingsView-B5WiYgzQ.js → SettingsView-AdpIDPVs.js} +4 -4
- package/dist/{StockView-CMpwj3Uj.js → StockView-C5AtoijI.js} +19 -19
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DLgG9xtS.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B3az_NVO.js} +1 -1
- package/dist/{SupplierView-fNRDc_x_.js → SupplierView-D7Nr2RxT.js} +12 -12
- package/dist/{SurchargeView-BFNLXBhF.js → SurchargeView-vJimp1Cv.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-BZNp7tzb.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CinFL3QM.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-vS6YPslL.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D2SvRBN6.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CJsiG8_J.js → TransferDetails.vue_vue_type_script_setup_true_lang-DlEjTd8E.js} +20 -20
- package/dist/{TransferTemplateView-_FrgI8cM.js → TransferTemplateView-C6RmjS-v.js} +18 -18
- package/dist/{UnitCostHistoryView-CSpTcsy3.js → UnitCostHistoryView-aC4aPr3L.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-Gk2dEE02.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CuP7FMd1.js} +4 -4
- package/dist/{UnitView-CHszTLhJ.js → UnitView-BCGMlHCV.js} +7 -7
- package/dist/{WarehouseView-Blq5twXS.js → WarehouseView-O3gc_PiU.js} +5 -5
- package/dist/{WastageTemplateView-4vAEfwwh.js → WastageTemplateView-H9PA6ryl.js} +14 -14
- package/dist/api/sse.d.ts +3 -15
- package/dist/{app-CJCUyM2K.js → app-CItiJtFw.js} +13 -11
- package/dist/app.js +1 -1
- package/dist/{closing-template-DYPYr0fP.js → closing-template-Cwj3O7Lm.js} +1 -1
- package/dist/composable/useSseClient.d.ts +5 -4
- package/dist/{date2-B5vQOHhT.js → date2-D00juOhc.js} +1 -1
- package/dist/{dayjs.min-BGPpM-Nq.js → dayjs.min-DmEufB_X.js} +1 -1
- package/dist/{decimal-BICfAJQ3.js → decimal-Cfx4iNIN.js} +2 -2
- package/dist/{defineDeepModel-ChRv0GuO.js → defineDeepModel-Dn4pcA76.js} +1 -1
- package/dist/{duplicate-template-CLQGD4uE.js → duplicate-template-3GCMrDdJ.js} +1 -1
- package/dist/{export-Cl8-8sZB.js → export-Taxbki8U.js} +2 -2
- package/dist/{feature-BLDH9AEJ.js → feature-CWFT4m6D.js} +2 -2
- package/dist/{format-time-from-id-C6M0NTzd.js → format-time-from-id-DBU5YJL6.js} +1 -1
- package/dist/{format-unit-display-Dzn7Uc85.js → format-unit-display-Bcg7Sa60.js} +11 -11
- package/dist/{import-export.helper-B7-eCQI0.js → import-export.helper-DDM-pvFO.js} +6 -6
- package/dist/{index-B3sbJhqm.js → index-BMhosF1x.js} +3 -3
- package/dist/{index-Bm8HK6qv.js → index-DHnHIq4-.js} +1 -1
- package/dist/{index-CvZh88Lj.js → index-DK0BNrfa.js} +1 -1
- package/dist/{inventory-core-dart.default-Du_WwCCt.js → inventory-core-dart.default-B8aW6vKZ.js} +1 -1
- package/dist/{lodash-B6H4w0jG.js → lodash-raCw-gUe.js} +1 -1
- package/dist/{lz-string-CeVsQ_dU.js → lz-string-eBAqN_g9.js} +1 -1
- package/dist/{netsuite-ZVGNSjFa.js → netsuite-uRj2P-EH.js} +5 -6
- package/dist/{number-D-VYMb74.js → number-C9o5tPfP.js} +3 -3
- package/dist/{predefined-templates-ZgvhYORs.js → predefined-templates-YPJMW8GJ.js} +1 -1
- package/dist/{purchase-order-template-C5zKJ9Bc.js → purchase-order-template-B6aV2vdS.js} +1 -1
- package/dist/{recalculationUtils-D4T00HaY.js → recalculationUtils-BiZ-pU6y.js} +1 -1
- package/dist/{rules-F6nkVow_.js → rules-01UCJome.js} +2 -2
- package/dist/{stock-blbdqBxF.js → stock-DTp9AhdZ.js} +1 -1
- package/dist/{stock-C-h8RIJ_.js → stock-SuApOj2U.js} +3 -3
- package/dist/{supplier-CNTidb3t.js → supplier-D60bDAuZ.js} +2 -2
- package/dist/{surcharge-Cjv4kJAG.js → surcharge-BWwSWZ1U.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-B_NCYB_x.js → use-ingredient-select-dialog-B4zci6JI.js} +2 -2
- package/dist/{use-inventory-binding-dialog-BGpapCGC.js → use-inventory-binding-dialog-CgSz72ZS.js} +2 -2
- package/dist/{use-template-enabled-locations-CZyjUoRM.js → use-template-enabled-locations-DVLHfYM9.js} +2 -2
- package/dist/{use-transfer-locations-CfrPp0HG.js → use-transfer-locations-POSn3UDi.js} +2 -2
- package/dist/{useHrmPermission-8emm2QNi.js → useHrmPermission-B9ffPr7i.js} +1 -1
- package/dist/{useNavigationMenu-B2X2yYsh.js → useNavigationMenu-dJYOEiud.js} +2 -2
- package/dist/{vue-i18n-CeMrtkEZ.js → vue-i18n-CqFS0F9S.js} +389 -389
- package/dist/{xlsx-DcqQqpKu.js → xlsx-BY0_-lpm.js} +184 -184
- package/dist/{xlsx.util-DeMt7xsj.js → xlsx.util-DR3_mTtm.js} +3 -3
- package/package.json +3 -3
- package/dist/App-DLieHoJM.js +0 -310
- package/dist/ClosingDraftView-DDp3CtNn.js +0 -3183
- package/dist/useSseClient-DDjyQANd.js +0 -502
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u, a as d, r as p } from "./xlsx-
|
|
2
|
-
import "./dayjs.min-
|
|
3
|
-
import "./app-
|
|
1
|
+
import { u, a as d, r as p } from "./xlsx-BY0_-lpm.js";
|
|
2
|
+
import "./dayjs.min-DmEufB_X.js";
|
|
3
|
+
import "./app-CItiJtFw.js";
|
|
4
4
|
function* x(e) {
|
|
5
5
|
const [t, o] = e.split(":"), n = /\d+/, r = n.exec(t), a = n.exec(o);
|
|
6
6
|
if (!r || !a)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-inventory-portal",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4-dev.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"vue-i18n": "^10.0.5",
|
|
52
52
|
"vue-router": "^4.4.0",
|
|
53
53
|
"xlsx": "^0.18.5",
|
|
54
|
-
"@feedmepos/inventory-core-2": "^2.0.0",
|
|
55
54
|
"@feedmepos/inventory-core": "^1.0.2-dev.4",
|
|
56
|
-
"@feedmepos/inventory-core-
|
|
55
|
+
"@feedmepos/inventory-core-2": "^2.0.0",
|
|
57
56
|
"@feedmepos/inventory-core-js": "^1.0.1",
|
|
57
|
+
"@feedmepos/inventory-core-dart": "^1.0.0",
|
|
58
58
|
"@feedmepos/netsuite-core": "^1.0.0",
|
|
59
59
|
"@feedmepos/zod-inventory": "^2.0.0"
|
|
60
60
|
},
|
package/dist/App-DLieHoJM.js
DELETED
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import { ref as k, onUnmounted as O, computed as y, defineComponent as N, watch as P, onMounted as $, resolveComponent as h, openBlock as m, createElementBlock as g, unref as x, createVNode as _, createElementVNode as n, toDisplayString as b, createBlock as A, createCommentVNode as U, withCtx as R, withDirectives as j, vModelText as q, Fragment as z, renderList as K, createTextVNode as B } from "vue";
|
|
2
|
-
import { _ as Q } from "./empty-placeholder-B0QU467o.js";
|
|
3
|
-
import { u as J, a as W, R as w, b as X } from "./app-CJCUyM2K.js";
|
|
4
|
-
import { useCoreStore as T, useI18n as Y } from "@feedmepos/mf-common";
|
|
5
|
-
import { useRouter as V, useRoute as Z } from "vue-router";
|
|
6
|
-
import { u as ee, a as te, I as ne } from "./feature-BLDH9AEJ.js";
|
|
7
|
-
import { u as oe } from "./netsuite-ZVGNSjFa.js";
|
|
8
|
-
import { u as D } from "./useNavigationMenu-B2X2yYsh.js";
|
|
9
|
-
import { u as se } from "./useSseClient-DDjyQANd.js";
|
|
10
|
-
import { u as re } from "./useTabStorage-BkIVScW_.js";
|
|
11
|
-
import { F as ae } from "./FmAdminBadge-DjnBAgyv.js";
|
|
12
|
-
import { u as le } from "./googlemap-BGi_aKUA.js";
|
|
13
|
-
function ie() {
|
|
14
|
-
return {
|
|
15
|
-
loadingHookInstalled: !1,
|
|
16
|
-
isLoading: !1
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
const F = k(ie());
|
|
20
|
-
function ue() {
|
|
21
|
-
const p = V();
|
|
22
|
-
if (!F.value.loadingHookInstalled) {
|
|
23
|
-
F.value.loadingHookInstalled = !0;
|
|
24
|
-
const t = p.beforeEach(() => {
|
|
25
|
-
F.value.isLoading = !0;
|
|
26
|
-
}), u = p.afterEach(() => {
|
|
27
|
-
F.value.isLoading = !1;
|
|
28
|
-
});
|
|
29
|
-
O(() => {
|
|
30
|
-
F.value.loadingHookInstalled = !1, t(), u();
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
get isLoading() {
|
|
35
|
-
return F.value.isLoading;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function ce() {
|
|
40
|
-
const { firstAccessibleRouteName: p } = D();
|
|
41
|
-
return { hasAnyAccessibleInventoryRoute: y(() => p.value !== null) };
|
|
42
|
-
}
|
|
43
|
-
const de = {
|
|
44
|
-
key: 0,
|
|
45
|
-
class: "flex flex-col items-center w-full h-full gap-24"
|
|
46
|
-
}, me = {
|
|
47
|
-
key: 1,
|
|
48
|
-
class: "flex flex-col pt-[200px] gap-32 items-center"
|
|
49
|
-
}, pe = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, fe = { class: "fm-typo-en-title-lg-600" }, ve = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, ge = {
|
|
50
|
-
key: 2,
|
|
51
|
-
class: "flex flex-col pt-[200px] gap-32 items-center"
|
|
52
|
-
}, _e = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, ye = { class: "fm-typo-en-title-lg-600" }, xe = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, be = { class: "flex gap-16" }, he = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, we = { href: "https://feedme.ai/form" }, Se = /* @__PURE__ */ N({
|
|
53
|
-
__name: "InventoryView",
|
|
54
|
-
setup(p) {
|
|
55
|
-
const t = J(), u = W(), i = oe(), a = T(), c = V(), l = ue(), e = ee(), f = se(), { t: s } = Y(), { hasAnyAccessibleInventoryRoute: r } = ce();
|
|
56
|
-
P(
|
|
57
|
-
[() => a.sessionUser.value, () => a.currentBusiness.value],
|
|
58
|
-
([v, d]) => {
|
|
59
|
-
o(v, d);
|
|
60
|
-
}
|
|
61
|
-
), $(async () => {
|
|
62
|
-
await e.init(), await a.readBusinesses();
|
|
63
|
-
const v = a.sessionUser.value, d = a.currentBusiness.value;
|
|
64
|
-
o(v, d);
|
|
65
|
-
});
|
|
66
|
-
function o(v, d) {
|
|
67
|
-
!v || !d || (f.start(), C());
|
|
68
|
-
}
|
|
69
|
-
async function C() {
|
|
70
|
-
return await t.init(), await i.readSetting().catch((v) => {
|
|
71
|
-
console.error("[all] error on reading netsuite store", v);
|
|
72
|
-
}), await u.init();
|
|
73
|
-
}
|
|
74
|
-
const E = y(() => c.currentRoute.value.name === w.TRANSFER_TEMPLATE ? e.enablePoTemplate : c.currentRoute.value.name === w.INGREDIENT_GROUP ? e.enableIngredientGroup : !0), G = y(
|
|
75
|
-
() => c.currentRoute.value.matched.some((v) => {
|
|
76
|
-
var I;
|
|
77
|
-
const d = v.meta, S = d == null ? void 0 : d.validationManifest;
|
|
78
|
-
return (((I = S == null ? void 0 : S.requiredCaslPermissions) == null ? void 0 : I.length) ?? 0) > 0;
|
|
79
|
-
})
|
|
80
|
-
), M = y(() => {
|
|
81
|
-
if (!a.sessionUser.value || !e.isLoaded) return !1;
|
|
82
|
-
const v = c.currentRoute.value.name === w.LOADING;
|
|
83
|
-
return !r.value && (v || G.value);
|
|
84
|
-
});
|
|
85
|
-
return (v, d) => {
|
|
86
|
-
const S = h("FmSpacer"), I = h("FmCircularProgress"), L = h("FmButton"), H = h("RouterView");
|
|
87
|
-
return m(), g("div", null, [
|
|
88
|
-
x(l).isLoading ? (m(), g("div", de, [
|
|
89
|
-
_(S),
|
|
90
|
-
n("div", null, [
|
|
91
|
-
_(I, { size: "xl" })
|
|
92
|
-
]),
|
|
93
|
-
d[0] || (d[0] = n("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
|
|
94
|
-
_(S)
|
|
95
|
-
])) : M.value ? (m(), g("div", me, [
|
|
96
|
-
d[1] || (d[1] = n("img", {
|
|
97
|
-
src: Q,
|
|
98
|
-
alt: "No permission",
|
|
99
|
-
class: "w-[200px] h-[200px]"
|
|
100
|
-
}, null, -1)),
|
|
101
|
-
n("div", pe, [
|
|
102
|
-
n("div", fe, b(x(s)("inventory.common.noPermission.title")), 1),
|
|
103
|
-
n("div", ve, b(x(s)("inventory.common.noPermission.description")), 1)
|
|
104
|
-
])
|
|
105
|
-
])) : E.value ? x(a).sessionUser.value ? (m(), A(H, { key: 3 })) : U("", !0) : (m(), g("div", ge, [
|
|
106
|
-
n("div", _e, [
|
|
107
|
-
n("div", ye, b(x(s)("inventory.common.proPlan.title")), 1),
|
|
108
|
-
n("div", xe, b(x(s)("inventory.common.proPlan.subtitle")), 1)
|
|
109
|
-
]),
|
|
110
|
-
n("div", be, [
|
|
111
|
-
n("a", he, [
|
|
112
|
-
_(L, {
|
|
113
|
-
label: x(s)("inventory.common.proPlan.comparePlans"),
|
|
114
|
-
variant: "secondary"
|
|
115
|
-
}, null, 8, ["label"])
|
|
116
|
-
]),
|
|
117
|
-
n("a", we, [
|
|
118
|
-
_(L, {
|
|
119
|
-
label: x(s)("inventory.common.proPlan.callUs"),
|
|
120
|
-
"prepend-icon": "call"
|
|
121
|
-
}, null, 8, ["label"])
|
|
122
|
-
])
|
|
123
|
-
])
|
|
124
|
-
]))
|
|
125
|
-
]);
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
}), Fe = { class: "flex items-center gap-2" }, Re = { class: "text-xs text-gray-400 font-normal" }, Ie = { class: "flex flex-col gap-3" }, ke = { class: "max-h-[480px] flex flex-col gap-1" }, Pe = { class: "font-mono text-xs text-gray-700 break-all min-w-0" }, Ne = {
|
|
129
|
-
key: 0,
|
|
130
|
-
class: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 px-2 py-0.5 rounded-full"
|
|
131
|
-
}, Ce = {
|
|
132
|
-
key: 1,
|
|
133
|
-
class: "inline-flex items-center gap-1 text-xs font-medium text-red-700 bg-red-50 px-2 py-0.5 rounded-full"
|
|
134
|
-
}, Ee = {
|
|
135
|
-
key: 2,
|
|
136
|
-
class: "inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full"
|
|
137
|
-
}, Be = {
|
|
138
|
-
key: 0,
|
|
139
|
-
class: "text-center text-sm text-gray-400 py-4"
|
|
140
|
-
}, Ae = /* @__PURE__ */ N({
|
|
141
|
-
__name: "FmFeatureFlagDialog",
|
|
142
|
-
setup(p) {
|
|
143
|
-
const t = k(!1), u = k(""), i = y(() => {
|
|
144
|
-
const { getFlagValue: l } = te();
|
|
145
|
-
return Object.values(ne).map((e) => {
|
|
146
|
-
const f = l(e, (s) => s === "true");
|
|
147
|
-
return {
|
|
148
|
-
name: e,
|
|
149
|
-
enabled: f
|
|
150
|
-
};
|
|
151
|
-
});
|
|
152
|
-
}), a = y(() => {
|
|
153
|
-
const l = u.value.toLowerCase();
|
|
154
|
-
return l ? i.value.filter((e) => e.name.toLowerCase().includes(l)) : i.value;
|
|
155
|
-
}), c = y(() => {
|
|
156
|
-
const l = i.value.filter((s) => s.enabled === !0).length, e = i.value.filter((s) => s.enabled === !1).length, f = i.value.filter((s) => s.enabled === null).length;
|
|
157
|
-
return { enabled: l, disabled: e, unknown: f, total: i.value.length };
|
|
158
|
-
});
|
|
159
|
-
return (l, e) => {
|
|
160
|
-
const f = h("FmButton"), s = h("FmSpacer"), r = h("FmDialog");
|
|
161
|
-
return m(), A(r, {
|
|
162
|
-
modelValue: t.value,
|
|
163
|
-
"onUpdate:modelValue": e[2] || (e[2] = (o) => t.value = o),
|
|
164
|
-
overlay: !0
|
|
165
|
-
}, {
|
|
166
|
-
"dialog-button": R(() => [
|
|
167
|
-
_(ae, null, {
|
|
168
|
-
default: R(() => [
|
|
169
|
-
_(f, {
|
|
170
|
-
variant: "secondary",
|
|
171
|
-
label: "Feature flags"
|
|
172
|
-
})
|
|
173
|
-
]),
|
|
174
|
-
_: 1
|
|
175
|
-
})
|
|
176
|
-
]),
|
|
177
|
-
"dialog-header": R(() => [
|
|
178
|
-
n("div", Fe, [
|
|
179
|
-
e[3] || (e[3] = n("span", null, "Feature Flags", -1)),
|
|
180
|
-
n("span", Re, b(c.value.enabled) + " enabled · " + b(c.value.disabled) + " disabled · " + b(c.value.unknown) + " unknown ", 1)
|
|
181
|
-
])
|
|
182
|
-
]),
|
|
183
|
-
"dialog-footer": R(() => [
|
|
184
|
-
_(s, { class: "sm:hidden xs:hidden" }),
|
|
185
|
-
_(f, {
|
|
186
|
-
class: "sm:w-full xs:w-full",
|
|
187
|
-
label: "Close",
|
|
188
|
-
size: "md",
|
|
189
|
-
variant: "primary",
|
|
190
|
-
onClick: e[1] || (e[1] = (o) => t.value = !1)
|
|
191
|
-
})
|
|
192
|
-
]),
|
|
193
|
-
default: R(() => [
|
|
194
|
-
n("div", Ie, [
|
|
195
|
-
j(n("input", {
|
|
196
|
-
"onUpdate:modelValue": e[0] || (e[0] = (o) => u.value = o),
|
|
197
|
-
type: "text",
|
|
198
|
-
placeholder: "Search flags...",
|
|
199
|
-
class: "w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500"
|
|
200
|
-
}, null, 512), [
|
|
201
|
-
[q, u.value]
|
|
202
|
-
]),
|
|
203
|
-
n("div", ke, [
|
|
204
|
-
(m(!0), g(z, null, K(a.value, (o) => (m(), g("div", {
|
|
205
|
-
key: o.name,
|
|
206
|
-
class: "flex items-start justify-between gap-2 px-3 py-2 rounded-md hover:bg-gray-50 text-sm"
|
|
207
|
-
}, [
|
|
208
|
-
n("span", Pe, b(o.name), 1),
|
|
209
|
-
o.enabled === !0 ? (m(), g("span", Ne, e[4] || (e[4] = [
|
|
210
|
-
n("span", { class: "w-1.5 h-1.5 rounded-full bg-green-500" }, null, -1),
|
|
211
|
-
B(" Enabled ")
|
|
212
|
-
]))) : o.enabled === !1 ? (m(), g("span", Ce, e[5] || (e[5] = [
|
|
213
|
-
n("span", { class: "w-1.5 h-1.5 rounded-full bg-red-500" }, null, -1),
|
|
214
|
-
B(" Disabled ")
|
|
215
|
-
]))) : (m(), g("span", Ee, e[6] || (e[6] = [
|
|
216
|
-
n("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1),
|
|
217
|
-
B(" Unknown ")
|
|
218
|
-
])))
|
|
219
|
-
]))), 128)),
|
|
220
|
-
a.value.length === 0 ? (m(), g("div", Be, ' No flags matching "' + b(u.value) + '" ', 1)) : U("", !0)
|
|
221
|
-
])
|
|
222
|
-
])
|
|
223
|
-
]),
|
|
224
|
-
_: 1
|
|
225
|
-
}, 8, ["modelValue"]);
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
}), Te = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Ve = /* @__PURE__ */ N({
|
|
229
|
-
__name: "NavigationTab",
|
|
230
|
-
setup(p) {
|
|
231
|
-
const t = Z(), u = V(), i = T(), a = re(), { menuItems: c } = D();
|
|
232
|
-
P([() => i.currentBusiness.value, () => t.name], ([r, o]) => {
|
|
233
|
-
(r == null ? void 0 : r.menuVersion) === "v3" && (o === w.INGREDIENTS || o === w.RECIPE || o === w.UNIT) && u.push({ name: w.STOCK });
|
|
234
|
-
});
|
|
235
|
-
const l = y({
|
|
236
|
-
get() {
|
|
237
|
-
if (t.name)
|
|
238
|
-
return String(t.name);
|
|
239
|
-
},
|
|
240
|
-
set(r) {
|
|
241
|
-
r && u.push({ name: r });
|
|
242
|
-
}
|
|
243
|
-
}), e = y(
|
|
244
|
-
() => {
|
|
245
|
-
var r;
|
|
246
|
-
return `NavigationTab.${(r = i.currentBusiness.value) == null ? void 0 : r._id}`;
|
|
247
|
-
}
|
|
248
|
-
), f = k(!1), s = y({
|
|
249
|
-
get() {
|
|
250
|
-
return f.value;
|
|
251
|
-
},
|
|
252
|
-
set(r) {
|
|
253
|
-
f.value = r, r || a.setItem(e.value, "true");
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
return P([() => e.value], () => {
|
|
257
|
-
f.value = !1, setTimeout(() => {
|
|
258
|
-
s.value = !a.getItem(e.value);
|
|
259
|
-
}, 2e3);
|
|
260
|
-
}), (r, o) => {
|
|
261
|
-
const C = h("FmCollapsibleTabs");
|
|
262
|
-
return m(), g("div", Te, [
|
|
263
|
-
_(Ae),
|
|
264
|
-
_(C, {
|
|
265
|
-
modelValue: l.value,
|
|
266
|
-
"onUpdate:modelValue": o[0] || (o[0] = (E) => l.value = E),
|
|
267
|
-
items: x(c)
|
|
268
|
-
}, null, 8, ["modelValue", "items"])
|
|
269
|
-
]);
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
|
|
274
|
-
let p, t;
|
|
275
|
-
return { promise: new Promise((i, a) => {
|
|
276
|
-
p = i, t = a;
|
|
277
|
-
}), resolve: p, reject: t };
|
|
278
|
-
});
|
|
279
|
-
typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(p) {
|
|
280
|
-
return await new Promise((t) => setTimeout(t, p)), Promise.resolve(this);
|
|
281
|
-
});
|
|
282
|
-
const Qe = /* @__PURE__ */ N({
|
|
283
|
-
__name: "App",
|
|
284
|
-
setup(p) {
|
|
285
|
-
const t = T(), u = le(), i = X();
|
|
286
|
-
$(() => {
|
|
287
|
-
if (window.location.href.includes("print-preview")) {
|
|
288
|
-
t.setEmbedded(!0), document.body.classList.add("print-mode");
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
t.registerSidebarComponent(Ve), u.initGoogleMap(i.appApi.googleMap).catch(() => {
|
|
292
|
-
console.error("Google map cannot be loaded");
|
|
293
|
-
});
|
|
294
|
-
}), P([() => t.currentCountry.value], () => {
|
|
295
|
-
a();
|
|
296
|
-
});
|
|
297
|
-
async function a() {
|
|
298
|
-
var c;
|
|
299
|
-
try {
|
|
300
|
-
await t.readBusinesses(), t.currentBusiness.value = (c = t.businesses.value) == null ? void 0 : c.find((l) => l);
|
|
301
|
-
} catch (l) {
|
|
302
|
-
console.error("error when trying to reset businesses:", l);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
return (c, l) => (m(), A(Se));
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
export {
|
|
309
|
-
Qe as default
|
|
310
|
-
};
|