@feedmepos/mf-inventory-portal 1.8.0-dev.16 → 1.8.0-dev.18

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 (139) hide show
  1. package/dist/{App-xSsyvQV_.js → App-Djr9dJ9q.js} +9 -9
  2. package/dist/{ApprovalView-DfJ0FAiD.js → ApprovalView-VIVSr66P.js} +9 -9
  3. package/dist/{BindingsDialog-oAZyjgrN.js → BindingsDialog-NKiZKKA1.js} +2 -2
  4. package/dist/{BindingsPicker-CEIo7myR.js → BindingsPicker-WLdfNtim.js} +2 -2
  5. package/dist/{BindingsTable-BKa-JYRR.js → BindingsTable-DGikPjdP.js} +10 -10
  6. package/dist/{BulkReceiveRequestPage-C6Oyg5-E.js → BulkReceiveRequestPage-GmZ7yxnK.js} +21 -21
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BvleQo5y.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-6n-R2gAL.js} +1 -1
  8. package/dist/{ClosingDraftView-tJrjqyAC.js → ClosingDraftView-Biir_xEx.js} +19 -19
  9. package/dist/{ClosingHistoryView-CJQlK4Xc.js → ClosingHistoryView-ZMXQesn4.js} +7 -7
  10. package/dist/{ClosingTemplateView-DYRtdK5h.js → ClosingTemplateView-B-c3FkLX.js} +18 -18
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DEwi7wFf.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-D2bp6pW-.js} +1 -1
  12. package/dist/{DefaultView-CxTBlkln.js → DefaultView-D_Jhtw_c.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-Bywdjc2U.js → DeliveryOrderPrintPreview-D5-9lzBd.js} +9 -9
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DcFAUTdO.js → EmailDialog.vue_vue_type_script_setup_true_lang-DEqUAhaS.js} +7759 -7654
  15. package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C8c6rmJv.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CCzJ6Awz.js} +1 -1
  16. package/dist/{FeatureCapabilityGate-B41dULfm.js → FeatureCapabilityGate-iW8fvX19.js} +28 -28
  17. package/dist/{FeaturePageGate.vue_vue_type_script_setup_true_lang-D4G6i1D6.js → FeaturePageGate.vue_vue_type_script_setup_true_lang-f3Y9lCSv.js} +1 -1
  18. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CnqH115V.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-1mVLSzDy.js} +1 -1
  19. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-QBviJzAO.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D6jnR8Rx.js} +2 -2
  20. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BqHtzo20.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-tMoK_Ce8.js} +2 -2
  21. package/dist/{FmMultiselectDialog-M6CvNFW1.js → FmMultiselectDialog-B8P_qEAQ.js} +2 -2
  22. package/dist/{FmMultiselectDialog-CFNZMzlC.js → FmMultiselectDialog-DP480e0e.js} +2 -2
  23. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BGco50Ma.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D7pb8F_A.js} +113 -106
  24. package/dist/{ImportView-C2GOmpuK.js → ImportView-BISXn7Th.js} +6 -6
  25. package/dist/{IngredientsView-wB9kGiOK.js → IngredientsView-C3LrzIuS.js} +15 -15
  26. package/dist/{IntegrationExplorerView-BujwGE4q.js → IntegrationExplorerView-B_4Af6OW.js} +6 -6
  27. package/dist/{IntegrationPlatformView-Wnvj6-BG.js → IntegrationPlatformView-CQUi7sRi.js} +2 -2
  28. package/dist/{IntegrationView-C77rSbpn.js → IntegrationView-CYkZq_tq.js} +14 -14
  29. package/dist/{InventoryBindingForm-Bs7Duwfj.js → InventoryBindingForm-D2s_z-6Q.js} +1 -1
  30. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DawAEeuP.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DXsyVclI.js} +4 -4
  31. package/dist/{InventoryBindingSummary-BefkYWIr.js → InventoryBindingSummary-BOBGDwSm.js} +1 -1
  32. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BpUMK6fj.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-gAd41m7W.js} +2 -2
  33. package/dist/{ProductionRunDetailPage-CVx9LS-P.js → ProductionRunDetailPage-COncuigP.js} +4 -4
  34. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-4aYz5NwS.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-B3PSF7-H.js} +988 -954
  35. package/dist/{ProductionRunPage-CuXzmWMc.js → ProductionRunPage-RUkgXlmL.js} +4 -4
  36. package/dist/{PublishView-Bu8J6ndy.js → PublishView-B0QVNasT.js} +3 -3
  37. package/dist/{PurchaseOrderPrintPreview-DaslFe8u.js → PurchaseOrderPrintPreview-CbjbKRS2.js} +13 -13
  38. package/dist/{ReceiveRequestView-CKPBpN4x.js → ReceiveRequestView-DAiOgbUO.js} +13 -13
  39. package/dist/{RecipeView-BeZ9ljtA.js → RecipeView-B-Qr9p-i.js} +15 -15
  40. package/dist/{SettingsView-CWhMdNfn.js → SettingsView-BnWul5uf.js} +7 -7
  41. package/dist/StockView-raj4WifG.js +2756 -0
  42. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B9Rx_9b7.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CYLgevQO.js} +1 -1
  43. package/dist/{SupplierView-BSGajl9V.js → SupplierView-CxAwhXEg.js} +15 -14
  44. package/dist/{SurchargeView-DtAszxTN.js → SurchargeView-B7R7_JVv.js} +7 -7
  45. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CfxroS8u.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CrYxhm0y.js} +2 -2
  46. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BSglNZaK.js +332 -0
  47. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B_9i5LzY.js → TransferDetails.vue_vue_type_script_setup_true_lang-CoOidQMw.js} +1583 -1530
  48. package/dist/{TransferTemplateView-D6_AfMja.js → TransferTemplateView-BXu5OhXF.js} +945 -941
  49. package/dist/{UnitCostHistoryView-kisQehVE.js → UnitCostHistoryView-BAfxgkjF.js} +4 -4
  50. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DKoPNZoW.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DTS06g9i.js} +4 -4
  51. package/dist/{UnitView-jSLennZW.js → UnitView-BnCe1kBW.js} +7 -7
  52. package/dist/{WarehouseView-CUdWJCMq.js → WarehouseView-D3y9EDWW.js} +8 -8
  53. package/dist/{WastageTemplateView--B0LSwHa.js → WastageTemplateView-BShli8bj.js} +15 -15
  54. package/dist/api/inventory.d.ts +9 -9
  55. package/dist/{app-Bb5HLWTu.js → app-FPg0KzwG.js} +6884 -6971
  56. package/dist/app.d.ts +49 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{closing-template-CgDMayoo.js → closing-template-Db-KNAjB.js} +4 -4
  59. package/dist/components/FeatureCapabilityGate.vue.d.ts +1 -0
  60. package/dist/components/FmUnitInputProps.d.ts +1 -0
  61. package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
  62. package/dist/components/TemplatePublishDialog.d.ts +2 -0
  63. package/dist/components/TemplatePublishDialog.spec.d.ts +1 -0
  64. package/dist/composable/defineApi.d.ts +1 -1
  65. package/dist/{date2-D9gB9BE-.js → date2-YICloR2o.js} +1 -1
  66. package/dist/{dayjs.min-CumM_kH7.js → dayjs.min-CefWSTKK.js} +1 -1
  67. package/dist/{decimal-CVF1rRoj.js → decimal-CBsXxlpr.js} +2 -2
  68. package/dist/defineDeepModel-DdUeiux0.js +19 -0
  69. package/dist/{duplicate-template-CFYtQfQn.js → duplicate-template-BvMZ2ilL.js} +1 -1
  70. package/dist/{feature-kti8bU8q.js → feature-HJuftceg.js} +2 -2
  71. package/dist/{format-time-from-id-CWZ5VGvM.js → format-time-from-id-BUJJn9WM.js} +1 -1
  72. package/dist/{format-unit-display-BlxdvskN.js → format-unit-display-vkauUh5a.js} +115 -113
  73. package/dist/{id-to-date-BaH_1Kui.js → id-to-date-BFOeIS4x.js} +1 -1
  74. package/dist/{import-export.helper-8rKrOB0E.js → import-export.helper-C48DsrFq.js} +5 -5
  75. package/dist/{index-BHc3cNyz.js → index--e5sOJ5N.js} +3 -3
  76. package/dist/{index-B9p_OEdk.js → index-4EWcUZB2.js} +1 -1
  77. package/dist/{index-MEUJonBr.js → index-COy6Gu_M.js} +1768 -1741
  78. package/dist/{lz-string-IiazGN0W.js → lz-string-CX9VutYB.js} +1 -1
  79. package/dist/{netsuite-BeDxaeKM.js → netsuite-BOb6Ek6I.js} +247 -262
  80. package/dist/{netsuite-explorer-4IluitzS.js → netsuite-explorer-Czbq3dDh.js} +1 -1
  81. package/dist/{predefined-templates-D4qVID1q.js → predefined-templates-Cb97vyso.js} +1 -1
  82. package/dist/{purchase-order-template-GTOntq3C.js → purchase-order-template-CBjU0dUO.js} +1 -1
  83. package/dist/{recalculationUtils-Dye8x2TO.js → recalculationUtils-CyoKTNie.js} +1 -1
  84. package/dist/{row-action.enum-CVJbq_-y.js → row-action.enum-DoY1An1e.js} +1 -1
  85. package/dist/{rules-Y3zXVj3i.js → rules-C23j4F0_.js} +45 -40
  86. package/dist/{stock-BR8x3nlx.js → stock-CN-acijK.js} +1 -1
  87. package/dist/stock-DClY4hP_.js +78 -0
  88. package/dist/stores/integration/netsuite.d.ts +2 -2
  89. package/dist/stores/location.d.ts +42 -42
  90. package/dist/stores/supplier.d.ts +48 -48
  91. package/dist/stores/warehouse.d.ts +1 -1
  92. package/dist/style.css +1 -1
  93. package/dist/{supplier-CbdCjiIB.js → supplier-OCIcWTkA.js} +2 -2
  94. package/dist/{surcharge-BoXLK6o0.js → surcharge-CCqME8iu.js} +1 -1
  95. package/dist/tsconfig.app.tsbuildinfo +1 -1
  96. package/dist/{uom-rules-C5h1AoPJ.js → uom-rules-DyRkdoii.js} +1 -1
  97. package/dist/{use-ingredient-select-dialog-D196q_qk.js → use-ingredient-select-dialog-B9SD-Gfg.js} +2 -2
  98. package/dist/{use-inventory-binding-dialog-B4IhhCjM.js → use-inventory-binding-dialog-Dx8nYVH0.js} +2 -2
  99. package/dist/{use-template-enabled-locations-CDKP3kTS.js → use-template-enabled-locations-C7vIH0p-.js} +2 -2
  100. package/dist/{use-transfer-locations-DE4vxSDp.js → use-transfer-locations-DfZI178Y.js} +2 -2
  101. package/dist/{useHrmPermission-D1dkveCP.js → useHrmPermission-BF87diqS.js} +1 -1
  102. package/dist/{useNavigationMenu-N5_7da8m.js → useNavigationMenu-hmVbINp6.js} +4 -4
  103. package/dist/{useSseClient-CKpNaz5g.js → useSseClient-D-dJYaOl.js} +1 -1
  104. package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
  105. package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
  106. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
  107. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
  108. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
  109. package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
  110. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +18 -18
  111. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
  112. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
  113. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
  114. package/dist/views/integration/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
  115. package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
  116. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
  117. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +5 -5
  118. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +39 -39
  119. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +35 -35
  120. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +34 -34
  121. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +6 -6
  122. package/dist/views/stock/components/StockRecordCard.vue.d.ts +16 -2
  123. package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
  124. package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
  125. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
  126. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
  127. package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
  128. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
  129. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
  130. package/dist/views/transfer-template/helpers/template-item.error.helper.spec.d.ts +1 -0
  131. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
  132. package/dist/{vue-CxSKQOrZ.js → vue-_3HY6f-w.js} +2 -2
  133. package/dist/{vue-i18n-CTR_IUvd.js → vue-i18n-B8eq3KRC.js} +158 -158
  134. package/dist/{xlsx.util-J9pxGRQD.js → xlsx.util-BbyZEE1S.js} +2 -2
  135. package/package.json +4 -4
  136. package/dist/StockView-C5IhPGxi.js +0 -2651
  137. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CTj_jYK1.js +0 -299
  138. package/dist/defineDeepModel-DE-DsQjm.js +0 -19
  139. package/dist/stock-BIjTQFsR.js +0 -74
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as C, computed as h, createElementBlock as l, openBlock as d, createElementVNode as r, normalizeClass as v, toDisplayString as m, unref as p, ref as V, resolveComponent as $, Fragment as k, createCommentVNode as G, createVNode as E, withCtx as S, renderList as P } from "vue";
2
2
  import { useI18n as D, useCoreStore as N } from "@feedmepos/mf-common";
