@feedmepos/mf-inventory-portal 1.7.3-dev.1 → 1.7.3-dev.2

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 (91) hide show
  1. package/dist/{App-DK0-LWWu.js → App-B5qnwEvd.js} +4 -4
  2. package/dist/{ApprovalView-BxV4_keX.js → ApprovalView-C_bCdqCE.js} +8 -8
  3. package/dist/{BindingsDialog-DYVL00NY.js → BindingsDialog-NoD35amZ.js} +2 -2
  4. package/dist/{BindingsPicker-Bi1EcW62.js → BindingsPicker-CPjrsA7g.js} +2 -2
  5. package/dist/{BindingsTable-CvtOCAkc.js → BindingsTable-lSM6Qvc1.js} +3 -3
  6. package/dist/{BulkReceiveRequestView-Dgp3EWOn.js → BulkReceiveRequestView-H97Vm5RQ.js} +19 -19
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DX3Ug_dN.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Ysx4_aKb.js} +1 -1
  8. package/dist/{ClosingDraftView-D2uvIKY5.js → ClosingDraftView-D1qzcxyc.js} +19 -19
  9. package/dist/{ClosingHistoryView-CIb7Ch4L.js → ClosingHistoryView-COVLEUJE.js} +5 -5
  10. package/dist/{ClosingTemplateView-XVSVYB2y.js → ClosingTemplateView-CCjWKW4A.js} +16 -16
  11. package/dist/{DefaultView-BJets42n.js → DefaultView-8JanBwi1.js} +2 -2
  12. package/dist/{DeliveryOrderPrintPreview-DaQHEkqA.js → DeliveryOrderPrintPreview-jmYbNNQS.js} +2 -2
  13. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-CBL0xqFW.js → EmailDialog.vue_vue_type_script_setup_true_lang-HSlddJKT.js} +23 -23
  14. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DbQxJtrd.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-D7i1SzCt.js} +1 -1
  15. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BgCS24jN.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-GZFKLCed.js} +2 -2
  16. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Dc6xTcD8.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-C-A4ytBi.js} +2 -2
  17. package/dist/{FmMultiselectDialog-CxsksooH.js → FmMultiselectDialog-DIm-TBkv.js} +1 -1
  18. package/dist/{FmMultiselectDialog-Bq_Na17d.js → FmMultiselectDialog-DNqQOM8Z.js} +2 -2
  19. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DkftHtJN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CGpxstv1.js} +5 -5
  20. package/dist/{ImportView-BzNfHFEx.js → ImportView-Czlfd6fQ.js} +6 -6
  21. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Hat27Ar4.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CVq7-2qs.js} +1 -1
  22. package/dist/{IngredientGroupView-ClG1OM4D.js → IngredientGroupView-D5iO0K_A.js} +5 -5
  23. package/dist/{IngredientsView-BYE1xoOE.js → IngredientsView-BLpExZxR.js} +15 -15
  24. package/dist/{IntegrationExplorerView-DwvsbHfd.js → IntegrationExplorerView-Dc9GHMqa.js} +4 -4
  25. package/dist/{IntegrationView-ikLaCdnl.js → IntegrationView-FnMv7ETs.js} +14 -14
  26. package/dist/{InventoryBindingForm-C6P0ZuXJ.js → InventoryBindingForm-Cyzr1Bst.js} +1 -1
  27. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DzLxq3uM.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-C3AYygQH.js} +5 -5
  28. package/dist/{InventoryBindingSummary-CMSSSTdo.js → InventoryBindingSummary-B5XtTUoM.js} +1 -1
  29. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-COXmn2a8.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D0pmO2lT.js} +1 -1
  30. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BvrpIpql.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BfqfE-MH.js} +1 -1
  31. package/dist/{ProductionView-DI3JxiFg.js → ProductionView-vt5M7OFl.js} +7 -7
  32. package/dist/{PublishView-BoyEuUAu.js → PublishView-B93jBpMw.js} +3 -3
  33. package/dist/{PurchaseOrderPrintPreview-D60kdiQU.js → PurchaseOrderPrintPreview-CHRnWgEH.js} +2 -2
  34. package/dist/{ReceiveRequestView-DhpS9JLx.js → ReceiveRequestView-DsykNduj.js} +13 -13
  35. package/dist/{RecipeView-Cz-Q0aio.js → RecipeView-C1KRJwD_.js} +17 -17
  36. package/dist/{SettingsView-BNDr4ez-.js → SettingsView-5uoZvtor.js} +226 -224
  37. package/dist/{StockView-bpRLYtw0.js → StockView-CFjw8sTV.js} +21 -21
  38. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B0wulwNM.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-EkuTLEsr.js} +1 -1
  39. package/dist/{SupplierView-CDHpZdob.js → SupplierView-Cz0RMHV1.js} +12 -12
  40. package/dist/{SurchargeView-BQ1O-fAr.js → SurchargeView-BXD2yfHT.js} +6 -6
  41. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DicFDlas.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CVyTmnnl.js} +2 -2
  42. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D0NGjAyr.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-uaHJlzzd.js} +1 -1
  43. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-SHMiHC5F.js → TransferDetails.vue_vue_type_script_setup_true_lang-DShpMILM.js} +1167 -1164
  44. package/dist/{TransferTemplateView-BRYAJdlG.js → TransferTemplateView-DzNLq8-A.js} +20 -20
  45. package/dist/{UnitCostHistoryView-DLLPBU9n.js → UnitCostHistoryView-AHCSzXg6.js} +4 -4
  46. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DTJBsfEj.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CuLDwpz_.js} +4 -4
  47. package/dist/{UnitView-DwZMbt4A.js → UnitView-CQuXzism.js} +7 -7
  48. package/dist/{WarehouseView-DyKR9b4c.js → WarehouseView-CwtDpf_J.js} +5 -5
  49. package/dist/{WastageTemplateView-CZhQ7MKe.js → WastageTemplateView-CE28O1gZ.js} +14 -14
  50. package/dist/{app-CPHh8dJ8.js → app-BuoXiggC.js} +15 -15
  51. package/dist/app.js +1 -1
  52. package/dist/{closing-template-DV8hM9mR.js → closing-template-C1qVUaYB.js} +1 -1
  53. package/dist/{date2-CMYcYkVI.js → date2-BQpsoOPQ.js} +1 -1
  54. package/dist/{dayjs.min-Crreg1xX.js → dayjs.min-C-6FhQxs.js} +1 -1
  55. package/dist/{decimal-DhFDmEjW.js → decimal-bQrHKApj.js} +2 -2
  56. package/dist/{defineDeepModel-DSzyuBIx.js → defineDeepModel-nEhqHuqN.js} +1 -1
  57. package/dist/{duplicate-template-qbIou3kX.js → duplicate-template-E9mFjnug.js} +1 -1
  58. package/dist/{feature-Do5dZj8x.js → feature-B0AS1EQ6.js} +2 -2
  59. package/dist/{format-time-from-id-BbguyEMG.js → format-time-from-id-DIMT-bqD.js} +1 -1
  60. package/dist/{format-unit-display-C-RAKWPU.js → format-unit-display-B-mLM6e4.js} +12 -12
  61. package/dist/{import-export.helper-Duq-vfeY.js → import-export.helper-CbwYpiCV.js} +6 -6
  62. package/dist/{index-Ctrxj7cE.js → index-B35IG4Yk.js} +3 -3
  63. package/dist/{index-D73SJ6zk.js → index-_tt7s1OE.js} +1 -1
  64. package/dist/{index-75GfRz2O.js → index-dlW6ARAr.js} +1 -1
  65. package/dist/{inventory-core-dart.default-toC4Oswn.js → inventory-core-dart.default-LjwypePL.js} +1 -1
  66. package/dist/{jszip.min-DCDx15Lo.js → jszip.min-D5T4A7Ll.js} +251 -251
  67. package/dist/{lz-string-DIrw_osP.js → lz-string-BS_s7ZIl.js} +1 -1
  68. package/dist/modules/print-template/types/print-data.d.ts +1 -0
  69. package/dist/{netsuite-BCPPfv5q.js → netsuite-CJCV-Xun.js} +2 -2
  70. package/dist/{number-Dj-zUn93.js → number-Dzy12OlH.js} +3 -3
  71. package/dist/{predefined-templates-CkZwybVN.js → predefined-templates-DHykkVzD.js} +572 -562
  72. package/dist/{purchase-order-template-B96No_lH.js → purchase-order-template-BaSnDkW4.js} +1 -1
  73. package/dist/{recalculationUtils-lkExVizR.js → recalculationUtils-DzajZbBh.js} +1 -1
  74. package/dist/{rules-DjI-FPha.js → rules-CMwZOiOr.js} +2 -2
  75. package/dist/{stock-BLL3aLEQ.js → stock-CeOgNPCZ.js} +3 -3
  76. package/dist/{stock-KNrrUQF1.js → stock-CuO-Hg1Q.js} +1 -1
  77. package/dist/style.css +1 -1
  78. package/dist/{supplier-CosSdx6_.js → supplier-CNPExTUb.js} +2 -2
  79. package/dist/{surcharge-DFnSG3ka.js → surcharge-JxVEnWL9.js} +1 -1
  80. package/dist/tsconfig.app.tsbuildinfo +1 -1
  81. package/dist/{uom-rules-MbRvuo5s.js → uom-rules-71IIkmUk.js} +1 -1
  82. package/dist/{use-ingredient-select-dialog-HqatzFkQ.js → use-ingredient-select-dialog-DNcSzjv1.js} +2 -2
  83. package/dist/{use-inventory-binding-dialog-CHIrX4O3.js → use-inventory-binding-dialog-BFeTdXTG.js} +2 -2
  84. package/dist/{use-template-enabled-locations-CZDQcsEJ.js → use-template-enabled-locations-BmRiYSuz.js} +2 -2
  85. package/dist/{use-transfer-locations-BRCrX_-r.js → use-transfer-locations-BlQTXhOJ.js} +2 -2
  86. package/dist/{useHrmPermission-B9vfKTf-.js → useHrmPermission-CgIdm6P7.js} +1 -1
  87. package/dist/{useNavigationMenu-DPD_pWDz.js → useNavigationMenu-hX7eAxQm.js} +2 -2
  88. package/dist/{useSseClient-CuljyleL.js → useSseClient-D-5Wi7LQ.js} +1 -1
  89. package/dist/{vue-i18n-CyoeLXfI.js → vue-i18n-D_0CiHw_.js} +1 -1
  90. package/dist/{xlsx.util-C6g7kacG.js → xlsx.util-DDV-UHBt.js} +2 -2
  91. package/package.json +3 -3
