@feedmepos/mf-inventory-portal 1.3.14-dev.2 → 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.
Files changed (105) hide show
  1. package/dist/App-BQZQFNKG.js +411 -0
  2. package/dist/{ApprovalView-CfF2FqsE.js → ApprovalView-BVszC4Cw.js} +12 -12
  3. package/dist/{BindingsDialog-H-juP-az.js → BindingsDialog-B3L_3xdo.js} +13 -13
  4. package/dist/{BindingsPicker-ClruHF7p.js → BindingsPicker-A4togB2v.js} +2 -2
  5. package/dist/{BindingsTable-Bx9pbFOO.js → BindingsTable-DacoMdY6.js} +3 -3
  6. package/dist/{ClosingDraftView-DN97Tao5.js → ClosingDraftView-C9tvMgLl.js} +16 -16
  7. package/dist/{ClosingHistoryView-DsRYUqa2.js → ClosingHistoryView-CqqzqSqU.js} +5 -5
  8. package/dist/{ClosingTemplateView-f9zfsxCu.js → ClosingTemplateView-CLi0XE8S.js} +15 -15
  9. package/dist/{DeliveryOrderPrintPreview-BMK4kBCQ.js → DeliveryOrderPrintPreview-DEHEfd80.js} +11 -11
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bqj_Ygmo.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BDZVaj3l.js} +16 -16
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CK1ha_AY.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-xxS4P6uo.js} +2 -2
  12. package/dist/{FmMultiselectDialog-BazT9oUX.js → FmMultiselectDialog-CR2peMEL.js} +1 -1
  13. package/dist/{FmMultiselectDialog-_gUuhudi.js → FmMultiselectDialog-FGR8t9rz.js} +16 -16
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BBtAgdsA.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DgXOsVLe.js} +4 -4
  15. package/dist/{ImportView-jpkwuCXO.js → ImportView-CEI0QqGz.js} +6 -6
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DLJnF4do.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-cRgKjHY0.js} +1 -1
  17. package/dist/{IngredientGroupView-x3t1hyNn.js → IngredientGroupView-DEELNMpl.js} +6 -6
  18. package/dist/{IngredientsView-BzWTnlb4.js → IngredientsView-D3OcjZdT.js} +16 -16
  19. package/dist/{IntegrationExplorerView-Bca3owbx.js → IntegrationExplorerView-ByPpT3hC.js} +5 -5
  20. package/dist/{IntegrationView-Dh1c4Qyo.js → IntegrationView-BSqlJBp-.js} +81 -81
  21. package/dist/{InventoryBindingForm-B1sI1TGZ.js → InventoryBindingForm-SgmyJvCs.js} +1 -1
  22. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-7NeE7Xos.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-GLipe2bO.js} +5 -5
  23. package/dist/{InventoryBindingSummary-R8zHPc52.js → InventoryBindingSummary-D6deGR6B.js} +1 -1
  24. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DMJVh7Nt.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DGDL-t7m.js} +1 -1
  25. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-ChC9sEIk.js → PremiumBadge.vue_vue_type_script_setup_true_lang-ff1rPUJW.js} +7 -7
  26. package/dist/{PublishView-Bqp8Ww4J.js → PublishView-7TAa2QQB.js} +15 -15
  27. package/dist/{PurchaseOrderPrintPreview-D7TCn8U-.js → PurchaseOrderPrintPreview-DhcnInSW.js} +11 -11
  28. package/dist/ReceiveRequestView-Z3JYH3gf.js +36203 -0
  29. package/dist/{RecipeView-D8Mvgji9.js → RecipeView--ALwYD-O.js} +16 -16
  30. package/dist/{SettingsView-BJScLK9z.js → SettingsView-F_BWUxoq.js} +4 -4
  31. package/dist/StockView-BLrquJf2.js +2406 -0
  32. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DUKv_LV6.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxNgi5uv.js} +1 -1
  33. package/dist/{SupplierView-DdBBIV8W.js → SupplierView-DklOXwHD.js} +13 -13
  34. package/dist/{SurchargeView-DisBUPIs.js → SurchargeView-DcImorUr.js} +17 -17
  35. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CZ3Q3BAf.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-xdLxGAOM.js} +2 -2
  36. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CC7F5HVc.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bu4XKhII.js} +1 -1
  37. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DMrRfwKD.js +3890 -0
  38. package/dist/{TransferTemplateView-7ICJMF9z.js → TransferTemplateView-DTdlSI2b.js} +18 -18
  39. package/dist/{UnitCostHistoryView-BMRDBQ58.js → UnitCostHistoryView-CQ_DJE-t.js} +243 -246
  40. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-mNXHzLN3.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-QuejzcCL.js} +4 -4
  41. package/dist/{UnitView-uUUYOjYn.js → UnitView-DzcCdCGw.js} +8 -8
  42. package/dist/{WarehouseView-BfMf_iuj.js → WarehouseView-BYj9DD1N.js} +26 -26
  43. package/dist/{WastageTemplateView-BQYjJGZ-.js → WastageTemplateView--w6an2Ar.js} +15 -15
  44. package/dist/api/email.d.ts +54 -0
  45. package/dist/{app-B_zMegJc.js → app-CPlgHGkC.js} +22314 -23519
  46. package/dist/app.d.ts +14 -22
  47. package/dist/app.js +2 -2
  48. package/dist/{closing-template-9vhx5Ji1.js → closing-template-B9JOB9ah.js} +1 -1
  49. package/dist/components/row-action.enum.d.ts +2 -1
  50. package/dist/{date2-BMCS_Dsc.js → date2-Ci9tlLMJ.js} +1 -1
  51. package/dist/{dayjs.min-Dl26OaXo.js → dayjs.min-DTx2lmq6.js} +26 -26
  52. package/dist/{decimal-e6OK2jkR.js → decimal-iKhH_VJO.js} +2 -2
  53. package/dist/{defineDeepModel-BvLlwxnd.js → defineDeepModel-C25T8oyP.js} +1 -1
  54. package/dist/{duplicate-template-Cnhu8Rxw.js → duplicate-template-BptIBRQ3.js} +1 -1
  55. package/dist/{empty-placeholder-B0QU467o.js → empty-placeholder-wf6-BWE8.js} +1 -1
  56. package/dist/{export-CGvyGmeo.js → export-CKuVd5pP.js} +1 -1
  57. package/dist/{feature-Do41WWzx.js → feature-CXMSo4z7.js} +121 -116
  58. package/dist/{format-time-from-id-CqX_KaUG.js → format-time-from-id-Bk60g6lh.js} +1 -1
  59. package/dist/{format-unit-display-D8qWmRXP.js → format-unit-display-C4nf8hG8.js} +12 -12
  60. package/dist/{import-export.helper-85V8Ib5e.js → import-export.helper-BDzsQcYD.js} +6 -6
  61. package/dist/{index-C-CwnjUn.js → index-CUVlQagt.js} +3 -3
  62. package/dist/{index-CtUF9Nsv.js → index-DTszDSPO.js} +1 -1
  63. package/dist/{index-Cg3aLEhT.js → index-DiKOwY5C.js} +1 -1
  64. package/dist/{inventory-core-dart.default-B64FzAla.js → inventory-core-dart.default-Cn3sonot.js} +10 -10
  65. package/dist/{lodash-U9ycVPlv.js → lodash-DGOK6ZkA.js} +1 -1
  66. package/dist/{lz-string-0CgVsQoC.js → lz-string-QrWbdmw6.js} +21 -21
  67. package/dist/{netsuite-Du7-sXJt.js → netsuite-DglgyKcZ.js} +37 -37
  68. package/dist/{number-iJAzDfmj.js → number-Ut7u2ZEE.js} +11 -11
  69. package/dist/{predefined-templates-LlSrXOXm.js → predefined-templates-DZtFebPU.js} +1 -1
  70. package/dist/{purchase-order-template-DFuXb0rr.js → purchase-order-template-DhNVhXmD.js} +1 -1
  71. package/dist/{recalculationUtils-DWPnMW1G.js → recalculationUtils-CqJRd9B2.js} +1 -1
  72. package/dist/router/name.d.ts +0 -1
  73. package/dist/{row-action.enum-Co_O4qD9.js → row-action.enum-DQ9bJ_uv.js} +7 -1
  74. package/dist/{rules-DefSKiUN.js → rules-BIm67nl_.js} +2 -2
  75. package/dist/{stock-BfF6peMd.js → stock-CzdMn9n8.js} +3 -3
  76. package/dist/{stock-Cx1BwdWs.js → stock-Dc4_U69J.js} +27 -28
  77. package/dist/stores/feature.d.ts +2 -0
  78. package/dist/{supplier-CU3iqdGr.js → supplier-De5G6CeF.js} +2 -2
  79. package/dist/{surcharge-D77J5opH.js → surcharge-CN5FtDZq.js} +8 -8
  80. package/dist/tsconfig.app.tsbuildinfo +1 -1
  81. package/dist/{use-ingredient-select-dialog-B-jxV-79.js → use-ingredient-select-dialog-Wy4CtYcZ.js} +2 -2
  82. package/dist/{use-inventory-binding-dialog-BdTd5qPl.js → use-inventory-binding-dialog-C1LCH0jV.js} +2 -2
  83. package/dist/{use-template-enabled-locations-vFvaCjlH.js → use-template-enabled-locations-BfZFcXZ_.js} +2 -2
  84. package/dist/views/receive-request/components/email-dialog/EmailDialog.vue.d.ts +20 -0
  85. package/dist/views/receive-request/components/email-dialog/EmailDialogProps.d.ts +13 -0
  86. package/dist/views/receive-request/composables/use-order-draft-permission.d.ts +5 -2
  87. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -0
  88. package/dist/vue-i18n-CvVV4Xof.js +2365 -0
  89. package/dist/{xlsx-o7n1whCa.js → xlsx-lawW6Hwh.js} +570 -570
  90. package/dist/{xlsx.util-D6nPboPW.js → xlsx.util-DSCqPt8v.js} +1 -1
  91. package/package.json +2 -2
  92. package/dist/App-D1_jkD6L.js +0 -309
  93. package/dist/DefaultView-COVVxOrF.js +0 -31
  94. package/dist/ReceiveRequestView-oNBVAMYu.js +0 -2817
  95. package/dist/StockView-CRRdVCcD.js +0 -2439
  96. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BLlg1Vka.js +0 -3837
  97. package/dist/components/HrmPermissionGuard.vue.d.ts +0 -54
  98. package/dist/composable/useHrmPermission.d.ts +0 -17
  99. package/dist/composable/useInventoryAccess.d.ts +0 -11
  100. package/dist/composable/useNavigationMenu.d.ts +0 -14
  101. package/dist/router/route-permission.d.ts +0 -10
  102. package/dist/useHrmPermission-CekUhyck.js +0 -16
  103. package/dist/useNavigationMenu-BiLWMIip.js +0 -162
  104. package/dist/views/DefaultView.vue.d.ts +0 -2
  105. package/dist/vue-i18n-C3_OsgSl.js +0 -2365