3
- import { u as O } from "./netsuite-BeDxaeKM.js";
3
+ import { u as O } from "./netsuite-BOb6Ek6I.js";
4
4
  function re(e, t = !1) {
5
5
  var c;
6
6
  return e ? [
@@ -1,26 +1,26 @@
1
1
  import { defineComponent as ie, mergeModels as Kd, computed as I, useModel as td, resolveComponent as V, createElementBlock as w, openBlock as S, createElementVNode as v, createVNode as b, toDisplayString as k, unref as u, Fragment as oe, renderList as se, withCtx as R, ref as G, createBlock as Q, createCommentVNode as ee, createTextVNode as Ad, isRef as rd, normalizeClass as ae, watch as Rd, createSlots as Wd, normalizeStyle as Yd, Teleport as Xd } from "vue";
2
- import { u as pe } from "./supplier-CbdCjiIB.js";
3
- import { D as nd, R as ve } from "./row-action.enum-CVJbq_-y.js";
2
+ import { u as pe } from "./supplier-OCIcWTkA.js";
3
+ import { D as nd, R as ve } from "./row-action.enum-DoY1An1e.js";
4
4
  import { c as zd } from "./component-BmLAdDiY.js";
5
- import { c as Ae, a as Be, h as od, i as ad, g as Zd, m as Md, u as Ne } from "./app-Bb5HLWTu.js";
5
+ import { c as Ae, a as Be, h as od, i as ad, g as Zd, m as Md, u as Ne } from "./app-FPg0KzwG.js";
6
6
  import { useI18n as te, useCoreStore as Ce } from "@feedmepos/mf-common";
7
- import { u as Se } from "./netsuite-BeDxaeKM.js";
7
+ import { u as Se } from "./netsuite-BOb6Ek6I.js";
8
8
  import { useDialog as Ee, useSnackbar as xe, useProxiedModel as id, useDialogChild as qd, useBreakpoints as Jd } from "@feedmepos/ui-library";
9
9
  import { u as Qd, _ as et } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
10
10
  import { F as K } from "./form-mode.enum-BKiNVH6A.js";
11
- import { R as q, g as dt } from "./rules-Y3zXVj3i.js";
12
- import { a as tt } from "./FmMultiselectDialog-CFNZMzlC.js";
13
- import { _ as Re } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C8c6rmJv.js";
14
- import { _ as rt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BGco50Ma.js";
15
- import { u as Ie } from "./feature-kti8bU8q.js";
11
+ import { R as q, g as dt } from "./rules-C23j4F0_.js";
12
+ import { a as tt } from "./FmMultiselectDialog-DP480e0e.js";
13
+ import { _ as Re } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CCzJ6Awz.js";
14
+ import { _ as rt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-D7pb8F_A.js";
15
+ import { u as Ie } from "./feature-HJuftceg.js";
16
16
  import { _ as Z } from "./FmLockableField.vue_vue_type_script_setup_true_lang-FCg4K7y8.js";
17
- import { u as nt } from "./purchase-order-template-GTOntq3C.js";
17
+ import { u as nt } from "./purchase-order-template-CBjU0dUO.js";
18
18
  import { _ as ot } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js";
19
19
  import { F as ge } from "./index-eGvSlWMU.js";
20
- import { _ as at } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BqHtzo20.js";
20
+ import { _ as at } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-tMoK_Ce8.js";
21
21
  import { defineStore as it } from "pinia";
22
- import { b as kd, d as Dd, s as lt, r as $t } from "./xlsx.util-J9pxGRQD.js";
23
- import { f as st } from "./date2-D9gB9BE-.js";
22
+ import { b as kd, d as Dd, s as lt, r as $t } from "./xlsx.util-BbyZEE1S.js";
23
+ import { f as st } from "./date2-YICloR2o.js";
24
24
  import { F as ut } from "./FmDroppableField-J0tG_U3w.js";
25
25
  function ct(e, d) {
26
26
  const { t } = te(), r = Se();
@@ -228,7 +228,8 @@ const pt = { class: "flex flex-col gap-12" }, ft = { class: "flex flex-col" }, m
228
228
  separator: "/",
229
229
  "apply-default-rules": "",
230
230
  precision: 4,
231
- "format-minimum-precision": 2
231
+ "format-minimum-precision": 2,
232
+ "show-measurement-conversion": ""
232
233
  }, {
233
234
  prepend: R(() => {
234
235
  var M, B;
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as pe, ref as v, computed as c, watch as R, onMounted as fe, resolveComponent as p, createElementBlock as ye, openBlock as j, Fragment as ge, createVNode as n, unref as s, withCtx as f, createElementVNode as u, normalizeClass as G, normalizeStyle as he, toDisplayString as E, withDirectives as be, vModelText as _e, createBlock as Se, createCommentVNode as xe, withModifiers as Fe } from "vue";
2
2
  import { u as ke, _ as we } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
3
- import { a as Ie, u as Ce, q as V, j as Le, s as Ve } from "./app-Bb5HLWTu.js";
4
- import { u as Ae } from "./surcharge-BoXLK6o0.js";
3
+ import { a as Ie, u as Ce, q as V, j as Le, s as Ve } from "./app-FPg0KzwG.js";
4
+ import { u as Ae } from "./surcharge-CCqME8iu.js";
5
5
  import { useSnackbar as De, useDialog as Me, useBreakpoints as Oe } from "@feedmepos/ui-library";
6
- import { _ as Pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BqHtzo20.js";
7
- import { a as Te } from "./FmMultiselectDialog-CFNZMzlC.js";
6
+ import { _ as Pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-tMoK_Ce8.js";
7
+ import { a as Te } from "./FmMultiselectDialog-DP480e0e.js";
8
8
  import { useI18n as Be } from "@feedmepos/mf-common";
9
- import { u as ze } from "./supplier-CbdCjiIB.js";
10
- import { u as Ee } from "./feature-kti8bU8q.js";
9
+ import { u as ze } from "./supplier-OCIcWTkA.js";
10
+ import { u as Ee } from "./feature-HJuftceg.js";
11
11
  import { D as Ne, P as $e, L as qe } from "./app-C39bYJmq.js";
12
- import { D as H, R as A } from "./row-action.enum-CVJbq_-y.js";
12
+ import { D as H, R as A } from "./row-action.enum-DoY1An1e.js";
13
13
  import { c as Ue } from "./component-BmLAdDiY.js";
14
14
  const Je = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, je = { class: "flex flex-col h-full justify-between" }, Ge = { class: "space-y-16" }, He = ["placeholder"], Ke = { class: "flex flex-col gap-16" }, Qe = { class: "flex flex-col gap-8" }, We = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = { class: "flex flex-col gap-12" }, Ye = { class: "flex flex-col gap-4" }, Ze = { class: "flex items-center gap-8" }, pt = /* @__PURE__ */ pe({
15
15
  __name: "SurchargeView",
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as U, ref as B, resolveComponent as g, createBlock as I, openBlock as $, withCtx as h, createElementVNode as O, createVNode as k, h as f, createElementBlock as w, toDisplayString as b } from "vue";
2
2
  import { F as _ } from "./FmAdminBadge-DlplQOHb.js";
3
- import { d as L, u as T } from "./app-Bb5HLWTu.js";
3
+ import { d as L, u as T } from "./app-FPg0KzwG.js";
4
4
  import { useCoreStore as A } from "@feedmepos/mf-common";
5
5
  import { useDialog as j, components as P } from "@feedmepos/ui-library";
6
- import { u as C, a as q } from "./closing-template-CgDMayoo.js";
6
+ import { u as C, a as q } from "./closing-template-Db-KNAjB.js";
7
7
  const F = L((o, t) => {
8
8
  const d = T(), l = A();
9
9
  return {
@@ -0,0 +1,332 @@
1
+ import { defineComponent as H, ref as g, computed as u, watch as J, h as i, resolveComponent as L, createElementBlock as Q, openBlock as U, createElementVNode as b, toDisplayString as W, createVNode as y, createBlock as X, createCommentVNode as Y, unref as P } from "vue";
2
+ import { useCoreStore as Z, useI18n as ee } from "@feedmepos/mf-common";
3
+ import { useSnackbar as le, components as A } from "@feedmepos/ui-library";
4
+ import { K as te, D as ae } from "./app-C39bYJmq.js";
5
+ import { u as oe } from "./app-FPg0KzwG.js";
6
+ import { F as ne } from "./FmAdminBadge-DlplQOHb.js";
7
+ function se(C, o, r) {
8
+ if (!(r != null && r.length)) return [];
9
+ const t = new Set(r);
10
+ return Object.entries(C).filter(([n, w]) => !t.has(n) && w.some((F) => F._id === o)).map(([n]) => n);
11
+ }
12
+ const ie = {
13
+ class: "flex flex-col gap-24 h-full",
14
+ style: { "max-height": "50vh" }
15
+ }, re = { class: "flex items-center flex-shrink-0" }, ue = { class: "fm-typo-en-body-lg-600 flex-1" }, de = { class: "flex gap-8" }, ce = { class: "flex flex-col gap-4 w-full flex-1 min-h-0" }, ve = { class: "flex items-center gap-8 flex-shrink-0" }, me = { class: "flex-1 border border-fm-color-border-secondary rounded-lg overflow-hidden overflow-y-auto min-h-0" }, we = /* @__PURE__ */ H({
16
+ __name: "TemplatePublishDialog",
17
+ props: {
18
+ title: {},
19
+ doc: {},
20
+ controller: {},
21
+ initialPublishedRev: {},
22
+ locations: {},
23
+ enabledLocations: {},
24
+ hideUnpublish: { type: Boolean }
25
+ },
26
+ setup(C) {
27
+ const o = C, r = g(o.initialPublishedRev ?? {}), t = g(), n = g(/* @__PURE__ */ new Set()), w = oe(), F = Z(), p = le(), E = u(() => {
28
+ var l;
29
+ return ((l = F.sessionUser.value) == null ? void 0 : l.role.isAdmin) ?? !1;
30
+ }), _ = (l) => l.status !== "invalid" && l.status !== "pendingRemoval", R = u(() => {
31
+ var e;
32
+ return ((e = o.enabledLocations) != null && e.length ? o.enabledLocations : o.locations).map((a) => {
33
+ var s;
34
+ if (!!!w.locationByDbName[a.dbName])
35
+ return {
36
+ ...a,
37
+ status: "invalid"
38
+ };
39
+ const h = !!(((s = r.value) == null ? void 0 : s[a.dbName]) ?? []).find(
40
+ (k) => k._id === o.doc._id && (k.updatedAt ? k.updatedAt === o.doc.updatedAt : k._rev === o.doc._rev)
41
+ );
42
+ return {
43
+ ...a,
44
+ status: h ? "published" : "outdated",
45
+ state: a.doc.profile.address.state
46
+ };
47
+ });
48
+ }), $ = u(
49
+ () => {
50
+ var l;
51
+ return se(
52
+ r.value,
53
+ o.doc._id,
54
+ (l = o.enabledLocations) == null ? void 0 : l.map((e) => e.dbName)
55
+ ).flatMap((e) => {
56
+ const a = o.locations.find((v) => v.dbName === e);
57
+ return a ? [{ ...a, status: "pendingRemoval" }] : [];
58
+ });
59
+ }
60
+ ), { t: f } = ee(), x = g(""), N = g({
61
+ logic: "AND",
62
+ rules: []
63
+ }), T = [
64
+ {
65
+ type: "string",
66
+ key: "status",
67
+ entity: "inventory",
68
+ values: ["published", "outdated", "pendingRemoval"]
69
+ },
70
+ {
71
+ type: "string",
72
+ key: "state",
73
+ entity: "inventory",
74
+ values: [
75
+ ...new Set(w.locations.map((l) => l.doc.profile.address.state).filter(Boolean))
76
+ ]
77
+ }
78
+ ], d = u(() => {
79
+ const l = x.value.toLowerCase();
80
+ return [...R.value, ...$.value].filter((e) => te(e, N.value)).filter(({ name: e, dbName: a }) => !!(!l || e.toLowerCase().includes(l) || E.value && a.toLowerCase().includes(l)));
81
+ }), S = u(
82
+ () => d.value.filter(_)
83
+ );
84
+ J(
85
+ [x, N],
86
+ () => {
87
+ n.value = /* @__PURE__ */ new Set();
88
+ },
89
+ { deep: !0 }
90
+ );
91
+ const B = u(() => d.value.length === 0 ? !1 : d.value.every((l) => n.value.has(l.dbName))), z = u(() => {
92
+ if (S.value.length === 0) return !1;
93
+ const l = S.value.filter(
94
+ (e) => n.value.has(e.dbName)
95
+ ).length;
96
+ return l > 0 && l < S.value.length;
97
+ });
98
+ function D() {
99
+ B.value ? d.value.forEach((l) => n.value.delete(l.dbName)) : d.value.forEach((l) => n.value.add(l.dbName)), n.value = new Set(n.value);
100
+ }
101
+ function I(l) {
102
+ _(l) && (n.value.has(l.dbName) ? n.value.delete(l.dbName) : n.value.add(l.dbName), n.value = new Set(n.value));
103
+ }
104
+ function V() {
105
+ const l = d.value.filter(
106
+ (e) => _(e) && n.value.has(e.dbName)
107
+ );
108
+ return l.length === 0 ? S.value : l;
109
+ }
110
+ const M = u(() => [
111
+ {
112
+ id: "checkbox",
113
+ header: () => "",
114
+ size: 56,
115
+ cell: (l) => {
116
+ const e = l.row.original;
117
+ return _(e) ? i(A.FmCheckbox, {
118
+ value: e.dbName,
119
+ modelValue: n.value.has(e.dbName),
120
+ "onUpdate:modelValue": () => I(e)
121
+ }) : i("div", { class: "w-56" });
122
+ }
123
+ },
124
+ {
125
+ id: "name",
126
+ header: () => "Name",
127
+ size: "auto",
128
+ cell: (l) => {
129
+ const e = l.row.original;
130
+ return i("div", { class: "flex flex-col" }, [
131
+ i("span", {}, e.name),
132
+ i(
133
+ ne,
134
+ {},
135
+ {
136
+ default: () => i("div", { class: "flex items-center gap-4" }, [
137
+ i(
138
+ "span",
139
+ { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" },
140
+ e.dbName
141
+ ),
142
+ i(A.FmButton, {
143
+ variant: "tertiary",
144
+ icon: "content_copy",
145
+ size: "sm",
146
+ onClick: async (a) => {
147
+ a.stopPropagation();
148
+ try {
149
+ await navigator.clipboard.writeText(e.dbName), p == null || p.open({
150
+ title: "Copied to clipboard",
151
+ message: e.name,
152
+ type: "success"
153
+ });
154
+ } catch (v) {
155
+ console.error("Failed to copy:", v);
156
+ }
157
+ }
158
+ })
159
+ ])
160
+ }
161
+ )
162
+ ]);
163
+ }
164
+ },
165
+ {
166
+ id: "status",
167
+ header: () => "Status",
168
+ size: 200,
169
+ cell: (l) => {
170
+ const e = l.row.original, a = e.status === "published";
171
+ if (e.status === "invalid")
172
+ return i(
173
+ "div",
174
+ {
175
+ class: ["fm-status-badge", "fm-status-badge-error-secondary"]
176
+ },
177
+ "Invalid"
178
+ );
179
+ if (e.status === "pendingRemoval")
180
+ return i(
181
+ "div",
182
+ {
183
+ class: ["fm-status-badge", "fm-status-badge-processing"],
184
+ title: "This template is no longer enabled here but the outlet still has it. Publish again to remove it; it stays while an open closing draft uses it."
185
+ },
186
+ "Pending removal"
187
+ );
188
+ let m;
189
+ a && o.controller.unpublishAtLocation && !o.hideUnpublish ? m = i(A.FmButton, {
190
+ variant: "tertiary",
191
+ icon: "block",
192
+ loading: t.value === `unpublish-${e.dbName}`,
193
+ disabled: t.value !== void 0 && t.value !== `unpublish-${e.dbName}`,
194
+ onClick: async () => {
195
+ t.value = `unpublish-${e.dbName}`;
196
+ try {
197
+ const s = await o.controller.unpublishAtLocation(e).delayed(1e3);
198
+ r.value = s;
199
+ } catch (s) {
200
+ console.error("Error unpublishing at location:", s);
201
+ } finally {
202
+ t.value = void 0;
203
+ }
204
+ }
205
+ }) : a || (m = i(A.FmButton, {
206
+ variant: "tertiary",
207
+ icon: "ios_share",
208
+ loading: t.value === `publish-${e.dbName}`,
209
+ disabled: t.value !== void 0 && t.value !== `publish-${e.dbName}`,
210
+ onClick: async () => {
211
+ t.value = `publish-${e.dbName}`;
212
+ try {
213
+ const s = await o.controller.publishAtLocation(e).delayed(1e3);
214
+ r.value = s;
215
+ } catch (s) {
216
+ console.error("Error publishing at location:", s);
217
+ } finally {
218
+ t.value = void 0;
219
+ }
220
+ }
221
+ }));
222
+ const h = [
223
+ i(
224
+ "div",
225
+ {
226
+ class: [
227
+ "fm-status-badge",
228
+ a ? "fm-status-badge-success-secondary" : "fm-status-badge-info-secondary"
229
+ ]
230
+ },
231
+ f(a ? "inventory.publish.status.published" : "inventory.publish.status.outdated")
232
+ )
233
+ ];
234
+ return m && h.push(m), i("div", { class: "flex items-center gap-8" }, h);
235
+ }
236
+ }
237
+ ]);
238
+ async function K() {
239
+ t.value = "all";
240
+ try {
241
+ const l = V(), e = $.value.length, a = await o.controller.publishAll(l).delayed(1e3);
242
+ r.value = a, j(e, $.value.length);
243
+ } catch (l) {
244
+ console.error("Error publishing all:", l);
245
+ } finally {
246
+ t.value = void 0;
247
+ }
248
+ }
249
+ function j(l, e) {
250
+ l === 0 && e === 0 || p == null || p.open({
251
+ title: `Removed from ${l - e} of ${l} outlet${l === 1 ? "" : "s"} no longer enabled`,
252
+ message: e ? `${e} still pending removal: an open closing draft may still use it, or removal failed. Publish again later.` : void 0,
253
+ type: e ? "warning" : "success"
254
+ });
255
+ }
256
+ async function O() {
257
+ if (o.controller.unpublishAll) {
258
+ t.value = "unpublish-all";
259
+ try {
260
+ const l = V(), e = await o.controller.unpublishAll(l).delayed(1e3);
261
+ r.value = e;
262
+ } catch (l) {
263
+ console.error("Error unpublishing all:", l);
264
+ } finally {
265
+ t.value = void 0;
266
+ }
267
+ }
268
+ }
269
+ const c = u(() => n.value.size), q = u(() => c.value === 0 || c.value === R.value.length ? f("inventory.publish.actions.publishAll") : f("inventory.publish.actions.publishSelected", { count: c.value })), G = u(() => c.value === 0 || c.value === R.value.length ? "Unpublish all" : `Unpublish selected ${c.value} location${c.value === 1 ? "" : "s"}`);
270
+ return (l, e) => {
271
+ const a = L("FmButton"), v = L("FmTextField"), m = L("FmCheckbox"), h = L("FmTable");
272
+ return U(), Q("div", ie, [
273
+ b("div", re, [
274
+ b("div", ue, W(l.title), 1),
275
+ b("div", de, [
276
+ y(a, {
277
+ label: q.value,
278
+ variant: "secondary",
279
+ onClick: e[0] || (e[0] = (s) => K()),
280
+ loading: t.value === "all",
281
+ disabled: t.value !== "all" && t.value !== void 0
282
+ }, null, 8, ["label", "loading", "disabled"]),
283
+ l.controller.unpublishAll && !l.hideUnpublish ? (U(), X(a, {
284
+ key: 0,
285
+ label: G.value,
286
+ variant: "tertiary",
287
+ onClick: e[1] || (e[1] = (s) => O()),
288
+ loading: t.value === "unpublish-all",
289
+ disabled: t.value !== "unpublish-all" && t.value !== void 0
290
+ }, null, 8, ["label", "loading", "disabled"])) : Y("", !0)
291
+ ])
292
+ ]),
293
+ b("div", ce, [
294
+ y(v, {
295
+ modelValue: x.value,
296
+ "onUpdate:modelValue": e[2] || (e[2] = (s) => x.value = s),
297
+ class: "w-full flex-shrink-0",
298
+ placeholder: P(f)("inventory.publish.search.placeholder"),
299
+ "prepend-icon": "search"
300
+ }, null, 8, ["modelValue", "placeholder"]),
301
+ b("div", ve, [
302
+ y(P(ae), {
303
+ modelValue: N.value,
304
+ "onUpdate:modelValue": e[3] || (e[3] = (s) => N.value = s),
305
+ attributes: T
306
+ }, null, 8, ["modelValue"]),
307
+ y(m, {
308
+ value: "select-all",
309
+ "model-value": B.value,
310
+ indeterminate: z.value,
311
+ "onUpdate:modelValue": D,
312
+ label: "Select all"
313
+ }, null, 8, ["model-value", "indeterminate"])
314
+ ]),
315
+ b("div", me, [
316
+ y(h, {
317
+ "row-data": d.value,
318
+ "column-defs": M.value,
319
+ "shrink-at": 9999,
320
+ virtual: !0,
321
+ "page-size": d.value.length,
322
+ "hide-footer": ""
323
+ }, null, 8, ["row-data", "column-defs", "page-size"])
324
+ ])
325
+ ])
326
+ ]);
327
+ };
328
+ }
329
+ });
330
+ export {
331
+ we as _
332
+ };