@feedmepos/mf-inventory-portal 1.3.7-dev.2 → 1.3.7
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.
- package/dist/{App-Bt9_9LW3.js → App-D1-fT3jF.js} +3 -3
- package/dist/ApprovalView-0FbsslVD.js +226 -0
- package/dist/{BindingsDialog-lLNdP2RG.js → BindingsDialog-DeavyPY-.js} +5 -5
- package/dist/{BindingsPicker-BwxdoHu-.js → BindingsPicker-BGzhKq8G.js} +3 -3
- package/dist/{BindingsTable-C8cf9nV_.js → BindingsTable-Dr9hWkE1.js} +5 -5
- package/dist/{ClosingDraftView-CHB815at.js → ClosingDraftView-6gwWEWWB.js} +57 -57
- package/dist/{ClosingHistoryView-BQS52wLi.js → ClosingHistoryView-D4rNnlsq.js} +4 -4
- package/dist/{ClosingTemplateView-7o5xDvYi.js → ClosingTemplateView-DxCLH1GH.js} +16 -16
- package/dist/{DeliveryOrderPrintPreview-DBWYDmhP.js → DeliveryOrderPrintPreview-D-XeZX-z.js} +17 -17
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-hX9rZGHP.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DeoaPLQm.js} +14 -14
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DLo83JRe.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BMhSHZ3Z.js} +2 -2
- package/dist/{FmMultiselectDialog-CX6Q05kY.js → FmMultiselectDialog-BQZmTWDb.js} +2 -2
- package/dist/{FmMultiselectDialog-eZLmEoMJ.js → FmMultiselectDialog-DJFi54mG.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CNP7o7p-.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DAivpdPp.js} +4 -4
- package/dist/{ImportView-5F1k_NOx.js → ImportView-DPQY0ELT.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-COyKYsPf.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DeVYXEzb.js} +1 -1
- package/dist/{IngredientGroupView-1kwOZDub.js → IngredientGroupView-5AuPbMDz.js} +7 -7
- package/dist/{IngredientsView-L50oDR5B.js → IngredientsView-qMotWYnL.js} +17 -17
- package/dist/{IntegrationView-CwBluyeW.js → IntegrationView-CVdwhNTA.js} +13 -13
- package/dist/{InventoryBindingForm-28KU0Y69.js → InventoryBindingForm-B5KUYKIu.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DAxmcGtJ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-pbyMU879.js} +5 -5
- package/dist/{InventoryBindingSummary-hjZLd6je.js → InventoryBindingSummary-Bm3A2kmC.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-GqT3S9zo.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-NnoVkA8W.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-6jv1aHW-.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Dp4gFbs5.js} +1 -1
- package/dist/PublishView-DOIiAeDK.js +208 -0
- package/dist/{PurchaseOrderPrintPreview-C_AaZuFs.js → PurchaseOrderPrintPreview-BE-8EJFv.js} +12 -12
- package/dist/ReceiveRequestView-ur3OeHuv.js +2802 -0
- package/dist/{RecipeView-B39YtOhH.js → RecipeView-CM-BrVSe.js} +21 -22
- package/dist/{StockView-DGO3Xf6j.js → StockView-DDqlms0m.js} +20 -21
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-b6jr57r-.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CcQ6bBWG.js} +1 -1
- package/dist/{SupplierView-Bfo4AYFs.js → SupplierView-CM2PrtHi.js} +14 -14
- package/dist/{SurchargeView-CPuDx3I8.js → SurchargeView-q2NfASMH.js} +8 -8
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-EmbaZT8X.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-BbZQZQTQ.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CMWRgrTV.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bp3joqMK.js} +67 -60
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-GhRFdMoW.js +3521 -0
- package/dist/{TransferTemplateView-DH1BkbUP.js → TransferTemplateView-B26H_T9Q.js} +19 -20
- package/dist/{UnitCostHistoryView-DonGH8na.js → UnitCostHistoryView-BzumRVdx.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-CW3kofME.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CfWpv2Mv.js} +4 -4
- package/dist/{UnitView-CFBdZjSP.js → UnitView-Cxfg--TU.js} +9 -9
- package/dist/{WarehouseView-gdd1ou_Y.js → WarehouseView-CvoafTrd.js} +7 -7
- package/dist/{WastageTemplateView-BoMqb-zR.js → WastageTemplateView-Bqd4Wp3d.js} +16 -16
- package/dist/{app-QEDlYnlN.js → app-CrrDFeMj.js} +4557 -4711
- package/dist/app.d.ts +0 -32
- package/dist/app.js +2 -2
- package/dist/{closing-template-CbHN15AQ.js → closing-template-Ew74NLQj.js} +1 -1
- package/dist/{component-kqxARxvM.js → component-DpCUABT3.js} +21 -30
- package/dist/components/row-action.enum.d.ts +0 -3
- package/dist/{date2-Z-I7Kd_W.js → date2-Bklbk2g-.js} +4 -4
- package/dist/{dayjs.min-D4CmdyEZ.js → dayjs.min-B463GIlc.js} +1 -1
- package/dist/{decimal-C-T875Hm.js → decimal-Dm2vbfDq.js} +2 -2
- package/dist/defineDeepModel-SD5OUepJ.js +19 -0
- package/dist/{duplicate-template-CmTg7BGs.js → duplicate-template-CR79OmLy.js} +1 -1
- package/dist/{export-B1VAPZRx.js → export-CQJcxfPC.js} +1 -1
- package/dist/{inventory-core-dart.default-ugZJdof5.js → feature-CZHvliez.js} +1395 -322
- package/dist/{format-time-from-id-DZ_PAFci.js → format-time-from-id-61ydd8RS.js} +1 -1
- package/dist/{format-unit-display-DlODRa7k.js → format-unit-display-BLtW28yU.js} +13 -13
- package/dist/{import-export.helper-DVCiPtHv.js → import-export.helper-uhFwjH6X.js} +6 -6
- package/dist/{index-rghVMuZK.js → index-CouegIcG.js} +1 -1
- package/dist/{index-BHqcJDf6.js → index-Dx5HvWR_.js} +1 -1
- package/dist/{index-BZxwdVW1.js → index-uA6bkf1x.js} +3 -3
- package/dist/{lodash-CgDY9U7s.js → lodash-CjyamSgJ.js} +1 -1
- package/dist/{lz-string-DNoTxtCy.js → lz-string-BbZdMrTL.js} +1 -1
- package/dist/{netsuite-B64xGIt5.js → netsuite-2v3F8ILe.js} +9 -60
- package/dist/{number-Bqy4-9rV.js → number-BYbxsJHr.js} +3 -3
- package/dist/{purchase-order-template-BxowjjVQ.js → purchase-order-template-s1AiueV_.js} +1 -1
- package/dist/router/name.d.ts +0 -2
- package/dist/{row-action.enum-Co_O4qD9.js → row-action.enum-BcW_L_nE.js} +3 -11
- package/dist/{rules-BkK6oJzC.js → rules-C7L-LFOd.js} +2 -2
- package/dist/{stock-lXNLY2TO.js → stock-CvYOcgWb.js} +3 -3
- package/dist/{stock-CedueOcQ.js → stock-D2s88pz1.js} +1 -1
- package/dist/stores/feature.d.ts +0 -2
- package/dist/stores/integration/netsuite.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-BxEW6DYL.js → supplier-DmobM7mD.js} +2 -2
- package/dist/{surcharge-_zxlHhpJ.js → surcharge-BdZOVfi0.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BQFTqO6q.js → use-ingredient-select-dialog-BUCJBHjV.js} +2 -2
- package/dist/{use-inventory-binding-dialog-BnJKIhqC.js → use-inventory-binding-dialog-DiN1hBIm.js} +2 -2
- package/dist/{use-template-enabled-locations-2-Ch5vC3Ux.js → use-template-enabled-locations-CmH6I2cy.js} +33 -21
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +21 -21
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +21 -21
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +129 -129
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +150 -154
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +7 -93
- package/dist/vue-i18n-D0Q6LFcu.js +2365 -0
- package/dist/{xlsx-BlvEsbYy.js → xlsx-D4PML26z.js} +398 -398
- package/dist/{xlsx.util-B4ae3AUU.js → xlsx.util-BWLcCmO_.js} +1 -1
- package/package.json +3 -8
- package/dist/ApprovalView-BAFatrEE.js +0 -241
- package/dist/IntegrationExplorerView-BVJ3qSYS.js +0 -22254
- package/dist/PublishView-kBqlO98G.js +0 -234
- package/dist/ReceiveRequestView-sebwwuaH.js +0 -2817
- package/dist/SettingsView-CFoKuaMo.js +0 -695
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-_5fogvJl.js +0 -3790
- package/dist/api/integration-sync-log.d.ts +0 -47
- package/dist/api/netsuite-explorer.d.ts +0 -51
- package/dist/defineDeepModel-Ds_lq_kg.js +0 -19
- package/dist/feature-_WJViVjR.js +0 -1081
- package/dist/modules/print-template/api/print-template.d.ts +0 -29
- package/dist/modules/print-template/components/BlockConfigPanel.vue.d.ts +0 -19
- package/dist/modules/print-template/components/CustomPrintTemplatePreview.vue.d.ts +0 -25
- package/dist/modules/print-template/components/PrintTemplateEditorDialog.vue.d.ts +0 -45
- package/dist/modules/print-template/components/TemplatePreview.vue.d.ts +0 -22
- package/dist/modules/print-template/composables/print-po-with-template.d.ts +0 -25
- package/dist/modules/print-template/definitions/block-definitions.d.ts +0 -88
- package/dist/modules/print-template/definitions/predefined-templates.d.ts +0 -22
- package/dist/modules/print-template/definitions/template-renderer.d.ts +0 -17
- package/dist/modules/print-template/index.d.ts +0 -11
- package/dist/modules/print-template/store/print-template.d.ts +0 -170
- package/dist/modules/print-template/types/print-data.d.ts +0 -52
- package/dist/modules/print-template/utils/sanitize-html.d.ts +0 -32
- package/dist/predefined-templates-B5qmOdnZ.js +0 -4542
- package/dist/views/integration/components/IntegrationSyncLogTab.vue.d.ts +0 -15
- package/dist/views/integration/composables/use-integration-sync-log.d.ts +0 -45
- package/dist/views/integration-explorer/IntegrationExplorerView.vue.d.ts +0 -2
- package/dist/views/integration-explorer/composables/use-explorer-tab.d.ts +0 -126
- package/dist/views/integration-explorer/netsuite/ExplorerRecordSyncLog.vue.d.ts +0 -17
- package/dist/views/integration-explorer/netsuite/ExplorerRecordToolbar.vue.d.ts +0 -201
- package/dist/views/integration-explorer/netsuite/ExplorerSystemNote.vue.d.ts +0 -15
- package/dist/views/integration-explorer/netsuite/JsonViewer.vue.d.ts +0 -15
- package/dist/views/integration-explorer/netsuite/NetSuiteExplorerView.vue.d.ts +0 -2
- package/dist/views/integration-explorer/netsuite/inventoryTransfer/InventoryTransferSideSheet.vue.d.ts +0 -7
- package/dist/views/integration-explorer/netsuite/inventoryTransfer/InventoryTransferView.vue.d.ts +0 -39
- package/dist/views/integration-explorer/netsuite/items/AssemblyItemSideSheet.vue.d.ts +0 -7
- package/dist/views/integration-explorer/netsuite/items/InventoryItemSideSheet.vue.d.ts +0 -7
- package/dist/views/integration-explorer/netsuite/items/ItemsView.vue.d.ts +0 -2
- package/dist/views/integration-explorer/netsuite/items/ServiceItemSideSheet.vue.d.ts +0 -7
- package/dist/views/integration-explorer/netsuite/orders/ExplorerOrderDetailSideSheet.vue.d.ts +0 -7
- package/dist/views/integration-explorer/netsuite/orders/OrdersView.vue.d.ts +0 -39
- package/dist/views/integration-explorer/netsuite/orders/PurchaseOrderSideSheet.vue.d.ts +0 -7
- package/dist/views/integration-explorer/netsuite/orders/SyncNetsuiteButton.vue.d.ts +0 -29
- package/dist/views/integration-explorer/netsuite/orders/TransferOrderSideSheet.vue.d.ts +0 -7
- package/dist/views/settings/SettingsView.vue.d.ts +0 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +0 -13
- package/dist/vue-i18n-taYcBeKI.js +0 -2365
|
@@ -1,695 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Y, ref as b, computed as K, watch as M, resolveComponent as V, openBlock as s, createElementBlock as r, createElementVNode as t, toDisplayString as F, Fragment as U, renderList as G, createVNode as p, createBlock as P, createCommentVNode as q, nextTick as fe, createSlots as ye, withCtx as T, normalizeClass as ee, unref as O, withModifiers as be, Teleport as xe } from "vue";
|
|
2
|
-
import { _ as _e } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CkPuJQWF.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-B5qmOdnZ.js";
|
|
4
|
-
import { useSnackbar as Be } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as Ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import { I as j, J as $e } from "./app-QEDlYnlN.js";
|
|
7
|
-
import { useCoreStore as ze, useI18n as Ie } from "@feedmepos/mf-common";
|
|
8
|
-
import "./dayjs.min-D4CmdyEZ.js";
|
|
9
|
-
import "./inventory-core-dart.default-ugZJdof5.js";
|
|
10
|
-
import { F as Oe } from "./FmAdminBadge-BOEV93D3.js";
|
|
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
|
-
key: 0,
|
|
13
|
-
class: "flex items-center justify-between py-1"
|
|
14
|
-
}, Ae = { class: "text-[13px] text-gray-600" }, He = { class: "text-[13px] text-gray-600" }, Le = ["value", "rows", "placeholder", "onInput"], Re = {
|
|
15
|
-
key: 5,
|
|
16
|
-
class: "flex items-center justify-between py-1"
|
|
17
|
-
}, je = { class: "text-[13px] text-gray-600" }, Me = ["value", "onInput"], Ge = /* @__PURE__ */ Y({
|
|
18
|
-
__name: "BlockConfigPanel",
|
|
19
|
-
props: {
|
|
20
|
-
block: {}
|
|
21
|
-
},
|
|
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];
|
|
30
|
-
return c ? c.initialConfigFields() : [];
|
|
31
|
-
}
|
|
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;
|
|
35
|
-
});
|
|
36
|
-
M(
|
|
37
|
-
() => g.block,
|
|
38
|
-
(n) => {
|
|
39
|
-
d.value = h(n);
|
|
40
|
-
},
|
|
41
|
-
{ deep: !0 }
|
|
42
|
-
);
|
|
43
|
-
function i(n, c) {
|
|
44
|
-
const v = d.value[n];
|
|
45
|
-
v && (v.value = c, m());
|
|
46
|
-
}
|
|
47
|
-
function m() {
|
|
48
|
-
f("update", {
|
|
49
|
-
...g.block.config || {},
|
|
50
|
-
configFields: d.value.map((n) => ({ ...n }))
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
return (n, c) => {
|
|
54
|
-
const v = V("FmSwitch"), _ = V("FmTextField"), D = V("FmSelect");
|
|
55
|
-
return s(), r("div", Pe, [
|
|
56
|
-
t("div", Ee, F($.value) + " Settings ", 1),
|
|
57
|
-
t("div", Ne, [
|
|
58
|
-
(s(!0), r(U, null, G(d.value, (a, w) => (s(), r("div", {
|
|
59
|
-
key: a.key
|
|
60
|
-
}, [
|
|
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)
|
|
66
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
67
|
-
])) : a.type === "text" ? (s(), P(_, {
|
|
68
|
-
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),
|
|
75
|
-
t("textarea", {
|
|
76
|
-
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)
|
|
81
|
-
}, null, 40, Le)
|
|
82
|
-
], 64)) : a.type === "select" ? (s(), P(D, {
|
|
83
|
-
key: 3,
|
|
84
|
-
label: a.label,
|
|
85
|
-
"model-value": a.value,
|
|
86
|
-
items: a.options || [],
|
|
87
|
-
"item-label": "label",
|
|
88
|
-
"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
|
-
key: 4,
|
|
92
|
-
label: a.label,
|
|
93
|
-
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),
|
|
98
|
-
t("input", {
|
|
99
|
-
type: "color",
|
|
100
|
-
value: a.value,
|
|
101
|
-
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)
|
|
103
|
-
}, null, 40, Me)
|
|
104
|
-
])) : q("", !0)
|
|
105
|
-
]))), 128))
|
|
106
|
-
])
|
|
107
|
-
]);
|
|
108
|
-
};
|
|
109
|
-
}
|
|
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({
|
|
111
|
-
__name: "TemplatePreview",
|
|
112
|
-
props: {
|
|
113
|
-
blocks: {},
|
|
114
|
-
previewData: {},
|
|
115
|
-
selectedBlockId: {},
|
|
116
|
-
templateType: {}
|
|
117
|
-
},
|
|
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;
|
|
123
|
-
}
|
|
124
|
-
const d = K(() => x.previewData ?? he(x.templateType));
|
|
125
|
-
M(
|
|
126
|
-
() => [x.blocks, d.value, g.value],
|
|
127
|
-
() => {
|
|
128
|
-
const i = h();
|
|
129
|
-
if (i) {
|
|
130
|
-
try {
|
|
131
|
-
const m = ke(x.blocks, d.value), n = we(m);
|
|
132
|
-
i.innerHTML = `
|
|
133
|
-
<style>
|
|
134
|
-
:host { display: block; }
|
|
135
|
-
.preview-scale-wrapper {
|
|
136
|
-
transform-origin: top left;
|
|
137
|
-
transform: scale(0.75);
|
|
138
|
-
width: 133.33%;
|
|
139
|
-
}
|
|
140
|
-
.preview-content {
|
|
141
|
-
max-width: 800px;
|
|
142
|
-
margin: auto;
|
|
143
|
-
padding: 30px;
|
|
144
|
-
border: 1px solid #eee;
|
|
145
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
|
146
|
-
background: white;
|
|
147
|
-
font-size: 16px;
|
|
148
|
-
line-height: 1.5;
|
|
149
|
-
font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
|
|
150
|
-
color: #555;
|
|
151
|
-
}
|
|
152
|
-
</style>
|
|
153
|
-
<div class="preview-scale-wrapper">
|
|
154
|
-
<div class="preview-content">${n}</div>
|
|
155
|
-
</div>
|
|
156
|
-
`;
|
|
157
|
-
} catch (m) {
|
|
158
|
-
i.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${m}</div>`;
|
|
159
|
-
}
|
|
160
|
-
fe(() => $(x.selectedBlockId));
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
{ deep: !0, immediate: !0 }
|
|
164
|
-
), M(
|
|
165
|
-
() => x.selectedBlockId,
|
|
166
|
-
(i) => $(i)
|
|
167
|
-
);
|
|
168
|
-
function $(i) {
|
|
169
|
-
if (!f || (f.querySelectorAll("[data-block-id].highlight").forEach((n) => {
|
|
170
|
-
n.classList.remove("highlight");
|
|
171
|
-
}), !i)) return;
|
|
172
|
-
const m = f.querySelector(`[data-block-id="${i}"]`);
|
|
173
|
-
m && (m.classList.add("highlight"), m.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
174
|
-
}
|
|
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
|
-
t("div", Ye, [
|
|
178
|
-
t("div", {
|
|
179
|
-
ref_key: "shadowHost",
|
|
180
|
-
ref: g
|
|
181
|
-
}, null, 512)
|
|
182
|
-
])
|
|
183
|
-
]));
|
|
184
|
-
}
|
|
185
|
-
}), Qe = { class: "flex items-center gap-2 text-base font-semibold" }, We = { key: 1 }, Xe = { key: 2 }, Ze = {
|
|
186
|
-
key: 0,
|
|
187
|
-
class: "p-6"
|
|
188
|
-
}, et = {
|
|
189
|
-
key: 0,
|
|
190
|
-
class: "flex justify-center items-center h-40 text-gray-400"
|
|
191
|
-
}, tt = {
|
|
192
|
-
key: 1,
|
|
193
|
-
class: "grid grid-cols-2 gap-8"
|
|
194
|
-
}, lt = ["onClick"], ot = { class: "flex items-center justify-center w-12 h-12 rounded-xl bg-gray-100 text-gray-500 group-hover:bg-blue-100 group-hover:text-blue-600 transition-colors" }, at = { class: "text-center" }, st = { class: "text-sm font-semibold text-gray-700 group-hover:text-blue-700" }, nt = { class: "text-xs text-gray-400 mt-1" }, rt = {
|
|
195
|
-
key: 0,
|
|
196
|
-
class: "absolute top-2.5 right-2.5 text-[10px] font-medium text-green-600 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full"
|
|
197
|
-
}, it = {
|
|
198
|
-
key: 1,
|
|
199
|
-
class: "absolute top-2.5 right-2.5 text-[10px] font-medium text-gray-400 bg-gray-100 px-2 py-0.5 rounded-full"
|
|
200
|
-
}, ut = {
|
|
201
|
-
key: 1,
|
|
202
|
-
class: "flex justify-center items-center h-[400px] text-gray-400"
|
|
203
|
-
}, dt = {
|
|
204
|
-
key: 2,
|
|
205
|
-
class: "flex h-[calc(100vh-120px)] border-t border-gray-200"
|
|
206
|
-
}, ct = { class: "w-[280px] border-r border-gray-200 overflow-y-auto shrink-0" }, pt = { class: "px-3 pt-3 pb-2" }, mt = { class: "flex flex-col" }, vt = ["onClick"], gt = { class: "border-y border-gray-100" }, ft = ["onDragstart", "onDragover", "onDrop", "onClick"], yt = { class: "flex-1" }, bt = { class: "flex gap-1 opacity-50 hover:opacity-100" }, xt = {
|
|
207
|
-
key: 0,
|
|
208
|
-
class: "py-6 px-4 text-center text-gray-400 text-[13px]"
|
|
209
|
-
}, _t = {
|
|
210
|
-
key: 0,
|
|
211
|
-
class: "border-t border-gray-200"
|
|
212
|
-
}, ht = {
|
|
213
|
-
key: 1,
|
|
214
|
-
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({
|
|
216
|
-
__name: "PrintTemplateEditorDialog",
|
|
217
|
-
props: {
|
|
218
|
-
modelValue: { type: Boolean }
|
|
219
|
-
},
|
|
220
|
-
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 = [
|
|
226
|
-
{
|
|
227
|
-
label: "Purchase Order",
|
|
228
|
-
value: j.Enum.purchaseOrder,
|
|
229
|
-
icon: "receipt_long",
|
|
230
|
-
description: "Customize the layout for purchase order printouts"
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
label: "Transfer Order",
|
|
234
|
-
value: j.Enum.transferOrder,
|
|
235
|
-
icon: "swap_horiz",
|
|
236
|
-
description: "Customize the layout for transfer order printouts"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
label: "Goods Received Note",
|
|
240
|
-
value: j.Enum.goodsReceivedNote,
|
|
241
|
-
icon: "fact_check",
|
|
242
|
-
description: "Customize the layout for GRN printouts"
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
label: "Delivery Order",
|
|
246
|
-
value: j.Enum.deliveryOrder,
|
|
247
|
-
icon: "local_shipping",
|
|
248
|
-
description: "Customize the layout for delivery order printouts"
|
|
249
|
-
}
|
|
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);
|
|
253
|
-
M(i, async (l) => {
|
|
254
|
-
if (l) {
|
|
255
|
-
C.value = "select-type", m.value = !0;
|
|
256
|
-
try {
|
|
257
|
-
const e = await h.browse();
|
|
258
|
-
H.value = new Set(e.map((u) => u.type));
|
|
259
|
-
} catch {
|
|
260
|
-
} finally {
|
|
261
|
-
m.value = !1;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}), M(_, async () => {
|
|
265
|
-
v.value = null, await X();
|
|
266
|
-
});
|
|
267
|
-
async function le(l) {
|
|
268
|
-
_.value = l, await X(), C.value = "editor";
|
|
269
|
-
}
|
|
270
|
-
function Q() {
|
|
271
|
-
return {
|
|
272
|
-
purchaseOrder: "Purchase Order Template",
|
|
273
|
-
transferOrder: "Transfer Order Template",
|
|
274
|
-
goodsReceivedNote: "Goods Received Note Template",
|
|
275
|
-
deliveryOrder: "Delivery Order Template"
|
|
276
|
-
}[_.value] ?? "Purchase Order Template";
|
|
277
|
-
}
|
|
278
|
-
async function X() {
|
|
279
|
-
m.value = !0;
|
|
280
|
-
try {
|
|
281
|
-
const l = await h.browse();
|
|
282
|
-
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
|
-
} catch {
|
|
286
|
-
c.value = R(), D.value = Q();
|
|
287
|
-
} finally {
|
|
288
|
-
m.value = !1;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
function oe(l) {
|
|
292
|
-
const e = {
|
|
293
|
-
id: Fe(),
|
|
294
|
-
tag: l,
|
|
295
|
-
config: De(l)
|
|
296
|
-
};
|
|
297
|
-
c.value.push(e), v.value = e.id;
|
|
298
|
-
}
|
|
299
|
-
function ae(l) {
|
|
300
|
-
const e = c.value.findIndex((u) => u.id === l);
|
|
301
|
-
e >= 0 && (c.value.splice(e, 1), v.value === l && (v.value = null));
|
|
302
|
-
}
|
|
303
|
-
function se(l) {
|
|
304
|
-
const e = c.value.find((u) => u.id === v.value);
|
|
305
|
-
if (e) {
|
|
306
|
-
const u = l.configFields || [], L = te(e.tag);
|
|
307
|
-
e.config = { configFields: u, templateHtml: L };
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
function ne(l) {
|
|
311
|
-
z.value = l;
|
|
312
|
-
}
|
|
313
|
-
function re(l, e) {
|
|
314
|
-
l.preventDefault(), N.value = e;
|
|
315
|
-
}
|
|
316
|
-
function ie() {
|
|
317
|
-
N.value = null;
|
|
318
|
-
}
|
|
319
|
-
function ue(l) {
|
|
320
|
-
if (z.value === null || z.value === l) {
|
|
321
|
-
z.value = null, N.value = null;
|
|
322
|
-
return;
|
|
323
|
-
}
|
|
324
|
-
const e = c.value.splice(z.value, 1)[0];
|
|
325
|
-
c.value.splice(l, 0, e), z.value = null, N.value = null;
|
|
326
|
-
}
|
|
327
|
-
function de() {
|
|
328
|
-
z.value = null, N.value = null;
|
|
329
|
-
}
|
|
330
|
-
async function ce() {
|
|
331
|
-
var l;
|
|
332
|
-
n.value = !0;
|
|
333
|
-
try {
|
|
334
|
-
const e = (l = $.currentBusiness.value) == null ? void 0 : l._id;
|
|
335
|
-
if (!e)
|
|
336
|
-
throw new Error("Business ID is missing. Please select a business first.");
|
|
337
|
-
const u = c.value.map((o) => {
|
|
338
|
-
var Z;
|
|
339
|
-
const k = ((Z = o.config) == null ? void 0 : Z.configFields) || [], I = te(o.tag, k);
|
|
340
|
-
return {
|
|
341
|
-
...o,
|
|
342
|
-
config: { configFields: k, templateHtml: I }
|
|
343
|
-
};
|
|
344
|
-
}), L = Ce(u), S = {
|
|
345
|
-
name: D.value,
|
|
346
|
-
type: _.value,
|
|
347
|
-
blocks: L,
|
|
348
|
-
businessId: e,
|
|
349
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
350
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
351
|
-
};
|
|
352
|
-
let B;
|
|
353
|
-
a.value ? B = await h.update(a.value, {
|
|
354
|
-
_id: a.value,
|
|
355
|
-
...S
|
|
356
|
-
}) : (B = await h.create(S), a.value = B._id), H.value.add(_.value), y.value = !1, d == null || d.open({
|
|
357
|
-
title: "Success",
|
|
358
|
-
message: "Print template saved",
|
|
359
|
-
type: "success"
|
|
360
|
-
}), f("saved", B), i.value = !1;
|
|
361
|
-
} catch (e) {
|
|
362
|
-
d == null || d.open({
|
|
363
|
-
title: "Error",
|
|
364
|
-
message: (e == null ? void 0 : e.message) || "Failed to save template",
|
|
365
|
-
type: "error"
|
|
366
|
-
});
|
|
367
|
-
} finally {
|
|
368
|
-
n.value = !1;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
async function pe() {
|
|
372
|
-
if (a.value) {
|
|
373
|
-
n.value = !0;
|
|
374
|
-
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({
|
|
376
|
-
title: "Deleted",
|
|
377
|
-
message: "Print template deleted. Default layout will be used.",
|
|
378
|
-
type: "success"
|
|
379
|
-
}), f("saved", null), i.value = !1;
|
|
380
|
-
} catch (l) {
|
|
381
|
-
d == null || d.open({
|
|
382
|
-
title: "Error",
|
|
383
|
-
message: (l == null ? void 0 : l.message) || "Failed to delete template",
|
|
384
|
-
type: "error"
|
|
385
|
-
});
|
|
386
|
-
} finally {
|
|
387
|
-
n.value = !1;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
function me() {
|
|
392
|
-
c.value = R(), v.value = null;
|
|
393
|
-
}
|
|
394
|
-
function ve(l) {
|
|
395
|
-
var e;
|
|
396
|
-
return ((e = A[l]) == null ? void 0 : e.label) ?? l;
|
|
397
|
-
}
|
|
398
|
-
function ge(l) {
|
|
399
|
-
var e;
|
|
400
|
-
return ((e = A[l]) == null ? void 0 : e.icon) ?? "widgets";
|
|
401
|
-
}
|
|
402
|
-
return (l, e) => {
|
|
403
|
-
const u = V("FmIcon"), L = V("FmTextField"), S = V("FmButton"), B = V("FmDialog");
|
|
404
|
-
return s(), r(U, null, [
|
|
405
|
-
p(B, {
|
|
406
|
-
modelValue: i.value,
|
|
407
|
-
"onUpdate:modelValue": e[4] || (e[4] = (o) => i.value = o),
|
|
408
|
-
overlay: !0,
|
|
409
|
-
"close-button": "",
|
|
410
|
-
"max-width": "98vw"
|
|
411
|
-
}, ye({
|
|
412
|
-
"dialog-header": T(() => {
|
|
413
|
-
var o;
|
|
414
|
-
return [
|
|
415
|
-
t("div", Qe, [
|
|
416
|
-
C.value === "editor" ? (s(), r("button", {
|
|
417
|
-
key: 0,
|
|
418
|
-
class: "flex items-center justify-center w-7 h-7 rounded hover:bg-gray-100 transition-colors text-gray-500",
|
|
419
|
-
onClick: e[0] || (e[0] = (k) => C.value = "select-type")
|
|
420
|
-
}, [
|
|
421
|
-
p(u, {
|
|
422
|
-
name: "arrow_back",
|
|
423
|
-
size: "sm"
|
|
424
|
-
})
|
|
425
|
-
])) : q("", !0),
|
|
426
|
-
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))
|
|
427
|
-
])
|
|
428
|
-
];
|
|
429
|
-
}),
|
|
430
|
-
default: T(() => [
|
|
431
|
-
C.value === "select-type" ? (s(), r("div", Ze, [
|
|
432
|
-
e[7] || (e[7] = t("p", { class: "text-sm text-gray-500 mb-5" }, " Select a template type to customize its print layout. ", -1)),
|
|
433
|
-
m.value ? (s(), r("div", et, " Loading... ")) : (s(), r("div", tt, [
|
|
434
|
-
(s(), r(U, null, G(W, (o) => t("div", {
|
|
435
|
-
key: o.value,
|
|
436
|
-
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", {
|
|
437
|
-
"border-blue-500 bg-blue-50/50 shadow-md": _.value === o.value && C.value === "select-type"
|
|
438
|
-
}]),
|
|
439
|
-
onClick: (k) => le(o.value)
|
|
440
|
-
}, [
|
|
441
|
-
t("div", ot, [
|
|
442
|
-
p(u, {
|
|
443
|
-
name: o.icon,
|
|
444
|
-
size: "sm"
|
|
445
|
-
}, null, 8, ["name"])
|
|
446
|
-
]),
|
|
447
|
-
t("div", at, [
|
|
448
|
-
t("div", st, F(o.label), 1),
|
|
449
|
-
t("div", nt, F(o.description), 1)
|
|
450
|
-
]),
|
|
451
|
-
H.value.has(o.value) ? (s(), r("span", rt, "Customized")) : (s(), r("span", it, "Default"))
|
|
452
|
-
], 10, lt)), 64))
|
|
453
|
-
]))
|
|
454
|
-
])) : m.value ? (s(), r("div", ut, e[8] || (e[8] = [
|
|
455
|
-
t("div", null, "Loading template...", -1)
|
|
456
|
-
]))) : (s(), r("div", dt, [
|
|
457
|
-
t("div", ct, [
|
|
458
|
-
t("div", pt, [
|
|
459
|
-
p(L, {
|
|
460
|
-
modelValue: D.value,
|
|
461
|
-
"onUpdate:modelValue": e[1] || (e[1] = (o) => D.value = o),
|
|
462
|
-
placeholder: "Template name",
|
|
463
|
-
label: "Template Name"
|
|
464
|
-
}, null, 8, ["modelValue"])
|
|
465
|
-
]),
|
|
466
|
-
e[9] || (e[9] = t("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2" }, " Add Blocks ", -1)),
|
|
467
|
-
t("div", mt, [
|
|
468
|
-
(s(!0), r(U, null, G(O($e).Values, (o) => (s(), r("div", {
|
|
469
|
-
key: o,
|
|
470
|
-
class: "group flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 transition-colors hover:bg-gray-100",
|
|
471
|
-
onClick: (k) => oe(o)
|
|
472
|
-
}, [
|
|
473
|
-
p(u, {
|
|
474
|
-
name: O(A)[o].icon,
|
|
475
|
-
size: "sm"
|
|
476
|
-
}, null, 8, ["name"]),
|
|
477
|
-
t("span", null, F(O(A)[o].label), 1),
|
|
478
|
-
p(u, {
|
|
479
|
-
name: "add",
|
|
480
|
-
size: "sm",
|
|
481
|
-
class: "ml-auto opacity-0 text-blue-600 group-hover:opacity-100"
|
|
482
|
-
})
|
|
483
|
-
], 8, vt))), 128))
|
|
484
|
-
]),
|
|
485
|
-
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)),
|
|
486
|
-
t("div", gt, [
|
|
487
|
-
(s(!0), r(U, null, G(c.value, (o, k) => (s(), r("div", {
|
|
488
|
-
key: o.id,
|
|
489
|
-
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", {
|
|
490
|
-
"bg-blue-50 border-l-[3px] border-l-blue-600": o.id === v.value,
|
|
491
|
-
"border-t-2 border-t-blue-600": N.value === k
|
|
492
|
-
}]),
|
|
493
|
-
draggable: "true",
|
|
494
|
-
onDragstart: (I) => ne(k),
|
|
495
|
-
onDragover: (I) => re(I, k),
|
|
496
|
-
onDragleave: ie,
|
|
497
|
-
onDrop: (I) => ue(k),
|
|
498
|
-
onDragend: de,
|
|
499
|
-
onClick: (I) => v.value = o.id
|
|
500
|
-
}, [
|
|
501
|
-
p(u, {
|
|
502
|
-
name: "drag_indicator",
|
|
503
|
-
size: "sm",
|
|
504
|
-
class: "cursor-grab text-gray-300"
|
|
505
|
-
}),
|
|
506
|
-
p(u, {
|
|
507
|
-
name: ge(o.tag),
|
|
508
|
-
size: "sm"
|
|
509
|
-
}, null, 8, ["name"]),
|
|
510
|
-
t("span", yt, F(ve(o.tag)), 1),
|
|
511
|
-
t("div", bt, [
|
|
512
|
-
p(u, {
|
|
513
|
-
name: "delete",
|
|
514
|
-
size: "sm",
|
|
515
|
-
class: "cursor-pointer text-gray-400 hover:text-red-500",
|
|
516
|
-
onClick: be((I) => ae(o.id), ["stop"])
|
|
517
|
-
}, null, 8, ["onClick"])
|
|
518
|
-
])
|
|
519
|
-
], 42, ft))), 128)),
|
|
520
|
-
c.value.length === 0 ? (s(), r("div", xt, " Click a block above to add it ")) : q("", !0)
|
|
521
|
-
]),
|
|
522
|
-
J.value ? (s(), r("div", _t, [
|
|
523
|
-
(s(), P(qe, {
|
|
524
|
-
key: J.value.id,
|
|
525
|
-
block: J.value,
|
|
526
|
-
onUpdate: se
|
|
527
|
-
}, null, 8, ["block"]))
|
|
528
|
-
])) : (s(), r("div", ht, " Select a block to configure it ")),
|
|
529
|
-
t("div", kt, [
|
|
530
|
-
p(S, {
|
|
531
|
-
label: "Reset to Default",
|
|
532
|
-
variant: "plain",
|
|
533
|
-
size: "md",
|
|
534
|
-
onClick: me
|
|
535
|
-
})
|
|
536
|
-
])
|
|
537
|
-
]),
|
|
538
|
-
t("div", wt, [
|
|
539
|
-
p(Je, {
|
|
540
|
-
blocks: c.value,
|
|
541
|
-
"selected-block-id": v.value,
|
|
542
|
-
"template-type": _.value
|
|
543
|
-
}, null, 8, ["blocks", "selected-block-id", "template-type"])
|
|
544
|
-
])
|
|
545
|
-
]))
|
|
546
|
-
]),
|
|
547
|
-
_: 2
|
|
548
|
-
}, [
|
|
549
|
-
C.value === "editor" ? {
|
|
550
|
-
name: "dialog-footer",
|
|
551
|
-
fn: T(() => [
|
|
552
|
-
t("div", Tt, [
|
|
553
|
-
a.value ? (s(), P(S, {
|
|
554
|
-
key: 0,
|
|
555
|
-
label: "Delete Template",
|
|
556
|
-
variant: "destructive",
|
|
557
|
-
size: "md",
|
|
558
|
-
onClick: e[2] || (e[2] = (o) => w.value = !0)
|
|
559
|
-
})) : q("", !0),
|
|
560
|
-
p(S, {
|
|
561
|
-
label: "Save Template",
|
|
562
|
-
variant: "primary",
|
|
563
|
-
size: "md",
|
|
564
|
-
onClick: e[3] || (e[3] = (o) => y.value = !0)
|
|
565
|
-
})
|
|
566
|
-
])
|
|
567
|
-
]),
|
|
568
|
-
key: "0"
|
|
569
|
-
} : void 0
|
|
570
|
-
]), 1032, ["modelValue"]),
|
|
571
|
-
p(B, {
|
|
572
|
-
modelValue: y.value,
|
|
573
|
-
"onUpdate:modelValue": e[5] || (e[5] = (o) => y.value = o),
|
|
574
|
-
overlay: !0,
|
|
575
|
-
dismissAway: !0,
|
|
576
|
-
"close-button": "",
|
|
577
|
-
"max-width": "400px"
|
|
578
|
-
}, {
|
|
579
|
-
"dialog-header": T(() => e[11] || (e[11] = [
|
|
580
|
-
t("span", null, "Save Print Template?", -1)
|
|
581
|
-
])),
|
|
582
|
-
"dialog-footer": T(() => [
|
|
583
|
-
p(S, {
|
|
584
|
-
class: "ml-auto",
|
|
585
|
-
label: "Save",
|
|
586
|
-
variant: "primary",
|
|
587
|
-
size: "md",
|
|
588
|
-
loading: n.value,
|
|
589
|
-
onClick: ce
|
|
590
|
-
}, null, 8, ["loading"])
|
|
591
|
-
]),
|
|
592
|
-
default: T(() => [
|
|
593
|
-
t("div", Ft, [
|
|
594
|
-
e[13] || (e[13] = t("p", null, "Are you sure you want to save this print template?", -1)),
|
|
595
|
-
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)),
|
|
596
|
-
t("div", Dt, [
|
|
597
|
-
p(u, {
|
|
598
|
-
name: "warning",
|
|
599
|
-
size: "sm"
|
|
600
|
-
}),
|
|
601
|
-
e[12] || (e[12] = t("span", null, "This will affect all locations under this business.", -1))
|
|
602
|
-
])
|
|
603
|
-
])
|
|
604
|
-
]),
|
|
605
|
-
_: 1
|
|
606
|
-
}, 8, ["modelValue"]),
|
|
607
|
-
p(B, {
|
|
608
|
-
modelValue: w.value,
|
|
609
|
-
"onUpdate:modelValue": e[6] || (e[6] = (o) => w.value = o),
|
|
610
|
-
overlay: !0,
|
|
611
|
-
dismissAway: !0,
|
|
612
|
-
"close-button": "",
|
|
613
|
-
"max-width": "400px"
|
|
614
|
-
}, {
|
|
615
|
-
"dialog-header": T(() => e[15] || (e[15] = [
|
|
616
|
-
t("span", null, "Delete Print Template?", -1)
|
|
617
|
-
])),
|
|
618
|
-
"dialog-footer": T(() => [
|
|
619
|
-
p(S, {
|
|
620
|
-
class: "ml-auto",
|
|
621
|
-
label: "Delete",
|
|
622
|
-
variant: "destructive",
|
|
623
|
-
size: "md",
|
|
624
|
-
loading: n.value,
|
|
625
|
-
onClick: pe
|
|
626
|
-
}, null, 8, ["loading"])
|
|
627
|
-
]),
|
|
628
|
-
default: T(() => [
|
|
629
|
-
t("div", Ct, [
|
|
630
|
-
e[17] || (e[17] = t("p", null, "Are you sure you want to delete this print template?", -1)),
|
|
631
|
-
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)),
|
|
632
|
-
t("div", St, [
|
|
633
|
-
p(u, {
|
|
634
|
-
name: "warning",
|
|
635
|
-
size: "sm"
|
|
636
|
-
}),
|
|
637
|
-
e[16] || (e[16] = t("span", null, "This will affect all locations under this business.", -1))
|
|
638
|
-
])
|
|
639
|
-
])
|
|
640
|
-
]),
|
|
641
|
-
_: 1
|
|
642
|
-
}, 8, ["modelValue"])
|
|
643
|
-
], 64);
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
}), 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({
|
|
647
|
-
__name: "SettingsView",
|
|
648
|
-
setup(E) {
|
|
649
|
-
const { t: x } = Ie(), g = Se();
|
|
650
|
-
g.fetchTemplates();
|
|
651
|
-
const f = b(!1);
|
|
652
|
-
function h() {
|
|
653
|
-
g.invalidate(), g.fetchTemplates();
|
|
654
|
-
}
|
|
655
|
-
function d() {
|
|
656
|
-
f.value = !0;
|
|
657
|
-
}
|
|
658
|
-
return ($, i) => {
|
|
659
|
-
const m = V("FmButton");
|
|
660
|
-
return s(), P(_e, {
|
|
661
|
-
title: O(x)("inventory.settings.title")
|
|
662
|
-
}, {
|
|
663
|
-
default: T(() => [
|
|
664
|
-
t("div", Vt, [
|
|
665
|
-
p(Oe, null, {
|
|
666
|
-
default: T(() => [
|
|
667
|
-
t("div", $t, [
|
|
668
|
-
t("h2", zt, F(O(x)("inventory.settings.printTemplate.title")), 1),
|
|
669
|
-
t("p", It, F(O(x)("inventory.settings.printTemplate.description")), 1),
|
|
670
|
-
p(m, {
|
|
671
|
-
onClick: d,
|
|
672
|
-
variant: "secondary",
|
|
673
|
-
label: O(x)("inventory.settings.printTemplate.edit")
|
|
674
|
-
}, null, 8, ["label"])
|
|
675
|
-
])
|
|
676
|
-
]),
|
|
677
|
-
_: 1
|
|
678
|
-
})
|
|
679
|
-
]),
|
|
680
|
-
(s(), P(xe, { to: "body" }, [
|
|
681
|
-
p(Bt, {
|
|
682
|
-
modelValue: f.value,
|
|
683
|
-
"onUpdate:modelValue": i[0] || (i[0] = (n) => f.value = n),
|
|
684
|
-
onSaved: h
|
|
685
|
-
}, null, 8, ["modelValue"])
|
|
686
|
-
]))
|
|
687
|
-
]),
|
|
688
|
-
_: 1
|
|
689
|
-
}, 8, ["title"]);
|
|
690
|
-
};
|
|
691
|
-
}
|
|
692
|
-
});
|
|
693
|
-
export {
|
|
694
|
-
Mt as default
|
|
695
|
-
};
|