@@ -1,12 +1,12 @@
1
- import { defineComponent as Y, ref as b, computed as K, watch as M, resolveComponent as V, createElementBlock as r, openBlock as s, createElementVNode as t, toDisplayString as F, Fragment as U, renderList as G, createBlock as P, createCommentVNode as q, createVNode as p, nextTick as fe, createSlots as ye, withCtx as T, normalizeClass as ee, unref as O, withModifiers as be, Teleport as xe } from "vue";
1
+ import { defineComponent as Y, ref as x, computed as q, watch as M, resolveComponent as V, createElementBlock as r, openBlock as s, createElementVNode as t, toDisplayString as C, Fragment as A, renderList as G, createBlock as E, createCommentVNode as K, createVNode as m, nextTick as fe, createSlots as ye, withCtx as F, normalizeClass as ee, unref as O, withModifiers as be, Teleport as xe } from "vue";
2
2
  import { _ as _e } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DwrLsWX_.js";
3
- import { B as A, g as he, r as ke, s as we, u as Te, a as R, b as Fe, c as De, d as te, e as Ce, f as Se } from "./predefined-templates-CkZwybVN.js";
3
+ import { B as P, g as he, r as ke, s as we, u as Te, a as R, b as Fe, c as Ce, d as te, e as De, f as Se } from "./predefined-templates-DHykkVzD.js";
4
4
  import { useSnackbar as Be } from "@feedmepos/ui-library";
5
5
  import { _ as Ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import { H as j, I as $e } from "./app-CPHh8dJ8.js";
6
+ import { H as j, I as $e } from "./app-BuoXiggC.js";
7
7
  import { useCoreStore as ze, useI18n as Ie } from "@feedmepos/mf-common";
8
- import "./dayjs.min-Crreg1xX.js";
9
- import "./inventory-core-dart.default-toC4Oswn.js";
8
+ import "./dayjs.min-C-6FhQxs.js";
9
+ import "./inventory-core-dart.default-LjwypePL.js";
10
10
  import { F as Oe } from "./FmAdminBadge-DlplQOHb.js";
11
11
  const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700 mb-4 pb-2 border-b border-gray-200" }, Ne = { class: "flex flex-col gap-3" }, Ue = {
12
12
  key: 0,
@@ -20,94 +20,96 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
20
20
  block: {}
21
21
  },
