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

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 (133) hide show
  1. package/dist/{App-xSsyvQV_.js → App-CRmKXhRV.js} +9 -9
  2. package/dist/{ApprovalView-DfJ0FAiD.js → ApprovalView-tDkNN-Cd.js} +9 -9
  3. package/dist/{BindingsDialog-oAZyjgrN.js → BindingsDialog-DrB0U9F6.js} +2 -2
  4. package/dist/{BindingsPicker-CEIo7myR.js → BindingsPicker-tjjgijNe.js} +2 -2
  5. package/dist/{BindingsTable-BKa-JYRR.js → BindingsTable-D7EGgWxE.js} +4 -4
  6. package/dist/{BulkReceiveRequestPage-C6Oyg5-E.js → BulkReceiveRequestPage-B7GEE9qI.js} +21 -21
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BvleQo5y.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-B4j6Acmo.js} +1 -1
  8. package/dist/{ClosingDraftView-tJrjqyAC.js → ClosingDraftView-DH0eBMZ8.js} +19 -19
  9. package/dist/{ClosingHistoryView-CJQlK4Xc.js → ClosingHistoryView-FmdYCiLI.js} +7 -7
  10. package/dist/{ClosingTemplateView-DYRtdK5h.js → ClosingTemplateView-BGmFG2-y.js} +18 -18
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DEwi7wFf.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DHboInU_.js} +1 -1
  12. package/dist/{DefaultView-CxTBlkln.js → DefaultView-CsNlHUlf.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-Bywdjc2U.js → DeliveryOrderPrintPreview-CMe2DpP1.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DcFAUTdO.js → EmailDialog.vue_vue_type_script_setup_true_lang-Yen9u78U.js} +7759 -7654
  15. package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C8c6rmJv.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-BJy8_H2s.js} +1 -1
  16. package/dist/{FeatureCapabilityGate-B41dULfm.js → FeatureCapabilityGate-DN8b1697.js} +2 -2
  17. package/dist/{FeaturePageGate.vue_vue_type_script_setup_true_lang-D4G6i1D6.js → FeaturePageGate.vue_vue_type_script_setup_true_lang-DmNFZYam.js} +1 -1
  18. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CnqH115V.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-2zOATqzb.js} +1 -1
  19. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-QBviJzAO.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CVBUkN02.js} +2 -2
  20. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BqHtzo20.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BuE-1qd6.js} +2 -2
  21. package/dist/{FmMultiselectDialog-M6CvNFW1.js → FmMultiselectDialog-C3B8pd2Z.js} +2 -2
  22. package/dist/{FmMultiselectDialog-CFNZMzlC.js → FmMultiselectDialog-LI5ekHzQ.js} +2 -2
  23. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BGco50Ma.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DQZ7aJGJ.js} +113 -106
  24. package/dist/{ImportView-C2GOmpuK.js → ImportView-DYoeJLdr.js} +6 -6
  25. package/dist/{IngredientsView-wB9kGiOK.js → IngredientsView-u3KHfALO.js} +15 -15
  26. package/dist/{IntegrationExplorerView-BujwGE4q.js → IntegrationExplorerView-Bl0Z8sxM.js} +6 -6
  27. package/dist/{IntegrationPlatformView-Wnvj6-BG.js → IntegrationPlatformView-CybBB3RA.js} +2 -2
  28. package/dist/{IntegrationView-C77rSbpn.js → IntegrationView-Dxy7QhCp.js} +14 -14
  29. package/dist/{InventoryBindingForm-Bs7Duwfj.js → InventoryBindingForm-DyUvyOsa.js} +1 -1
  30. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DawAEeuP.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dmch1sfA.js} +4 -4
  31. package/dist/{InventoryBindingSummary-BefkYWIr.js → InventoryBindingSummary-DwY3vUf_.js} +1 -1
  32. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BpUMK6fj.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B2UtnJtf.js} +2 -2
  33. package/dist/{ProductionRunDetailPage-CVx9LS-P.js → ProductionRunDetailPage-Cdi4hv3E.js} +4 -4
  34. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-4aYz5NwS.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-D5jlF5x4.js} +988 -954
  35. package/dist/{ProductionRunPage-CuXzmWMc.js → ProductionRunPage-RcbHy0Mj.js} +4 -4
  36. package/dist/{PublishView-Bu8J6ndy.js → PublishView-CyJ_rE-5.js} +3 -3
  37. package/dist/{PurchaseOrderPrintPreview-DaslFe8u.js → PurchaseOrderPrintPreview-ZlbV3YfE.js} +2 -2
  38. package/dist/{ReceiveRequestView-CKPBpN4x.js → ReceiveRequestView-BKz8N6yK.js} +13 -13
  39. package/dist/{RecipeView-BeZ9ljtA.js → RecipeView-D3IEyQoK.js} +15 -15
  40. package/dist/{SettingsView-CWhMdNfn.js → SettingsView-A0eozTq3.js} +7 -7
  41. package/dist/{StockView-C5IhPGxi.js → StockView-DrxkHTH4.js} +25 -25
  42. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B9Rx_9b7.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CD11VzXa.js} +1 -1
  43. package/dist/{SupplierView-BSGajl9V.js → SupplierView-Cg60vwsj.js} +15 -14
  44. package/dist/{SurchargeView-DtAszxTN.js → SurchargeView-Dxvg-RnC.js} +7 -7
  45. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CfxroS8u.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DDLGEaa2.js} +2 -2
  46. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DfYoaT5a.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-D3wClK8t.js} +1264 -1232
  48. package/dist/{TransferTemplateView-D6_AfMja.js → TransferTemplateView-DfCJzLHt.js} +945 -941
  49. package/dist/{UnitCostHistoryView-kisQehVE.js → UnitCostHistoryView-BkNnwNUc.js} +4 -4
  50. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DKoPNZoW.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-Clufqvr_.js} +4 -4
  51. package/dist/{UnitView-jSLennZW.js → UnitView-D_agG3Kd.js} +7 -7
  52. package/dist/{WarehouseView-CUdWJCMq.js → WarehouseView-DE_CaJCb.js} +8 -8
  53. package/dist/{WastageTemplateView--B0LSwHa.js → WastageTemplateView-r3b6angy.js} +15 -15
  54. package/dist/api/inventory.d.ts +9 -9
  55. package/dist/{app-Bb5HLWTu.js → app-CLTXsVH_.js} +26976 -25707
  56. package/dist/app.d.ts +48 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{closing-template-CgDMayoo.js → closing-template-yP6QT_6M.js} +4 -4
  59. package/dist/components/FmUnitInputProps.d.ts +1 -0
  60. package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
  61. package/dist/components/TemplatePublishDialog.d.ts +2 -0
  62. package/dist/components/TemplatePublishDialog.spec.d.ts +1 -0
  63. package/dist/composable/defineApi.d.ts +1 -1
  64. package/dist/{date2-D9gB9BE-.js → date2-9jq_OKuv.js} +1 -1
  65. package/dist/{dayjs.min-CumM_kH7.js → dayjs.min-CAxu5-hQ.js} +1 -1
  66. package/dist/{decimal-CVF1rRoj.js → decimal-BhGvDuWQ.js} +2 -2
  67. package/dist/{defineDeepModel-DE-DsQjm.js → defineDeepModel-Czbczabc.js} +1 -1
  68. package/dist/{duplicate-template-CFYtQfQn.js → duplicate-template-X72Zob-u.js} +1 -1
  69. package/dist/{feature-kti8bU8q.js → feature-CC2pF6VK.js} +2 -2
  70. package/dist/{format-time-from-id-CWZ5VGvM.js → format-time-from-id-DhZOfLN4.js} +1 -1
  71. package/dist/{format-unit-display-BlxdvskN.js → format-unit-display-BalKqHYj.js} +115 -113
  72. package/dist/{id-to-date-BaH_1Kui.js → id-to-date-Cb9v4BtX.js} +1 -1
  73. package/dist/{import-export.helper-8rKrOB0E.js → import-export.helper-9D5DLoaq.js} +5 -5
  74. package/dist/{index-B9p_OEdk.js → index-B0T8iGU6.js} +1 -1
  75. package/dist/{index-BHc3cNyz.js → index-CnjRz458.js} +3 -3
  76. package/dist/{index-MEUJonBr.js → index-DqV626Os.js} +1768 -1741
  77. package/dist/{lz-string-IiazGN0W.js → lz-string-CK_kK0b8.js} +1 -1
  78. package/dist/{netsuite-BeDxaeKM.js → netsuite-Czq6x14E.js} +2 -2
  79. package/dist/{netsuite-explorer-4IluitzS.js → netsuite-explorer-BugWV6N7.js} +1 -1
  80. package/dist/{predefined-templates-D4qVID1q.js → predefined-templates-D5qjNE4o.js} +1 -1
  81. package/dist/{purchase-order-template-GTOntq3C.js → purchase-order-template-Bc0QP-bq.js} +1 -1
  82. package/dist/{recalculationUtils-Dye8x2TO.js → recalculationUtils-CJknKvb-.js} +1 -1
  83. package/dist/{row-action.enum-CVJbq_-y.js → row-action.enum-Cz1k6Kht.js} +1 -1
  84. package/dist/{rules-Y3zXVj3i.js → rules-BQscySfb.js} +45 -40
  85. package/dist/{stock-BR8x3nlx.js → stock--68mu-M1.js} +1 -1
  86. package/dist/{stock-BIjTQFsR.js → stock-DCz3ZTmd.js} +2 -2
  87. package/dist/stores/integration/netsuite.d.ts +2 -2
  88. package/dist/stores/location.d.ts +42 -42
  89. package/dist/stores/supplier.d.ts +48 -48
  90. package/dist/stores/warehouse.d.ts +1 -1
  91. package/dist/{supplier-CbdCjiIB.js → supplier-U06ZrnoC.js} +2 -2
  92. package/dist/{surcharge-BoXLK6o0.js → surcharge-B5DGPlf5.js} +1 -1
  93. package/dist/tsconfig.app.tsbuildinfo +1 -1
  94. package/dist/{uom-rules-C5h1AoPJ.js → uom-rules-DfBYytl6.js} +1 -1
  95. package/dist/{use-ingredient-select-dialog-D196q_qk.js → use-ingredient-select-dialog-BRTxaEaQ.js} +2 -2
  96. package/dist/{use-inventory-binding-dialog-B4IhhCjM.js → use-inventory-binding-dialog-DQDv8yOS.js} +2 -2
  97. package/dist/{use-template-enabled-locations-CDKP3kTS.js → use-template-enabled-locations-DzQVNhev.js} +2 -2
  98. package/dist/{use-transfer-locations-DE4vxSDp.js → use-transfer-locations-CGvKssyQ.js} +2 -2
  99. package/dist/{useHrmPermission-D1dkveCP.js → useHrmPermission-BkOtYcLu.js} +1 -1
  100. package/dist/{useNavigationMenu-N5_7da8m.js → useNavigationMenu-korDNdFf.js} +4 -4
  101. package/dist/{useSseClient-CKpNaz5g.js → useSseClient-BjoRcYKu.js} +1 -1
  102. package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
  103. package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
  104. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
  105. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
  106. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
  107. package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
  108. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +18 -18
  109. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
  110. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
  111. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
  112. package/dist/views/integration/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
  113. package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
  114. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
  115. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +5 -5
  116. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +39 -39
  117. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +35 -35
  118. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +34 -34
  119. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +6 -6
  120. package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
  121. package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
  122. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
  123. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
  124. package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
  125. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
  126. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
  127. package/dist/views/transfer-template/helpers/template-item.error.helper.spec.d.ts +1 -0
  128. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
  129. package/dist/{vue-CxSKQOrZ.js → vue-hPU91AHR.js} +2 -2
  130. package/dist/{vue-i18n-CTR_IUvd.js → vue-i18n-VFYpKHHB.js} +158 -158
  131. package/dist/{xlsx.util-J9pxGRQD.js → xlsx.util-VlHt05TU.js} +2 -2
  132. package/package.json +5 -5
  133. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CTj_jYK1.js +0 -299
