@feedmepos/mf-inventory-portal 1.3.14-dev.1 → 1.3.14
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-BQZQFNKG.js +411 -0
- package/dist/{ApprovalView-BxioAXpO.js → ApprovalView-BVszC4Cw.js} +7 -7
- package/dist/{BindingsDialog-Dn_hP7Ji.js → BindingsDialog-B3L_3xdo.js} +13 -13
- package/dist/{BindingsPicker-BEXOUaoI.js → BindingsPicker-A4togB2v.js} +2 -2
- package/dist/{BindingsTable-CsRLA5J_.js → BindingsTable-DacoMdY6.js} +3 -3
- package/dist/{ClosingDraftView-DoH9ZcGA.js → ClosingDraftView-C9tvMgLl.js} +137 -137
- package/dist/{ClosingHistoryView-BWf_gIrc.js → ClosingHistoryView-CqqzqSqU.js} +32 -32
- package/dist/{ClosingTemplateView-BKRxzvQX.js → ClosingTemplateView-CLi0XE8S.js} +15 -15
- package/dist/{DeliveryOrderPrintPreview-HzspgQXj.js → DeliveryOrderPrintPreview-DEHEfd80.js} +11 -11
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DstxeP1q.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BDZVaj3l.js} +16 -16
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-E9FFFhwx.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-xxS4P6uo.js} +2 -2
- package/dist/{FmMultiselectDialog-3uKA-o0f.js → FmMultiselectDialog-CR2peMEL.js} +1 -1
- package/dist/{FmMultiselectDialog-uFZKKIiO.js → FmMultiselectDialog-FGR8t9rz.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C1KGaqi7.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DgXOsVLe.js} +18 -18
- package/dist/{ImportView-zrNDzp3k.js → ImportView-CEI0QqGz.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-B2vMgXVZ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-cRgKjHY0.js} +1 -1
- package/dist/{IngredientGroupView-HcAKvPur.js → IngredientGroupView-DEELNMpl.js} +6 -6
- package/dist/{IngredientsView-CRB5UN-e.js → IngredientsView-D3OcjZdT.js} +16 -16
- package/dist/{IntegrationExplorerView-k3IHeiOU.js → IntegrationExplorerView-ByPpT3hC.js} +5 -5
- package/dist/{IntegrationView-B3WeQTDB.js → IntegrationView-BSqlJBp-.js} +13 -13
- package/dist/{InventoryBindingForm-B-7SQKl2.js → InventoryBindingForm-SgmyJvCs.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DhPu_GyE.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-GLipe2bO.js} +15 -15
- package/dist/{InventoryBindingSummary-Swi6A3W2.js → InventoryBindingSummary-D6deGR6B.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Duv0At06.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DGDL-t7m.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang--gt60IlU.js → PremiumBadge.vue_vue_type_script_setup_true_lang-ff1rPUJW.js} +9 -9
- package/dist/{PublishView-B9HJT61I.js → PublishView-7TAa2QQB.js} +11 -11
- package/dist/{PurchaseOrderPrintPreview-sClUXkgt.js → PurchaseOrderPrintPreview-DhcnInSW.js} +9 -9
- package/dist/ReceiveRequestView-Z3JYH3gf.js +36203 -0
- package/dist/{RecipeView-BH3asOD4.js → RecipeView--ALwYD-O.js} +51 -51
- package/dist/{SettingsView-BJAMNNhr.js → SettingsView-F_BWUxoq.js} +30 -30
- package/dist/StockView-BLrquJf2.js +2406 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeiLMVin.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxNgi5uv.js} +1 -1
- package/dist/{SupplierView-C3uBrEcc.js → SupplierView-DklOXwHD.js} +13 -13
- package/dist/{SurchargeView-S9ByD9Nd.js → SurchargeView-DcImorUr.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-ha60Wy7z.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-xdLxGAOM.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CfyCEElN.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bu4XKhII.js} +1 -1
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DMrRfwKD.js +3890 -0
- package/dist/{TransferTemplateView-zbn5CGiZ.js → TransferTemplateView-DTdlSI2b.js} +18 -18
- package/dist/{UnitCostHistoryView-LhvAybS8.js → UnitCostHistoryView-CQ_DJE-t.js} +243 -246
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-E2QCl521.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-QuejzcCL.js} +4 -4
- package/dist/{UnitView-6oUdlUVo.js → UnitView-DzcCdCGw.js} +25 -25
- package/dist/{WarehouseView-DQFe99KT.js → WarehouseView-BYj9DD1N.js} +6 -6
- package/dist/{WastageTemplateView-BiYZqiT2.js → WastageTemplateView--w6an2Ar.js} +15 -15
- package/dist/api/email.d.ts +54 -0
- package/dist/{app-SnX9gL_k.js → app-CPlgHGkC.js} +22314 -23512
- package/dist/app.d.ts +14 -6
- package/dist/app.js +2 -2
- package/dist/{closing-template-Ch--jBk-.js → closing-template-B9JOB9ah.js} +1 -1
- package/dist/components/row-action.enum.d.ts +2 -1
- package/dist/{date2-CGqqJOqr.js → date2-Ci9tlLMJ.js} +1 -1
- package/dist/{dayjs.min-JnfBpNSN.js → dayjs.min-DTx2lmq6.js} +12 -12
- package/dist/{decimal-C-2MQYNP.js → decimal-iKhH_VJO.js} +2 -2
- package/dist/{defineDeepModel-CUJCBuvw.js → defineDeepModel-C25T8oyP.js} +1 -1
- package/dist/{duplicate-template-BXg5EQRC.js → duplicate-template-BptIBRQ3.js} +1 -1
- package/dist/{export-DUsFBcmf.js → export-CKuVd5pP.js} +1 -1
- package/dist/{feature-gkhmly57.js → feature-CXMSo4z7.js} +109 -104
- package/dist/{format-time-from-id-D1RhcKfL.js → format-time-from-id-Bk60g6lh.js} +1 -1
- package/dist/{format-unit-display-DXs_-yEW.js → format-unit-display-C4nf8hG8.js} +12 -12
- package/dist/{import-export.helper-B84wW0eo.js → import-export.helper-BDzsQcYD.js} +6 -6
- package/dist/{index-Dp1GAjHf.js → index-CUVlQagt.js} +3 -3
- package/dist/{index-D3XgyMwL.js → index-DTszDSPO.js} +1 -1
- package/dist/{index-artVJVqL.js → index-DiKOwY5C.js} +1 -1
- package/dist/{inventory-core-dart.default-Bu1oVkLC.js → inventory-core-dart.default-Cn3sonot.js} +10 -10
- package/dist/{lodash-DZbYS5Vn.js → lodash-DGOK6ZkA.js} +1 -1
- package/dist/{lz-string-nX96TtT6.js → lz-string-QrWbdmw6.js} +17 -17
- package/dist/{netsuite-DQkJKCH9.js → netsuite-DglgyKcZ.js} +109 -109
- package/dist/{number-gRrApZRj.js → number-Ut7u2ZEE.js} +7 -7
- package/dist/{predefined-templates-D9bzSOz_.js → predefined-templates-DZtFebPU.js} +1 -1
- package/dist/{purchase-order-template-BiE_We2X.js → purchase-order-template-DhNVhXmD.js} +1 -1
- package/dist/{recalculationUtils-zNt-EW5S.js → recalculationUtils-CqJRd9B2.js} +1 -1
- package/dist/{row-action.enum-Co_O4qD9.js → row-action.enum-DQ9bJ_uv.js} +7 -1
- package/dist/{rules-CWFFr_mA.js → rules-BIm67nl_.js} +2 -2
- package/dist/{stock-C-34Vuxz.js → stock-CzdMn9n8.js} +3 -3
- package/dist/{stock-V4Oy4QHQ.js → stock-Dc4_U69J.js} +27 -28
- package/dist/stores/feature.d.ts +2 -0
- package/dist/{supplier-DbYagMhS.js → supplier-De5G6CeF.js} +16 -16
- package/dist/{surcharge-CcvvfLHB.js → surcharge-CN5FtDZq.js} +5 -5
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-B4jFgJ5b.js → use-ingredient-select-dialog-Wy4CtYcZ.js} +2 -2
- package/dist/{use-inventory-binding-dialog-20flYyGE.js → use-inventory-binding-dialog-C1LCH0jV.js} +2 -2
- package/dist/{use-template-enabled-locations-CpDMbAGF.js → use-template-enabled-locations-BfZFcXZ_.js} +2 -2
- package/dist/views/receive-request/components/email-dialog/EmailDialog.vue.d.ts +20 -0
- package/dist/views/receive-request/components/email-dialog/EmailDialogProps.d.ts +13 -0
- package/dist/views/receive-request/composables/use-order-draft-permission.d.ts +5 -2
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -0
- package/dist/{vue-i18n-CUrz9OVK.js → vue-i18n-CvVV4Xof.js} +305 -305
- package/dist/{xlsx-DBsOBE1z.js → xlsx-lawW6Hwh.js} +184 -184
- package/dist/{xlsx.util-xziohm10.js → xlsx.util-DSCqPt8v.js} +1 -1
- package/package.json +4 -4
- package/dist/App-Cb6qfRCz.js +0 -445
- package/dist/ReceiveRequestView-BbS55juS.js +0 -2817
- package/dist/StockView-DMLFY7d1.js +0 -2439
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CKfs-ns0.js +0 -3837
- package/dist/components/HrmPermissionGuard.vue.d.ts +0 -54
- package/dist/composable/useHrmPermission.d.ts +0 -17
- package/dist/router/route-permission.d.ts +0 -10
- package/dist/useHrmPermission-CZW6u2TS.js +0 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-inventory-portal",
|
|
3
|
-
"version": "1.3.14
|
|
3
|
+
"version": "1.3.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -18,7 +18,6 @@
|
|
|
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.6",
|
|
22
21
|
"@feedmepos/menu": "1.5.22",
|
|
23
22
|
"@feedmepos/mf-common": "^1.29.11",
|
|
24
23
|
"@feedmepos/ui-library": "1.10.1",
|
|
@@ -39,6 +38,7 @@
|
|
|
39
38
|
"fuzzy-search": "^3.2.1",
|
|
40
39
|
"google-maps": "^4.3.3",
|
|
41
40
|
"handlebars": "^4.7.8",
|
|
41
|
+
"html2pdf.js": "^0.14.0",
|
|
42
42
|
"libphonenumber-js": "^1.11.18",
|
|
43
43
|
"lodash": "^4.17.20",
|
|
44
44
|
"lz-string": "^1.5.0",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"xlsx": "^0.18.5",
|
|
52
52
|
"@feedmepos/inventory-core": "^1.0.1-dev.2",
|
|
53
53
|
"@feedmepos/inventory-core-2": "^2.0.0",
|
|
54
|
-
"@feedmepos/zod-inventory": "^2.0.0",
|
|
55
54
|
"@feedmepos/inventory-core-dart": "^1.0.0",
|
|
56
55
|
"@feedmepos/inventory-core-js": "^1.0.1",
|
|
57
|
-
"@feedmepos/netsuite-core": "^1.0.0"
|
|
56
|
+
"@feedmepos/netsuite-core": "^1.0.0",
|
|
57
|
+
"@feedmepos/zod-inventory": "^2.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@rushstack/eslint-patch": "^1.10.3",
|
package/dist/App-Cb6qfRCz.js
DELETED
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
import { ref as U, onUnmounted as q, defineComponent as k, watch as G, onMounted as D, computed as I, resolveComponent as R, openBlock as g, createElementBlock as T, unref as N, createVNode as b, createElementVNode as u, toDisplayString as x, createBlock as V, createCommentVNode as $, withCtx as w, withDirectives as J, vModelText as X, Fragment as Z, renderList as ee, createTextVNode as B } from "vue";
|
|
2
|
-
import { u as te, a as ne, R as e, r as W, m as y, g as r, b as K, d as oe } from "./app-SnX9gL_k.js";
|
|
3
|
-
import { useCoreStore as H, useI18n as Y } from "@feedmepos/mf-common";
|
|
4
|
-
import { useRouter as M, createRouter as le, createWebHistory as ae, useRoute as se } from "vue-router";
|
|
5
|
-
import { u as j, a as re, I as ie } from "./feature-gkhmly57.js";
|
|
6
|
-
import { u as ue } from "./netsuite-DQkJKCH9.js";
|
|
7
|
-
import { u as ce } from "./useTabStorage-BkIVScW_.js";
|
|
8
|
-
import { F as de } from "./FmAdminBadge-DjnBAgyv.js";
|
|
9
|
-
import { u as me } from "./googlemap-BGi_aKUA.js";
|
|
10
|
-
function pe() {
|
|
11
|
-
return {
|
|
12
|
-
loadingHookInstalled: !1,
|
|
13
|
-
isLoading: !1
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
const C = U(pe());
|
|
17
|
-
function fe() {
|
|
18
|
-
const p = M();
|
|
19
|
-
if (!C.value.loadingHookInstalled) {
|
|
20
|
-
C.value.loadingHookInstalled = !0;
|
|
21
|
-
const a = p.beforeEach(() => {
|
|
22
|
-
C.value.isLoading = !0;
|
|
23
|
-
}), d = p.afterEach(() => {
|
|
24
|
-
C.value.isLoading = !1;
|
|
25
|
-
});
|
|
26
|
-
q(() => {
|
|
27
|
-
C.value.loadingHookInstalled = !1, a(), d();
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
get isLoading() {
|
|
32
|
-
return C.value.isLoading;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
const ve = {
|
|
37
|
-
key: 0,
|
|
38
|
-
class: "flex flex-col items-center w-full h-full gap-24"
|
|
39
|
-
}, ge = {
|
|
40
|
-
key: 1,
|
|
41
|
-
class: "flex flex-col pt-[200px] gap-32 items-center"
|
|
42
|
-
}, _e = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Ee = { class: "fm-typo-en-title-lg-600" }, be = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, he = { class: "flex gap-16" }, Te = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, Se = { href: "https://feedme.ai/form" }, Ie = /* @__PURE__ */ k({
|
|
43
|
-
__name: "InventoryView",
|
|
44
|
-
setup(p) {
|
|
45
|
-
const a = te(), d = ne(), m = ue(), i = H(), s = M(), c = fe(), t = j(), { t: v } = Y();
|
|
46
|
-
G(
|
|
47
|
-
[() => i.sessionUser.value, () => i.currentBusiness.value],
|
|
48
|
-
([_, E]) => {
|
|
49
|
-
f(_, E);
|
|
50
|
-
}
|
|
51
|
-
), D(async () => {
|
|
52
|
-
await t.init(), await i.readBusinesses();
|
|
53
|
-
const _ = i.sessionUser.value, E = i.currentBusiness.value;
|
|
54
|
-
f(_, E);
|
|
55
|
-
});
|
|
56
|
-
function f(_, E) {
|
|
57
|
-
!_ || !E || A();
|
|
58
|
-
}
|
|
59
|
-
async function A() {
|
|
60
|
-
return await a.init(), await m.readSetting().catch((_) => {
|
|
61
|
-
console.error("[all] error on reading netsuite store", _);
|
|
62
|
-
}), await d.init();
|
|
63
|
-
}
|
|
64
|
-
const n = I(() => s.currentRoute.value.name === e.TRANSFER_TEMPLATE ? t.enablePoTemplate : s.currentRoute.value.name === e.INGREDIENT_GROUP ? t.enableIngredientGroup : !0);
|
|
65
|
-
return (_, E) => {
|
|
66
|
-
const O = R("FmSpacer"), F = R("FmCircularProgress"), P = R("FmButton"), L = R("RouterView");
|
|
67
|
-
return g(), T("div", null, [
|
|
68
|
-
N(c).isLoading ? (g(), T("div", ve, [
|
|
69
|
-
b(O),
|
|
70
|
-
u("div", null, [
|
|
71
|
-
b(F, { size: "xl" })
|
|
72
|
-
]),
|
|
73
|
-
E[0] || (E[0] = u("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
|
|
74
|
-
b(O)
|
|
75
|
-
])) : n.value ? N(i).sessionUser.value ? (g(), V(L, { key: 2 })) : $("", !0) : (g(), T("div", ge, [
|
|
76
|
-
u("div", _e, [
|
|
77
|
-
u("div", Ee, x(N(v)("inventory.common.proPlan.title")), 1),
|
|
78
|
-
u("div", be, x(N(v)("inventory.common.proPlan.subtitle")), 1)
|
|
79
|
-
]),
|
|
80
|
-
u("div", he, [
|
|
81
|
-
u("a", Te, [
|
|
82
|
-
b(P, {
|
|
83
|
-
label: N(v)("inventory.common.proPlan.comparePlans"),
|
|
84
|
-
variant: "secondary"
|
|
85
|
-
}, null, 8, ["label"])
|
|
86
|
-
]),
|
|
87
|
-
u("a", Se, [
|
|
88
|
-
b(P, {
|
|
89
|
-
label: N(v)("inventory.common.proPlan.callUs"),
|
|
90
|
-
"prepend-icon": "call"
|
|
91
|
-
}, null, 8, ["label"])
|
|
92
|
-
])
|
|
93
|
-
])
|
|
94
|
-
]))
|
|
95
|
-
]);
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}), Q = W.reduce(
|
|
99
|
-
(p, a) => (p[a.name] = a, p),
|
|
100
|
-
{}
|
|
101
|
-
);
|
|
102
|
-
le({
|
|
103
|
-
history: ae(),
|
|
104
|
-
routes: [
|
|
105
|
-
{
|
|
106
|
-
path: "/",
|
|
107
|
-
redirect: Q[e.STOCK]
|
|
108
|
-
},
|
|
109
|
-
...W
|
|
110
|
-
]
|
|
111
|
-
});
|
|
112
|
-
const Re = { class: "flex items-center gap-2" }, ye = { class: "text-xs text-gray-400 font-normal" }, xe = { class: "flex flex-col gap-3" }, Pe = { class: "max-h-[480px] flex flex-col gap-1" }, Ne = { class: "font-mono text-xs text-gray-700 break-all min-w-0" }, Ce = {
|
|
113
|
-
key: 0,
|
|
114
|
-
class: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 px-2 py-0.5 rounded-full"
|
|
115
|
-
}, Ae = {
|
|
116
|
-
key: 1,
|
|
117
|
-
class: "inline-flex items-center gap-1 text-xs font-medium text-red-700 bg-red-50 px-2 py-0.5 rounded-full"
|
|
118
|
-
}, Le = {
|
|
119
|
-
key: 2,
|
|
120
|
-
class: "inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full"
|
|
121
|
-
}, we = {
|
|
122
|
-
key: 0,
|
|
123
|
-
class: "text-center text-sm text-gray-400 py-4"
|
|
124
|
-
}, Oe = /* @__PURE__ */ k({
|
|
125
|
-
__name: "FmFeatureFlagDialog",
|
|
126
|
-
setup(p) {
|
|
127
|
-
const a = U(!1), d = U(""), m = I(() => {
|
|
128
|
-
const { getFlagValue: c } = re();
|
|
129
|
-
return Object.values(ie).map((t) => {
|
|
130
|
-
const v = c(t, (f) => f === "true");
|
|
131
|
-
return {
|
|
132
|
-
name: t,
|
|
133
|
-
enabled: v
|
|
134
|
-
};
|
|
135
|
-
});
|
|
136
|
-
}), i = I(() => {
|
|
137
|
-
const c = d.value.toLowerCase();
|
|
138
|
-
return c ? m.value.filter((t) => t.name.toLowerCase().includes(c)) : m.value;
|
|
139
|
-
}), s = I(() => {
|
|
140
|
-
const c = m.value.filter((f) => f.enabled === !0).length, t = m.value.filter((f) => f.enabled === !1).length, v = m.value.filter((f) => f.enabled === null).length;
|
|
141
|
-
return { enabled: c, disabled: t, unknown: v, total: m.value.length };
|
|
142
|
-
});
|
|
143
|
-
return (c, t) => {
|
|
144
|
-
const v = R("FmButton"), f = R("FmSpacer"), A = R("FmDialog");
|
|
145
|
-
return g(), V(A, {
|
|
146
|
-
modelValue: a.value,
|
|
147
|
-
"onUpdate:modelValue": t[2] || (t[2] = (n) => a.value = n),
|
|
148
|
-
overlay: !0
|
|
149
|
-
}, {
|
|
150
|
-
"dialog-button": w(() => [
|
|
151
|
-
b(de, null, {
|
|
152
|
-
default: w(() => [
|
|
153
|
-
b(v, {
|
|
154
|
-
variant: "secondary",
|
|
155
|
-
label: "Feature flags"
|
|
156
|
-
})
|
|
157
|
-
]),
|
|
158
|
-
_: 1
|
|
159
|
-
})
|
|
160
|
-
]),
|
|
161
|
-
"dialog-header": w(() => [
|
|
162
|
-
u("div", Re, [
|
|
163
|
-
t[3] || (t[3] = u("span", null, "Feature Flags", -1)),
|
|
164
|
-
u("span", ye, x(s.value.enabled) + " enabled · " + x(s.value.disabled) + " disabled · " + x(s.value.unknown) + " unknown ", 1)
|
|
165
|
-
])
|
|
166
|
-
]),
|
|
167
|
-
"dialog-footer": w(() => [
|
|
168
|
-
b(f, { class: "sm:hidden xs:hidden" }),
|
|
169
|
-
b(v, {
|
|
170
|
-
class: "sm:w-full xs:w-full",
|
|
171
|
-
label: "Close",
|
|
172
|
-
size: "md",
|
|
173
|
-
variant: "primary",
|
|
174
|
-
onClick: t[1] || (t[1] = (n) => a.value = !1)
|
|
175
|
-
})
|
|
176
|
-
]),
|
|
177
|
-
default: w(() => [
|
|
178
|
-
u("div", xe, [
|
|
179
|
-
J(u("input", {
|
|
180
|
-
"onUpdate:modelValue": t[0] || (t[0] = (n) => d.value = n),
|
|
181
|
-
type: "text",
|
|
182
|
-
placeholder: "Search flags...",
|
|
183
|
-
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"
|
|
184
|
-
}, null, 512), [
|
|
185
|
-
[X, d.value]
|
|
186
|
-
]),
|
|
187
|
-
u("div", Pe, [
|
|
188
|
-
(g(!0), T(Z, null, ee(i.value, (n) => (g(), T("div", {
|
|
189
|
-
key: n.name,
|
|
190
|
-
class: "flex items-start justify-between gap-2 px-3 py-2 rounded-md hover:bg-gray-50 text-sm"
|
|
191
|
-
}, [
|
|
192
|
-
u("span", Ne, x(n.name), 1),
|
|
193
|
-
n.enabled === !0 ? (g(), T("span", Ce, t[4] || (t[4] = [
|
|
194
|
-
u("span", { class: "w-1.5 h-1.5 rounded-full bg-green-500" }, null, -1),
|
|
195
|
-
B(" Enabled ")
|
|
196
|
-
]))) : n.enabled === !1 ? (g(), T("span", Ae, t[5] || (t[5] = [
|
|
197
|
-
u("span", { class: "w-1.5 h-1.5 rounded-full bg-red-500" }, null, -1),
|
|
198
|
-
B(" Disabled ")
|
|
199
|
-
]))) : (g(), T("span", Le, t[6] || (t[6] = [
|
|
200
|
-
u("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1),
|
|
201
|
-
B(" Unknown ")
|
|
202
|
-
])))
|
|
203
|
-
]))), 128)),
|
|
204
|
-
i.value.length === 0 ? (g(), T("div", we, ' No flags matching "' + x(d.value) + '" ', 1)) : $("", !0)
|
|
205
|
-
])
|
|
206
|
-
])
|
|
207
|
-
]),
|
|
208
|
-
_: 1
|
|
209
|
-
}, 8, ["modelValue"]);
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
}), Fe = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Ue = /* @__PURE__ */ k({
|
|
213
|
-
__name: "NavigationTab",
|
|
214
|
-
setup(p) {
|
|
215
|
-
const a = y.object({
|
|
216
|
-
label: y.string(),
|
|
217
|
-
value: y.string().optional(),
|
|
218
|
-
icon: y.string().optional(),
|
|
219
|
-
hide: y.boolean().optional(),
|
|
220
|
-
children: y.array(y.lazy(() => a)).optional()
|
|
221
|
-
}), d = se(), m = M(), i = H(), s = j(), c = ce(), { t } = Y(), { isDev: v } = K(), f = I(
|
|
222
|
-
() => {
|
|
223
|
-
var o;
|
|
224
|
-
return ((o = i.sessionUser.value) == null ? void 0 : o.permissions) ?? [];
|
|
225
|
-
}
|
|
226
|
-
), A = (o = []) => o.length === 0 ? !0 : oe(o, f.value).granted, n = (o) => {
|
|
227
|
-
var h, S;
|
|
228
|
-
const l = (S = (h = Q[o]) == null ? void 0 : h.meta) == null ? void 0 : S.validationManifest;
|
|
229
|
-
return A(l == null ? void 0 : l.requiredCaslPermissions);
|
|
230
|
-
};
|
|
231
|
-
G([() => i.currentBusiness.value, () => d.name], ([o, l]) => {
|
|
232
|
-
(o == null ? void 0 : o.menuVersion) === "v3" && (l === e.INGREDIENTS || l === e.RECIPE || l === e.UNIT) && m.push({ name: e.STOCK });
|
|
233
|
-
});
|
|
234
|
-
const _ = (o) => o.filter((l) => !l.hide).map((l) => l.children ? { ...l, children: _(l.children) } : l).filter((l) => !l.children || l.children.length > 0), E = (o) => o.map((l) => {
|
|
235
|
-
delete l.hide;
|
|
236
|
-
const h = l;
|
|
237
|
-
return l.children && (h.children = E(l.children)), h;
|
|
238
|
-
}), O = I(() => {
|
|
239
|
-
var h;
|
|
240
|
-
const o = [
|
|
241
|
-
{
|
|
242
|
-
label: "Non-Production Environment",
|
|
243
|
-
icon: "logo_dev",
|
|
244
|
-
disabled: !0,
|
|
245
|
-
hide: !v
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
label: r(e.STOCK, t),
|
|
249
|
-
// icon: 'inventory_2',
|
|
250
|
-
children: [
|
|
251
|
-
{
|
|
252
|
-
label: t("inventory.stock.stock_balance.title"),
|
|
253
|
-
value: e.STOCK,
|
|
254
|
-
hide: !n(e.STOCK)
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
label: r(e.UNIT_COST_HISTORY, t),
|
|
258
|
-
value: e.UNIT_COST_HISTORY,
|
|
259
|
-
hide: !n(e.UNIT_COST_HISTORY) || !s.enableTotalCost
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
label: r(e.WASTAGE_TEMPLATE, t),
|
|
263
|
-
value: e.WASTAGE_TEMPLATE,
|
|
264
|
-
hide: !n(e.WASTAGE_TEMPLATE) || !s.enableWastageTemplate
|
|
265
|
-
}
|
|
266
|
-
]
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
label: t("inventory.closing.title"),
|
|
270
|
-
children: [
|
|
271
|
-
{
|
|
272
|
-
label: r(e.CLOSING_HISTORY, t),
|
|
273
|
-
value: e.CLOSING_HISTORY,
|
|
274
|
-
hide: !n(e.CLOSING_HISTORY)
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
label: r(e.CLOSING_TEMPLATE, t),
|
|
278
|
-
value: e.CLOSING_TEMPLATE,
|
|
279
|
-
hide: !n(e.CLOSING_TEMPLATE) || !s.enableClosingTemplate
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
label: r(e.CLOSING_DRAFT, t),
|
|
283
|
-
value: e.CLOSING_DRAFT,
|
|
284
|
-
hide: !n(e.CLOSING_DRAFT) || !s.enableClosingTemplate
|
|
285
|
-
}
|
|
286
|
-
]
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
label: r(e.INGREDIENTS, t),
|
|
290
|
-
// icon: 'grocery',
|
|
291
|
-
value: e.INGREDIENTS,
|
|
292
|
-
hide: !n(e.INGREDIENTS)
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
label: r(e.INGREDIENT_GROUP, t),
|
|
296
|
-
// icon: 'grocery',
|
|
297
|
-
value: e.INGREDIENT_GROUP,
|
|
298
|
-
hide: !s.enableIngredientGroup
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
label: r(e.RECIPE, t),
|
|
302
|
-
// icon: 'weight',
|
|
303
|
-
value: e.RECIPE,
|
|
304
|
-
hide: !n(e.RECIPE)
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
label: r(e.UNIT, t),
|
|
308
|
-
// icon: 'fastfood',
|
|
309
|
-
value: e.UNIT,
|
|
310
|
-
hide: !n(e.UNIT)
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
label: t("inventory.transfer.title"),
|
|
314
|
-
// icon: 'swap_horiz',
|
|
315
|
-
children: [
|
|
316
|
-
{
|
|
317
|
-
label: r(e.RECEIVE_REQUEST, t),
|
|
318
|
-
value: e.RECEIVE_REQUEST,
|
|
319
|
-
hide: !n(e.RECEIVE_REQUEST)
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
label: r(e.APPROVAL, t),
|
|
323
|
-
value: e.APPROVAL,
|
|
324
|
-
hide: !n(e.APPROVAL)
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
label: r(e.SURCHARGE, t),
|
|
328
|
-
value: e.SURCHARGE,
|
|
329
|
-
hide: !n(e.SURCHARGE) || !s.enableSurcharge
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
label: r(e.TRANSFER_TEMPLATE, t),
|
|
333
|
-
value: e.TRANSFER_TEMPLATE,
|
|
334
|
-
hide: !n(e.TRANSFER_TEMPLATE) || !s.enablePoTemplate
|
|
335
|
-
}
|
|
336
|
-
]
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
label: r(e.SUPPLIER, t),
|
|
340
|
-
// icon: 'group',
|
|
341
|
-
value: e.SUPPLIER,
|
|
342
|
-
hide: !n(e.SUPPLIER)
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
label: r(e.WAREHOUSE, t),
|
|
346
|
-
// icon: 'warehouse',
|
|
347
|
-
value: e.WAREHOUSE,
|
|
348
|
-
hide: !n(e.WAREHOUSE)
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
label: r(e.PUBLISH, t),
|
|
352
|
-
value: e.PUBLISH,
|
|
353
|
-
hide: !n(e.PUBLISH)
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
label: r(e.IMPORT, t),
|
|
357
|
-
value: e.IMPORT,
|
|
358
|
-
hide: !n(e.IMPORT) || !s.enableBulkImport
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
label: r(e.INTEGRATION, t),
|
|
362
|
-
// icon: 'integration_instructions',
|
|
363
|
-
value: e.INTEGRATION,
|
|
364
|
-
hide: !n(e.INTEGRATION)
|
|
365
|
-
}
|
|
366
|
-
], l = E(_(o));
|
|
367
|
-
return ((h = i.currentBusiness.value) == null ? void 0 : h.menuVersion) === "v3" ? l.filter(
|
|
368
|
-
(S) => S.value !== e.INGREDIENTS && S.value !== e.RECIPE && S.value !== e.UNIT && S.value !== e.PUBLISH
|
|
369
|
-
) : l;
|
|
370
|
-
}), F = I({
|
|
371
|
-
get() {
|
|
372
|
-
if (d.name)
|
|
373
|
-
return String(d.name);
|
|
374
|
-
},
|
|
375
|
-
set(o) {
|
|
376
|
-
o && m.push({ name: o });
|
|
377
|
-
}
|
|
378
|
-
}), P = I(
|
|
379
|
-
() => {
|
|
380
|
-
var o;
|
|
381
|
-
return `NavigationTab.${(o = i.currentBusiness.value) == null ? void 0 : o._id}`;
|
|
382
|
-
}
|
|
383
|
-
), L = U(!1), z = I({
|
|
384
|
-
get() {
|
|
385
|
-
return L.value;
|
|
386
|
-
},
|
|
387
|
-
set(o) {
|
|
388
|
-
L.value = o, o || c.setItem(P.value, "true");
|
|
389
|
-
}
|
|
390
|
-
});
|
|
391
|
-
return G([() => P.value], () => {
|
|
392
|
-
L.value = !1, setTimeout(() => {
|
|
393
|
-
z.value = !c.getItem(P.value);
|
|
394
|
-
}, 2e3);
|
|
395
|
-
}), (o, l) => {
|
|
396
|
-
const h = R("FmCollapsibleTabs");
|
|
397
|
-
return g(), T("div", Fe, [
|
|
398
|
-
b(Oe),
|
|
399
|
-
b(h, {
|
|
400
|
-
modelValue: F.value,
|
|
401
|
-
"onUpdate:modelValue": l[0] || (l[0] = (S) => F.value = S),
|
|
402
|
-
items: O.value
|
|
403
|
-
}, null, 8, ["modelValue", "items"])
|
|
404
|
-
]);
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
|
|
409
|
-
let p, a;
|
|
410
|
-
return { promise: new Promise((m, i) => {
|
|
411
|
-
p = m, a = i;
|
|
412
|
-
}), resolve: p, reject: a };
|
|
413
|
-
});
|
|
414
|
-
typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(p) {
|
|
415
|
-
return await new Promise((a) => setTimeout(a, p)), Promise.resolve(this);
|
|
416
|
-
});
|
|
417
|
-
const Ke = /* @__PURE__ */ k({
|
|
418
|
-
__name: "App",
|
|
419
|
-
setup(p) {
|
|
420
|
-
const a = H(), d = me(), m = K();
|
|
421
|
-
D(() => {
|
|
422
|
-
if (window.location.href.includes("print-preview")) {
|
|
423
|
-
a.setEmbedded(!0), document.body.classList.add("print-mode");
|
|
424
|
-
return;
|
|
425
|
-
}
|
|
426
|
-
a.registerSidebarComponent(Ue), d.initGoogleMap(m.appApi.googleMap).catch(() => {
|
|
427
|
-
console.error("Google map cannot be loaded");
|
|
428
|
-
});
|
|
429
|
-
}), G([() => a.currentCountry.value], () => {
|
|
430
|
-
i();
|
|
431
|
-
});
|
|
432
|
-
async function i() {
|
|
433
|
-
var s;
|
|
434
|
-
try {
|
|
435
|
-
await a.readBusinesses(), a.currentBusiness.value = (s = a.businesses.value) == null ? void 0 : s.find((c) => c);
|
|
436
|
-
} catch (c) {
|
|
437
|
-
console.error("error when trying to reset businesses:", c);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
return (s, c) => (g(), V(Ie));
|
|
441
|
-
}
|
|
442
|
-
});
|
|
443
|
-
export {
|
|
444
|
-
Ke as default
|
|
445
|
-
};
|