@feedmepos/mf-inventory-portal 1.7.9 → 1.7.11-dev.0

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 (137) hide show
  1. package/dist/App-8RkTRU8A.js +1434 -0
  2. package/dist/{ApprovalView-DRT6Qd2e.js → ApprovalView-3pDiNOMO.js} +10 -10
  3. package/dist/{BindingsDialog-CdAUadBI.js → BindingsDialog-CEXDujwo.js} +2 -2
  4. package/dist/{BindingsPicker-BN_wX0N8.js → BindingsPicker-UfogQ71P.js} +2 -2
  5. package/dist/{BindingsTable-CK6m-C2K.js → BindingsTable-qxNINfoB.js} +4 -4
  6. package/dist/BulkReceiveRequestView-BOz0aMxF.js +2657 -0
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CFX666Wz.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Dyy-mkOF.js} +1 -1
  8. package/dist/ClosingDraftView-DgLOKZZv.js +4656 -0
  9. package/dist/{ClosingHistoryView-DrI5Qo6C.js → ClosingHistoryView-BMcoewSW.js} +6 -6
  10. package/dist/{ClosingTemplateView-DilRh_vH.js → ClosingTemplateView-C85_eRfx.js} +17 -17
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-Dzaimy8_.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CIXV7TwL.js} +1 -1
  12. package/dist/{DefaultView-DAud5FWQ.js → DefaultView-BCPdBP97.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-V-x1xvBl.js → DeliveryOrderPrintPreview-DvKOE8bs.js} +8 -8
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-KUJLmR7a.js → EmailDialog.vue_vue_type_script_setup_true_lang-D0XF1ILm.js} +5072 -5067
  15. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BStqqCMn.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-kTHffgJ0.js} +6 -6
  16. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BnHM1BX1.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D6T3zCf3.js} +2 -2
  17. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BPyrxPpe.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-NuIzfwdk.js} +3 -3
  18. package/dist/{FmMultiselectDialog-BniqAG4j.js → FmMultiselectDialog-CE-n4_oS.js} +1 -1
  19. package/dist/{FmMultiselectDialog-C2PspPWe.js → FmMultiselectDialog-DAJZwLbn.js} +2 -2
  20. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Bf3SW_Cs.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BKfT_BMX.js} +6 -6
  21. package/dist/{ImportView-DWRmu0QT.js → ImportView-CGgk98bu.js} +499 -496
  22. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DY0kkryN.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-D19a-cBS.js} +1 -1
  23. package/dist/{IngredientGroupView-C6VVdwdq.js → IngredientGroupView-CQ-spqfv.js} +6 -6
  24. package/dist/{IngredientsView-DuEBYiLy.js → IngredientsView-BDuPrYSY.js} +19 -18
  25. package/dist/{IntegrationExplorerView-DJh7dTAl.js → IntegrationExplorerView-DXMTYLFQ.js} +5 -5
  26. package/dist/{IntegrationView-DsH2Hs1K.js → IntegrationView-B6qaoyfJ.js} +15 -15
  27. package/dist/{InventoryBindingForm-BACENuFH.js → InventoryBindingForm-Cj5DSxr7.js} +1 -1
  28. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bj4R7KQF.js +563 -0
  29. package/dist/{InventoryBindingSummary-BncS50eD.js → InventoryBindingSummary-DTdjcASy.js} +1 -1
  30. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-LzXw3Flm.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-L_Mk0z6y.js} +1 -1
  31. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Dra4APix.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BnjSVqIF.js} +1 -1
  32. package/dist/{ProductionView-CJ6Oi2ae.js → ProductionView-W2-oSNQn.js} +8 -8
  33. package/dist/{PublishView-30yz5vFX.js → PublishView-DEX148S9.js} +4 -4
  34. package/dist/{PurchaseOrderPrintPreview-CclxLcCT.js → PurchaseOrderPrintPreview-DN8TnmIP.js} +5 -5
  35. package/dist/{ReceiveRequestView-DIQeDhuy.js → ReceiveRequestView-C3ExFs2T.js} +15 -15
  36. package/dist/RecipeView-BYeKfM6_.js +3625 -0
  37. package/dist/{SettingsView-Bfp1K782.js → SettingsView-Bv0BdRhB.js} +5 -5
  38. package/dist/{SingleColumnLayout.vue_vue_type_script_setup_true_lang-DwrLsWX_.js → SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js} +39 -37
  39. package/dist/{StockView-BNqzu1Rt.js → StockView-Cx2I8wc7.js} +22 -22
  40. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DFI2fuD0.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-D3AxBfTX.js} +1 -1
  41. package/dist/{SupplierView-Bnw_eUE1.js → SupplierView-n8tQo7GX.js} +13 -13
  42. package/dist/{SurchargeView-B0VoAU4k.js → SurchargeView-BSq_i2LS.js} +7 -7
  43. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-Cymvi3zl.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DrVYEbqs.js} +2 -2
  44. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DBQx6RAo.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DHbTvUSw.js} +1 -1
  45. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BMpUm52g.js → TransferDetails.vue_vue_type_script_setup_true_lang-AZjFZAHD.js} +1648 -1584
  46. package/dist/{TransferTemplateView-BjfxrwzR.js → TransferTemplateView-D29atWbe.js} +21 -21
  47. package/dist/{UnitCostHistoryView-C3ffDyKS.js → UnitCostHistoryView-Bc75dnSv.js} +5 -5
  48. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-VG2ecWER.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BL-N9tyu.js} +4 -4
  49. package/dist/{UnitView-BaR_a9Kw.js → UnitView-CP452QJB.js} +9 -9
  50. package/dist/{WarehouseView-RQjCcteZ.js → WarehouseView-hAFZ3OgC.js} +6 -6
  51. package/dist/{WastageTemplateView-D4z8zpwb.js → WastageTemplateView-BHoD95B4.js} +15 -15
  52. package/dist/api/changelog.d.ts +132 -0
  53. package/dist/api/purchase-order.d.ts +2 -0
  54. package/dist/{app-CyTU8N3H.js → app-DMuIqNOV.js} +22057 -21089
  55. package/dist/app.d.ts +906 -15
  56. package/dist/app.js +1 -1
  57. package/dist/{closing-template-B2tB7sQC.js → closing-template-vfraoomZ.js} +1 -1
  58. package/dist/{date2-DQH6DhKn.js → date2-nHWr0vbq.js} +5 -5
  59. package/dist/{dayjs.min-BOciSc8b.js → dayjs.min-CWDZGPnC.js} +5 -5
  60. package/dist/{decimal-yQvd_IOl.js → decimal-BRpZx0Ku.js} +2 -2
  61. package/dist/{defineDeepModel-DXNMJH2I.js → defineDeepModel-Cpd1mYyq.js} +1 -1
  62. package/dist/{duplicate-template-DO7WYSTm.js → duplicate-template-D0SC2p3z.js} +1 -1
  63. package/dist/{feature-v0qFoj-w.js → feature-_LWb4rW0.js} +2 -2
  64. package/dist/{format-time-from-id-BuBtGQBF.js → format-time-from-id-Dl3MwzI7.js} +1 -1
  65. package/dist/{format-unit-display-sljdJGi2.js → format-unit-display-DWI0rLun.js} +27 -27
  66. package/dist/{import-export.helper-B72QRGIw.js → import-export.helper-B0Y6WK3R.js} +6 -6
  67. package/dist/{index-CU4Kuswf.js → index-7XQuT32d.js} +1 -1
  68. package/dist/{index-BCGkKprE.js → index-BSnZJjFV.js} +3 -3
  69. package/dist/{index-TQcHaMrv.js → index-BpvlLCUv.js} +3306 -3232
  70. package/dist/{inventory-core-dart.default-BgoK1eTS.js → inventory-core-dart.default-DGcUQGOR.js} +1 -1
  71. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -0
  72. package/dist/{lz-string-BjdS2wyT.js → lz-string-Lbge8hci.js} +1 -1
  73. package/dist/{netsuite-z7vVdCsZ.js → netsuite-CFXLrvd1.js} +3 -2
  74. package/dist/{number-CPj4E2k6.js → number-B7y_oaIm.js} +3 -3
  75. package/dist/{predefined-templates-Bhig3JBF.js → predefined-templates-SX1B-fCF.js} +1 -1
  76. package/dist/{purchase-order-template-CNDfnM86.js → purchase-order-template-qKmMGW-y.js} +1 -1
  77. package/dist/{recalculationUtils-CQNmwxc2.js → recalculationUtils-DdG6rZr1.js} +1 -1
  78. package/dist/{rules-9N5HIcET.js → rules-DRizXY3Q.js} +2 -2
  79. package/dist/{stock-uZA1to9T.js → stock-BAMK_7xp.js} +1 -1
  80. package/dist/{stock-B7QJYZif.js → stock-CAlt5MDT.js} +3 -3
  81. package/dist/stores/bulk-job.d.ts +13 -0
  82. package/dist/stores/inventory.d.ts +11 -2
  83. package/dist/style.css +1 -1
  84. package/dist/{supplier-B8DQBfvr.js → supplier-B34rnmVy.js} +2 -2
  85. package/dist/{surcharge-DHf5QM_k.js → surcharge-CMBDRIiD.js} +8 -8
  86. package/dist/tsconfig.app.tsbuildinfo +1 -1
  87. package/dist/{uom-rules-IHu3f_dQ.js → uom-rules-DE4OV7iK.js} +1 -1
  88. package/dist/{use-ingredient-select-dialog-Cd3IeQRi.js → use-ingredient-select-dialog-4yUGH4g0.js} +2 -2
  89. package/dist/{use-inventory-binding-dialog-BG0l9YPD.js → use-inventory-binding-dialog-CY42PPSW.js} +2 -2
  90. package/dist/{use-template-enabled-locations-b39RUsFB.js → use-template-enabled-locations-BhYnNMZ_.js} +2 -2
  91. package/dist/{use-transfer-locations-BPzNKZEi.js → use-transfer-locations-agCdJKE0.js} +2 -2
  92. package/dist/{useHrmPermission-BpoNpgJ-.js → useHrmPermission-BQxDr0db.js} +1 -1
  93. package/dist/{useNavigationMenu-CaG9YOud.js → useNavigationMenu-Cm5dPWI-.js} +2 -2
  94. package/dist/{useSseClient-B2KhM-LZ.js → useSseClient-DkX7GX1_.js} +1 -1
  95. package/dist/views/changelog/components/ChangelogDialog.vue.d.ts +19 -0
  96. package/dist/views/changelog/components/ChangelogFloatingButton.vue.d.ts +2 -0
  97. package/dist/views/changelog/components/ChangelogPanel.spec.d.ts +1 -0
  98. package/dist/views/changelog/components/ChangelogPanel.vue.d.ts +20 -0
  99. package/dist/views/changelog/composables/change-path.d.ts +10 -0
  100. package/dist/views/changelog/composables/commit-message.d.ts +9 -0
  101. package/dist/views/changelog/composables/commit-message.spec.d.ts +1 -0
  102. package/dist/views/changelog/composables/json-line-diff.d.ts +10 -0
  103. package/dist/views/changelog/composables/json-line-diff.spec.d.ts +1 -0
  104. package/dist/views/changelog/composables/use-changelog.d.ts +90 -0
  105. package/dist/views/changelog/composables/use-changelog.spec.d.ts +1 -0
  106. package/dist/views/changelog/composables/use-inventory-record-commits.d.ts +97 -0
  107. package/dist/views/changelog/composables/use-inventory-record-commits.spec.d.ts +1 -0
  108. package/dist/views/changelog/composables/use-snapshot-diff.d.ts +29 -0
  109. package/dist/views/changelog/composables/use-snapshot-diff.spec.d.ts +1 -0
  110. package/dist/views/changelog/composables/value-tree.d.ts +14 -0
  111. package/dist/views/changelog/composables/value-tree.spec.d.ts +1 -0
  112. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftOutdatedApproveWarning.spec.d.ts +1 -0
  113. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftOutdatedApproveWarning.vue.d.ts +24 -0
  114. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftSkuCell.spec.d.ts +1 -0
  115. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftSkuCell.vue.d.ts +23 -0
  116. package/dist/views/closing-draft/components/closing-draft-dialog/closing-draft-bridge.d.ts +4 -0
  117. package/dist/views/closing-draft/components/closing-draft-dialog/use-outdated-draft-items.d.ts +10 -0
  118. package/dist/views/closing-draft/components/closing-draft-dialog/use-outdated-draft-items.spec.d.ts +1 -0
  119. package/dist/views/import/helper/submit-rows.d.ts +13 -0
  120. package/dist/views/import/helper/submit-rows.spec.d.ts +1 -0
  121. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +2 -0
  122. package/dist/views/ingredients/components/inventory-binding/RecipeBindingBreakdown.vue.d.ts +25 -0
  123. package/dist/views/ingredients/components/inventory-binding/composables/recipe-breakdown.d.ts +34 -0
  124. package/dist/views/ingredients/components/inventory-binding/composables/recipe-breakdown.spec.d.ts +1 -0
  125. package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +2 -0
  126. package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +4 -0
  127. package/dist/views/receive-request/components/email-dialog/EmailDialog.spec.d.ts +1 -0
  128. package/dist/views/receive-request/components/email-dialog/EmailDialogProps.d.ts +23 -9
  129. package/dist/views/recipe/composables/use-recipe-table.d.ts +11 -0
  130. package/dist/{vue-i18n-DgJpgCMa.js → vue-i18n-CsKZo5u4.js} +271 -271
  131. package/dist/{xlsx.util-Bkd2A_If.js → xlsx.util-Cy5DyLlu.js} +2 -2
  132. package/package.json +4 -2
  133. package/dist/App-wSwzHKiz.js +0 -311
  134. package/dist/BulkReceiveRequestView-BXs22T-g.js +0 -2584
  135. package/dist/ClosingDraftView-IffpT50J.js +0 -4496
  136. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-BlxNT4bV.js +0 -441
  137. package/dist/RecipeView-D8DyqwP-.js +0 -3584