@@ -1,5 +1,5 @@
1
- import "./app-Bb5HLWTu.js";
2
- import "./dayjs.min-CumM_kH7.js";
1
+ import "./app-CLTXsVH_.js";
2
+ import "./dayjs.min-CAxu5-hQ.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.8.0-dev.16",
3
+ "version": "1.8.0-dev.17",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -55,14 +55,14 @@
55
55
  "vue-i18n": "10.0.5",
56
56
  "vue-router": "4.4.0",
57
57
  "xlsx": "0.18.5",
58
- "@feedmepos/integration-portal": "0.0.1",
59
- "@feedmepos/inventory-core": "1.0.2-dev.8",
60
58
  "@feedmepos/codemax-core": "1.0.0",
59
+ "@feedmepos/integration-portal": "0.0.1",
60
+ "@feedmepos/inventory-core": "1.0.3-dev.0",
61
61
  "@feedmepos/inventory-core-2": "2.0.0",
62
+ "@feedmepos/zod-inventory": "2.0.0",
62
63
  "@feedmepos/inventory-core-js": "1.0.1",
63
64
  "@feedmepos/netsuite-core": "1.0.0",
64
- "@feedmepos/inventory-core-dart": "1.0.0",
65
- "@feedmepos/zod-inventory": "2.0.0"
65
+ "@feedmepos/inventory-core-dart": "1.0.0"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@playwright/test": "1.61.1",
@@ -1,299 +0,0 @@
1
- import { defineComponent as q, ref as f, computed as r, watch as G, h as i, resolveComponent as x, createElementBlock as H, openBlock as B, createElementVNode as b, toDisplayString as J, createVNode as y, createBlock as O, createCommentVNode as Q, unref as V } from "vue";
2
- import { useCoreStore as W, useI18n as X } from "@feedmepos/mf-common";
3
- import { useSnackbar as Y, components as A } from "@feedmepos/ui-library";
4
- import { K as Z, D as ee } from "./app-C39bYJmq.js";
5
- import { u as le } from "./app-Bb5HLWTu.js";
6
- import { F as te } from "./FmAdminBadge-DlplQOHb.js";
7
- const ae = {
8
- class: "flex flex-col gap-24 h-full",
9
- style: { "max-height": "50vh" }
10
- }, oe = { class: "flex items-center flex-shrink-0" }, ne = { class: "fm-typo-en-body-lg-600 flex-1" }, se = { class: "flex gap-8" }, ie = { class: "flex flex-col gap-4 w-full flex-1 min-h-0" }, re = { class: "flex items-center gap-8 flex-shrink-0" }, ue = { class: "flex-1 border border-fm-color-border-secondary rounded-lg overflow-hidden overflow-y-auto min-h-0" }, he = /* @__PURE__ */ q({
11
- __name: "TemplatePublishDialog",
12
- props: {
13
- title: {},
14
- doc: {},
15
- controller: {},
16
- initialPublishedRev: {},
17
- locations: {},
18
- enabledLocations: {},
19
- hideUnpublish: { type: Boolean }
20
- },
21
- setup(U) {
22
- const s = U, p = f(s.initialPublishedRev ?? {}), t = f(), n = f(/* @__PURE__ */ new Set()), C = le(), $ = W(), k = Y(), E = r(() => {
23
- var e;
24
- return ((e = $.sessionUser.value) == null ? void 0 : e.role.isAdmin) ?? !1;
25
- }), S = r(() => {
26
- var l;
27
- return ((l = s.enabledLocations) != null && l.length ? s.enabledLocations : s.locations).map((a) => {
28
- var o;
29
- if (!!!C.locationByDbName[a.dbName])
30
- return {
31
- ...a,
32
- status: "invalid"
33
- };
34
- const v = !!(((o = p.value) == null ? void 0 : o[a.dbName]) ?? []).find(
35
- (_) => _._id === s.doc._id && (_.updatedAt ? _.updatedAt === s.doc.updatedAt : _._rev === s.doc._rev)
36
- );
37
- return {
38
- ...a,
39
- status: v ? "published" : "outdated",
40
- state: a.doc.profile.address.state
41
- };
42
- });
43
- }), { t: m } = X(), g = f(""), w = f({
44
- logic: "AND",
45
- rules: []
46
- }), D = [
47
- {
48
- type: "string",
49
- key: "status",
50
- entity: "inventory",
51
- values: ["published", "outdated"]
52
- },
53
- {
54
- type: "string",
55
- key: "state",
56
- entity: "inventory",
57
- values: [
58
- ...new Set(C.locations.map((e) => e.doc.profile.address.state).filter(Boolean))
59
- ]
60
- }
61
- ], u = r(() => {
62
- const e = g.value.toLowerCase();
63
- return S.value.filter((l) => Z(l, w.value)).filter(({ name: l, dbName: a }) => !!(!e || l.toLowerCase().includes(e) || E.value && a.toLowerCase().includes(e)));
64
- }), N = r(
65
- () => u.value.filter((e) => e.status !== "invalid")
66
- );
67
- G(
68
- [g, w],
69
- () => {
70
- n.value = /* @__PURE__ */ new Set();
71
- },
72
- { deep: !0 }
73
- );
74
- const F = r(() => u.value.length === 0 ? !1 : u.value.every((e) => n.value.has(e.dbName))), T = r(() => {
75
- if (N.value.length === 0) return !1;
76
- const e = N.value.filter(
77
- (l) => n.value.has(l.dbName)
78
- ).length;
79
- return e > 0 && e < N.value.length;
80
- });
81
- function z() {
82
- F.value ? u.value.forEach((e) => n.value.delete(e.dbName)) : u.value.forEach((e) => n.value.add(e.dbName)), n.value = new Set(n.value);
83
- }
84
- function P(e) {
85
- e.status !== "invalid" && (n.value.has(e.dbName) ? n.value.delete(e.dbName) : n.value.add(e.dbName), n.value = new Set(n.value));
86
- }
87
- function L() {
88
- const e = u.value.filter(
89
- (l) => l.status !== "invalid" && n.value.has(l.dbName)
90
- );
91
- return e.length === 0 ? N.value : e;
92
- }
93
- const R = r(() => [
94
- {
95
- id: "checkbox",
96
- header: () => "",
97
- size: 56,
98
- cell: (e) => {
99
- const l = e.row.original;
100
- return l.status === "invalid" ? i("div", { class: "w-56" }) : i(A.FmCheckbox, {
101
- value: l.dbName,
102
- modelValue: n.value.has(l.dbName),
103
- "onUpdate:modelValue": () => P(l)
104
- });
105
- }
106
- },
107
- {
108
- id: "name",
109
- header: () => "Name",
110
- size: "auto",
111
- cell: (e) => {
112
- const l = e.row.original;
113
- return i("div", { class: "flex flex-col" }, [
114
- i("span", {}, l.name),
115
- i(
116
- te,
117
- {},
118
- {
119
- default: () => i("div", { class: "flex items-center gap-4" }, [
120
- i(
121
- "span",
122
- { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" },
123
- l.dbName
124
- ),
125
- i(A.FmButton, {
126
- variant: "tertiary",
127
- icon: "content_copy",
128
- size: "sm",
129
- onClick: async (a) => {
130
- a.stopPropagation();
131
- try {
132
- await navigator.clipboard.writeText(l.dbName), k == null || k.open({
133
- title: "Copied to clipboard",
134
- message: l.name,
135
- type: "success"
136
- });
137
- } catch (h) {
138
- console.error("Failed to copy:", h);
139
- }
140
- }
141
- })
142
- ])
143
- }
144
- )
145
- ]);
146
- }
147
- },
148
- {
149
- id: "status",
150
- header: () => "Status",
151
- size: 200,
152
- cell: (e) => {
153
- const l = e.row.original, a = l.status === "published";
154
- if (l.status === "invalid")
155
- return i(
156
- "div",
157
- {
158
- class: ["fm-status-badge", "fm-status-badge-error-secondary"]
159
- },
160
- "Invalid"
161
- );
162
- let c;
163
- a && s.controller.unpublishAtLocation && !s.hideUnpublish ? c = i(A.FmButton, {
164
- variant: "tertiary",
165
- icon: "block",
166
- loading: t.value === `unpublish-${l.dbName}`,
167
- disabled: t.value !== void 0 && t.value !== `unpublish-${l.dbName}`,
168
- onClick: async () => {
169
- t.value = `unpublish-${l.dbName}`;
170
- try {
171
- const o = await s.controller.unpublishAtLocation(l).delayed(1e3);
172
- p.value = o;
173
- } catch (o) {
174
- console.error("Error unpublishing at location:", o);
175
- } finally {
176
- t.value = void 0;
177
- }
178
- }
179
- }) : a || (c = i(A.FmButton, {
180
- variant: "tertiary",
181
- icon: "ios_share",
182
- loading: t.value === `publish-${l.dbName}`,
183
- disabled: t.value !== void 0 && t.value !== `publish-${l.dbName}`,
184
- onClick: async () => {
185
- t.value = `publish-${l.dbName}`;
186
- try {
187
- const o = await s.controller.publishAtLocation(l).delayed(1e3);
188
- p.value = o;
189
- } catch (o) {
190
- console.error("Error publishing at location:", o);
191
- } finally {
192
- t.value = void 0;
193
- }
194
- }
195
- }));
196
- const v = [
197
- i(
198
- "div",
199
- {
200
- class: [
201
- "fm-status-badge",
202
- a ? "fm-status-badge-success-secondary" : "fm-status-badge-info-secondary"
203
- ]
204
- },
205
- m(a ? "inventory.publish.status.published" : "inventory.publish.status.outdated")
206
- )
207
- ];
208
- return c && v.push(c), i("div", { class: "flex items-center gap-8" }, v);
209
- }
210
- }
211
- ]);
212
- async function I() {
213
- t.value = "all";
214
- try {
215
- const e = L(), l = await s.controller.publishAll(e).delayed(1e3);
216
- p.value = l;
217
- } catch (e) {
218
- console.error("Error publishing all:", e);
219
- } finally {
220
- t.value = void 0;
221
- }
222
- }
223
- async function K() {
224
- if (s.controller.unpublishAll) {
225
- t.value = "unpublish-all";
226
- try {
227
- const e = L(), l = await s.controller.unpublishAll(e).delayed(1e3);
228
- p.value = l;
229
- } catch (e) {
230
- console.error("Error unpublishing all:", e);
231
- } finally {
232
- t.value = void 0;
233
- }
234
- }
235
- }
236
- const d = r(() => n.value.size), M = r(() => d.value === 0 || d.value === S.value.length ? m("inventory.publish.actions.publishAll") : m("inventory.publish.actions.publishSelected", { count: d.value })), j = r(() => d.value === 0 || d.value === S.value.length ? "Unpublish all" : `Unpublish selected ${d.value} location${d.value === 1 ? "" : "s"}`);
237
- return (e, l) => {
238
- const a = x("FmButton"), h = x("FmTextField"), c = x("FmCheckbox"), v = x("FmTable");
239
- return B(), H("div", ae, [
240
- b("div", oe, [
241
- b("div", ne, J(e.title), 1),
242
- b("div", se, [
243
- y(a, {
244
- label: M.value,
245
- variant: "secondary",
246
- onClick: l[0] || (l[0] = (o) => I()),
247
- loading: t.value === "all",
248
- disabled: t.value !== "all" && t.value !== void 0
249
- }, null, 8, ["label", "loading", "disabled"]),
250
- e.controller.unpublishAll && !e.hideUnpublish ? (B(), O(a, {
251
- key: 0,
252
- label: j.value,
253
- variant: "tertiary",
254
- onClick: l[1] || (l[1] = (o) => K()),
255
- loading: t.value === "unpublish-all",
256
- disabled: t.value !== "unpublish-all" && t.value !== void 0
257
- }, null, 8, ["label", "loading", "disabled"])) : Q("", !0)
258
- ])
259
- ]),
260
- b("div", ie, [
261
- y(h, {
262
- modelValue: g.value,
263
- "onUpdate:modelValue": l[2] || (l[2] = (o) => g.value = o),
264
- class: "w-full flex-shrink-0",
265
- placeholder: V(m)("inventory.publish.search.placeholder"),
266
- "prepend-icon": "search"
267
- }, null, 8, ["modelValue", "placeholder"]),
268
- b("div", re, [
269
- y(V(ee), {
270
- modelValue: w.value,
271
- "onUpdate:modelValue": l[3] || (l[3] = (o) => w.value = o),
272
- attributes: D
273
- }, null, 8, ["modelValue"]),
274
- y(c, {
275
- value: "select-all",
276
- "model-value": F.value,
277
- indeterminate: T.value,
278
- "onUpdate:modelValue": z,
279
- label: "Select all"
280
- }, null, 8, ["model-value", "indeterminate"])
281
- ]),
282
- b("div", ue, [
283
- y(v, {
284
- "row-data": u.value,
285
- "column-defs": R.value,
286
- "shrink-at": 9999,
287
- virtual: !0,
288
- "page-size": u.value.length,
289
- "hide-footer": ""
290
- }, null, 8, ["row-data", "column-defs", "page-size"])
291
- ])
292
- ])
293
- ]);
294
- };
295
- }
296
- });
297
- export {
298
- he as _
299
- };