@@ -1,4 +1,4 @@
1
- import { r as m, u, a as d } from "./xlsx-o7n1whCa.js";
1
+ import { r as m, u, a as d } from "./xlsx-lawW6Hwh.js";
2
2
  function* x(o) {
3
3
  const [e, n] = o.split(":"), t = /\d+/, l = t.exec(e), c = t.exec(n);
4
4
  if (!l || !c)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-inventory-portal",
3
- "version": "1.3.14-dev.2",
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.7",
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",
@@ -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-B_zMegJc.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-Do41WWzx.js";
7
- import { u as ne } from "./netsuite-Du7-sXJt.js";
8
- import { u as D } from "./useNavigationMenu-BiLWMIip.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
- };
@@ -1,31 +0,0 @@
1
- import { defineComponent as p, computed as f, watchEffect as d, resolveComponent as n, openBlock as _, createElementBlock as v, createVNode as o, createElementVNode as c } from "vue";
2
- import { useRouter as g } from "vue-router";
3
- import { useCoreStore as x } from "@feedmepos/mf-common";
4
- import { u as S } from "./useNavigationMenu-BiLWMIip.js";
5
- import { u as y } from "./feature-Do41WWzx.js";
6
- const C = { class: "flex flex-col items-center w-full h-full gap-24" }, V = /* @__PURE__ */ p({
7
- __name: "DefaultView",
8
- setup(F) {
9
- const t = x(), a = y(), u = g(), { firstAccessibleRouteName: l } = S(), m = f(
10
- () => !!t.sessionUser.value && !!t.currentBusiness.value && a.isLoaded
11
- );
12
- return d(() => {
13
- if (!m.value) return;
14
- const e = l.value;
15
- e && u.replace({ name: e });
16
- }), (e, r) => {
17
- const s = n("FmSpacer"), i = n("FmCircularProgress");
18
- return _(), v("div", C, [
19
- o(s),
20
- c("div", null, [
21
- o(i, { size: "xl" })
22
- ]),
23
- r[0] || (r[0] = c("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
24
- o(s)
25
- ]);
26
- };
27
- }
28
- });
29
- export {
30
- V as default
31
- };