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