@feedmepos/mf-inventory-portal 1.3.13 → 1.3.14-dev.1

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 (88) hide show
  1. package/dist/App-Cb6qfRCz.js +445 -0
  2. package/dist/{ApprovalView-ClQU6bq0.js → ApprovalView-BxioAXpO.js} +7 -7
  3. package/dist/{BindingsDialog--w8amPhB.js → BindingsDialog-Dn_hP7Ji.js} +13 -13
  4. package/dist/{BindingsPicker-CLZ2cy95.js → BindingsPicker-BEXOUaoI.js} +2 -2
  5. package/dist/{BindingsTable-DMKnwFJt.js → BindingsTable-CsRLA5J_.js} +3 -3
  6. package/dist/{ClosingDraftView-DOSvb2cx.js → ClosingDraftView-DoH9ZcGA.js} +136 -136
  7. package/dist/{ClosingHistoryView-Dbysx1Ca.js → ClosingHistoryView-BWf_gIrc.js} +32 -32
  8. package/dist/{ClosingTemplateView-kOWpFBhr.js → ClosingTemplateView-BKRxzvQX.js} +14 -14
  9. package/dist/{DeliveryOrderPrintPreview-CTrf0b97.js → DeliveryOrderPrintPreview-HzspgQXj.js} +11 -11
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-HLHu23Ly.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DstxeP1q.js} +20 -20
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BTwfJTx3.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-E9FFFhwx.js} +2 -2
  12. package/dist/{FmMultiselectDialog-D8AXgAuO.js → FmMultiselectDialog-3uKA-o0f.js} +1 -1
  13. package/dist/{FmMultiselectDialog-ByvnmkuF.js → FmMultiselectDialog-uFZKKIiO.js} +2 -2
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-B8Jp-237.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C1KGaqi7.js} +18 -18
  15. package/dist/{ImportView-B8jTVkI3.js → ImportView-zrNDzp3k.js} +6 -6
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D3bMh_iG.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-B2vMgXVZ.js} +1 -1
  17. package/dist/{IngredientGroupView-DEZHQArP.js → IngredientGroupView-HcAKvPur.js} +5 -5
  18. package/dist/{IngredientsView-D_0aKc2P.js → IngredientsView-CRB5UN-e.js} +15 -15
  19. package/dist/{IntegrationExplorerView-RNQ89fRN.js → IntegrationExplorerView-k3IHeiOU.js} +5 -5
  20. package/dist/{IntegrationView-HyqeX65i.js → IntegrationView-B3WeQTDB.js} +13 -13
  21. package/dist/{InventoryBindingForm-GXWU6jVC.js → InventoryBindingForm-B-7SQKl2.js} +1 -1
  22. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BSWEOGs7.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DhPu_GyE.js} +15 -15
  23. package/dist/{InventoryBindingSummary-Dcsun-ae.js → InventoryBindingSummary-Swi6A3W2.js} +1 -1
  24. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BPHzJFkv.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Duv0At06.js} +1 -1
  25. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-eaX2F6rA.js → PremiumBadge.vue_vue_type_script_setup_true_lang--gt60IlU.js} +9 -9
  26. package/dist/{PublishView-BzaSX1CF.js → PublishView-B9HJT61I.js} +11 -11
  27. package/dist/{PurchaseOrderPrintPreview-Dq9RVILX.js → PurchaseOrderPrintPreview-sClUXkgt.js} +9 -9
  28. package/dist/{ReceiveRequestView-CUR65B8h.js → ReceiveRequestView-BbS55juS.js} +23 -23
  29. package/dist/{RecipeView-DA1exNa3.js → RecipeView-BH3asOD4.js} +50 -50
  30. package/dist/{SettingsView-G9VVMREu.js → SettingsView-BJAMNNhr.js} +30 -30
  31. package/dist/StockView-DMLFY7d1.js +2439 -0
  32. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DflfaS_i.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeiLMVin.js} +1 -1
  33. package/dist/{SupplierView-Br3PxWl6.js → SupplierView-C3uBrEcc.js} +12 -12
  34. package/dist/{SurchargeView-DnC875ic.js → SurchargeView-S9ByD9Nd.js} +6 -6
  35. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DxElZDE3.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-ha60Wy7z.js} +2 -2
  36. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DncbuAH1.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CfyCEElN.js} +1 -1
  37. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-R0DRQHII.js → TransferDetails.vue_vue_type_script_setup_true_lang-CKfs-ns0.js} +790 -806
  38. package/dist/{TransferTemplateView-CN-1iASP.js → TransferTemplateView-zbn5CGiZ.js} +17 -17
  39. package/dist/{UnitCostHistoryView-HMfTl2Rl.js → UnitCostHistoryView-LhvAybS8.js} +246 -243
  40. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BQSRm_uN.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-E2QCl521.js} +4 -4
  41. package/dist/{UnitView-2J7SxbnX.js → UnitView-6oUdlUVo.js} +24 -24
  42. package/dist/{WarehouseView-EIXt8wd0.js → WarehouseView-DQFe99KT.js} +5 -5
  43. package/dist/{WastageTemplateView-B8yQevPX.js → WastageTemplateView-BiYZqiT2.js} +14 -14
  44. package/dist/{app-DZ_O5S5y.js → app-SnX9gL_k.js} +23514 -22309
  45. package/dist/app.d.ts +6 -6
  46. package/dist/app.js +2 -2
  47. package/dist/{closing-template-C3F4uA55.js → closing-template-Ch--jBk-.js} +1 -1
  48. package/dist/components/HrmPermissionGuard.vue.d.ts +54 -0
  49. package/dist/composable/useHrmPermission.d.ts +17 -0
  50. package/dist/{date2-DoKx3vEH.js → date2-CGqqJOqr.js} +1 -1
  51. package/dist/{dayjs.min-BzKmIVU5.js → dayjs.min-JnfBpNSN.js} +1 -1
  52. package/dist/{decimal-CHryhQrv.js → decimal-C-2MQYNP.js} +2 -2
  53. package/dist/{defineDeepModel-Dt72PPYN.js → defineDeepModel-CUJCBuvw.js} +1 -1
  54. package/dist/{duplicate-template-k0PYkiot.js → duplicate-template-BXg5EQRC.js} +1 -1
  55. package/dist/{export-D0nU9NCc.js → export-DUsFBcmf.js} +1 -1
  56. package/dist/{feature-DTXvUM9q.js → feature-gkhmly57.js} +28 -28
  57. package/dist/{format-time-from-id-CjML4YH3.js → format-time-from-id-D1RhcKfL.js} +1 -1
  58. package/dist/{format-unit-display-BASnDwRJ.js → format-unit-display-DXs_-yEW.js} +11 -11
  59. package/dist/{import-export.helper-BGRAKGXv.js → import-export.helper-B84wW0eo.js} +6 -6
  60. package/dist/{index-FhahM2dg.js → index-D3XgyMwL.js} +1 -1
  61. package/dist/{index-Db7jD-CU.js → index-Dp1GAjHf.js} +3 -3
  62. package/dist/{index-D5qTaOFp.js → index-artVJVqL.js} +1 -1
  63. package/dist/{inventory-core-dart.default-Cvvr8rpN.js → inventory-core-dart.default-Bu1oVkLC.js} +10 -10
  64. package/dist/{lodash-B4Uj749H.js → lodash-DZbYS5Vn.js} +1 -1
  65. package/dist/{lz-string-Ckbaw1Bu.js → lz-string-nX96TtT6.js} +17 -17
  66. package/dist/{netsuite-B4O7LRpC.js → netsuite-DQkJKCH9.js} +109 -109
  67. package/dist/{number-9PlMlR2G.js → number-gRrApZRj.js} +7 -7
  68. package/dist/{predefined-templates-BqAy88Rp.js → predefined-templates-D9bzSOz_.js} +1 -1
  69. package/dist/{purchase-order-template-KkhC0FCL.js → purchase-order-template-BiE_We2X.js} +1 -1
  70. package/dist/{recalculationUtils-Rj0SZQO3.js → recalculationUtils-zNt-EW5S.js} +1 -1
  71. package/dist/router/route-permission.d.ts +10 -0
  72. package/dist/{rules-BvLBkdfK.js → rules-CWFFr_mA.js} +2 -2
  73. package/dist/{stock-CoG3l91v.js → stock-C-34Vuxz.js} +3 -3
  74. package/dist/{stock-yUbmIey0.js → stock-V4Oy4QHQ.js} +28 -27
  75. package/dist/{supplier-Qlox4B8s.js → supplier-DbYagMhS.js} +16 -16
  76. package/dist/{surcharge-CsAxFX-L.js → surcharge-CcvvfLHB.js} +5 -5
  77. package/dist/tsconfig.app.tsbuildinfo +1 -1
  78. package/dist/{use-ingredient-select-dialog-BOtDFKQO.js → use-ingredient-select-dialog-B4jFgJ5b.js} +2 -2
  79. package/dist/{use-inventory-binding-dialog-Dz5NbeEn.js → use-inventory-binding-dialog-20flYyGE.js} +2 -2
  80. package/dist/{use-template-enabled-locations-MNNKqChl.js → use-template-enabled-locations-CpDMbAGF.js} +2 -2
  81. package/dist/useHrmPermission-CZW6u2TS.js +16 -0
  82. package/dist/views/receive-request/composables/use-order-draft-permission.d.ts +2 -5
  83. package/dist/{vue-i18n-BqX2td3b.js → vue-i18n-CUrz9OVK.js} +389 -389
  84. package/dist/{xlsx-CtRIIkxr.js → xlsx-DBsOBE1z.js} +1 -1
  85. package/dist/{xlsx.util-Bd4_86rn.js → xlsx.util-xziohm10.js} +1 -1
  86. package/package.json +5 -4
  87. package/dist/App-Dm-YoD_v.js +0 -411
  88. package/dist/StockView-3J7Gkskb.js +0 -2406