@@ -1,5 +1,5 @@
1
- import "./dayjs.min-BOciSc8b.js";
2
- import "./app-CyTU8N3H.js";
1
+ import "./dayjs.min-CWDZGPnC.js";
2
+ import "./app-DMuIqNOV.js";
3
3
  var Fn = {};
4
4
  /*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
5
5
  var cn = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-inventory-portal",
3
- "version": "1.7.9",
3
+ "version": "1.7.11-dev.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -51,8 +51,8 @@
51
51
  "vue-i18n": "^10.0.5",
52
52
  "vue-router": "^4.4.0",
53
53
  "xlsx": "^0.18.5",
54
- "@feedmepos/codemax-core": "^1.0.0",
55
54
  "@feedmepos/inventory-core-2": "^2.0.0",
55
+ "@feedmepos/codemax-core": "^1.0.0",
56
56
  "@feedmepos/inventory-core": "^1.0.2-dev.8",
57
57
  "@feedmepos/inventory-core-js": "^1.0.1",
58
58
  "@feedmepos/inventory-core-dart": "^1.0.0",
@@ -60,6 +60,7 @@
60
60
  "@feedmepos/zod-inventory": "^2.0.0"
61
61
  },
62
62
  "devDependencies": {
63
+ "@playwright/test": "1.61.1",
63
64
  "@rushstack/eslint-patch": "^1.10.3",
64
65
  "@testing-library/vue": "^8.1.0",
65
66
  "@tsconfig/node18": "^18.2.4",
@@ -108,6 +109,7 @@
108
109
  "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
109
110
  "format": "prettier --write src/",
110
111
  "test": "vitest",
112
+ "test:e2e": "playwright test",
111
113
  "type-check": "vue-tsc --declaration --noEmit -p tsconfig.app.json",
112
114
  "check:env": "cat build-*.env | grep -qE \"^[^#].*localhost\" && { echo \"Error: build-*.env files contains localhost reference\" >&2; exit 1;} || exit 0",
113
115
  "prepublish": "pnpm check:env && pnpm build:mf && pnpm build:dts",
@@ -1,311 +0,0 @@
1
- import { ref as k, onUnmounted as H, computed as y, defineComponent as P, watch as N, onMounted as $, resolveComponent as w, createElementBlock as g, openBlock as m, createBlock as L, createCommentVNode as U, unref as x, createVNode as _, createElementVNode as o, toDisplayString as b, withCtx as R, withDirectives as O, vModelText as j, Fragment as q, renderList as z, createTextVNode as B } from "vue";
2
- import { _ as K } from "./empty-placeholder-B0QU467o.js";
3
- import { u as Q, a as J, R as S, b as W } from "./app-CyTU8N3H.js";
4
- import { useCoreStore as C, useI18n as X } from "@feedmepos/mf-common";
5
- import { useRouter as T, useRoute as Y } from "vue-router";
6
- import { u as Z, a as ee, I as te } from "./feature-v0qFoj-w.js";
7
- import { u as oe } from "./netsuite-z7vVdCsZ.js";
8
- import { u as D } from "./useNavigationMenu-CaG9YOud.js";
9
- import { u as ne } from "./useTabStorage-BkIVScW_.js";
10
- import { F as se } from "./FmAdminBadge-DlplQOHb.js";
11
- import { u as re } from "./googlemap-D9vA7GsS.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 = T();
21
- if (!F.value.loadingHookInstalled) {
22
- F.value.loadingHookInstalled = !0;
23
- const t = p.beforeEach(() => {
24
- F.value.isLoading = !0;
25
- }), c = p.afterEach(() => {
26
- F.value.isLoading = !1;
27
- });
28
- H(() => {
29
- F.value.loadingHookInstalled = !1, t(), c();
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__ */ P({
52
- __name: "InventoryView",
53
- setup(p) {
54
- const t = Q(), c = J(), i = oe(), r = C(), d = T(), a = le(), e = Z(), { t: l } = X(), { hasAnyAccessibleInventoryRoute: f } = ie();
55
- N(
56
- [() => r.sessionUser.value, () => r.currentBusiness.value],
57
- ([v, u]) => {
58
- n(v, u);
59
- }
60
- ), $(async () => {
61
- await e.init(), await r.readBusinesses();
62
- const v = r.sessionUser.value, u = r.currentBusiness.value;
63
- n(v, u);
64
- });
65
- function n(v, u) {
66
- !v || !u || 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 c.init();
72
- }
73
- const A = y(() => d.currentRoute.value.name === S.TRANSFER_TEMPLATE ? e.enablePoTemplate : d.currentRoute.value.name === S.INGREDIENT_GROUP ? e.enableIngredientGroup : !0), E = y(
74
- () => d.currentRoute.value.matched.some((v) => {
75
- var I;
76
- const u = v.meta, h = u == null ? void 0 : u.validationManifest;
77
- return (((I = h == null ? void 0 : h.requiredCaslPermissions) == null ? void 0 : I.length) ?? 0) > 0;
78
- })
79
- ), G = y(() => {
80
- if (!r.sessionUser.value) return !1;
81
- if (t._locations !== null && t.locations.length === 0) return !0;
82
- if (!e.isLoaded) return !1;
83
- const h = d.currentRoute.value.name === S.LOADING;
84
- return !f.value && (h || E.value);
85
- });
86
- return (v, u) => {
87
- const h = w("FmSpacer"), I = w("FmCircularProgress"), V = w("FmButton"), M = w("RouterView");
88
- return m(), g("div", null, [
89
- x(a).isLoading ? (m(), g("div", ue, [
90
- _(h),
91
- o("div", null, [
92
- _(I, { size: "xl" })
93
- ]),
94
- u[0] || (u[0] = o("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
95
- _(h)
96
- ])) : G.value ? (m(), g("div", ce, [
97
- u[1] || (u[1] = o("img", {
98
- src: K,
99
- alt: "No permission",
100
- class: "w-[200px] h-[200px]"
101
- }, null, -1)),
102
- o("div", de, [
103
- o("div", me, b(x(l)("inventory.common.noPermission.title")), 1),
104
- o("div", pe, b(x(l)("inventory.common.noPermission.description")), 1)
105
- ])
106
- ])) : A.value ? x(r).sessionUser.value ? (m(), L(M, { key: 3 })) : U("", !0) : (m(), g("div", fe, [
107
- o("div", ve, [
108
- o("div", ge, b(x(l)("inventory.common.proPlan.title")), 1),
109
- o("div", _e, b(x(l)("inventory.common.proPlan.subtitle")), 1)
110
- ]),
111
- o("div", ye, [
112
- o("a", xe, [
113
- _(V, {
114
- label: x(l)("inventory.common.proPlan.comparePlans"),
115
- variant: "secondary"
116
- }, null, 8, ["label"])
117
- ]),
118
- o("a", be, [
119
- _(V, {
120
- label: x(l)("inventory.common.proPlan.callUs"),
121
- "prepend-icon": "call"
122
- }, null, 8, ["label"])
123
- ])
124
- ])
125
- ]))
126
- ]);
127
- };
128
- }
129
- }), 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 = {
130
- key: 0,
131
- class: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 px-2 py-0.5 rounded-full"
132
- }, Ne = {
133
- key: 1,
134
- class: "inline-flex items-center gap-1 text-xs font-medium text-red-700 bg-red-50 px-2 py-0.5 rounded-full"
135
- }, Pe = {
136
- key: 2,
137
- class: "inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full"
138
- }, Ae = {
139
- key: 0,
140
- class: "text-center text-sm text-gray-400 py-4"
141
- }, Ee = /* @__PURE__ */ P({
142
- __name: "FmFeatureFlagDialog",
143
- setup(p) {
144
- const t = k(!1), c = k(""), i = y(() => {
145
- const { getFlagValue: a } = ee();
146
- return Object.values(te).map((e) => {
147
- const l = a(e, (f) => f === "true");
148
- return {
149
- name: e,
150
- enabled: l
151
- };
152
- });
153
- }), r = y(() => {
154
- const a = c.value.toLowerCase();
155
- return a ? i.value.filter((e) => e.name.toLowerCase().includes(a)) : i.value;
156
- }), d = y(() => {
157
- 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;
158
- return { enabled: a, disabled: e, unknown: l, total: i.value.length };
159
- });
160
- return (a, e) => {
161
- const l = w("FmButton"), f = w("FmSpacer"), n = w("FmDialog");
162
- return m(), L(n, {
163
- modelValue: t.value,
164
- "onUpdate:modelValue": e[2] || (e[2] = (s) => t.value = s),
165
- overlay: !0
166
- }, {
167
- "dialog-button": R(() => [
168
- _(se, null, {
169
- default: R(() => [
170
- _(l, {
171
- variant: "secondary",
172
- label: "Feature flags"
173
- })
174
- ]),
175
- _: 1
176
- })
177
- ]),
178
- "dialog-header": R(() => [
179
- o("div", we, [
180
- e[3] || (e[3] = o("span", null, "Feature Flags", -1)),
181
- o("span", Se, b(d.value.enabled) + " enabled · " + b(d.value.disabled) + " disabled · " + b(d.value.unknown) + " unknown ", 1)
182
- ])
183
- ]),
184
- "dialog-footer": R(() => [
185
- _(f, { class: "sm:hidden xs:hidden" }),
186
- _(l, {
187
- class: "sm:w-full xs:w-full",
188
- label: "Close",
189
- size: "md",
190
- variant: "primary",
191
- onClick: e[1] || (e[1] = (s) => t.value = !1)
192
- })
193
- ]),
194
- default: R(() => [
195
- o("div", Fe, [
196
- O(o("input", {
197
- "onUpdate:modelValue": e[0] || (e[0] = (s) => c.value = s),
198
- type: "text",
199
- placeholder: "Search flags...",
200
- 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"
201
- }, null, 512), [
202
- [j, c.value]
203
- ]),
204
- o("div", Re, [
205
- (m(!0), g(q, null, z(r.value, (s) => (m(), g("div", {
206
- key: s.name,
207
- class: "flex items-start justify-between gap-2 px-3 py-2 rounded-md hover:bg-gray-50 text-sm"
208
- }, [
209
- o("span", Ie, b(s.name), 1),
210
- s.enabled === !0 ? (m(), g("span", ke, e[4] || (e[4] = [
211
- o("span", { class: "w-1.5 h-1.5 rounded-full bg-green-500" }, null, -1),
212
- B(" Enabled ")
213
- ]))) : s.enabled === !1 ? (m(), g("span", Ne, e[5] || (e[5] = [
214
- o("span", { class: "w-1.5 h-1.5 rounded-full bg-red-500" }, null, -1),
215
- B(" Disabled ")
216
- ]))) : (m(), g("span", Pe, e[6] || (e[6] = [
217
- o("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1),
218
- B(" Unknown ")
219
- ])))
220
- ]))), 128)),
221
- r.value.length === 0 ? (m(), g("div", Ae, ' No flags matching "' + b(c.value) + '" ', 1)) : U("", !0)
222
- ])
223
- ])
224
- ]),
225
- _: 1
226
- }, 8, ["modelValue"]);
227
- };
228
- }
229
- }), Be = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Le = /* @__PURE__ */ P({
230
- __name: "NavigationTab",
231
- setup(p) {
232
- const t = Y(), c = T(), i = C(), r = ne(), { menuItems: d } = D();
233
- N([() => i.currentBusiness.value, () => t.name], ([n, s]) => {
234
- (n == null ? void 0 : n.menuVersion) === "v3" && (s === S.INGREDIENTS || s === S.RECIPE || s === S.UNIT) && c.push({ name: S.STOCK });
235
- });
236
- const a = y({
237
- get() {
238
- if (t.name)
239
- return String(t.name);
240
- },
241
- set(n) {
242
- n && c.push({ name: n });
243
- }
244
- }), e = y(
245
- () => {
246
- var n;
247
- return `NavigationTab.${(n = i.currentBusiness.value) == null ? void 0 : n._id}`;
248
- }
249
- ), l = k(!1), f = y({
250
- get() {
251
- return l.value;
252
- },
253
- set(n) {
254
- l.value = n, n || r.setItem(e.value, "true");
255
- }
256
- });
257
- return N([() => e.value], () => {
258
- l.value = !1, setTimeout(() => {
259
- f.value = !r.getItem(e.value);
260
- }, 2e3);
261
- }), (n, s) => {
262
- const A = w("FmCollapsibleTabs");
263
- return m(), g("div", Be, [
264
- _(Ee),
265
- _(A, {
266
- modelValue: a.value,
267
- "onUpdate:modelValue": s[0] || (s[0] = (E) => a.value = E),
268
- items: x(d)
269
- }, null, 8, ["modelValue", "items"])
270
- ]);
271
- };
272
- }
273
- });
274
- typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
275
- let p, t;
276
- return { promise: new Promise((i, r) => {
277
- p = i, t = r;
278
- }), resolve: p, reject: t };
279
- });
280
- typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(p) {
281
- return await new Promise((t) => setTimeout(t, p)), Promise.resolve(this);
282
- });
283
- const qe = /* @__PURE__ */ P({
284
- __name: "App",
285
- setup(p) {
286
- const t = C(), c = re(), i = W();
287
- $(() => {
288
- if (window.location.href.includes("print-preview")) {
289
- t.setEmbedded(!0), document.body.classList.add("print-mode");
290
- return;
291
- }
292
- t.registerSidebarComponent(Le), c.initGoogleMap(i.appApi.googleMap).catch(() => {
293
- console.error("Google map cannot be loaded");
294
- });
295
- }), N([() => t.currentCountry.value], () => {
296
- r();
297
- });
298
- async function r() {
299
- var d;
300
- try {
301
- await t.readBusinesses(), t.currentBusiness.value = (d = t.businesses.value) == null ? void 0 : d.find((a) => a);
302
- } catch (a) {
303
- console.error("error when trying to reset businesses:", a);
304
- }
305
- }
306
- return (d, a) => (m(), L(he));
307
- }
308
- });
309
- export {
310
- qe as default
311
- };