22
22
  emits: ["update"],
23
- setup(E, { emit: x }) {
24
- const g = E, f = x;
25
- function h(n) {
26
- var v;
27
- if ((v = n.config) != null && v.configFields && Array.isArray(n.config.configFields))
28
- return n.config.configFields.map((_) => ({ ..._ }));
29
- const c = A[n.tag];
23
+ setup(N, { emit: _ }) {
24
+ const f = N, y = _;
25
+ function k(n) {
26
+ var g;
27
+ if ((g = n.config) != null && g.configFields && Array.isArray(n.config.configFields)) {
28
+ const b = n.config.configFields.map((p) => ({ ...p })), T = new Set(b.map((p) => p.key)), o = P[n.tag], h = o ? o.initialConfigFields().filter((p) => !T.has(p.key)) : [];
29
+ return [...b, ...h];
30
+ }
31
+ const c = P[n.tag];
30
32
  return c ? c.initialConfigFields() : [];
31
33
  }
32
- const d = b(h(g.block)), $ = K(() => {
33
- const n = A[g.block.tag];
34
- return (n == null ? void 0 : n.label) ?? g.block.tag;
34
+ const d = x(k(f.block)), $ = q(() => {
35
+ const n = P[f.block.tag];
36
+ return (n == null ? void 0 : n.label) ?? f.block.tag;
35
37
  });
36
38
  M(
37
- () => g.block,
39
+ () => f.block,
38
40
  (n) => {
39
- d.value = h(n);
41
+ d.value = k(n);
40
42
  },
41
43
  { deep: !0 }
42
44
  );
43
45
  function i(n, c) {
44
- const v = d.value[n];
45
- v && (v.value = c, m());
46
+ const g = d.value[n];
47
+ g && (g.value = c, v());
46
48
  }
47
- function m() {
48
- f("update", {
49
- ...g.block.config || {},
49
+ function v() {
50
+ y("update", {
51
+ ...f.block.config || {},
50
52
  configFields: d.value.map((n) => ({ ...n }))
51
53
  });
52
54
  }
53
55
  return (n, c) => {
54
- const v = V("FmSwitch"), _ = V("FmTextField"), D = V("FmSelect");
56
+ const g = V("FmSwitch"), b = V("FmTextField"), T = V("FmSelect");
55
57
  return s(), r("div", Pe, [
56
- t("div", Ee, F($.value) + " Settings ", 1),
58
+ t("div", Ee, C($.value) + " Settings ", 1),
57
59
  t("div", Ne, [
58
- (s(!0), r(U, null, G(d.value, (a, w) => (s(), r("div", {
59
- key: a.key
60
+ (s(!0), r(A, null, G(d.value, (o, h) => (s(), r("div", {
61
+ key: o.key
60
62
  }, [
61
- a.type === "toggle" ? (s(), r("div", Ue, [
62
- t("label", Ae, F(a.label), 1),
63
- p(v, {
64
- "model-value": a.value,
65
- "onUpdate:modelValue": (y) => i(w, y)
63
+ o.type === "toggle" ? (s(), r("div", Ue, [
64
+ t("label", Ae, C(o.label), 1),
65
+ m(g, {
66
+ "model-value": o.value,
67
+ "onUpdate:modelValue": (p) => i(h, p)
66
68
  }, null, 8, ["model-value", "onUpdate:modelValue"])
67
- ])) : a.type === "text" ? (s(), P(_, {
69
+ ])) : o.type === "text" ? (s(), E(b, {
68
70
  key: 1,
69
- label: a.label,
70
- "model-value": a.value,
71
- placeholder: a.placeholder,
72
- "onUpdate:modelValue": (y) => i(w, y)
73
- }, null, 8, ["label", "model-value", "placeholder", "onUpdate:modelValue"])) : a.type === "textarea" ? (s(), r(U, { key: 2 }, [
74
- t("div", He, F(a.label), 1),
71
+ label: o.label,
72
+ "model-value": o.value,
73
+ placeholder: o.placeholder,
74
+ "onUpdate:modelValue": (p) => i(h, p)
75
+ }, null, 8, ["label", "model-value", "placeholder", "onUpdate:modelValue"])) : o.type === "textarea" ? (s(), r(A, { key: 2 }, [
76
+ t("div", He, C(o.label), 1),
75
77
  t("textarea", {
76
78
  class: "w-full font-mono text-[13px] p-2 border border-gray-300 rounded resize-y box-border focus:outline-none focus:border-blue-600",
77
- value: a.value,
78
- rows: a.rows ?? 8,
79
- placeholder: a.placeholder,
80
- onInput: (y) => i(w, y.target.value)
79
+ value: o.value,
80
+ rows: o.rows ?? 8,
81
+ placeholder: o.placeholder,
82
+ onInput: (p) => i(h, p.target.value)
81
83
  }, null, 40, Le)
82
- ], 64)) : a.type === "select" ? (s(), P(D, {
84
+ ], 64)) : o.type === "select" ? (s(), E(T, {
83
85
  key: 3,
84
- label: a.label,
85
- "model-value": a.value,
86
- items: a.options || [],
86
+ label: o.label,
87
+ "model-value": o.value,
88
+ items: o.options || [],
87
89
  "item-label": "label",
88
90
  "item-value": "value",
89
- "onUpdate:modelValue": (y) => i(w, y)
90
- }, null, 8, ["label", "model-value", "items", "onUpdate:modelValue"])) : a.type === "number" ? (s(), P(_, {
91
+ "onUpdate:modelValue": (p) => i(h, p)
92
+ }, null, 8, ["label", "model-value", "items", "onUpdate:modelValue"])) : o.type === "number" ? (s(), E(b, {
91
93
  key: 4,
92
- label: a.label,
94
+ label: o.label,
93
95
  type: "number",
94
- "model-value": String(a.value),
95
- "onUpdate:modelValue": (y) => i(w, Number(y))
96
- }, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : a.type === "color" ? (s(), r("div", Re, [
97
- t("label", je, F(a.label), 1),
96
+ "model-value": String(o.value),
97
+ "onUpdate:modelValue": (p) => i(h, Number(p))
98
+ }, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : o.type === "color" ? (s(), r("div", Re, [
99
+ t("label", je, C(o.label), 1),
98
100
  t("input", {
99
101
  type: "color",
100
- value: a.value,
102
+ value: o.value,
101
103
  class: "color-input w-9 h-7 p-0 border border-gray-300 rounded cursor-pointer bg-transparent",
102
- onInput: (y) => i(w, y.target.value)
104
+ onInput: (p) => i(h, p.target.value)
103
105
  }, null, 40, Me)
104
- ])) : q("", !0)
106
+ ])) : K("", !0)
105
107
  ]))), 128))
106
108
  ])
107
109
  ]);
108
110
  };
109
111
  }
110
- }), qe = /* @__PURE__ */ Ve(Ge, [["__scopeId", "data-v-1f00cb56"]]), Ke = { class: "h-full flex flex-col" }, Ye = { class: "flex-1 overflow-auto p-4 bg-gray-100" }, Je = /* @__PURE__ */ Y({
112
+ }), Ke = /* @__PURE__ */ Ve(Ge, [["__scopeId", "data-v-840687bf"]]), qe = { class: "h-full flex flex-col" }, Ye = { class: "flex-1 overflow-auto p-4 bg-gray-100" }, Je = /* @__PURE__ */ Y({
111
113
  __name: "TemplatePreview",
112
114
  props: {
113
115
  blocks: {},
@@ -115,20 +117,20 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
115
117
  selectedBlockId: {},
116
118
  templateType: {}
117
119
  },
118
- setup(E) {
119
- const x = E, g = b(null);
120
- let f = null;
121
- function h() {
122
- return !f && g.value && (f = g.value.attachShadow({ mode: "open" })), f;
120
+ setup(N) {
121
+ const _ = N, f = x(null);
122
+ let y = null;
123
+ function k() {
124
+ return !y && f.value && (y = f.value.attachShadow({ mode: "open" })), y;
123
125
  }
124
- const d = K(() => x.previewData ?? he(x.templateType));
126
+ const d = q(() => _.previewData ?? he(_.templateType));
125
127
  M(
126
- () => [x.blocks, d.value, g.value],
128
+ () => [_.blocks, d.value, f.value],
127
129
  () => {
128
- const i = h();
130
+ const i = k();
129
131
  if (i) {
130
132
  try {
131
- const m = ke(x.blocks, d.value), n = we(m);
133
+ const v = ke(_.blocks, d.value), n = we(v);
132
134
  i.innerHTML = `
133
135
  <style>
134
136
  :host { display: block; }
@@ -154,30 +156,30 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
154
156
  <div class="preview-content">${n}</div>
155
157
  </div>
156
158
  `;
157
- } catch (m) {
158
- i.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${m}</div>`;
159
+ } catch (v) {
160
+ i.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${v}</div>`;
159
161
  }
160
- fe(() => $(x.selectedBlockId));
162
+ fe(() => $(_.selectedBlockId));
161
163
  }
162
164
  },
163
165
  { deep: !0, immediate: !0 }
164
166
  ), M(
165
- () => x.selectedBlockId,
167
+ () => _.selectedBlockId,
166
168
  (i) => $(i)
167
169
  );
168
170
  function $(i) {
169
- if (!f || (f.querySelectorAll("[data-block-id].highlight").forEach((n) => {
171
+ if (!y || (y.querySelectorAll("[data-block-id].highlight").forEach((n) => {
170
172
  n.classList.remove("highlight");
171
173
  }), !i)) return;
172
- const m = f.querySelector(`[data-block-id="${i}"]`);
173
- m && (m.classList.add("highlight"), m.scrollIntoView({ behavior: "smooth", block: "nearest" }));
174
+ const v = y.querySelector(`[data-block-id="${i}"]`);
175
+ v && (v.classList.add("highlight"), v.scrollIntoView({ behavior: "smooth", block: "nearest" }));
174
176
  }
175
- return (i, m) => (s(), r("div", Ke, [
176
- m[0] || (m[0] = t("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 border-b border-gray-200" }, " Live Preview ", -1)),
177
+ return (i, v) => (s(), r("div", qe, [
178
+ v[0] || (v[0] = t("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 border-b border-gray-200" }, " Live Preview ", -1)),
177
179
  t("div", Ye, [
178
180
  t("div", {
179
181
  ref_key: "shadowHost",
180
- ref: g
182
+ ref: f
181
183
  }, null, 512)
182
184
  ])
183
185
  ]));
@@ -212,17 +214,17 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
212
214
  }, ht = {
213
215
  key: 1,
214
216
  class: "flex items-center justify-center text-gray-400 text-[13px] py-8"
215
- }, kt = { class: "p-3 border-t border-gray-200" }, wt = { class: "flex-1 overflow-hidden" }, Tt = { class: "ml-auto flex gap-2" }, Ft = { class: "p-4" }, Dt = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, Ct = { class: "p-4" }, St = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, Bt = /* @__PURE__ */ Y({
217
+ }, kt = { class: "p-3 border-t border-gray-200" }, wt = { class: "flex-1 overflow-hidden" }, Tt = { class: "ml-auto flex gap-2" }, Ft = { class: "p-4" }, Ct = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, Dt = { class: "p-4" }, St = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, Bt = /* @__PURE__ */ Y({
216
218
  __name: "PrintTemplateEditorDialog",
217
219
  props: {
218
220
  modelValue: { type: Boolean }
219
221
  },
220
222
  emits: ["update:modelValue", "saved"],
221
- setup(E, { emit: x }) {
222
- const g = E, f = x, h = Te(), d = Be(), $ = ze(), i = K({
223
- get: () => g.modelValue,
224
- set: (l) => f("update:modelValue", l)
225
- }), m = b(!1), n = b(!1), c = b(R()), v = b(null), _ = b(j.Enum.purchaseOrder), D = b("Purchase Order Template"), a = b(null), w = b(!1), y = b(!1), C = b("select-type"), W = [
223
+ setup(N, { emit: _ }) {
224
+ const f = N, y = _, k = Te(), d = Be(), $ = ze(), i = q({
225
+ get: () => f.modelValue,
226
+ set: (l) => y("update:modelValue", l)
227
+ }), v = x(!1), n = x(!1), c = x(R()), g = x(null), b = x(j.Enum.purchaseOrder), T = x("Purchase Order Template"), o = x(null), h = x(!1), p = x(!1), D = x("select-type"), W = [
226
228
  {
227
229
  label: "Purchase Order",
228
230
  value: j.Enum.purchaseOrder,
@@ -247,25 +249,25 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
247
249
  icon: "local_shipping",
248
250
  description: "Customize the layout for delivery order printouts"
249
251
  }
250
- ], H = b(/* @__PURE__ */ new Set()), J = K(
251
- () => c.value.find((l) => l.id === v.value) ?? null
252
- ), z = b(null), N = b(null);
252
+ ], H = x(/* @__PURE__ */ new Set()), J = q(
253
+ () => c.value.find((l) => l.id === g.value) ?? null
254
+ ), z = x(null), U = x(null);
253
255
  M(i, async (l) => {
254
256
  if (l) {
255
- C.value = "select-type", m.value = !0;
257
+ D.value = "select-type", v.value = !0;
256
258
  try {
257
- const e = await h.browse();
259
+ const e = await k.browse();
258
260
  H.value = new Set(e.map((u) => u.type));
259
261
  } catch {
260
262
  } finally {
261
- m.value = !1;
263
+ v.value = !1;
262
264
  }
263
265
  }
264
- }), M(_, async () => {
265
- v.value = null, await X();
266
+ }), M(b, async () => {
267
+ g.value = null, await X();
266
268
  });
267
269
  async function le(l) {
268
- _.value = l, await X(), C.value = "editor";
270
+ b.value = l, await X(), D.value = "editor";
269
271
  }
270
272
  function Q() {
271
273
  return {
@@ -273,35 +275,35 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
273
275
  transferOrder: "Transfer Order Template",
274
276
  goodsReceivedNote: "Goods Received Note Template",
275
277
  deliveryOrder: "Delivery Order Template"
276
- }[_.value] ?? "Purchase Order Template";
278
+ }[b.value] ?? "Purchase Order Template";
277
279
  }
278
280
  async function X() {
279
- m.value = !0;
281
+ v.value = !0;
280
282
  try {
281
- const l = await h.browse();
283
+ const l = await k.browse();
282
284
  H.value = new Set(l.map((u) => u.type));
283
- const e = l.find((u) => u.type === _.value);
284
- e ? (a.value = e._id, D.value = e.name, c.value = e.blocks.map((u) => ({ ...u }))) : (a.value = null, c.value = R(), D.value = Q());
285
+ const e = l.find((u) => u.type === b.value);
286
+ e ? (o.value = e._id, T.value = e.name, c.value = e.blocks.map((u) => ({ ...u }))) : (o.value = null, c.value = R(), T.value = Q());
285
287
  } catch {
286
- c.value = R(), D.value = Q();
288
+ c.value = R(), T.value = Q();
287
289
  } finally {
288
- m.value = !1;
290
+ v.value = !1;
289
291
  }
290
292
  }
291
293
  function oe(l) {
292
294
  const e = {
293
- id: De(),
295
+ id: Ce(),
294
296
  tag: l,
295
297
  config: Fe(l)
296
298
  };
297
- c.value.push(e), v.value = e.id;
299
+ c.value.push(e), g.value = e.id;
298
300
  }
299
301
  function ae(l) {
300
302
  const e = c.value.findIndex((u) => u.id === l);
301
- e >= 0 && (c.value.splice(e, 1), v.value === l && (v.value = null));
303
+ e >= 0 && (c.value.splice(e, 1), g.value === l && (g.value = null));
302
304
  }
303
305
  function se(l) {
304
- const e = c.value.find((u) => u.id === v.value);
306
+ const e = c.value.find((u) => u.id === g.value);
305
307
  if (e) {
306
308
  const u = l.configFields || [], L = te(e.tag);
307
309
  e.config = { configFields: u, templateHtml: L };
@@ -311,21 +313,21 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
311
313
  z.value = l;
312
314
  }
313
315
  function re(l, e) {
314
- l.preventDefault(), N.value = e;
316
+ l.preventDefault(), U.value = e;
315
317
  }
316
318
  function ie() {
317
- N.value = null;
319
+ U.value = null;
318
320
  }
319
321
  function ue(l) {
320
322
  if (z.value === null || z.value === l) {
321
- z.value = null, N.value = null;
323
+ z.value = null, U.value = null;
322
324
  return;
323
325
  }
324
326
  const e = c.value.splice(z.value, 1)[0];
325
- c.value.splice(l, 0, e), z.value = null, N.value = null;
327
+ c.value.splice(l, 0, e), z.value = null, U.value = null;
326
328
  }
327
329
  function de() {
328
- z.value = null, N.value = null;
330
+ z.value = null, U.value = null;
329
331
  }
330
332
  async function ce() {
331
333
  var l;
@@ -334,30 +336,30 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
334
336
  const e = (l = $.currentBusiness.value) == null ? void 0 : l._id;
335
337
  if (!e)
336
338
  throw new Error("Business ID is missing. Please select a business first.");
337
- const u = c.value.map((o) => {
339
+ const u = c.value.map((a) => {
338
340
  var Z;
339
- const k = ((Z = o.config) == null ? void 0 : Z.configFields) || [], I = te(o.tag, k);
341
+ const w = ((Z = a.config) == null ? void 0 : Z.configFields) || [], I = te(a.tag, w);
340
342
  return {
341
- ...o,
342
- config: { configFields: k, templateHtml: I }
343
+ ...a,
344
+ config: { configFields: w, templateHtml: I }
343
345
  };
344
- }), L = Ce(u), S = {
345
- name: D.value,
346
- type: _.value,
346
+ }), L = De(u), S = {
347
+ name: T.value,
348
+ type: b.value,
347
349
  blocks: L,
348
350
  businessId: e,
349
351
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
350
352
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
351
353
  };
352
354
  let B;
353
- a.value ? B = await h.update(a.value, {
354
- _id: a.value,
355
+ o.value ? B = await k.update(o.value, {
356
+ _id: o.value,
355
357
  ...S
356
- }) : (B = await h.create(S), a.value = B._id), H.value.add(_.value), y.value = !1, d == null || d.open({
358
+ }) : (B = await k.create(S), o.value = B._id), H.value.add(b.value), p.value = !1, d == null || d.open({
357
359
  title: "Success",
358
360
  message: "Print template saved",
359
361
  type: "success"
360
- }), f("saved", B), i.value = !1;
362
+ }), y("saved", B), i.value = !1;
361
363
  } catch (e) {
362
364
  d == null || d.open({
363
365
  title: "Error",
@@ -369,14 +371,14 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
369
371
  }
370
372
  }
371
373
  async function pe() {
372
- if (a.value) {
374
+ if (o.value) {
373
375
  n.value = !0;
374
376
  try {
375
- await h.delete(a.value), a.value = null, c.value = R(), D.value = Q(), H.value.delete(_.value), w.value = !1, d == null || d.open({
377
+ await k.delete(o.value), o.value = null, c.value = R(), T.value = Q(), H.value.delete(b.value), h.value = !1, d == null || d.open({
376
378
  title: "Deleted",
377
379
  message: "Print template deleted. Default layout will be used.",
378
380
  type: "success"
379
- }), f("saved", null), i.value = !1;
381
+ }), y("saved", null), i.value = !1;
380
382
  } catch (l) {
381
383
  d == null || d.open({
382
384
  title: "Error",
@@ -389,94 +391,94 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
389
391
  }
390
392
  }
391
393
  function me() {
392
- c.value = R(), v.value = null;
394
+ c.value = R(), g.value = null;
393
395
  }
394
396
  function ve(l) {
395
397
  var e;
396
- return ((e = A[l]) == null ? void 0 : e.label) ?? l;
398
+ return ((e = P[l]) == null ? void 0 : e.label) ?? l;
397
399
  }
398
400
  function ge(l) {
399
401
  var e;
400
- return ((e = A[l]) == null ? void 0 : e.icon) ?? "widgets";
402
+ return ((e = P[l]) == null ? void 0 : e.icon) ?? "widgets";
401
403
  }
402
404
  return (l, e) => {
403
405
  const u = V("FmIcon"), L = V("FmTextField"), S = V("FmButton"), B = V("FmDialog");
404
- return s(), r(U, null, [
405
- p(B, {
406
+ return s(), r(A, null, [
407
+ m(B, {
406
408
  modelValue: i.value,
407
- "onUpdate:modelValue": e[4] || (e[4] = (o) => i.value = o),
409
+ "onUpdate:modelValue": e[4] || (e[4] = (a) => i.value = a),
408
410
  overlay: !0,
409
411
  "close-button": "",
410
412
  "max-width": "98vw",
411
413
  "max-height": "98vh"
412
414
  }, ye({
413
- "dialog-header": T(() => {
414
- var o;
415
+ "dialog-header": F(() => {
416
+ var a;
415
417
  return [
416
418
  t("div", Qe, [
417
- C.value === "editor" ? (s(), r("button", {
419
+ D.value === "editor" ? (s(), r("button", {
418
420
  key: 0,
419
421
  class: "flex items-center justify-center w-7 h-7 rounded hover:bg-gray-100 transition-colors text-gray-500",
420
- onClick: e[0] || (e[0] = (k) => C.value = "select-type")
422
+ onClick: e[0] || (e[0] = (w) => D.value = "select-type")
421
423
  }, [
422
- p(u, {
424
+ m(u, {
423
425
  name: "arrow_back",
424
426
  size: "sm"
425
427
  })
426
- ])) : q("", !0),
427
- C.value === "select-type" ? (s(), r("span", We, "Print Template Editor")) : (s(), r("span", Xe, F((o = W.find((k) => k.value === _.value)) == null ? void 0 : o.label) + " Template", 1))
428
+ ])) : K("", !0),
429
+ D.value === "select-type" ? (s(), r("span", We, "Print Template Editor")) : (s(), r("span", Xe, C((a = W.find((w) => w.value === b.value)) == null ? void 0 : a.label) + " Template", 1))
428
430
  ])
429
431
  ];
430
432
  }),
431
- default: T(() => [
432
- C.value === "select-type" ? (s(), r("div", Ze, [
433
+ default: F(() => [
434
+ D.value === "select-type" ? (s(), r("div", Ze, [
433
435
  e[7] || (e[7] = t("p", { class: "text-sm text-gray-500 mb-5" }, " Select a template type to customize its print layout. ", -1)),
434
- m.value ? (s(), r("div", et, " Loading... ")) : (s(), r("div", tt, [
435
- (s(), r(U, null, G(W, (o) => t("div", {
436
- key: o.value,
436
+ v.value ? (s(), r("div", et, " Loading... ")) : (s(), r("div", tt, [
437
+ (s(), r(A, null, G(W, (a) => t("div", {
438
+ key: a.value,
437
439
  class: ee(["group relative flex flex-col items-center gap-3 p-6 rounded-xl border-2 border-gray-200 cursor-pointer transition-all hover:border-blue-400 hover:shadow-md", {
438
- "border-blue-500 bg-blue-50/50 shadow-md": _.value === o.value && C.value === "select-type"
440
+ "border-blue-500 bg-blue-50/50 shadow-md": b.value === a.value && D.value === "select-type"
439
441
  }]),
440
- onClick: (k) => le(o.value)
442
+ onClick: (w) => le(a.value)
441
443
  }, [
442
444
  t("div", ot, [
443
- p(u, {
444
- name: o.icon,
445
+ m(u, {
446
+ name: a.icon,
445
447
  size: "sm"
446
448
  }, null, 8, ["name"])
447
449
  ]),
448
450
  t("div", at, [
449
- t("div", st, F(o.label), 1),
450
- t("div", nt, F(o.description), 1)
451
+ t("div", st, C(a.label), 1),
452
+ t("div", nt, C(a.description), 1)
451
453
  ]),
452
- H.value.has(o.value) ? (s(), r("span", rt, "Customized")) : (s(), r("span", it, "Default"))
454
+ H.value.has(a.value) ? (s(), r("span", rt, "Customized")) : (s(), r("span", it, "Default"))
453
455
  ], 10, lt)), 64))
454
456
  ]))
455
- ])) : m.value ? (s(), r("div", ut, e[8] || (e[8] = [
457
+ ])) : v.value ? (s(), r("div", ut, e[8] || (e[8] = [
456
458
  t("div", null, "Loading template...", -1)
457
459
  ]))) : (s(), r("div", dt, [
458
460
  t("div", ct, [
459
461
  t("div", pt, [
460
- p(L, {
461
- modelValue: D.value,
462
- "onUpdate:modelValue": e[1] || (e[1] = (o) => D.value = o),
462
+ m(L, {
463
+ modelValue: T.value,
464
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => T.value = a),
463
465
  placeholder: "Template name",
464
466
  label: "Template Name"
465
467
  }, null, 8, ["modelValue"])
466
468
  ]),
467
469
  e[9] || (e[9] = t("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2" }, " Add Blocks ", -1)),
468
470
  t("div", mt, [
469
- (s(!0), r(U, null, G(O($e).Values, (o) => (s(), r("div", {
470
- key: o,
471
+ (s(!0), r(A, null, G(O($e).Values, (a) => (s(), r("div", {
472
+ key: a,
471
473
  class: "group flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 transition-colors hover:bg-gray-100",
472
- onClick: (k) => oe(o)
474
+ onClick: (w) => oe(a)
473
475
  }, [
474
- p(u, {
475
- name: O(A)[o].icon,
476
+ m(u, {
477
+ name: O(P)[a].icon,
476
478
  size: "sm"
477
479
  }, null, 8, ["name"]),
478
- t("span", null, F(O(A)[o].label), 1),
479
- p(u, {
480
+ t("span", null, C(O(P)[a].label), 1),
481
+ m(u, {
480
482
  name: "add",
481
483
  size: "sm",
482
484
  class: "ml-auto opacity-0 text-blue-600 group-hover:opacity-100"
@@ -485,50 +487,50 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
485
487
  ]),
486
488
  e[10] || (e[10] = t("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 mt-2" }, " Block Order ", -1)),
487
489
  t("div", gt, [
488
- (s(!0), r(U, null, G(c.value, (o, k) => (s(), r("div", {
489
- key: o.id,
490
+ (s(!0), r(A, null, G(c.value, (a, w) => (s(), r("div", {
491
+ key: a.id,
490
492
  class: ee(["flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 border-b border-gray-100 transition-colors hover:bg-gray-100", {
491
- "bg-blue-50 border-l-[3px] border-l-blue-600": o.id === v.value,
492
- "border-t-2 border-t-blue-600": N.value === k
493
+ "bg-blue-50 border-l-[3px] border-l-blue-600": a.id === g.value,
494
+ "border-t-2 border-t-blue-600": U.value === w
493
495
  }]),
494
496
  draggable: "true",
495
- onDragstart: (I) => ne(k),
496
- onDragover: (I) => re(I, k),
497
+ onDragstart: (I) => ne(w),
498
+ onDragover: (I) => re(I, w),
497
499
  onDragleave: ie,
498
- onDrop: (I) => ue(k),
500
+ onDrop: (I) => ue(w),
499
501
  onDragend: de,
500
- onClick: (I) => v.value = o.id
502
+ onClick: (I) => g.value = a.id
501
503
  }, [
502
- p(u, {
504
+ m(u, {
503
505
  name: "drag_indicator",
504
506
  size: "sm",
505
507
  class: "cursor-grab text-gray-300"
506
508
  }),
507
- p(u, {
508
- name: ge(o.tag),
509
+ m(u, {
510
+ name: ge(a.tag),
509
511
  size: "sm"
510
512
  }, null, 8, ["name"]),
511
- t("span", yt, F(ve(o.tag)), 1),
513
+ t("span", yt, C(ve(a.tag)), 1),
512
514
  t("div", bt, [
513
- p(u, {
515
+ m(u, {
514
516
  name: "delete",
515
517
  size: "sm",
516
518
  class: "cursor-pointer text-gray-400 hover:text-red-500",
517
- onClick: be((I) => ae(o.id), ["stop"])
519
+ onClick: be((I) => ae(a.id), ["stop"])
518
520
  }, null, 8, ["onClick"])
519
521
  ])
520
522
  ], 42, ft))), 128)),
521
- c.value.length === 0 ? (s(), r("div", xt, " Click a block above to add it ")) : q("", !0)
523
+ c.value.length === 0 ? (s(), r("div", xt, " Click a block above to add it ")) : K("", !0)
522
524
  ]),
523
525
  J.value ? (s(), r("div", _t, [
524
- (s(), P(qe, {
526
+ (s(), E(Ke, {
525
527
  key: J.value.id,
526
528
  block: J.value,
527
529
  onUpdate: se
528
530
  }, null, 8, ["block"]))
529
531
  ])) : (s(), r("div", ht, " Select a block to configure it ")),
530
532
  t("div", kt, [
531
- p(S, {
533
+ m(S, {
532
534
  label: "Reset to Default",
533
535
  variant: "plain",
534
536
  size: "md",
@@ -537,51 +539,51 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
537
539
  ])
538
540
  ]),
539
541
  t("div", wt, [
540
- p(Je, {
542
+ m(Je, {
541
543
  blocks: c.value,
542
- "selected-block-id": v.value,
543
- "template-type": _.value
544
+ "selected-block-id": g.value,
545
+ "template-type": b.value
544
546
  }, null, 8, ["blocks", "selected-block-id", "template-type"])
545
547
  ])
546
548
  ]))
547
549
  ]),
548
550
  _: 2
549
551
  }, [
550
- C.value === "editor" ? {
552
+ D.value === "editor" ? {
551
553
  name: "dialog-footer",
552
- fn: T(() => [
554
+ fn: F(() => [
553
555
  t("div", Tt, [
554
- a.value ? (s(), P(S, {
556
+ o.value ? (s(), E(S, {
555
557
  key: 0,
556
558
  label: "Delete Template",
557
559
  variant: "destructive",
558
560
  size: "md",
559
- onClick: e[2] || (e[2] = (o) => w.value = !0)
560
- })) : q("", !0),
561
- p(S, {
561
+ onClick: e[2] || (e[2] = (a) => h.value = !0)
562
+ })) : K("", !0),
563
+ m(S, {
562
564
  label: "Save Template",
563
565
  variant: "primary",
564
566
  size: "md",
565
- onClick: e[3] || (e[3] = (o) => y.value = !0)
567
+ onClick: e[3] || (e[3] = (a) => p.value = !0)
566
568
  })
567
569
  ])
568
570
  ]),
569
571
  key: "0"
570
572
  } : void 0
571
573
  ]), 1032, ["modelValue"]),
572
- p(B, {
573
- modelValue: y.value,
574
- "onUpdate:modelValue": e[5] || (e[5] = (o) => y.value = o),
574
+ m(B, {
575
+ modelValue: p.value,
576
+ "onUpdate:modelValue": e[5] || (e[5] = (a) => p.value = a),
575
577
  overlay: !0,
576
578
  dismissAway: !0,
577
579
  "close-button": "",
578
580
  "max-width": "400px"
579
581
  }, {
580
- "dialog-header": T(() => e[11] || (e[11] = [
582
+ "dialog-header": F(() => e[11] || (e[11] = [
581
583
  t("span", null, "Save Print Template?", -1)
582
584
  ])),
583
- "dialog-footer": T(() => [
584
- p(S, {
585
+ "dialog-footer": F(() => [
586
+ m(S, {
585
587
  class: "ml-auto",
586
588
  label: "Save",
587
589
  variant: "primary",
@@ -590,12 +592,12 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
590
592
  onClick: ce
591
593
  }, null, 8, ["loading"])
592
594
  ]),
593
- default: T(() => [
595
+ default: F(() => [
594
596
  t("div", Ft, [
595
597
  e[13] || (e[13] = t("p", null, "Are you sure you want to save this print template?", -1)),
596
598
  e[14] || (e[14] = t("p", { class: "text-gray-500 text-sm mt-2" }, " This template will be used for all future prints of this type. ", -1)),
597
- t("div", Dt, [
598
- p(u, {
599
+ t("div", Ct, [
600
+ m(u, {
599
601
  name: "warning",
600
602
  size: "sm"
601
603
  }),
@@ -605,19 +607,19 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
605
607
  ]),
606
608
  _: 1
607
609
  }, 8, ["modelValue"]),
608
- p(B, {
609
- modelValue: w.value,
610
- "onUpdate:modelValue": e[6] || (e[6] = (o) => w.value = o),
610
+ m(B, {
611
+ modelValue: h.value,
612
+ "onUpdate:modelValue": e[6] || (e[6] = (a) => h.value = a),
611
613
  overlay: !0,
612
614
  dismissAway: !0,
613
615
  "close-button": "",
614
616
  "max-width": "400px"
615
617
  }, {
616
- "dialog-header": T(() => e[15] || (e[15] = [
618
+ "dialog-header": F(() => e[15] || (e[15] = [
617
619
  t("span", null, "Delete Print Template?", -1)
618
620
  ])),
619
- "dialog-footer": T(() => [
620
- p(S, {
621
+ "dialog-footer": F(() => [
622
+ m(S, {
621
623
  class: "ml-auto",
622
624
  label: "Delete",
623
625
  variant: "destructive",
@@ -626,12 +628,12 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
626
628
  onClick: pe
627
629
  }, null, 8, ["loading"])
628
630
  ]),
629
- default: T(() => [
630
- t("div", Ct, [
631
+ default: F(() => [
632
+ t("div", Dt, [
631
633
  e[17] || (e[17] = t("p", null, "Are you sure you want to delete this print template?", -1)),
632
634
  e[18] || (e[18] = t("p", { class: "text-gray-500 text-sm mt-2" }, " The default print layout will be used for all future prints. ", -1)),
633
635
  t("div", St, [
634
- p(u, {
636
+ m(u, {
635
637
  name: "warning",
636
638
  size: "sm"
637
639
  }),
@@ -646,43 +648,43 @@ const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700
646
648
  }
647
649
  }), Vt = { class: "p-16 flex flex-col gap-16" }, $t = { class: "bg-white rounded-8 p-16 shadow-sm" }, zt = { class: "fm-typo-en-heading-sm-600 text-fm-color-typo-primary mb-12" }, It = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-16" }, Mt = /* @__PURE__ */ Y({
648
650
  __name: "SettingsView",
649
- setup(E) {
650
- const { t: x } = Ie(), g = Se();
651
- g.fetchTemplates();
652
- const f = b(!1);
653
- function h() {
654
- g.invalidate(), g.fetchTemplates();
651
+ setup(N) {
652
+ const { t: _ } = Ie(), f = Se();
653
+ f.fetchTemplates();
654
+ const y = x(!1);
655
+ function k() {
656
+ f.invalidate(), f.fetchTemplates();
655
657
  }
656
658
  function d() {
657
- f.value = !0;
659
+ y.value = !0;
658
660
  }
659
661
  return ($, i) => {
660
- const m = V("FmButton");
661
- return s(), P(_e, {
662
- title: O(x)("inventory.settings.title")
662
+ const v = V("FmButton");
663
+ return s(), E(_e, {
664
+ title: O(_)("inventory.settings.title")
663
665
  }, {
664
- default: T(() => [
666
+ default: F(() => [
665
667
  t("div", Vt, [
666
- p(Oe, null, {
667
- default: T(() => [
668
+ m(Oe, null, {
669
+ default: F(() => [
668
670
  t("div", $t, [
669
- t("h2", zt, F(O(x)("inventory.settings.printTemplate.title")), 1),
670
- t("p", It, F(O(x)("inventory.settings.printTemplate.description")), 1),
671
- p(m, {
671
+ t("h2", zt, C(O(_)("inventory.settings.printTemplate.title")), 1),
672
+ t("p", It, C(O(_)("inventory.settings.printTemplate.description")), 1),
673
+ m(v, {
672
674
  onClick: d,
673
675
  variant: "secondary",
674
- label: O(x)("inventory.settings.printTemplate.edit")
676
+ label: O(_)("inventory.settings.printTemplate.edit")
675
677
  }, null, 8, ["label"])
676
678
  ])
677
679
  ]),
678
680
  _: 1
679
681
  })
680
682
  ]),
681
- (s(), P(xe, { to: "body" }, [
682
- p(Bt, {
683
- modelValue: f.value,
684
- "onUpdate:modelValue": i[0] || (i[0] = (n) => f.value = n),
685
- onSaved: h
683
+ (s(), E(xe, { to: "body" }, [
684
+ m(Bt, {
685
+ modelValue: y.value,
686
+ "onUpdate:modelValue": i[0] || (i[0] = (n) => y.value = n),
687
+ onSaved: k
686
688
  }, null, 8, ["modelValue"])
687
689
  ]))
688
690
  ]),