package/dist/app.d.ts CHANGED
@@ -5323,12 +5323,12 @@ export declare const InventoryBindingForm: import("vue").DefineComponent<import(
5323
5323
  }[]>;
5324
5324
  default: () => never[];
5325
5325
  };
5326
- iframeMode: {
5327
- type: import("vue").PropType<boolean>;
5328
- };
5329
5326
  excludeBindingId: {
5330
5327
  type: import("vue").PropType<string>;
5331
5328
  };
5329
+ iframeMode: {
5330
+ type: import("vue").PropType<boolean>;
5331
+ };
5332
5332
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5333
5333
  "update:modelValue": (bindings: {
5334
5334
  measurement?: {
@@ -5422,12 +5422,12 @@ export declare const InventoryBindingForm: import("vue").DefineComponent<import(
5422
5422
  }[]>;
5423
5423
  default: () => never[];
5424
5424
  };
5425
- iframeMode: {
5426
- type: import("vue").PropType<boolean>;
5427
- };
5428
5425
  excludeBindingId: {
5429
5426
  type: import("vue").PropType<string>;
5430
5427
  };
5428
+ iframeMode: {
5429
+ type: import("vue").PropType<boolean>;
5430
+ };
5431
5431
  }>> & Readonly<{
5432
5432
  "onUpdate:modelValue"?: ((bindings: {
5433
5433
  measurement?: {
package/dist/app.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "vue";
2
- import { at as r, au as e, av as o, as as t, aw as i, a as m } from "./app-DZ_O5S5y.js";
2
+ import { aw as s, ax as e, ay as o, av as t, r as i, a as m } from "./app-SnX9gL_k.js";
3
3
  export {
4
- r as FmApp,
4
+ s as FmApp,
5
5
  e as InventoryBindingForm,
6
6
  o as InventoryBindingSummary,
7
7
  t as i18nMessages,
@@ -1,4 +1,4 @@
1
- import { o as c } from "./app-DZ_O5S5y.js";
1
+ import { p as c } from "./app-SnX9gL_k.js";
2
2
  import { useCoreStore as u } from "@feedmepos/mf-common";
3
3
  const d = c((s, a) => {
4
4
  function r() {
@@ -0,0 +1,54 @@
1
+ import type { CaslPermission } from '@feedmepos/hrm-permission';
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ /** Single CASL permission to check */
4
+ permission?: CaslPermission | undefined;
5
+ /** Multiple CASL permissions to check */
6
+ permissions?: CaslPermission[] | undefined;
7
+ /** Check mode: 'all' requires every permission, 'any' requires at least one */
8
+ mode?: "all" | "any" | undefined;
9
+ }>, {
10
+ permission: undefined;
11
+ permissions: undefined;
12
+ mode: string;
13
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
14
+ /** Single CASL permission to check */
15
+ permission?: CaslPermission | undefined;
16
+ /** Multiple CASL permissions to check */
17
+ permissions?: CaslPermission[] | undefined;
18
+ /** Check mode: 'all' requires every permission, 'any' requires at least one */
19
+ mode?: "all" | "any" | undefined;
20
+ }>, {
21
+ permission: undefined;
22
+ permissions: undefined;
23
+ mode: string;
24
+ }>>> & Readonly<{}>, {
25
+ permissions: CaslPermission[];
26
+ mode: "all" | "any";
27
+ permission: CaslPermission;
28
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
29
+ default?(_: {}): any;
30
+ fallback?(_: {}): any;
31
+ }>;
32
+ export default _default;
33
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
34
+ type __VLS_TypePropsToRuntimeProps<T> = {
35
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
36
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
37
+ } : {
38
+ type: import('vue').PropType<T[K]>;
39
+ required: true;
40
+ };
41
+ };
42
+ type __VLS_WithDefaults<P, D> = {
43
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
44
+ default: D[K];
45
+ }> : P[K];
46
+ };
47
+ type __VLS_Prettify<T> = {
48
+ [K in keyof T]: T[K];
49
+ } & {};
50
+ type __VLS_WithTemplateSlots<T, S> = T & {
51
+ new (): {
52
+ $slots: S;
53
+ };
54
+ };
@@ -0,0 +1,17 @@
1
+ import type { MaybeRefOrGetter, ComputedRef } from 'vue';
2
+ import type { CaslPermission } from '@feedmepos/hrm-permission';
3
+ /**
4
+ * Reactively checks HRM permissions against the current session user.
5
+ *
6
+ * @param permissions CASL permission objects to check.
7
+ * @param mode Permission matching mode: `all` requires every permission, `any` requires at least one.
8
+ * @returns Object containing a computed `hasPermission` boolean.
9
+ *
10
+ * @example
11
+ * const { hasPermission } = useHrmPermission([
12
+ * { action: Permission.read, subject: 'inventory' }
13
+ * ])
14
+ */
15
+ export declare function useHrmPermission(permissions: MaybeRefOrGetter<CaslPermission[]>, mode?: MaybeRefOrGetter<'all' | 'any'>): {
16
+ hasPermission: ComputedRef<boolean>;
17
+ };
@@ -1,4 +1,4 @@
1
- import { d as l } from "./dayjs.min-BzKmIVU5.js";
1
+ import { d as l } from "./dayjs.min-JnfBpNSN.js";
2
2
  const T = new Intl.DateTimeFormat("en-US", {
3
3
  year: "numeric",
4
4
  month: "2-digit",
@@ -1,4 +1,4 @@
1
- import { ak as Q, A as K } from "./app-DZ_O5S5y.js";
1
+ import { an as Q, C as K } from "./app-SnX9gL_k.js";
2
2
  var E = { exports: {} };
3
3
  (function(V, X) {
4
4
  (function(W, k) {
@@ -1,5 +1,5 @@
1
- import "./dayjs.min-BzKmIVU5.js";
2
- import "./app-DZ_O5S5y.js";
1
+ import "./dayjs.min-JnfBpNSN.js";
2
+ import "./app-SnX9gL_k.js";
3
3
  function m(a) {
4
4
  function t(o, n = !0) {
5
5
  const e = Math.round(Math.log10(o));
@@ -1,4 +1,4 @@
1
- import { c as a, a0 as u } from "./app-DZ_O5S5y.js";
1
+ import { c as a, a3 as u } from "./app-SnX9gL_k.js";
2
2
  import { getCurrentInstance as d, reactive as l, watch as o } from "vue";
3
3
  function g(i = "modelValue", e) {
4
4
  var n, c;
@@ -1,4 +1,4 @@
1
- import { o as p } from "./app-DZ_O5S5y.js";
1
+ import { p } from "./app-SnX9gL_k.js";
2
2
  import { useCoreStore as c } from "@feedmepos/mf-common";
3
3
  const u = p((s, n) => {
4
4
  function o() {
@@ -1,4 +1,4 @@
1
- import { u as s, w as c } from "./xlsx-CtRIIkxr.js";
1
+ import { u as s, w as c } from "./xlsx-DBsOBE1z.js";
2
2
  function i(e, o) {
3
3
  return o.map((t) => typeof t.selector == "function" ? t.selector(e) : e[t.selector]);
4
4
  }
@@ -2,9 +2,9 @@ var _t = Object.defineProperty;
2
2
  var ft = (l, c, h) => c in l ? _t(l, c, { enumerable: !0, configurable: !0, writable: !0, value: h }) : l[c] = h;
3
3
  var ce = (l, c, h) => ft(l, typeof c != "symbol" ? c + "" : c, h);
4
4
  import { useCoreStore as De } from "@feedmepos/mf-common";
5
- import { ak as ve, u as Ke, k as at, a as gt } from "./app-DZ_O5S5y.js";
5
+ import { an as ve, u as Ke, l as at, a as gt } from "./app-SnX9gL_k.js";
6
6
  import { ref as he, readonly as Ge } from "vue";
7
- import "./inventory-core-dart.default-Cvvr8rpN.js";
7
+ import "./inventory-core-dart.default-Bu1oVkLC.js";
8
8
  var Ve = { exports: {} };
9
9
  (function(l, c) {
10
10
  (function(h, f) {
@@ -124,7 +124,7 @@ var Ve = { exports: {} };
124
124
  };
125
125
  }
126
126
  }
127
- function F(r, t, e) {
127
+ function k(r, t, e) {
128
128
  for (var i, n = 0, a = t.length; n < a; n++) !i && n in t || (i || (i = Array.prototype.slice.call(t, 0, n)), i[n] = t[n]);
129
129
  return r.concat(i || Array.prototype.slice.call(t));
130
130
  }
@@ -180,7 +180,7 @@ var Ve = { exports: {} };
180
180
  (function(r) {
181
181
  r.NONE = "NONE", r.DEFAULT_FLAGS = "DEFAULT_FLAGS", r.CACHE = "CACHE", r.SERVER = "SERVER";
182
182
  })(g || (g = {}));
183
- var _e, k = null, ut = "FLAGSMITH_EVENT", le = ut, Je = "https://edge.api.flagsmith.com/api/v1/", qe = "flagsmith_value_", Be = "flagsmith_enabled_", Me = "flagsmith_trait_", ct = function() {
183
+ var _e, F = null, ut = "FLAGSMITH_EVENT", le = ut, Je = "https://edge.api.flagsmith.com/api/v1/", qe = "flagsmith_value_", Be = "flagsmith_enabled_", Me = "flagsmith_trait_", ct = function() {
184
184
  function r(t) {
185
185
  var e = this;
186
186
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
@@ -323,7 +323,7 @@ var Ve = { exports: {} };
323
323
  }, this._onChange = function(i, n, a) {
324
324
  var o, v;
325
325
  e.setLoadingState(a), (o = e.onChange) === null || o === void 0 || o.call(e, i, n, e.loadingState), (v = e._trigger) === null || v === void 0 || v.call(e);
326
- }, b = t.fetch ? t.fetch : typeof fetch < "u" ? fetch : ve === null || ve === void 0 ? void 0 : ve.fetch, this.canUseStorage = typeof window < "u" || !!t.browserlessStorage, this.log("Constructing flagsmith instance " + t), t.eventSource && (_e = t.eventSource), t.AsyncStorage && (k = t.AsyncStorage);
326
+ }, b = t.fetch ? t.fetch : typeof fetch < "u" ? fetch : ve === null || ve === void 0 ? void 0 : ve.fetch, this.canUseStorage = typeof window < "u" || !!t.browserlessStorage, this.log("Constructing flagsmith instance " + t), t.eventSource && (_e = t.eventSource), t.AsyncStorage && (F = t.AsyncStorage);
327
327
  }
328
328
  return r.prototype.init = function(t) {
329
329
  var e, i, n;
@@ -339,7 +339,7 @@ var Ve = { exports: {} };
339
339
  return [N[0], { value: N[1] }];
340
340
  })) : {} } : a.identity, this.evaluationContext = a, this.api = d, this.headers = p, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = u, ye = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Qe || this._trigger, this._triggerLoadingState = et || this._triggerLoadingState, this.onError = function(N) {
341
341
  L.setLoadingState(s(s({}, L.loadingState), { isFetching: !1, isLoading: !1, error: N })), G == null || G(N);
342
- }, this.enableLogs = j || !1, this.cacheOptions = Q ? { skipAPI: !!Q.skipAPI, ttl: Q.ttl || 0, storageKey: Q.storageKey, loadStale: !!Q.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), U && (b = U), this.enableAnalytics = ie || !1, this.flags = Object.assign({}, A) || {}, this.datadogRum = O || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = k !== void 0 && !!y, le = "FLAGSMITH_EVENT_" + a.environment.apiKey, m && (k = m), re && typeof window < "u" && this.setupRealtime(T, a.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: g.DEFAULT_FLAGS })), this.setState(Ze), this.log("Initialising with properties", t, this), V && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), pe && (b = /* @__PURE__ */ function(N) {
342
+ }, this.enableLogs = j || !1, this.cacheOptions = Q ? { skipAPI: !!Q.skipAPI, ttl: Q.ttl || 0, storageKey: Q.storageKey, loadStale: !!Q.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), U && (b = U), this.enableAnalytics = ie || !1, this.flags = Object.assign({}, A) || {}, this.datadogRum = O || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = F !== void 0 && !!y, le = "FLAGSMITH_EVENT_" + a.environment.apiKey, m && (F = m), re && typeof window < "u" && this.setupRealtime(T, a.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: g.DEFAULT_FLAGS })), this.setState(Ze), this.log("Initialising with properties", t, this), V && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), pe && (b = /* @__PURE__ */ function(N) {
343
343
  return function(J, q) {
344
344
  var z = q.headers, C = q.method, te = q.body;
345
345
  return new Promise(function(X) {
@@ -360,14 +360,14 @@ var Ve = { exports: {} };
360
360
  }
361
361
  });
362
362
  };
363
- }(pe)), k && this.canUseStorage && k.getItem(le).then(function(N) {
363
+ }(pe)), F && this.canUseStorage && F.getItem(le).then(function(N) {
364
364
  try {
365
365
  L.evaluationEvent = JSON.parse(N) || {};
366
366
  } catch {
367
367
  L.evaluationEvent = {};
368
368
  }
369
369
  L.analyticsInterval = setInterval(L.analyticsFlags, L.ticks);
370
- }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), k && this.canUseStorage && k.getItem(le, function(N, J) {
370
+ }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), F && this.canUseStorage && F.getItem(le, function(N, J) {
371
371
  if (J && L.evaluationContext.environment) {
372
372
  var q = JSON.parse(J);
373
373
  if (q[L.evaluationContext.environment.apiKey]) {
@@ -376,17 +376,17 @@ var Ve = { exports: {} };
376
376
  }
377
377
  }
378
378
  })), !y) return [3, 9];
379
- if (!k || !this.canUseStorage) return [3, 8];
379
+ if (!F || !this.canUseStorage) return [3, 8];
380
380
  tt = function(N, J) {
381
381
  return R(L, void 0, void 0, function() {
382
- var q, z, C, te, X, M, be, it, Se, Ce, xe, we, Ee, Oe, Te, Le, ke, Fe, Ie, Ae, Pe, je, Ne, Re, rt = this;
382
+ var q, z, C, te, X, M, be, it, Se, Ce, xe, we, Ee, Oe, Te, Le, Fe, ke, Ie, Ae, Pe, je, Ne, Re, rt = this;
383
383
  return K(this, function(H) {
384
384
  switch (H.label) {
385
385
  case 0:
386
386
  if (!J) return [3, 7];
387
387
  q = null, z = null, H.label = 1;
388
388
  case 1:
389
- return H.trys.push([1, 5, , 6]), C = JSON.parse(J), te = !1, X = !1, C && C.api === this.api && ((Ce = (Se = C.evaluationContext) === null || Se === void 0 ? void 0 : Se.environment) === null || Ce === void 0 ? void 0 : Ce.apiKey) === ((xe = this.evaluationContext.environment) === null || xe === void 0 ? void 0 : xe.apiKey) && (M = !0, this.evaluationContext.identity && ((Ee = (we = C.evaluationContext) === null || we === void 0 ? void 0 : we.identity) === null || Ee === void 0 ? void 0 : Ee.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Te = (Oe = C.evaluationContext) === null || Oe === void 0 ? void 0 : Oe.identity) === null || Te === void 0 ? void 0 : Te.identifier) + " to " + this.evaluationContext.identity.identifier), M = !1), this.cacheOptions.ttl && (!C.ts || (/* @__PURE__ */ new Date()).valueOf() - C.ts > this.cacheOptions.ttl) && (C.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + C.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - C.ts) + "ms"), M = !1) : C.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + C.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - C.ts) + "ms"), X = !0, M = !0)), M && (te = !0, z = E((Le = this.evaluationContext.identity) === null || Le === void 0 ? void 0 : Le.traits, (Fe = (ke = C.evaluationContext) === null || ke === void 0 ? void 0 : ke.identity) === null || Fe === void 0 ? void 0 : Fe.traits), q = E(this.flags, C.flags), this.setState(s(s({}, C), { evaluationContext: Y(s(s({}, C.evaluationContext), { identity: !((Ie = C.evaluationContext) === null || Ie === void 0) && Ie.identity ? s(s({}, (Ae = C.evaluationContext) === null || Ae === void 0 ? void 0 : Ae.identity), { traits: s(s({}, ((je = (Pe = C.evaluationContext) === null || Pe === void 0 ? void 0 : Pe.identity) === null || je === void 0 ? void 0 : je.traits) || {}), ae || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", C))), te ? (be = !P && (!this.cacheOptions.skipAPI || X), this._onChange(null, { isFromServer: !1, flagsChanged: q, traitsChanged: z }, this._loadedState(null, g.CACHE, be)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && te && !X && this.log("Skipping API, using cache"), be && this.getFlags().catch(function(ht) {
389
+ return H.trys.push([1, 5, , 6]), C = JSON.parse(J), te = !1, X = !1, C && C.api === this.api && ((Ce = (Se = C.evaluationContext) === null || Se === void 0 ? void 0 : Se.environment) === null || Ce === void 0 ? void 0 : Ce.apiKey) === ((xe = this.evaluationContext.environment) === null || xe === void 0 ? void 0 : xe.apiKey) && (M = !0, this.evaluationContext.identity && ((Ee = (we = C.evaluationContext) === null || we === void 0 ? void 0 : we.identity) === null || Ee === void 0 ? void 0 : Ee.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Te = (Oe = C.evaluationContext) === null || Oe === void 0 ? void 0 : Oe.identity) === null || Te === void 0 ? void 0 : Te.identifier) + " to " + this.evaluationContext.identity.identifier), M = !1), this.cacheOptions.ttl && (!C.ts || (/* @__PURE__ */ new Date()).valueOf() - C.ts > this.cacheOptions.ttl) && (C.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + C.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - C.ts) + "ms"), M = !1) : C.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + C.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - C.ts) + "ms"), X = !0, M = !0)), M && (te = !0, z = E((Le = this.evaluationContext.identity) === null || Le === void 0 ? void 0 : Le.traits, (ke = (Fe = C.evaluationContext) === null || Fe === void 0 ? void 0 : Fe.identity) === null || ke === void 0 ? void 0 : ke.traits), q = E(this.flags, C.flags), this.setState(s(s({}, C), { evaluationContext: Y(s(s({}, C.evaluationContext), { identity: !((Ie = C.evaluationContext) === null || Ie === void 0) && Ie.identity ? s(s({}, (Ae = C.evaluationContext) === null || Ae === void 0 ? void 0 : Ae.identity), { traits: s(s({}, ((je = (Pe = C.evaluationContext) === null || Pe === void 0 ? void 0 : Pe.identity) === null || je === void 0 ? void 0 : je.traits) || {}), ae || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", C))), te ? (be = !P && (!this.cacheOptions.skipAPI || X), this._onChange(null, { isFromServer: !1, flagsChanged: q, traitsChanged: z }, this._loadedState(null, g.CACHE, be)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && te && !X && this.log("Skipping API, using cache"), be && this.getFlags().catch(function(ht) {
390
390
  var Ue;
391
391
  (Ue = rt.onError) === null || Ue === void 0 || Ue.call(rt, ht);
392
392
  }), [3, 4]) : [3, 2];
@@ -418,9 +418,9 @@ var Ve = { exports: {} };
418
418
  });
419
419
  }, D.label = 2;
420
420
  case 2:
421
- return D.trys.push([2, 7, , 8]), k.getItemSync ? (me = k.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
421
+ return D.trys.push([2, 7, , 8]), F.getItemSync ? (me = F.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
422
422
  case 3:
423
- return [4, k.getItem(this.getStorageKey())];
423
+ return [4, F.getItem(this.getStorageKey())];
424
424
  case 4:
425
425
  me = D.sent(), D.label = 5;
426
426
  case 5:
@@ -468,17 +468,17 @@ var Ve = { exports: {} };
468
468
  return t === void 0 && (t = null), i === void 0 && (i = !1), { error: t, isFetching: i, isLoading: !1, source: e };
469
469
  }, r.prototype.log = function() {
470
470
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
471
- this.enableLogs && console.log.apply(this, F(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], t));
471
+ this.enableLogs && console.log.apply(this, k(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], t));
472
472
  }, r.prototype.updateStorage = function() {
473
473
  if (this.cacheFlags) {
474
474
  this.ts = (/* @__PURE__ */ new Date()).valueOf();
475
475
  var t = JSON.stringify(this.getState());
476
- this.log("Setting storage", t), k.setItem(this.getStorageKey(), t);
476
+ this.log("Setting storage", t), F.setItem(this.getStorageKey(), t);
477
477
  }
478
478
  }, r.prototype.updateEventStorage = function() {
479
479
  if (this.enableAnalytics) {
480
480
  var t = JSON.stringify(this.getState().evaluationEvent);
481
- k.setItem(le, t).catch(function(e) {
481
+ F.setItem(le, t).catch(function(e) {
482
482
  return console.error("Flagsmith: Error setting item in async storage", e);
483
483
  });
484
484
  }
@@ -751,13 +751,13 @@ var pt = Ve.exports, yt = {
751
751
  const R = this.userContext;
752
752
  try {
753
753
  return await this.setUser(c), this.getFlagValue(h, s) ?? f;
754
- } catch (F) {
755
- return console.error(`Error getting user flag value for ${h}:`, F), f;
754
+ } catch (k) {
755
+ return console.error(`Error getting user flag value for ${h}:`, k), f;
756
756
  } finally {
757
757
  try {
758
758
  await ((K = this.flagsmithClient) == null ? void 0 : K.logout()), this.userContext = null, R && await this.setUser(R.identifier);
759
- } catch (F) {
760
- console.error("Error during cleanup:", F);
759
+ } catch (k) {
760
+ console.error("Error during cleanup:", k);
761
761
  }
762
762
  }
763
763
  }
@@ -797,14 +797,14 @@ function St(l = bt) {
797
797
  } catch (w) {
798
798
  return console.error(`Error getting flag for ${g}:`, w), b ?? null;
799
799
  }
800
- }, F = async (g, b, w = null, I) => {
800
+ }, k = async (g, b, w = null, I) => {
801
801
  if (!c()) return w;
802
802
  try {
803
803
  return await l.getUserFlagValue(g, b, w, I);
804
804
  } catch ($) {
805
805
  return console.error(`Error getting user flag value for ${b}:`, $), w;
806
806
  }
807
- }, W = async (g, b, w = null, I) => F(`${ot}-${g}`, b, w, I), E = () => {
807
+ }, W = async (g, b, w = null, I) => k(`${ot}-${g}`, b, w, I), E = () => {
808
808
  try {
809
809
  l.reset();
810
810
  } catch (g) {
@@ -822,7 +822,7 @@ function St(l = bt) {
822
822
  setBusiness: s,
823
823
  getFlagValue: R,
824
824
  getFlag: K,
825
- getUserFlagValue: F,
825
+ getUserFlagValue: k,
826
826
  getBusinessFlagValue: W,
827
827
  reset: E
828
828
  };
@@ -874,7 +874,7 @@ function lt() {
874
874
  inventory_print_template: !1
875
875
  };
876
876
  }
877
- const _ = he(lt()), kt = () => ({
877
+ const _ = he(lt()), Ft = () => ({
878
878
  get businessDbName() {
879
879
  var h;
880
880
  return `business_${((h = De().currentBusiness.value) == null ? void 0 : h._id) ?? ""}`;
@@ -998,9 +998,9 @@ const _ = he(lt()), kt = () => ({
998
998
  _.value = lt();
999
999
  return;
1000
1000
  }
1001
- const F = ((I = l.currentBusiness.value) == null ? void 0 : I._id) ?? "";
1002
- await h(F);
1003
- const W = `business_${F}`, E = K.type === at.enum.warehouse, g = (
1001
+ const k = ((I = l.currentBusiness.value) == null ? void 0 : I._id) ?? "";
1002
+ await h(k);
1003
+ const W = `business_${k}`, E = K.type === at.enum.warehouse, g = (
1004
1004
  // if menu v4, must manual receive && must use outlet app
1005
1005
  (($ = l.currentBusiness.value) == null ? void 0 : $.menuVersion) === "v4" && // more guard for businesses using menu v4, only those listed for manual receive will be included
1006
1006
  // TODO: may be removed to use menu version only
@@ -1077,5 +1077,5 @@ function x(l, c) {
1077
1077
  export {
1078
1078
  S as I,
1079
1079
  st as a,
1080
- kt as u
1080
+ Ft as u
1081
1081
  };
@@ -1,4 +1,4 @@
1
- import { h as n } from "./date2-DoKx3vEH.js";
1
+ import { h as n } from "./date2-CGqqJOqr.js";
2
2
  function d(r) {
3
3
  const t = a(r);
4
4
  return t === null ? "" : n(t);
@@ -1,23 +1,23 @@
1
1
  import { components as X, useDialogChild as Ae, useSnackbar as ye, useDialog as De, FmButtonVariant as j } from "@feedmepos/ui-library";
2
2
  import { defineStore as he } from "pinia";
3
3
  import { F as le } from "./form-mode.enum-BKiNVH6A.js";
4
- import { u as ve } from "./purchase-order-template-KkhC0FCL.js";
4
+ import { u as ve } from "./purchase-order-template-BiE_We2X.js";
5
5
  import { ref as E, h as K, defineComponent as te, resolveComponent as U, openBlock as _, createElementBlock as k, createElementVNode as C, normalizeClass as V, createTextVNode as Ne, toDisplayString as N, unref as O, createCommentVNode as q, createVNode as P, withCtx as ee, Fragment as L, renderList as W, onMounted as Re, computed as me, watch as Fe, createSlots as Pe, createBlock as z } from "vue";
6
- import { a as H, c as re, t as A, u as Z, n as Me, k as ce, v as Le, R as ue } from "./app-DZ_O5S5y.js";
6
+ import { a as H, c as re, w as A, u as Z, o as Me, l as ce, x as Le, R as ue } from "./app-SnX9gL_k.js";
7
7
  import { useRouter as Be } from "vue-router";
8
- import { a as Qe } from "./FmMultiselectDialog-ByvnmkuF.js";
8
+ import { a as Qe } from "./FmMultiselectDialog-uFZKKIiO.js";
9
9
  import { D as Y, R as D } from "./row-action.enum-Co_O4qD9.js";
10
10
  import { c as Ue } from "./component-kqxARxvM.js";
11
- import { f as Ve } from "./format-time-from-id-CjML4YH3.js";
11
+ import { f as Ve } from "./format-time-from-id-D1RhcKfL.js";
12
12
  import { useI18n as ne, useCoreStore as ge } from "@feedmepos/mf-common";
13
- import { t as B, a as be, d as xe, s as Te, r as qe } from "./xlsx.util-Bd4_86rn.js";
13
+ import { t as B, a as be, d as xe, s as Te, r as qe } from "./xlsx.util-xziohm10.js";
14
14
  import { F as He } from "./FmDroppableField-J0xUsOTV.js";
15
- import { c as je, a as Q, t as G, g as J } from "./number-9PlMlR2G.js";
16
- import { f as ze } from "./date2-DoKx3vEH.js";
17
- import { u as oe } from "./supplier-Qlox4B8s.js";
18
- import { a as Ye, B as Ke } from "./rules-BvLBkdfK.js";
19
- import { u as ae } from "./netsuite-B4O7LRpC.js";
20
- import { u as We } from "./duplicate-template-k0PYkiot.js";
15
+ import { c as je, a as Q, t as G, g as J } from "./number-gRrApZRj.js";
16
+ import { f as ze } from "./date2-CGqqJOqr.js";
17
+ import { u as oe } from "./supplier-DbYagMhS.js";
18
+ import { a as Ye, B as Ke } from "./rules-CWFFr_mA.js";
19
+ import { u as ae } from "./netsuite-DQkJKCH9.js";
20
+ import { u as We } from "./duplicate-template-BXg5EQRC.js";
21
21
  function Se(t) {
22
22
  const e = H(), a = t.sku, u = e.skuById[a._id];
23
23
  if (u.unit._id !== a.unit._id) return !0;
@@ -1,10 +1,10 @@
1
- import { a as w, t as H, f as T } from "./number-9PlMlR2G.js";
2
- import { u as P } from "./feature-DTXvUM9q.js";
1
+ import { a as w, t as H, f as T } from "./number-gRrApZRj.js";
2
+ import { u as P } from "./feature-gkhmly57.js";
3
3
  import { useCoreStore as g } from "@feedmepos/mf-common";
4
- import { a as y, d as k, n as j, e as S } from "./app-DZ_O5S5y.js";
5
- import { b as N, d as $, s as I } from "./xlsx.util-Bd4_86rn.js";
6
- import { f as _ } from "./date2-DoKx3vEH.js";
7
- import { I as O } from "./rules-BvLBkdfK.js";
4
+ import { a as y, e as k, o as j, f as S } from "./app-SnX9gL_k.js";
5
+ import { b as N, d as $, s as I } from "./xlsx.util-xziohm10.js";
6
+ import { f as _ } from "./date2-CGqqJOqr.js";
7
+ import { I as O } from "./rules-CWFFr_mA.js";
8
8
  function R() {
9
9
  return {
10
10
  low: 6,
@@ -1,4 +1,4 @@
1
- import { A as x, am as V, an as q, ao as Ne, ac as cl, ak as sr, ap as Lt, aq as fl, ar as $l } from "./app-DZ_O5S5y.js";
1
+ import { C as x, ap as V, aq as q, ar as Ne, af as cl, an as sr, as as Lt, at as fl, au as $l } from "./app-SnX9gL_k.js";
2
2
  function vl(t, e) {
3
3
  for (var r = 0; r < e.length; r++) {
4
4
  const n = e[r];
@@ -1,8 +1,8 @@
1
1
  import { ref as v, computed as c } from "vue";
2
- import { u as p } from "./netsuite-B4O7LRpC.js";
3
- import { u as g, C as h, a as E, H as b } from "./app-DZ_O5S5y.js";
2
+ import { u as p } from "./netsuite-DQkJKCH9.js";
3
+ import { u as g, E as h, a as E, J as b } from "./app-SnX9gL_k.js";
4
4
  import { useSnackbar as I } from "@feedmepos/ui-library";
5
- import { u as m } from "./feature-DTXvUM9q.js";
5
+ import { u as m } from "./feature-gkhmly57.js";
6
6
  function C() {
7
7
  return {
8
8
  setting: {
@@ -1,4 +1,4 @@
1
- import { A as h } from "./app-DZ_O5S5y.js";
1
+ import { C as h } from "./app-SnX9gL_k.js";
2
2
  var a = { exports: {} };
3
3
  function x(r, s = 100, u = {}) {
4
4
  if (typeof r != "function")