@feedmepos/mf-inventory-portal 1.3.13 → 1.3.14-dev.2
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-D1_jkD6L.js +309 -0
- package/dist/{ApprovalView-ClQU6bq0.js → ApprovalView-CfF2FqsE.js} +12 -12
- package/dist/{BindingsDialog--w8amPhB.js → BindingsDialog-H-juP-az.js} +13 -13
- package/dist/{BindingsPicker-CLZ2cy95.js → BindingsPicker-ClruHF7p.js} +2 -2
- package/dist/{BindingsTable-DMKnwFJt.js → BindingsTable-Bx9pbFOO.js} +3 -3
- package/dist/{ClosingDraftView-DOSvb2cx.js → ClosingDraftView-DN97Tao5.js} +15 -15
- package/dist/{ClosingHistoryView-Dbysx1Ca.js → ClosingHistoryView-DsRYUqa2.js} +5 -5
- package/dist/{ClosingTemplateView-kOWpFBhr.js → ClosingTemplateView-f9zfsxCu.js} +14 -14
- package/dist/DefaultView-COVVxOrF.js +31 -0
- package/dist/{DeliveryOrderPrintPreview-CTrf0b97.js → DeliveryOrderPrintPreview-BMK4kBCQ.js} +11 -11
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-HLHu23Ly.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bqj_Ygmo.js} +8 -8
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BTwfJTx3.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CK1ha_AY.js} +2 -2
- package/dist/{FmMultiselectDialog-D8AXgAuO.js → FmMultiselectDialog-BazT9oUX.js} +1 -1
- package/dist/{FmMultiselectDialog-ByvnmkuF.js → FmMultiselectDialog-_gUuhudi.js} +16 -16
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-B8Jp-237.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBtAgdsA.js} +4 -4
- package/dist/{ImportView-B8jTVkI3.js → ImportView-jpkwuCXO.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D3bMh_iG.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DLJnF4do.js} +1 -1
- package/dist/{IngredientGroupView-DEZHQArP.js → IngredientGroupView-x3t1hyNn.js} +5 -5
- package/dist/{IngredientsView-D_0aKc2P.js → IngredientsView-BzWTnlb4.js} +15 -15
- package/dist/{IntegrationExplorerView-RNQ89fRN.js → IntegrationExplorerView-Bca3owbx.js} +5 -5
- package/dist/{IntegrationView-HyqeX65i.js → IntegrationView-Dh1c4Qyo.js} +81 -81
- package/dist/{InventoryBindingForm-GXWU6jVC.js → InventoryBindingForm-B1sI1TGZ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BSWEOGs7.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-7NeE7Xos.js} +5 -5
- package/dist/{InventoryBindingSummary-Dcsun-ae.js → InventoryBindingSummary-R8zHPc52.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BPHzJFkv.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DMJVh7Nt.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-eaX2F6rA.js → PremiumBadge.vue_vue_type_script_setup_true_lang-ChC9sEIk.js} +7 -7
- package/dist/{PublishView-BzaSX1CF.js → PublishView-Bqp8Ww4J.js} +15 -15
- package/dist/{PurchaseOrderPrintPreview-Dq9RVILX.js → PurchaseOrderPrintPreview-D7TCn8U-.js} +11 -11
- package/dist/{ReceiveRequestView-CUR65B8h.js → ReceiveRequestView-oNBVAMYu.js} +23 -23
- package/dist/{RecipeView-DA1exNa3.js → RecipeView-D8Mvgji9.js} +15 -15
- package/dist/{SettingsView-G9VVMREu.js → SettingsView-BJScLK9z.js} +4 -4
- package/dist/StockView-CRRdVCcD.js +2439 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DflfaS_i.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DUKv_LV6.js} +1 -1
- package/dist/{SupplierView-Br3PxWl6.js → SupplierView-DdBBIV8W.js} +12 -12
- package/dist/{SurchargeView-DnC875ic.js → SurchargeView-DisBUPIs.js} +16 -16
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DxElZDE3.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CZ3Q3BAf.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DncbuAH1.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CC7F5HVc.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-R0DRQHII.js → TransferDetails.vue_vue_type_script_setup_true_lang-BLlg1Vka.js} +821 -837
- package/dist/{TransferTemplateView-CN-1iASP.js → TransferTemplateView-7ICJMF9z.js} +17 -17
- package/dist/{UnitCostHistoryView-HMfTl2Rl.js → UnitCostHistoryView-BMRDBQ58.js} +246 -243
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BQSRm_uN.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-mNXHzLN3.js} +4 -4
- package/dist/{UnitView-2J7SxbnX.js → UnitView-uUUYOjYn.js} +7 -7
- package/dist/{WarehouseView-EIXt8wd0.js → WarehouseView-BfMf_iuj.js} +25 -25
- package/dist/{WastageTemplateView-B8yQevPX.js → WastageTemplateView-BQYjJGZ-.js} +14 -14
- package/dist/{app-DZ_O5S5y.js → app-B_zMegJc.js} +23521 -22309
- package/dist/app.d.ts +22 -6
- package/dist/app.js +2 -2
- package/dist/{closing-template-C3F4uA55.js → closing-template-9vhx5Ji1.js} +1 -1
- package/dist/components/HrmPermissionGuard.vue.d.ts +54 -0
- package/dist/composable/useHrmPermission.d.ts +17 -0
- package/dist/composable/useInventoryAccess.d.ts +11 -0
- package/dist/composable/useNavigationMenu.d.ts +14 -0
- package/dist/{date2-DoKx3vEH.js → date2-BMCS_Dsc.js} +1 -1
- package/dist/{dayjs.min-BzKmIVU5.js → dayjs.min-Dl26OaXo.js} +16 -16
- package/dist/{decimal-CHryhQrv.js → decimal-e6OK2jkR.js} +2 -2
- package/dist/{defineDeepModel-Dt72PPYN.js → defineDeepModel-BvLlwxnd.js} +1 -1
- package/dist/{duplicate-template-k0PYkiot.js → duplicate-template-Cnhu8Rxw.js} +1 -1
- package/dist/{empty-placeholder-wf6-BWE8.js → empty-placeholder-B0QU467o.js} +1 -1
- package/dist/{export-D0nU9NCc.js → export-CGvyGmeo.js} +1 -1
- package/dist/{feature-DTXvUM9q.js → feature-Do41WWzx.js} +46 -46
- package/dist/{format-time-from-id-CjML4YH3.js → format-time-from-id-CqX_KaUG.js} +1 -1
- package/dist/{format-unit-display-BASnDwRJ.js → format-unit-display-D8qWmRXP.js} +11 -11
- package/dist/{import-export.helper-BGRAKGXv.js → import-export.helper-85V8Ib5e.js} +6 -6
- package/dist/{index-Db7jD-CU.js → index-C-CwnjUn.js} +3 -3
- package/dist/{index-D5qTaOFp.js → index-Cg3aLEhT.js} +1 -1
- package/dist/{index-FhahM2dg.js → index-CtUF9Nsv.js} +1 -1
- package/dist/{inventory-core-dart.default-Cvvr8rpN.js → inventory-core-dart.default-B64FzAla.js} +10 -10
- package/dist/{lodash-B4Uj749H.js → lodash-U9ycVPlv.js} +1 -1
- package/dist/{lz-string-Ckbaw1Bu.js → lz-string-0CgVsQoC.js} +21 -21
- package/dist/{netsuite-B4O7LRpC.js → netsuite-Du7-sXJt.js} +37 -37
- package/dist/{number-9PlMlR2G.js → number-iJAzDfmj.js} +11 -11
- package/dist/{predefined-templates-BqAy88Rp.js → predefined-templates-LlSrXOXm.js} +1 -1
- package/dist/{purchase-order-template-KkhC0FCL.js → purchase-order-template-DFuXb0rr.js} +1 -1
- package/dist/{recalculationUtils-Rj0SZQO3.js → recalculationUtils-DWPnMW1G.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/router/route-permission.d.ts +10 -0
- package/dist/{rules-BvLBkdfK.js → rules-DefSKiUN.js} +2 -2
- package/dist/{stock-CoG3l91v.js → stock-BfF6peMd.js} +3 -3
- package/dist/{stock-yUbmIey0.js → stock-Cx1BwdWs.js} +28 -27
- package/dist/{supplier-Qlox4B8s.js → supplier-CU3iqdGr.js} +2 -2
- package/dist/{surcharge-CsAxFX-L.js → surcharge-D77J5opH.js} +8 -8
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BOtDFKQO.js → use-ingredient-select-dialog-B-jxV-79.js} +2 -2
- package/dist/{use-inventory-binding-dialog-Dz5NbeEn.js → use-inventory-binding-dialog-BdTd5qPl.js} +2 -2
- package/dist/{use-template-enabled-locations-MNNKqChl.js → use-template-enabled-locations-vFvaCjlH.js} +2 -2
- package/dist/useHrmPermission-CekUhyck.js +16 -0
- package/dist/useNavigationMenu-BiLWMIip.js +162 -0
- package/dist/views/DefaultView.vue.d.ts +2 -0
- package/dist/views/receive-request/composables/use-order-draft-permission.d.ts +2 -5
- package/dist/{vue-i18n-BqX2td3b.js → vue-i18n-C3_OsgSl.js} +371 -371
- package/dist/{xlsx-CtRIIkxr.js → xlsx-o7n1whCa.js} +398 -398
- package/dist/{xlsx.util-Bd4_86rn.js → xlsx.util-D6nPboPW.js} +1 -1
- package/package.json +3 -2
- package/dist/App-Dm-YoD_v.js +0 -411
- package/dist/StockView-3J7Gkskb.js +0 -2406
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-inventory-portal",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.14-dev.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"@feedmepos/core": "2.14.40",
|
|
19
19
|
"@feedmepos/custom-attributes": "0.0.1-rc.5",
|
|
20
20
|
"@feedmepos/feature-flag": "^0.0.15",
|
|
21
|
+
"@feedmepos/hrm-permission": "^0.0.4-dev.7",
|
|
21
22
|
"@feedmepos/menu": "1.5.22",
|
|
22
23
|
"@feedmepos/mf-common": "^1.29.11",
|
|
23
24
|
"@feedmepos/ui-library": "1.10.1",
|
|
@@ -49,8 +50,8 @@
|
|
|
49
50
|
"vue-router": "^4.4.0",
|
|
50
51
|
"xlsx": "^0.18.5",
|
|
51
52
|
"@feedmepos/inventory-core": "^1.0.1-dev.2",
|
|
52
|
-
"@feedmepos/inventory-core-dart": "^1.0.0",
|
|
53
53
|
"@feedmepos/inventory-core-2": "^2.0.0",
|
|
54
|
+
"@feedmepos/inventory-core-dart": "^1.0.0",
|
|
54
55
|
"@feedmepos/inventory-core-js": "^1.0.1",
|
|
55
56
|
"@feedmepos/netsuite-core": "^1.0.0",
|
|
56
57
|
"@feedmepos/zod-inventory": "^2.0.0"
|
package/dist/App-Dm-YoD_v.js
DELETED
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
import { ref as A, onUnmounted as j, defineComponent as U, watch as L, onMounted as H, computed as S, resolveComponent as h, openBlock as v, createElementBlock as y, unref as w, createVNode as E, createElementVNode as r, toDisplayString as I, createBlock as k, createCommentVNode as M, withCtx as F, withDirectives as K, vModelText as Y, Fragment as z, renderList as Q, createTextVNode as O } from "vue";
|
|
2
|
-
import { u as q, a as J, R as t, m as x, g as s, b as D } from "./app-DZ_O5S5y.js";
|
|
3
|
-
import { useCoreStore as B, useI18n as $ } from "@feedmepos/mf-common";
|
|
4
|
-
import { useRouter as V, useRoute as X } from "vue-router";
|
|
5
|
-
import { u as W, a as Z, I as ee } from "./feature-DTXvUM9q.js";
|
|
6
|
-
import { u as te } from "./netsuite-B4O7LRpC.js";
|
|
7
|
-
import { u as ne } from "./useTabStorage-BkIVScW_.js";
|
|
8
|
-
import { F as oe } from "./FmAdminBadge-DjnBAgyv.js";
|
|
9
|
-
import { u as le } from "./googlemap-BGi_aKUA.js";
|
|
10
|
-
function ae() {
|
|
11
|
-
return {
|
|
12
|
-
loadingHookInstalled: !1,
|
|
13
|
-
isLoading: !1
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
const C = A(ae());
|
|
17
|
-
function se() {
|
|
18
|
-
const _ = V();
|
|
19
|
-
if (!C.value.loadingHookInstalled) {
|
|
20
|
-
C.value.loadingHookInstalled = !0;
|
|
21
|
-
const l = _.beforeEach(() => {
|
|
22
|
-
C.value.isLoading = !0;
|
|
23
|
-
}), c = _.afterEach(() => {
|
|
24
|
-
C.value.isLoading = !1;
|
|
25
|
-
});
|
|
26
|
-
j(() => {
|
|
27
|
-
C.value.loadingHookInstalled = !1, l(), c();
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
get isLoading() {
|
|
32
|
-
return C.value.isLoading;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
const re = {
|
|
37
|
-
key: 0,
|
|
38
|
-
class: "flex flex-col items-center w-full h-full gap-24"
|
|
39
|
-
}, ie = {
|
|
40
|
-
key: 1,
|
|
41
|
-
class: "flex flex-col pt-[200px] gap-32 items-center"
|
|
42
|
-
}, ue = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, ce = { class: "fm-typo-en-title-lg-600" }, de = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, me = { class: "flex gap-16" }, pe = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, fe = { href: "https://feedme.ai/form" }, ve = /* @__PURE__ */ U({
|
|
43
|
-
__name: "InventoryView",
|
|
44
|
-
setup(_) {
|
|
45
|
-
const l = q(), c = J(), d = te(), i = B(), a = V(), u = se(), e = W(), { t: p } = $();
|
|
46
|
-
L(
|
|
47
|
-
[() => i.sessionUser.value, () => i.currentBusiness.value],
|
|
48
|
-
([b, g]) => {
|
|
49
|
-
m(b, g);
|
|
50
|
-
}
|
|
51
|
-
), H(async () => {
|
|
52
|
-
await e.init(), await i.readBusinesses();
|
|
53
|
-
const b = i.sessionUser.value, g = i.currentBusiness.value;
|
|
54
|
-
m(b, g);
|
|
55
|
-
});
|
|
56
|
-
function m(b, g) {
|
|
57
|
-
!b || !g || R();
|
|
58
|
-
}
|
|
59
|
-
async function R() {
|
|
60
|
-
return await l.init(), await d.readSetting().catch((b) => {
|
|
61
|
-
console.error("[all] error on reading netsuite store", b);
|
|
62
|
-
}), await c.init();
|
|
63
|
-
}
|
|
64
|
-
const f = S(() => a.currentRoute.value.name === t.TRANSFER_TEMPLATE ? e.enablePoTemplate : a.currentRoute.value.name === t.INGREDIENT_GROUP ? e.enableIngredientGroup : !0);
|
|
65
|
-
return (b, g) => {
|
|
66
|
-
const N = h("FmSpacer"), G = h("FmCircularProgress"), n = h("FmButton"), o = h("RouterView");
|
|
67
|
-
return v(), y("div", null, [
|
|
68
|
-
w(u).isLoading ? (v(), y("div", re, [
|
|
69
|
-
E(N),
|
|
70
|
-
r("div", null, [
|
|
71
|
-
E(G, { size: "xl" })
|
|
72
|
-
]),
|
|
73
|
-
g[0] || (g[0] = r("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
|
|
74
|
-
E(N)
|
|
75
|
-
])) : f.value ? w(i).sessionUser.value ? (v(), k(o, { key: 2 })) : M("", !0) : (v(), y("div", ie, [
|
|
76
|
-
r("div", ue, [
|
|
77
|
-
r("div", ce, I(w(p)("inventory.common.proPlan.title")), 1),
|
|
78
|
-
r("div", de, I(w(p)("inventory.common.proPlan.subtitle")), 1)
|
|
79
|
-
]),
|
|
80
|
-
r("div", me, [
|
|
81
|
-
r("a", pe, [
|
|
82
|
-
E(n, {
|
|
83
|
-
label: w(p)("inventory.common.proPlan.comparePlans"),
|
|
84
|
-
variant: "secondary"
|
|
85
|
-
}, null, 8, ["label"])
|
|
86
|
-
]),
|
|
87
|
-
r("a", fe, [
|
|
88
|
-
E(n, {
|
|
89
|
-
label: w(p)("inventory.common.proPlan.callUs"),
|
|
90
|
-
"prepend-icon": "call"
|
|
91
|
-
}, null, 8, ["label"])
|
|
92
|
-
])
|
|
93
|
-
])
|
|
94
|
-
]))
|
|
95
|
-
]);
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}), ge = { class: "flex items-center gap-2" }, _e = { class: "text-xs text-gray-400 font-normal" }, be = { class: "flex flex-col gap-3" }, Ee = { class: "max-h-[480px] flex flex-col gap-1" }, ye = { class: "font-mono text-xs text-gray-700 break-all min-w-0" }, Se = {
|
|
99
|
-
key: 0,
|
|
100
|
-
class: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 px-2 py-0.5 rounded-full"
|
|
101
|
-
}, he = {
|
|
102
|
-
key: 1,
|
|
103
|
-
class: "inline-flex items-center gap-1 text-xs font-medium text-red-700 bg-red-50 px-2 py-0.5 rounded-full"
|
|
104
|
-
}, Te = {
|
|
105
|
-
key: 2,
|
|
106
|
-
class: "inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full"
|
|
107
|
-
}, xe = {
|
|
108
|
-
key: 0,
|
|
109
|
-
class: "text-center text-sm text-gray-400 py-4"
|
|
110
|
-
}, Ie = /* @__PURE__ */ U({
|
|
111
|
-
__name: "FmFeatureFlagDialog",
|
|
112
|
-
setup(_) {
|
|
113
|
-
const l = A(!1), c = A(""), d = S(() => {
|
|
114
|
-
const { getFlagValue: u } = Z();
|
|
115
|
-
return Object.values(ee).map((e) => {
|
|
116
|
-
const p = u(e, (m) => m === "true");
|
|
117
|
-
return {
|
|
118
|
-
name: e,
|
|
119
|
-
enabled: p
|
|
120
|
-
};
|
|
121
|
-
});
|
|
122
|
-
}), i = S(() => {
|
|
123
|
-
const u = c.value.toLowerCase();
|
|
124
|
-
return u ? d.value.filter((e) => e.name.toLowerCase().includes(u)) : d.value;
|
|
125
|
-
}), a = S(() => {
|
|
126
|
-
const u = d.value.filter((m) => m.enabled === !0).length, e = d.value.filter((m) => m.enabled === !1).length, p = d.value.filter((m) => m.enabled === null).length;
|
|
127
|
-
return { enabled: u, disabled: e, unknown: p, total: d.value.length };
|
|
128
|
-
});
|
|
129
|
-
return (u, e) => {
|
|
130
|
-
const p = h("FmButton"), m = h("FmSpacer"), R = h("FmDialog");
|
|
131
|
-
return v(), k(R, {
|
|
132
|
-
modelValue: l.value,
|
|
133
|
-
"onUpdate:modelValue": e[2] || (e[2] = (f) => l.value = f),
|
|
134
|
-
overlay: !0
|
|
135
|
-
}, {
|
|
136
|
-
"dialog-button": F(() => [
|
|
137
|
-
E(oe, null, {
|
|
138
|
-
default: F(() => [
|
|
139
|
-
E(p, {
|
|
140
|
-
variant: "secondary",
|
|
141
|
-
label: "Feature flags"
|
|
142
|
-
})
|
|
143
|
-
]),
|
|
144
|
-
_: 1
|
|
145
|
-
})
|
|
146
|
-
]),
|
|
147
|
-
"dialog-header": F(() => [
|
|
148
|
-
r("div", ge, [
|
|
149
|
-
e[3] || (e[3] = r("span", null, "Feature Flags", -1)),
|
|
150
|
-
r("span", _e, I(a.value.enabled) + " enabled · " + I(a.value.disabled) + " disabled · " + I(a.value.unknown) + " unknown ", 1)
|
|
151
|
-
])
|
|
152
|
-
]),
|
|
153
|
-
"dialog-footer": F(() => [
|
|
154
|
-
E(m, { class: "sm:hidden xs:hidden" }),
|
|
155
|
-
E(p, {
|
|
156
|
-
class: "sm:w-full xs:w-full",
|
|
157
|
-
label: "Close",
|
|
158
|
-
size: "md",
|
|
159
|
-
variant: "primary",
|
|
160
|
-
onClick: e[1] || (e[1] = (f) => l.value = !1)
|
|
161
|
-
})
|
|
162
|
-
]),
|
|
163
|
-
default: F(() => [
|
|
164
|
-
r("div", be, [
|
|
165
|
-
K(r("input", {
|
|
166
|
-
"onUpdate:modelValue": e[0] || (e[0] = (f) => c.value = f),
|
|
167
|
-
type: "text",
|
|
168
|
-
placeholder: "Search flags...",
|
|
169
|
-
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"
|
|
170
|
-
}, null, 512), [
|
|
171
|
-
[Y, c.value]
|
|
172
|
-
]),
|
|
173
|
-
r("div", Ee, [
|
|
174
|
-
(v(!0), y(z, null, Q(i.value, (f) => (v(), y("div", {
|
|
175
|
-
key: f.name,
|
|
176
|
-
class: "flex items-start justify-between gap-2 px-3 py-2 rounded-md hover:bg-gray-50 text-sm"
|
|
177
|
-
}, [
|
|
178
|
-
r("span", ye, I(f.name), 1),
|
|
179
|
-
f.enabled === !0 ? (v(), y("span", Se, e[4] || (e[4] = [
|
|
180
|
-
r("span", { class: "w-1.5 h-1.5 rounded-full bg-green-500" }, null, -1),
|
|
181
|
-
O(" Enabled ")
|
|
182
|
-
]))) : f.enabled === !1 ? (v(), y("span", he, e[5] || (e[5] = [
|
|
183
|
-
r("span", { class: "w-1.5 h-1.5 rounded-full bg-red-500" }, null, -1),
|
|
184
|
-
O(" Disabled ")
|
|
185
|
-
]))) : (v(), y("span", Te, e[6] || (e[6] = [
|
|
186
|
-
r("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1),
|
|
187
|
-
O(" Unknown ")
|
|
188
|
-
])))
|
|
189
|
-
]))), 128)),
|
|
190
|
-
i.value.length === 0 ? (v(), y("div", xe, ' No flags matching "' + I(c.value) + '" ', 1)) : M("", !0)
|
|
191
|
-
])
|
|
192
|
-
])
|
|
193
|
-
]),
|
|
194
|
-
_: 1
|
|
195
|
-
}, 8, ["modelValue"]);
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
}), Re = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Ne = /* @__PURE__ */ U({
|
|
199
|
-
__name: "NavigationTab",
|
|
200
|
-
setup(_) {
|
|
201
|
-
const l = x.object({
|
|
202
|
-
label: x.string(),
|
|
203
|
-
value: x.string().optional(),
|
|
204
|
-
icon: x.string().optional(),
|
|
205
|
-
hide: x.boolean().optional(),
|
|
206
|
-
children: x.array(x.lazy(() => l)).optional()
|
|
207
|
-
}), c = X(), d = V(), i = B(), a = W(), u = ne(), { t: e } = $(), { isDev: p } = D();
|
|
208
|
-
L([() => i.currentBusiness.value, () => c.name], ([n, o]) => {
|
|
209
|
-
(n == null ? void 0 : n.menuVersion) === "v3" && (o === t.INGREDIENTS || o === t.RECIPE || o === t.UNIT) && d.push({ name: t.STOCK });
|
|
210
|
-
});
|
|
211
|
-
const m = (n) => n.filter((o) => !o.hide).map((o) => o.children ? { ...o, children: m(o.children) } : o), R = (n) => n.map((o) => {
|
|
212
|
-
delete o.hide;
|
|
213
|
-
const T = o;
|
|
214
|
-
return o.children && (T.children = R(o.children)), T;
|
|
215
|
-
}), f = S(() => {
|
|
216
|
-
var T;
|
|
217
|
-
const n = [
|
|
218
|
-
{
|
|
219
|
-
label: "Non-Production Environment",
|
|
220
|
-
icon: "logo_dev",
|
|
221
|
-
disabled: !0,
|
|
222
|
-
hide: !p
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
label: s(t.STOCK, e),
|
|
226
|
-
// icon: 'inventory_2',
|
|
227
|
-
children: [
|
|
228
|
-
{
|
|
229
|
-
label: e("inventory.stock.stock_balance.title"),
|
|
230
|
-
value: t.STOCK
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
label: s(t.UNIT_COST_HISTORY, e),
|
|
234
|
-
value: t.UNIT_COST_HISTORY,
|
|
235
|
-
hide: !a.enableTotalCost
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
label: s(t.WASTAGE_TEMPLATE, e),
|
|
239
|
-
value: t.WASTAGE_TEMPLATE,
|
|
240
|
-
hide: !a.enableWastageTemplate
|
|
241
|
-
}
|
|
242
|
-
]
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
label: e("inventory.closing.title"),
|
|
246
|
-
children: [
|
|
247
|
-
{
|
|
248
|
-
label: s(t.CLOSING_HISTORY, e),
|
|
249
|
-
value: t.CLOSING_HISTORY
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
label: s(t.CLOSING_TEMPLATE, e),
|
|
253
|
-
value: t.CLOSING_TEMPLATE,
|
|
254
|
-
hide: !a.enableClosingTemplate
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
label: s(t.CLOSING_DRAFT, e),
|
|
258
|
-
value: t.CLOSING_DRAFT,
|
|
259
|
-
hide: !a.enableClosingTemplate
|
|
260
|
-
}
|
|
261
|
-
]
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
label: s(t.INGREDIENTS, e),
|
|
265
|
-
// icon: 'grocery',
|
|
266
|
-
value: t.INGREDIENTS
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
label: s(t.INGREDIENT_GROUP, e),
|
|
270
|
-
// icon: 'grocery',
|
|
271
|
-
value: t.INGREDIENT_GROUP,
|
|
272
|
-
hide: !a.enableIngredientGroup
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
label: s(t.RECIPE, e),
|
|
276
|
-
// icon: 'weight',
|
|
277
|
-
value: t.RECIPE
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
label: s(t.UNIT, e),
|
|
281
|
-
// icon: 'fastfood',
|
|
282
|
-
value: t.UNIT
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
label: e("inventory.transfer.title"),
|
|
286
|
-
// icon: 'swap_horiz',
|
|
287
|
-
children: [
|
|
288
|
-
{
|
|
289
|
-
label: s(t.RECEIVE_REQUEST, e),
|
|
290
|
-
value: t.RECEIVE_REQUEST
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
label: s(t.APPROVAL, e),
|
|
294
|
-
value: t.APPROVAL
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
label: s(t.SURCHARGE, e),
|
|
298
|
-
value: t.SURCHARGE,
|
|
299
|
-
hide: !a.enableSurcharge
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
label: s(t.TRANSFER_TEMPLATE, e),
|
|
303
|
-
value: t.TRANSFER_TEMPLATE,
|
|
304
|
-
hide: !a.enablePoTemplate
|
|
305
|
-
}
|
|
306
|
-
]
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
label: s(t.SUPPLIER, e),
|
|
310
|
-
// icon: 'group',
|
|
311
|
-
value: t.SUPPLIER
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
label: s(t.WAREHOUSE, e),
|
|
315
|
-
// icon: 'warehouse',
|
|
316
|
-
value: t.WAREHOUSE
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
label: s(t.PUBLISH, e),
|
|
320
|
-
value: t.PUBLISH
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
label: s(t.IMPORT, e),
|
|
324
|
-
value: t.IMPORT,
|
|
325
|
-
hide: !a.enableBulkImport
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
label: s(t.INTEGRATION, e),
|
|
329
|
-
// icon: 'integration_instructions',
|
|
330
|
-
value: t.INTEGRATION
|
|
331
|
-
}
|
|
332
|
-
], o = R(m(n));
|
|
333
|
-
return ((T = i.currentBusiness.value) == null ? void 0 : T.menuVersion) === "v3" ? o.filter(
|
|
334
|
-
(P) => P.value !== t.INGREDIENTS && P.value !== t.RECIPE && P.value !== t.UNIT && P.value !== t.PUBLISH
|
|
335
|
-
) : o;
|
|
336
|
-
}), b = S({
|
|
337
|
-
get() {
|
|
338
|
-
if (c.name)
|
|
339
|
-
return String(c.name);
|
|
340
|
-
},
|
|
341
|
-
set(n) {
|
|
342
|
-
n && d.push({ name: n });
|
|
343
|
-
}
|
|
344
|
-
}), g = S(
|
|
345
|
-
() => {
|
|
346
|
-
var n;
|
|
347
|
-
return `NavigationTab.${(n = i.currentBusiness.value) == null ? void 0 : n._id}`;
|
|
348
|
-
}
|
|
349
|
-
), N = A(!1), G = S({
|
|
350
|
-
get() {
|
|
351
|
-
return N.value;
|
|
352
|
-
},
|
|
353
|
-
set(n) {
|
|
354
|
-
N.value = n, n || u.setItem(g.value, "true");
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
return L([() => g.value], () => {
|
|
358
|
-
N.value = !1, setTimeout(() => {
|
|
359
|
-
G.value = !u.getItem(g.value);
|
|
360
|
-
}, 2e3);
|
|
361
|
-
}), (n, o) => {
|
|
362
|
-
const T = h("FmCollapsibleTabs");
|
|
363
|
-
return v(), y("div", Re, [
|
|
364
|
-
E(Ie),
|
|
365
|
-
E(T, {
|
|
366
|
-
modelValue: b.value,
|
|
367
|
-
"onUpdate:modelValue": o[0] || (o[0] = (P) => b.value = P),
|
|
368
|
-
items: f.value
|
|
369
|
-
}, null, 8, ["modelValue", "items"])
|
|
370
|
-
]);
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
});
|
|
374
|
-
typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
|
|
375
|
-
let _, l;
|
|
376
|
-
return { promise: new Promise((d, i) => {
|
|
377
|
-
_ = d, l = i;
|
|
378
|
-
}), resolve: _, reject: l };
|
|
379
|
-
});
|
|
380
|
-
typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(_) {
|
|
381
|
-
return await new Promise((l) => setTimeout(l, _)), Promise.resolve(this);
|
|
382
|
-
});
|
|
383
|
-
const ke = /* @__PURE__ */ U({
|
|
384
|
-
__name: "App",
|
|
385
|
-
setup(_) {
|
|
386
|
-
const l = B(), c = le(), d = D();
|
|
387
|
-
H(() => {
|
|
388
|
-
if (window.location.href.includes("print-preview")) {
|
|
389
|
-
l.setEmbedded(!0), document.body.classList.add("print-mode");
|
|
390
|
-
return;
|
|
391
|
-
}
|
|
392
|
-
l.registerSidebarComponent(Ne), c.initGoogleMap(d.appApi.googleMap).catch(() => {
|
|
393
|
-
console.error("Google map cannot be loaded");
|
|
394
|
-
});
|
|
395
|
-
}), L([() => l.currentCountry.value], () => {
|
|
396
|
-
i();
|
|
397
|
-
});
|
|
398
|
-
async function i() {
|
|
399
|
-
var a;
|
|
400
|
-
try {
|
|
401
|
-
await l.readBusinesses(), l.currentBusiness.value = (a = l.businesses.value) == null ? void 0 : a.find((u) => u);
|
|
402
|
-
} catch (u) {
|
|
403
|
-
console.error("error when trying to reset businesses:", u);
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
return (a, u) => (v(), k(ve));
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
export {
|
|
410
|
-
ke as default
|
|
411
|
-
};
|