@feedmepos/mf-inventory-portal 1.8.0-dev.19 → 1.8.0-dev.20
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-BXDscpMf.js → App-5GYyCfFq.js} +9 -9
- package/dist/{ApprovalView-CbP2H_8q.js → ApprovalView-DY1ayl1W.js} +9 -9
- package/dist/{BindingsDialog-C7OFDUAr.js → BindingsDialog-Dm7uKMfV.js} +2 -2
- package/dist/{BindingsPicker-BQjHQWPl.js → BindingsPicker-DhnMlj4x.js} +2 -2
- package/dist/{BindingsTable-grJZdI5F.js → BindingsTable-Cxibcjka.js} +4 -4
- package/dist/{BulkReceiveRequestPage-jZtPq5XF.js → BulkReceiveRequestPage-w4AA6BxB.js} +21 -21
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DOgwkHnO.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-B3ESPbQp.js} +1 -1
- package/dist/{ClosingDraftView-UmNAyX_s.js → ClosingDraftView-DMaONEZ7.js} +19 -19
- package/dist/{ClosingHistoryView-CZcOYK98.js → ClosingHistoryView-BBYruOux.js} +7 -7
- package/dist/{ClosingTemplateView-CP2-ib2S.js → ClosingTemplateView-DcwgokRl.js} +18 -18
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DYZjiuAH.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-a72IldDO.js} +1 -1
- package/dist/{DefaultView-DOa4PWSU.js → DefaultView-BVr_7JDn.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-DtFuSUby.js → DeliveryOrderPrintPreview-BXZFD3D5.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-CxsxIwZm.js → EmailDialog.vue_vue_type_script_setup_true_lang-Dne_9P3j.js} +25 -25
- package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-B3mPB7-O.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CYkPbFSA.js} +1 -1
- package/dist/FeatureCapabilityGate-DK_rTVyJ.js +82 -0
- package/dist/{FeaturePageGate.vue_vue_type_script_setup_true_lang-O58GGptu.js → FeaturePageGate.vue_vue_type_script_setup_true_lang-DIhV51l7.js} +1 -1
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CCrEBis5.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B80EHMBT.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-YGOFZ7uY.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C94IFGoH.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-F36jHbKZ.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-COZPDuAM.js} +2 -2
- package/dist/{FmMultiselectDialog-BDCQmCSh.js → FmMultiselectDialog-C1P22sj2.js} +2 -2
- package/dist/{FmMultiselectDialog-Dd9oKz5m.js → FmMultiselectDialog-Kb3IftHf.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CUmlLKDV.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BqB71yfu.js} +5 -5
- package/dist/ImportView-EJ4u8NHM.js +1540 -0
- package/dist/{IngredientsView-Bcxo5AlS.js → IngredientsView-Bxsgm4E7.js} +15 -15
- package/dist/{IntegrationExplorerView-C2jsPi_3.js → IntegrationExplorerView-owEaOVeG.js} +6 -6
- package/dist/{IntegrationPlatformView-Cr7Fyt4p.js → IntegrationPlatformView-BuptPyjg.js} +2 -2
- package/dist/{IntegrationView-BTcnK-_q.js → IntegrationView-DAcdY_d_.js} +14 -14
- package/dist/{InventoryBindingForm-e1rSW4FA.js → InventoryBindingForm-BvjY4zrn.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BjDz4LFE.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DhbF-jgN.js} +4 -4
- package/dist/{InventoryBindingSummary-CAGMRuy4.js → InventoryBindingSummary-DPqm94GX.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-eygCK9vN.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DDsigNJ4.js} +2 -2
- package/dist/{ProductionRunDetailPage-CQz-U7Sw.js → ProductionRunDetailPage-BaPCJUqT.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BtnKFZy2.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CNRX3MYt.js} +8 -8
- package/dist/{ProductionRunPage-BZnmoyLo.js → ProductionRunPage-B6Jsv9Hh.js} +4 -4
- package/dist/{PublishView-BJFoRmsD.js → PublishView-DonUv6nP.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-BQExGk_A.js → PurchaseOrderPrintPreview-CK3Cqdwp.js} +2 -2
- package/dist/{ReceiveRequestView-C4XUYhl5.js → ReceiveRequestView-CMAnKxzm.js} +13 -13
- package/dist/RecipeView-Bx13Bckq.js +3272 -0
- package/dist/{SettingsView-BDogzqxV.js → SettingsView-D1MiAkD8.js} +397 -425
- package/dist/StockView-CsxTjVEd.js +3003 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Ce82k1-V.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BT73j9SA.js} +1 -1
- package/dist/{SupplierView-DRSh4m07.js → SupplierView-CFACoZya.js} +13 -13
- package/dist/{SurchargeView-gNIDCY22.js → SurchargeView-CShhZa3x.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DrP1vAZX.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-B2OdmdI_.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Cxpc2Wtp.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-x3N2Oypo.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D4kpyIAQ.js → TransferDetails.vue_vue_type_script_setup_true_lang-BISmGBJE.js} +517 -517
- package/dist/{TransferTemplateView-adEB_aZg.js → TransferTemplateView-kx2IPqEv.js} +19 -19
- package/dist/{UnitCostHistoryView-ClgafUAg.js → UnitCostHistoryView-DgPWsXaB.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DpN-7H9P.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BtfJJgIP.js} +4 -4
- package/dist/{UnitView-DU-Kim1r.js → UnitView-aupXLRMk.js} +7 -7
- package/dist/{WarehouseView-Dw1xkcrx.js → WarehouseView-MTvbY4n4.js} +8 -8
- package/dist/{WastageTemplateView-CQj821yg.js → WastageTemplateView-Bs9HL-LK.js} +15 -15
- package/dist/api/bill.d.ts +4 -2
- package/dist/api/bill.spec.d.ts +1 -0
- package/dist/api/closing.d.ts +1 -0
- package/dist/api/feature-flags.d.ts +2 -0
- package/dist/api/license.d.ts +0 -1
- package/dist/api/stock.d.ts +1 -1
- package/dist/{app--e70sT_h.js → app-D38sV2ls.js} +2286 -2147
- package/dist/app.d.ts +92 -8
- package/dist/app.js +1 -1
- package/dist/bulk-edit-simulation.helper-DgniL8FN.js +178 -0
- package/dist/{closing-template-i0bDCk-x.js → closing-template-D_NAj_mU.js} +1 -1
- package/dist/{date2-CXI-d_rQ.js → date2-CvgxwuM1.js} +1 -1
- package/dist/{dayjs.min-Ivf4HAC3.js → dayjs.min-BOKV8T5Q.js} +1 -1
- package/dist/{decimal-d3XWw4d_.js → decimal-5xyg1WLu.js} +2 -2
- package/dist/{defineDeepModel-DrQmqGvi.js → defineDeepModel-BwB9XcMu.js} +1 -1
- package/dist/{duplicate-template-yVd6JWGz.js → duplicate-template-DvIgjm4K.js} +1 -1
- package/dist/{feature-CBrHj9bO.js → feature-CsPbMoeJ.js} +231 -221
- package/dist/{format-time-from-id-DpFUCBGw.js → format-time-from-id-DD6Ik9EK.js} +1 -1
- package/dist/{format-unit-display-CICNepRU.js → format-unit-display-DG564AN3.js} +12 -12
- package/dist/helper/country.spec.d.ts +1 -0
- package/dist/{id-to-date-BicEvFx1.js → id-to-date-DoN7OM21.js} +1 -1
- package/dist/{import-export.helper-Cy-nm8Ao.js → import-export.helper-CevBRFTZ.js} +6 -5
- package/dist/{index-CiWNQMAX.js → index-BIh1oTQH.js} +3 -3
- package/dist/{index-BfY6L-3r.js → index-BP3Avix6.js} +1 -1
- package/dist/{index-W7Q7cZGV.js → index-mzXhLwrZ.js} +1 -1
- package/dist/{lz-string-ClJ0qg4U.js → lz-string-DMjWYCk6.js} +1 -1
- package/dist/{netsuite-jSt2nlwO.js → netsuite-ZtoZBFBX.js} +2 -2
- package/dist/{netsuite-explorer-BWrO3KfB.js → netsuite-explorer-h_vID_ao.js} +1 -1
- package/dist/{predefined-templates-DKiqLY6F.js → predefined-templates-CdurFRJ4.js} +1 -1
- package/dist/{purchase-order-template-D-NkhbNh.js → purchase-order-template-BVdCftEo.js} +1 -1
- package/dist/{recalculationUtils-Bbe1w-wj.js → recalculationUtils-DBG8HGiJ.js} +1 -1
- package/dist/{row-action.enum-C8JhgYiR.js → row-action.enum-CGyAg4dC.js} +1 -1
- package/dist/{rules-CrAeAKSS.js → rules-DbFiOzUd.js} +3 -3
- package/dist/{stock-x072pQVW.js → stock-BATH4SoA.js} +1 -1
- package/dist/{stock-B27nWQ5z.js → stock-DXxsDPEO.js} +2 -2
- package/dist/stores/feature.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-sh98cdAW.js → supplier-CKXQmBZn.js} +2 -2
- package/dist/{surcharge-DsF53Jiz.js → surcharge-qupRJjjO.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-DuYrxEZK.js → uom-rules-ALtgjANX.js} +1 -1
- package/dist/{use-ingredient-select-dialog-DZJPaYJX.js → use-ingredient-select-dialog-C1sJpjfV.js} +2 -2
- package/dist/{use-inventory-binding-dialog-CEr-Nctj.js → use-inventory-binding-dialog-tl7-epun.js} +2 -2
- package/dist/{use-template-enabled-locations-h-1Om4op.js → use-template-enabled-locations-DWk2ndDC.js} +2 -2
- package/dist/{use-transfer-locations-CuCYcO6G.js → use-transfer-locations-CsdYY996.js} +2 -2
- package/dist/{useHrmPermission-Db-rrPU-.js → useHrmPermission-BtuqUrwj.js} +1 -1
- package/dist/{useNavigationMenu-DJCT15IW.js → useNavigationMenu-DKxKXykI.js} +4 -4
- package/dist/{useSseClient-B2_SvHJ2.js → useSseClient-CRfpltKK.js} +1 -1
- package/dist/views/import/helper/submit-rows.d.ts +1 -1
- package/dist/views/integration/components/IntegrationCard.vue.d.ts +3 -3
- package/dist/views/production-run/features/detail/ProductionRunItemsTable.vue.d.ts +2 -2
- package/dist/views/recipe/helper/import-recipe.d.ts +30 -0
- package/dist/views/settings/PlanLicenseDisplay.vue.d.ts +1 -14
- package/dist/views/stock/components/StockRecordCard.spec.d.ts +1 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +3 -863
- package/dist/views/stock/components/dialog/BillInventoryInfoDialog.spec.d.ts +1 -0
- package/dist/views/stock/components/dialog/BillInventoryInfoDialog.vue.d.ts +36 -0
- package/dist/views/stock/composables/use-last-closing-summary.d.ts +4 -0
- package/dist/views/stock/composables/use-last-closing-summary.spec.d.ts +1 -0
- package/dist/{vue-Co39mHJn.js → vue-CVco8McV.js} +2 -2
- package/dist/{vue-i18n-C2pkD_vQ.js → vue-i18n-C443zpcA.js} +280 -280
- package/dist/{xlsx.util-CLUjDX2E.js → xlsx.util-5_47Kslf.js} +2 -2
- package/package.json +2 -2
- package/dist/FeatureCapabilityGate-Dp_SfIlO.js +0 -77
- package/dist/ImportView-CbRrxlrW.js +0 -1290
- package/dist/RecipeView-Bd5--ENI.js +0 -3440
- package/dist/StockView-BCWwamwk.js +0 -2756
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
import { defineComponent as ee, ref as
|
|
1
|
+
import { defineComponent as ee, ref as k, computed as A, watch as J, resolveComponent as L, createElementBlock as r, openBlock as o, createElementVNode as l, toDisplayString as C, Fragment as E, renderList as Y, createBlock as z, createCommentVNode as Z, createVNode as p, nextTick as xe, createSlots as he, withCtx as P, normalizeClass as ue, unref as w, withModifiers as ke, h as B, Teleport as we } from "vue";
|
|
2
2
|
import { _ as Fe } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
|
|
3
|
-
import { B as
|
|
3
|
+
import { B as G, g as Te, r as Se, s as $e, u as Ce, a as ae, b as De, c as Be, d as be, e as Ve, f as Ie } from "./predefined-templates-CdurFRJ4.js";
|
|
4
4
|
import { useSnackbar as Pe, components as X } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import { H as se, J as Oe, u as
|
|
6
|
+
import { H as se, J as Oe, u as Le } from "./app-D38sV2ls.js";
|
|
7
7
|
import { useCoreStore as ye, useI18n as Ee } from "@feedmepos/mf-common";
|
|
8
|
-
import "./dayjs.min-
|
|
9
|
-
import {
|
|
10
|
-
import { _ as He, D as
|
|
11
|
-
import { _ as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { a as
|
|
14
|
-
const
|
|
8
|
+
import "./dayjs.min-BOKV8T5Q.js";
|
|
9
|
+
import { u as _e, a as Ue, I as Ae } from "./feature-CsPbMoeJ.js";
|
|
10
|
+
import { _ as He, D as Ne } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CYkPbFSA.js";
|
|
11
|
+
import { _ as Me } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-B3ESPbQp.js";
|
|
12
|
+
import { _ as Re } from "./PlanTierBadge.vue_vue_type_script_setup_true_lang-CM3gtYZo.js";
|
|
13
|
+
import { a as je } from "./vue-CVco8McV.js";
|
|
14
|
+
const Ke = { class: "p-3" }, qe = { class: "text-sm font-semibold text-gray-700 mb-4 pb-2 border-b border-gray-200" }, Ge = { class: "flex flex-col gap-3" }, Ye = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "flex items-center justify-between py-1"
|
|
17
|
-
},
|
|
17
|
+
}, Je = { class: "text-[13px] text-gray-600" }, We = { class: "text-[13px] text-gray-600" }, Qe = ["value", "rows", "placeholder", "onInput"], Xe = {
|
|
18
18
|
key: 5,
|
|
19
19
|
class: "flex items-center justify-between py-1"
|
|
20
|
-
},
|
|
20
|
+
}, Ze = { class: "text-[13px] text-gray-600" }, et = ["value", "onInput"], tt = /* @__PURE__ */ ee({
|
|
21
21
|
__name: "BlockConfigPanel",
|
|
22
22
|
props: {
|
|
23
23
|
block: {}
|
|
24
24
|
},
|
|
25
25
|
emits: ["update"],
|
|
26
|
-
setup(
|
|
27
|
-
const T =
|
|
28
|
-
function
|
|
29
|
-
var
|
|
30
|
-
if ((
|
|
31
|
-
const
|
|
32
|
-
return [...
|
|
26
|
+
setup(H, { emit: v }) {
|
|
27
|
+
const T = H, x = v;
|
|
28
|
+
function S(c) {
|
|
29
|
+
var b;
|
|
30
|
+
if ((b = c.config) != null && b.configFields && Array.isArray(c.config.configFields)) {
|
|
31
|
+
const _ = c.config.configFields.map((d) => ({ ...d })), h = new Set(_.map((d) => d.key)), a = G[c.tag], $ = a ? a.initialConfigFields().filter((d) => !h.has(d.key)) : [];
|
|
32
|
+
return [..._, ...$];
|
|
33
33
|
}
|
|
34
|
-
const
|
|
35
|
-
return
|
|
34
|
+
const u = G[c.tag];
|
|
35
|
+
return u ? u.initialConfigFields() : [];
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
return (
|
|
37
|
+
const m = k(S(T.block)), O = A(() => {
|
|
38
|
+
const c = G[T.block.tag];
|
|
39
|
+
return (c == null ? void 0 : c.label) ?? T.block.tag;
|
|
40
40
|
});
|
|
41
|
-
|
|
41
|
+
J(
|
|
42
42
|
() => T.block,
|
|
43
|
-
(
|
|
44
|
-
|
|
43
|
+
(c) => {
|
|
44
|
+
m.value = S(c);
|
|
45
45
|
},
|
|
46
46
|
{ deep: !0 }
|
|
47
47
|
);
|
|
48
|
-
function
|
|
49
|
-
const
|
|
50
|
-
|
|
48
|
+
function f(c, u) {
|
|
49
|
+
const b = m.value[c];
|
|
50
|
+
b && (b.value = u, g());
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
|
|
52
|
+
function g() {
|
|
53
|
+
x("update", {
|
|
54
54
|
...T.block.config || {},
|
|
55
|
-
configFields:
|
|
55
|
+
configFields: m.value.map((c) => ({ ...c }))
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
return (
|
|
59
|
-
const
|
|
60
|
-
return o(),
|
|
61
|
-
l("div",
|
|
62
|
-
l("div",
|
|
63
|
-
(o(!0),
|
|
58
|
+
return (c, u) => {
|
|
59
|
+
const b = L("FmSwitch"), _ = L("FmTextField"), h = L("FmSelect");
|
|
60
|
+
return o(), r("div", Ke, [
|
|
61
|
+
l("div", qe, C(O.value) + " Settings ", 1),
|
|
62
|
+
l("div", Ge, [
|
|
63
|
+
(o(!0), r(E, null, Y(m.value, (a, $) => (o(), r("div", {
|
|
64
64
|
key: a.key
|
|
65
65
|
}, [
|
|
66
|
-
a.type === "toggle" ? (o(),
|
|
67
|
-
l("label",
|
|
68
|
-
|
|
66
|
+
a.type === "toggle" ? (o(), r("div", Ye, [
|
|
67
|
+
l("label", Je, C(a.label), 1),
|
|
68
|
+
p(b, {
|
|
69
69
|
"model-value": a.value,
|
|
70
|
-
"onUpdate:modelValue": (d) =>
|
|
70
|
+
"onUpdate:modelValue": (d) => f($, d)
|
|
71
71
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
72
|
-
])) : a.type === "text" ? (o(),
|
|
72
|
+
])) : a.type === "text" ? (o(), z(_, {
|
|
73
73
|
key: 1,
|
|
74
74
|
label: a.label,
|
|
75
75
|
"model-value": a.value,
|
|
76
76
|
placeholder: a.placeholder,
|
|
77
|
-
"onUpdate:modelValue": (d) =>
|
|
78
|
-
}, null, 8, ["label", "model-value", "placeholder", "onUpdate:modelValue"])) : a.type === "textarea" ? (o(),
|
|
79
|
-
l("div",
|
|
77
|
+
"onUpdate:modelValue": (d) => f($, d)
|
|
78
|
+
}, null, 8, ["label", "model-value", "placeholder", "onUpdate:modelValue"])) : a.type === "textarea" ? (o(), r(E, { key: 2 }, [
|
|
79
|
+
l("div", We, C(a.label), 1),
|
|
80
80
|
l("textarea", {
|
|
81
81
|
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",
|
|
82
82
|
value: a.value,
|
|
83
83
|
rows: a.rows ?? 8,
|
|
84
84
|
placeholder: a.placeholder,
|
|
85
|
-
onInput: (d) =>
|
|
86
|
-
}, null, 40,
|
|
87
|
-
], 64)) : a.type === "select" ? (o(),
|
|
85
|
+
onInput: (d) => f($, d.target.value)
|
|
86
|
+
}, null, 40, Qe)
|
|
87
|
+
], 64)) : a.type === "select" ? (o(), z(h, {
|
|
88
88
|
key: 3,
|
|
89
89
|
label: a.label,
|
|
90
90
|
"model-value": a.value,
|
|
91
91
|
items: a.options || [],
|
|
92
92
|
"item-label": "label",
|
|
93
93
|
"item-value": "value",
|
|
94
|
-
"onUpdate:modelValue": (d) =>
|
|
95
|
-
}, null, 8, ["label", "model-value", "items", "onUpdate:modelValue"])) : a.type === "number" ? (o(),
|
|
94
|
+
"onUpdate:modelValue": (d) => f($, d)
|
|
95
|
+
}, null, 8, ["label", "model-value", "items", "onUpdate:modelValue"])) : a.type === "number" ? (o(), z(_, {
|
|
96
96
|
key: 4,
|
|
97
97
|
label: a.label,
|
|
98
98
|
type: "number",
|
|
99
99
|
"model-value": String(a.value),
|
|
100
|
-
"onUpdate:modelValue": (d) =>
|
|
101
|
-
}, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : a.type === "color" ? (o(),
|
|
102
|
-
l("label",
|
|
100
|
+
"onUpdate:modelValue": (d) => f($, Number(d))
|
|
101
|
+
}, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : a.type === "color" ? (o(), r("div", Xe, [
|
|
102
|
+
l("label", Ze, C(a.label), 1),
|
|
103
103
|
l("input", {
|
|
104
104
|
type: "color",
|
|
105
105
|
value: a.value,
|
|
106
106
|
class: "color-input w-9 h-7 p-0 border border-gray-300 rounded cursor-pointer bg-transparent",
|
|
107
|
-
onInput: (d) =>
|
|
108
|
-
}, null, 40,
|
|
107
|
+
onInput: (d) => f($, d.target.value)
|
|
108
|
+
}, null, 40, et)
|
|
109
109
|
])) : Z("", !0)
|
|
110
110
|
]))), 128))
|
|
111
111
|
])
|
|
112
112
|
]);
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
}),
|
|
115
|
+
}), lt = /* @__PURE__ */ ze(tt, [["__scopeId", "data-v-840687bf"]]), ot = { class: "h-full flex flex-col" }, at = { class: "flex-1 overflow-auto p-4 bg-gray-100" }, st = /* @__PURE__ */ ee({
|
|
116
116
|
__name: "TemplatePreview",
|
|
117
117
|
props: {
|
|
118
118
|
blocks: {},
|
|
@@ -120,21 +120,21 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
120
120
|
selectedBlockId: {},
|
|
121
121
|
templateType: {}
|
|
122
122
|
},
|
|
123
|
-
setup(
|
|
124
|
-
const
|
|
125
|
-
let
|
|
126
|
-
function
|
|
127
|
-
return !
|
|
128
|
-
}
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
() => [
|
|
123
|
+
setup(H) {
|
|
124
|
+
const v = H, T = k(null);
|
|
125
|
+
let x = null;
|
|
126
|
+
function S() {
|
|
127
|
+
return !x && T.value && (x = T.value.attachShadow({ mode: "open" })), x;
|
|
128
|
+
}
|
|
129
|
+
const m = A(() => v.previewData ?? Te(v.templateType));
|
|
130
|
+
J(
|
|
131
|
+
() => [v.blocks, m.value, T.value],
|
|
132
132
|
() => {
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
133
|
+
const f = S();
|
|
134
|
+
if (f) {
|
|
135
135
|
try {
|
|
136
|
-
const
|
|
137
|
-
|
|
136
|
+
const g = Se(v.blocks, m.value), c = $e(g);
|
|
137
|
+
f.innerHTML = `
|
|
138
138
|
<style>
|
|
139
139
|
:host { display: block; }
|
|
140
140
|
.preview-scale-wrapper {
|
|
@@ -156,30 +156,30 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
156
156
|
}
|
|
157
157
|
</style>
|
|
158
158
|
<div class="preview-scale-wrapper">
|
|
159
|
-
<div class="preview-content">${
|
|
159
|
+
<div class="preview-content">${c}</div>
|
|
160
160
|
</div>
|
|
161
161
|
`;
|
|
162
|
-
} catch (
|
|
163
|
-
|
|
162
|
+
} catch (g) {
|
|
163
|
+
f.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${g}</div>`;
|
|
164
164
|
}
|
|
165
|
-
xe(() =>
|
|
165
|
+
xe(() => O(v.selectedBlockId));
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
168
|
{ deep: !0, immediate: !0 }
|
|
169
|
-
),
|
|
170
|
-
() =>
|
|
171
|
-
(
|
|
169
|
+
), J(
|
|
170
|
+
() => v.selectedBlockId,
|
|
171
|
+
(f) => O(f)
|
|
172
172
|
);
|
|
173
|
-
function
|
|
174
|
-
if (!
|
|
175
|
-
|
|
176
|
-
}), !
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
return (
|
|
181
|
-
|
|
182
|
-
l("div",
|
|
173
|
+
function O(f) {
|
|
174
|
+
if (!x || (x.querySelectorAll("[data-block-id].highlight").forEach((c) => {
|
|
175
|
+
c.classList.remove("highlight");
|
|
176
|
+
}), !f)) return;
|
|
177
|
+
const g = x.querySelector(`[data-block-id="${f}"]`);
|
|
178
|
+
g && (g.classList.add("highlight"), g.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
179
|
+
}
|
|
180
|
+
return (f, g) => (o(), r("div", ot, [
|
|
181
|
+
g[0] || (g[0] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 border-b border-gray-200" }, " Live Preview ", -1)),
|
|
182
|
+
l("div", at, [
|
|
183
183
|
l("div", {
|
|
184
184
|
ref_key: "shadowHost",
|
|
185
185
|
ref: T
|
|
@@ -187,47 +187,47 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
187
187
|
])
|
|
188
188
|
]));
|
|
189
189
|
}
|
|
190
|
-
}),
|
|
190
|
+
}), nt = { class: "flex items-center gap-2 text-base font-semibold" }, rt = { key: 1 }, it = { key: 2 }, ut = {
|
|
191
191
|
key: 0,
|
|
192
192
|
class: "p-6"
|
|
193
|
-
},
|
|
193
|
+
}, ct = {
|
|
194
194
|
key: 0,
|
|
195
195
|
class: "flex justify-center items-center h-40 text-gray-400"
|
|
196
|
-
},
|
|
196
|
+
}, dt = {
|
|
197
197
|
key: 1,
|
|
198
198
|
class: "grid grid-cols-2 gap-8"
|
|
199
|
-
},
|
|
199
|
+
}, pt = ["onClick"], mt = { 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" }, vt = { class: "text-center" }, ft = { class: "text-sm font-semibold text-gray-700 group-hover:text-blue-700" }, yt = { class: "text-xs text-gray-400 mt-1" }, gt = {
|
|
200
200
|
key: 0,
|
|
201
201
|
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"
|
|
202
|
-
},
|
|
202
|
+
}, bt = {
|
|
203
203
|
key: 1,
|
|
204
204
|
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"
|
|
205
|
-
},
|
|
205
|
+
}, _t = {
|
|
206
206
|
key: 1,
|
|
207
207
|
class: "flex justify-center items-center h-[400px] text-gray-400"
|
|
208
|
-
},
|
|
208
|
+
}, xt = {
|
|
209
209
|
key: 2,
|
|
210
210
|
class: "flex h-[calc(100vh-120px)] border-t border-gray-200"
|
|
211
|
-
},
|
|
211
|
+
}, ht = { class: "w-[280px] border-r border-gray-200 overflow-y-auto shrink-0" }, kt = { class: "px-3 pt-3 pb-2" }, wt = { class: "flex flex-col" }, Ft = ["onClick"], Tt = { class: "border-y border-gray-100" }, St = ["onDragstart", "onDragover", "onDrop", "onClick"], $t = { class: "flex-1" }, Ct = { class: "flex gap-1 opacity-50 hover:opacity-100" }, Dt = {
|
|
212
212
|
key: 0,
|
|
213
213
|
class: "py-6 px-4 text-center text-gray-400 text-[13px]"
|
|
214
|
-
},
|
|
214
|
+
}, Bt = {
|
|
215
215
|
key: 0,
|
|
216
216
|
class: "border-t border-gray-200"
|
|
217
|
-
},
|
|
217
|
+
}, Vt = {
|
|
218
218
|
key: 1,
|
|
219
219
|
class: "flex items-center justify-center text-gray-400 text-[13px] py-8"
|
|
220
|
-
},
|
|
220
|
+
}, It = { class: "p-3 border-t border-gray-200" }, Pt = { class: "flex-1 overflow-hidden" }, zt = { class: "ml-auto flex gap-2" }, Ot = { class: "p-4" }, Lt = { 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" }, Et = { class: "p-4" }, Ut = { 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" }, At = /* @__PURE__ */ ee({
|
|
221
221
|
__name: "PrintTemplateEditorDialog",
|
|
222
222
|
props: {
|
|
223
223
|
modelValue: { type: Boolean }
|
|
224
224
|
},
|
|
225
225
|
emits: ["update:modelValue", "saved"],
|
|
226
|
-
setup(
|
|
227
|
-
const T =
|
|
226
|
+
setup(H, { emit: v }) {
|
|
227
|
+
const T = H, x = v, S = Ce(), m = Pe(), O = ye(), f = A({
|
|
228
228
|
get: () => T.modelValue,
|
|
229
|
-
set: (
|
|
230
|
-
}),
|
|
229
|
+
set: (n) => x("update:modelValue", n)
|
|
230
|
+
}), g = k(!1), c = k(!1), u = k(ae()), b = k(null), _ = k(se.Enum.purchaseOrder), h = k("Purchase Order Template"), a = k(null), $ = k(!1), d = k(!1), V = k("select-type"), W = [
|
|
231
231
|
{
|
|
232
232
|
label: "Purchase Order",
|
|
233
233
|
value: se.Enum.purchaseOrder,
|
|
@@ -252,25 +252,25 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
252
252
|
icon: "local_shipping",
|
|
253
253
|
description: "Customize the layout for delivery order printouts"
|
|
254
254
|
}
|
|
255
|
-
],
|
|
256
|
-
() =>
|
|
257
|
-
), U =
|
|
258
|
-
|
|
259
|
-
if (
|
|
260
|
-
|
|
255
|
+
], j = k(/* @__PURE__ */ new Set()), Q = A(
|
|
256
|
+
() => u.value.find((n) => n.id === b.value) ?? null
|
|
257
|
+
), U = k(null), N = k(null);
|
|
258
|
+
J(f, async (n) => {
|
|
259
|
+
if (n) {
|
|
260
|
+
V.value = "select-type", g.value = !0;
|
|
261
261
|
try {
|
|
262
|
-
const e = await
|
|
263
|
-
|
|
262
|
+
const e = await S.browse();
|
|
263
|
+
j.value = new Set(e.map((y) => y.type));
|
|
264
264
|
} catch {
|
|
265
265
|
} finally {
|
|
266
|
-
|
|
266
|
+
g.value = !1;
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
}),
|
|
270
|
-
|
|
269
|
+
}), J(_, async () => {
|
|
270
|
+
b.value = null, await le();
|
|
271
271
|
});
|
|
272
|
-
async function ne(
|
|
273
|
-
|
|
272
|
+
async function ne(n) {
|
|
273
|
+
_.value = n, await le(), V.value = "editor";
|
|
274
274
|
}
|
|
275
275
|
function te() {
|
|
276
276
|
return {
|
|
@@ -278,329 +278,329 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
278
278
|
transferOrder: "Transfer Order Template",
|
|
279
279
|
goodsReceivedNote: "Goods Received Note Template",
|
|
280
280
|
deliveryOrder: "Delivery Order Template"
|
|
281
|
-
}[
|
|
281
|
+
}[_.value] ?? "Purchase Order Template";
|
|
282
282
|
}
|
|
283
283
|
async function le() {
|
|
284
|
-
|
|
284
|
+
g.value = !0;
|
|
285
285
|
try {
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
const e =
|
|
289
|
-
e ? (a.value = e._id,
|
|
286
|
+
const n = await S.browse();
|
|
287
|
+
j.value = new Set(n.map((y) => y.type));
|
|
288
|
+
const e = n.find((y) => y.type === _.value);
|
|
289
|
+
e ? (a.value = e._id, h.value = e.name, u.value = e.blocks.map((y) => ({ ...y }))) : (a.value = null, u.value = ae(), h.value = te());
|
|
290
290
|
} catch {
|
|
291
|
-
|
|
291
|
+
u.value = ae(), h.value = te();
|
|
292
292
|
} finally {
|
|
293
|
-
|
|
293
|
+
g.value = !1;
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
function ce(
|
|
296
|
+
function ce(n) {
|
|
297
297
|
const e = {
|
|
298
298
|
id: Be(),
|
|
299
|
-
tag:
|
|
300
|
-
config:
|
|
299
|
+
tag: n,
|
|
300
|
+
config: De(n)
|
|
301
301
|
};
|
|
302
|
-
|
|
302
|
+
u.value.push(e), b.value = e.id;
|
|
303
303
|
}
|
|
304
|
-
function de(
|
|
305
|
-
const e =
|
|
306
|
-
e >= 0 && (
|
|
304
|
+
function de(n) {
|
|
305
|
+
const e = u.value.findIndex((y) => y.id === n);
|
|
306
|
+
e >= 0 && (u.value.splice(e, 1), b.value === n && (b.value = null));
|
|
307
307
|
}
|
|
308
|
-
function re(
|
|
309
|
-
const e =
|
|
308
|
+
function re(n) {
|
|
309
|
+
const e = u.value.find((y) => y.id === b.value);
|
|
310
310
|
if (e) {
|
|
311
|
-
const
|
|
312
|
-
e.config = { configFields:
|
|
311
|
+
const y = n.configFields || [], oe = be(e.tag);
|
|
312
|
+
e.config = { configFields: y, templateHtml: oe };
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
function pe(
|
|
316
|
-
U.value =
|
|
315
|
+
function pe(n) {
|
|
316
|
+
U.value = n;
|
|
317
317
|
}
|
|
318
|
-
function me(
|
|
319
|
-
|
|
318
|
+
function me(n, e) {
|
|
319
|
+
n.preventDefault(), N.value = e;
|
|
320
320
|
}
|
|
321
321
|
function ve() {
|
|
322
|
-
|
|
322
|
+
N.value = null;
|
|
323
323
|
}
|
|
324
|
-
function fe(
|
|
325
|
-
if (U.value === null || U.value ===
|
|
326
|
-
U.value = null,
|
|
324
|
+
function fe(n) {
|
|
325
|
+
if (U.value === null || U.value === n) {
|
|
326
|
+
U.value = null, N.value = null;
|
|
327
327
|
return;
|
|
328
328
|
}
|
|
329
|
-
const e =
|
|
330
|
-
|
|
329
|
+
const e = u.value.splice(U.value, 1)[0];
|
|
330
|
+
u.value.splice(n, 0, e), U.value = null, N.value = null;
|
|
331
331
|
}
|
|
332
332
|
function t() {
|
|
333
|
-
U.value = null,
|
|
333
|
+
U.value = null, N.value = null;
|
|
334
334
|
}
|
|
335
335
|
async function s() {
|
|
336
|
-
var
|
|
337
|
-
|
|
336
|
+
var n;
|
|
337
|
+
c.value = !0;
|
|
338
338
|
try {
|
|
339
|
-
const e = (
|
|
339
|
+
const e = (n = O.currentBusiness.value) == null ? void 0 : n._id;
|
|
340
340
|
if (!e)
|
|
341
341
|
throw new Error("Business ID is missing. Please select a business first.");
|
|
342
|
-
const
|
|
342
|
+
const y = u.value.map((i) => {
|
|
343
343
|
var ge;
|
|
344
|
-
const
|
|
344
|
+
const I = ((ge = i.config) == null ? void 0 : ge.configFields) || [], q = be(i.tag, I);
|
|
345
345
|
return {
|
|
346
|
-
...
|
|
347
|
-
config: { configFields:
|
|
346
|
+
...i,
|
|
347
|
+
config: { configFields: I, templateHtml: q }
|
|
348
348
|
};
|
|
349
|
-
}), oe = Ve(
|
|
350
|
-
name:
|
|
351
|
-
type:
|
|
349
|
+
}), oe = Ve(y), M = {
|
|
350
|
+
name: h.value,
|
|
351
|
+
type: _.value,
|
|
352
352
|
blocks: oe,
|
|
353
353
|
businessId: e,
|
|
354
354
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
355
355
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
356
356
|
};
|
|
357
357
|
let R;
|
|
358
|
-
a.value ? R = await
|
|
358
|
+
a.value ? R = await S.update(a.value, {
|
|
359
359
|
_id: a.value,
|
|
360
360
|
...M
|
|
361
|
-
}) : (R = await
|
|
361
|
+
}) : (R = await S.create(M), a.value = R._id), j.value.add(_.value), d.value = !1, m == null || m.open({
|
|
362
362
|
title: "Success",
|
|
363
363
|
message: "Print template saved",
|
|
364
364
|
type: "success"
|
|
365
|
-
}),
|
|
365
|
+
}), x("saved", R), f.value = !1;
|
|
366
366
|
} catch (e) {
|
|
367
|
-
|
|
367
|
+
m == null || m.open({
|
|
368
368
|
title: "Error",
|
|
369
369
|
message: (e == null ? void 0 : e.message) || "Failed to save template",
|
|
370
370
|
type: "error"
|
|
371
371
|
});
|
|
372
372
|
} finally {
|
|
373
|
-
|
|
373
|
+
c.value = !1;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
async function
|
|
376
|
+
async function D() {
|
|
377
377
|
if (a.value) {
|
|
378
|
-
|
|
378
|
+
c.value = !0;
|
|
379
379
|
try {
|
|
380
|
-
await
|
|
380
|
+
await S.delete(a.value), a.value = null, u.value = ae(), h.value = te(), j.value.delete(_.value), $.value = !1, m == null || m.open({
|
|
381
381
|
title: "Deleted",
|
|
382
382
|
message: "Print template deleted. Default layout will be used.",
|
|
383
383
|
type: "success"
|
|
384
|
-
}),
|
|
385
|
-
} catch (
|
|
386
|
-
|
|
384
|
+
}), x("saved", null), f.value = !1;
|
|
385
|
+
} catch (n) {
|
|
386
|
+
m == null || m.open({
|
|
387
387
|
title: "Error",
|
|
388
|
-
message: (
|
|
388
|
+
message: (n == null ? void 0 : n.message) || "Failed to delete template",
|
|
389
389
|
type: "error"
|
|
390
390
|
});
|
|
391
391
|
} finally {
|
|
392
|
-
|
|
392
|
+
c.value = !1;
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
function
|
|
397
|
-
|
|
396
|
+
function K() {
|
|
397
|
+
u.value = ae(), b.value = null;
|
|
398
398
|
}
|
|
399
|
-
function F(
|
|
399
|
+
function F(n) {
|
|
400
400
|
var e;
|
|
401
|
-
return ((e =
|
|
401
|
+
return ((e = G[n]) == null ? void 0 : e.label) ?? n;
|
|
402
402
|
}
|
|
403
|
-
function ie(
|
|
403
|
+
function ie(n) {
|
|
404
404
|
var e;
|
|
405
|
-
return ((e =
|
|
406
|
-
}
|
|
407
|
-
return (
|
|
408
|
-
const
|
|
409
|
-
return o(),
|
|
410
|
-
|
|
411
|
-
modelValue:
|
|
412
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
405
|
+
return ((e = G[n]) == null ? void 0 : e.icon) ?? "widgets";
|
|
406
|
+
}
|
|
407
|
+
return (n, e) => {
|
|
408
|
+
const y = L("FmIcon"), oe = L("FmTextField"), M = L("FmButton"), R = L("FmDialog");
|
|
409
|
+
return o(), r(E, null, [
|
|
410
|
+
p(R, {
|
|
411
|
+
modelValue: f.value,
|
|
412
|
+
"onUpdate:modelValue": e[4] || (e[4] = (i) => f.value = i),
|
|
413
413
|
overlay: !0,
|
|
414
414
|
"close-button": "",
|
|
415
415
|
"max-width": "98vw",
|
|
416
416
|
"max-height": "98vh"
|
|
417
417
|
}, he({
|
|
418
|
-
"dialog-header":
|
|
419
|
-
var
|
|
418
|
+
"dialog-header": P(() => {
|
|
419
|
+
var i;
|
|
420
420
|
return [
|
|
421
|
-
l("div",
|
|
422
|
-
|
|
421
|
+
l("div", nt, [
|
|
422
|
+
V.value === "editor" ? (o(), r("button", {
|
|
423
423
|
key: 0,
|
|
424
424
|
class: "flex items-center justify-center w-7 h-7 rounded hover:bg-gray-100 transition-colors text-gray-500",
|
|
425
|
-
onClick: e[0] || (e[0] = (
|
|
425
|
+
onClick: e[0] || (e[0] = (I) => V.value = "select-type")
|
|
426
426
|
}, [
|
|
427
|
-
|
|
427
|
+
p(y, {
|
|
428
428
|
name: "arrow_back",
|
|
429
429
|
size: "sm"
|
|
430
430
|
})
|
|
431
431
|
])) : Z("", !0),
|
|
432
|
-
|
|
432
|
+
V.value === "select-type" ? (o(), r("span", rt, "Print Template Editor")) : (o(), r("span", it, C((i = W.find((I) => I.value === _.value)) == null ? void 0 : i.label) + " Template", 1))
|
|
433
433
|
])
|
|
434
434
|
];
|
|
435
435
|
}),
|
|
436
|
-
default:
|
|
437
|
-
|
|
436
|
+
default: P(() => [
|
|
437
|
+
V.value === "select-type" ? (o(), r("div", ut, [
|
|
438
438
|
e[7] || (e[7] = l("p", { class: "text-sm text-gray-500 mb-5" }, " Select a template type to customize its print layout. ", -1)),
|
|
439
|
-
|
|
440
|
-
(o(),
|
|
441
|
-
key:
|
|
439
|
+
g.value ? (o(), r("div", ct, " Loading... ")) : (o(), r("div", dt, [
|
|
440
|
+
(o(), r(E, null, Y(W, (i) => l("div", {
|
|
441
|
+
key: i.value,
|
|
442
442
|
class: ue(["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", {
|
|
443
|
-
"border-blue-500 bg-blue-50/50 shadow-md":
|
|
443
|
+
"border-blue-500 bg-blue-50/50 shadow-md": _.value === i.value && V.value === "select-type"
|
|
444
444
|
}]),
|
|
445
|
-
onClick: (
|
|
445
|
+
onClick: (I) => ne(i.value)
|
|
446
446
|
}, [
|
|
447
|
-
l("div",
|
|
448
|
-
|
|
449
|
-
name:
|
|
447
|
+
l("div", mt, [
|
|
448
|
+
p(y, {
|
|
449
|
+
name: i.icon,
|
|
450
450
|
size: "sm"
|
|
451
451
|
}, null, 8, ["name"])
|
|
452
452
|
]),
|
|
453
|
-
l("div",
|
|
454
|
-
l("div",
|
|
455
|
-
l("div",
|
|
453
|
+
l("div", vt, [
|
|
454
|
+
l("div", ft, C(i.label), 1),
|
|
455
|
+
l("div", yt, C(i.description), 1)
|
|
456
456
|
]),
|
|
457
|
-
|
|
458
|
-
], 10,
|
|
457
|
+
j.value.has(i.value) ? (o(), r("span", gt, "Customized")) : (o(), r("span", bt, "Default"))
|
|
458
|
+
], 10, pt)), 64))
|
|
459
459
|
]))
|
|
460
|
-
])) :
|
|
460
|
+
])) : g.value ? (o(), r("div", _t, e[8] || (e[8] = [
|
|
461
461
|
l("div", null, "Loading template...", -1)
|
|
462
|
-
]))) : (o(),
|
|
463
|
-
l("div",
|
|
464
|
-
l("div",
|
|
465
|
-
|
|
466
|
-
modelValue:
|
|
467
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
462
|
+
]))) : (o(), r("div", xt, [
|
|
463
|
+
l("div", ht, [
|
|
464
|
+
l("div", kt, [
|
|
465
|
+
p(oe, {
|
|
466
|
+
modelValue: h.value,
|
|
467
|
+
"onUpdate:modelValue": e[1] || (e[1] = (i) => h.value = i),
|
|
468
468
|
placeholder: "Template name",
|
|
469
469
|
label: "Template Name"
|
|
470
470
|
}, null, 8, ["modelValue"])
|
|
471
471
|
]),
|
|
472
472
|
e[9] || (e[9] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2" }, " Add Blocks ", -1)),
|
|
473
|
-
l("div",
|
|
474
|
-
(o(!0),
|
|
475
|
-
key:
|
|
473
|
+
l("div", wt, [
|
|
474
|
+
(o(!0), r(E, null, Y(w(Oe).Values, (i) => (o(), r("div", {
|
|
475
|
+
key: i,
|
|
476
476
|
class: "group flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 transition-colors hover:bg-gray-100",
|
|
477
|
-
onClick: (
|
|
477
|
+
onClick: (I) => ce(i)
|
|
478
478
|
}, [
|
|
479
|
-
|
|
480
|
-
name:
|
|
479
|
+
p(y, {
|
|
480
|
+
name: w(G)[i].icon,
|
|
481
481
|
size: "sm"
|
|
482
482
|
}, null, 8, ["name"]),
|
|
483
|
-
l("span", null, C(
|
|
484
|
-
|
|
483
|
+
l("span", null, C(w(G)[i].label), 1),
|
|
484
|
+
p(y, {
|
|
485
485
|
name: "add",
|
|
486
486
|
size: "sm",
|
|
487
487
|
class: "ml-auto opacity-0 text-blue-600 group-hover:opacity-100"
|
|
488
488
|
})
|
|
489
|
-
], 8,
|
|
489
|
+
], 8, Ft))), 128))
|
|
490
490
|
]),
|
|
491
491
|
e[10] || (e[10] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 mt-2" }, " Block Order ", -1)),
|
|
492
|
-
l("div",
|
|
493
|
-
(o(!0),
|
|
494
|
-
key:
|
|
492
|
+
l("div", Tt, [
|
|
493
|
+
(o(!0), r(E, null, Y(u.value, (i, I) => (o(), r("div", {
|
|
494
|
+
key: i.id,
|
|
495
495
|
class: ue(["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", {
|
|
496
|
-
"bg-blue-50 border-l-[3px] border-l-blue-600":
|
|
497
|
-
"border-t-2 border-t-blue-600":
|
|
496
|
+
"bg-blue-50 border-l-[3px] border-l-blue-600": i.id === b.value,
|
|
497
|
+
"border-t-2 border-t-blue-600": N.value === I
|
|
498
498
|
}]),
|
|
499
499
|
draggable: "true",
|
|
500
|
-
onDragstart: (
|
|
501
|
-
onDragover: (
|
|
500
|
+
onDragstart: (q) => pe(I),
|
|
501
|
+
onDragover: (q) => me(q, I),
|
|
502
502
|
onDragleave: ve,
|
|
503
|
-
onDrop: (
|
|
503
|
+
onDrop: (q) => fe(I),
|
|
504
504
|
onDragend: t,
|
|
505
|
-
onClick: (
|
|
505
|
+
onClick: (q) => b.value = i.id
|
|
506
506
|
}, [
|
|
507
|
-
|
|
507
|
+
p(y, {
|
|
508
508
|
name: "drag_indicator",
|
|
509
509
|
size: "sm",
|
|
510
510
|
class: "cursor-grab text-gray-300"
|
|
511
511
|
}),
|
|
512
|
-
|
|
513
|
-
name: ie(
|
|
512
|
+
p(y, {
|
|
513
|
+
name: ie(i.tag),
|
|
514
514
|
size: "sm"
|
|
515
515
|
}, null, 8, ["name"]),
|
|
516
|
-
l("span",
|
|
516
|
+
l("span", $t, C(F(i.tag)), 1),
|
|
517
517
|
l("div", Ct, [
|
|
518
|
-
|
|
518
|
+
p(y, {
|
|
519
519
|
name: "delete",
|
|
520
520
|
size: "sm",
|
|
521
521
|
class: "cursor-pointer text-gray-400 hover:text-red-500",
|
|
522
|
-
onClick: ke((
|
|
522
|
+
onClick: ke((q) => de(i.id), ["stop"])
|
|
523
523
|
}, null, 8, ["onClick"])
|
|
524
524
|
])
|
|
525
|
-
], 42,
|
|
526
|
-
|
|
525
|
+
], 42, St))), 128)),
|
|
526
|
+
u.value.length === 0 ? (o(), r("div", Dt, " Click a block above to add it ")) : Z("", !0)
|
|
527
527
|
]),
|
|
528
|
-
Q.value ? (o(),
|
|
529
|
-
(o(),
|
|
528
|
+
Q.value ? (o(), r("div", Bt, [
|
|
529
|
+
(o(), z(lt, {
|
|
530
530
|
key: Q.value.id,
|
|
531
531
|
block: Q.value,
|
|
532
532
|
onUpdate: re
|
|
533
533
|
}, null, 8, ["block"]))
|
|
534
|
-
])) : (o(),
|
|
535
|
-
l("div",
|
|
536
|
-
|
|
534
|
+
])) : (o(), r("div", Vt, " Select a block to configure it ")),
|
|
535
|
+
l("div", It, [
|
|
536
|
+
p(M, {
|
|
537
537
|
label: "Reset to Default",
|
|
538
538
|
variant: "plain",
|
|
539
539
|
size: "md",
|
|
540
|
-
onClick:
|
|
540
|
+
onClick: K
|
|
541
541
|
})
|
|
542
542
|
])
|
|
543
543
|
]),
|
|
544
|
-
l("div",
|
|
545
|
-
|
|
546
|
-
blocks:
|
|
547
|
-
"selected-block-id":
|
|
548
|
-
"template-type":
|
|
544
|
+
l("div", Pt, [
|
|
545
|
+
p(st, {
|
|
546
|
+
blocks: u.value,
|
|
547
|
+
"selected-block-id": b.value,
|
|
548
|
+
"template-type": _.value
|
|
549
549
|
}, null, 8, ["blocks", "selected-block-id", "template-type"])
|
|
550
550
|
])
|
|
551
551
|
]))
|
|
552
552
|
]),
|
|
553
553
|
_: 2
|
|
554
554
|
}, [
|
|
555
|
-
|
|
555
|
+
V.value === "editor" ? {
|
|
556
556
|
name: "dialog-footer",
|
|
557
|
-
fn:
|
|
558
|
-
l("div",
|
|
559
|
-
a.value ? (o(),
|
|
557
|
+
fn: P(() => [
|
|
558
|
+
l("div", zt, [
|
|
559
|
+
a.value ? (o(), z(M, {
|
|
560
560
|
key: 0,
|
|
561
561
|
label: "Delete Template",
|
|
562
562
|
variant: "destructive",
|
|
563
563
|
size: "md",
|
|
564
|
-
onClick: e[2] || (e[2] = (
|
|
564
|
+
onClick: e[2] || (e[2] = (i) => $.value = !0)
|
|
565
565
|
})) : Z("", !0),
|
|
566
|
-
|
|
566
|
+
p(M, {
|
|
567
567
|
label: "Save Template",
|
|
568
568
|
variant: "primary",
|
|
569
569
|
size: "md",
|
|
570
|
-
onClick: e[3] || (e[3] = (
|
|
570
|
+
onClick: e[3] || (e[3] = (i) => d.value = !0)
|
|
571
571
|
})
|
|
572
572
|
])
|
|
573
573
|
]),
|
|
574
574
|
key: "0"
|
|
575
575
|
} : void 0
|
|
576
576
|
]), 1032, ["modelValue"]),
|
|
577
|
-
|
|
577
|
+
p(R, {
|
|
578
578
|
modelValue: d.value,
|
|
579
|
-
"onUpdate:modelValue": e[5] || (e[5] = (
|
|
579
|
+
"onUpdate:modelValue": e[5] || (e[5] = (i) => d.value = i),
|
|
580
580
|
overlay: !0,
|
|
581
581
|
dismissAway: !0,
|
|
582
582
|
"close-button": "",
|
|
583
583
|
"max-width": "400px"
|
|
584
584
|
}, {
|
|
585
|
-
"dialog-header":
|
|
585
|
+
"dialog-header": P(() => e[11] || (e[11] = [
|
|
586
586
|
l("span", null, "Save Print Template?", -1)
|
|
587
587
|
])),
|
|
588
|
-
"dialog-footer":
|
|
589
|
-
|
|
588
|
+
"dialog-footer": P(() => [
|
|
589
|
+
p(M, {
|
|
590
590
|
class: "ml-auto",
|
|
591
591
|
label: "Save",
|
|
592
592
|
variant: "primary",
|
|
593
593
|
size: "md",
|
|
594
|
-
loading:
|
|
594
|
+
loading: c.value,
|
|
595
595
|
onClick: s
|
|
596
596
|
}, null, 8, ["loading"])
|
|
597
597
|
]),
|
|
598
|
-
default:
|
|
599
|
-
l("div",
|
|
598
|
+
default: P(() => [
|
|
599
|
+
l("div", Ot, [
|
|
600
600
|
e[13] || (e[13] = l("p", null, "Are you sure you want to save this print template?", -1)),
|
|
601
601
|
e[14] || (e[14] = l("p", { class: "text-gray-500 text-sm mt-2" }, " This template will be used for all future prints of this type. ", -1)),
|
|
602
602
|
l("div", Lt, [
|
|
603
|
-
|
|
603
|
+
p(y, {
|
|
604
604
|
name: "warning",
|
|
605
605
|
size: "sm"
|
|
606
606
|
}),
|
|
@@ -610,33 +610,33 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
610
610
|
]),
|
|
611
611
|
_: 1
|
|
612
612
|
}, 8, ["modelValue"]),
|
|
613
|
-
|
|
614
|
-
modelValue:
|
|
615
|
-
"onUpdate:modelValue": e[6] || (e[6] = (
|
|
613
|
+
p(R, {
|
|
614
|
+
modelValue: $.value,
|
|
615
|
+
"onUpdate:modelValue": e[6] || (e[6] = (i) => $.value = i),
|
|
616
616
|
overlay: !0,
|
|
617
617
|
dismissAway: !0,
|
|
618
618
|
"close-button": "",
|
|
619
619
|
"max-width": "400px"
|
|
620
620
|
}, {
|
|
621
|
-
"dialog-header":
|
|
621
|
+
"dialog-header": P(() => e[15] || (e[15] = [
|
|
622
622
|
l("span", null, "Delete Print Template?", -1)
|
|
623
623
|
])),
|
|
624
|
-
"dialog-footer":
|
|
625
|
-
|
|
624
|
+
"dialog-footer": P(() => [
|
|
625
|
+
p(M, {
|
|
626
626
|
class: "ml-auto",
|
|
627
627
|
label: "Delete",
|
|
628
628
|
variant: "destructive",
|
|
629
629
|
size: "md",
|
|
630
|
-
loading:
|
|
631
|
-
onClick:
|
|
630
|
+
loading: c.value,
|
|
631
|
+
onClick: D
|
|
632
632
|
}, null, 8, ["loading"])
|
|
633
633
|
]),
|
|
634
|
-
default:
|
|
635
|
-
l("div",
|
|
634
|
+
default: P(() => [
|
|
635
|
+
l("div", Et, [
|
|
636
636
|
e[17] || (e[17] = l("p", null, "Are you sure you want to delete this print template?", -1)),
|
|
637
637
|
e[18] || (e[18] = l("p", { class: "text-gray-500 text-sm mt-2" }, " The default print layout will be used for all future prints. ", -1)),
|
|
638
|
-
l("div",
|
|
639
|
-
|
|
638
|
+
l("div", Ut, [
|
|
639
|
+
p(y, {
|
|
640
640
|
name: "warning",
|
|
641
641
|
size: "sm"
|
|
642
642
|
}),
|
|
@@ -649,65 +649,34 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
649
649
|
], 64);
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
|
-
}), Ht = { class: "flex flex-wrap items-center gap-8 border-b border-fm-color-neutral-gray-200 pb-16" },
|
|
652
|
+
}), Ht = { class: "flex flex-wrap items-center gap-8 border-b border-fm-color-neutral-gray-200 pb-16" }, Nt = {
|
|
653
653
|
key: 0,
|
|
654
|
-
class: "text-fm-color-typo-
|
|
655
|
-
},
|
|
654
|
+
class: "text-fm-color-typo-error"
|
|
655
|
+
}, Mt = {
|
|
656
656
|
key: 1,
|
|
657
657
|
class: "text-fm-color-typo-secondary"
|
|
658
|
-
},
|
|
659
|
-
key:
|
|
660
|
-
class: "text-fm-color-typo-error"
|
|
661
|
-
}, Kt = {
|
|
662
|
-
key: 4,
|
|
658
|
+
}, Rt = {
|
|
659
|
+
key: 3,
|
|
663
660
|
class: "fm-typo-en-body-md-600"
|
|
664
|
-
},
|
|
665
|
-
key: 5,
|
|
666
|
-
class: "text-fm-color-typo-secondary"
|
|
667
|
-
}, Gt = /* @__PURE__ */ ee({
|
|
661
|
+
}, jt = /* @__PURE__ */ ee({
|
|
668
662
|
__name: "PlanLicenseDisplay",
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
const n = (r = w.value) == null ? void 0 : r.doc;
|
|
676
|
-
return n ? n.id || n._id : void 0;
|
|
677
|
-
}), $ = _(null), v = _(!1), y = _(!1);
|
|
678
|
-
return j(
|
|
679
|
-
p,
|
|
680
|
-
async (n, r, g) => {
|
|
681
|
-
if ($.value = null, y.value = !1, !n) return;
|
|
682
|
-
let f = !1;
|
|
683
|
-
g(() => {
|
|
684
|
-
f = !0;
|
|
685
|
-
}), v.value = !0;
|
|
686
|
-
try {
|
|
687
|
-
const x = await k.getInventoryPlan(n);
|
|
688
|
-
f || ($.value = x);
|
|
689
|
-
} catch {
|
|
690
|
-
f || (y.value = !0);
|
|
691
|
-
} finally {
|
|
692
|
-
f || (v.value = !1);
|
|
693
|
-
}
|
|
694
|
-
},
|
|
695
|
-
{ immediate: !0 }
|
|
696
|
-
), (n, r) => (o(), i("div", Ht, [
|
|
697
|
-
r[0] || (r[0] = l("span", { class: "fm-typo-en-body-md-600" }, "Inventory plan", -1)),
|
|
698
|
-
w.value ? v.value ? (o(), i("span", Rt, "Loading…")) : y.value ? (o(), i("span", jt, "Could not load plan")) : $.value === "Premium" ? (o(), O(je, {
|
|
699
|
-
key: 3,
|
|
663
|
+
setup(H) {
|
|
664
|
+
const v = _e();
|
|
665
|
+
return (T, x) => (o(), r("div", Ht, [
|
|
666
|
+
x[0] || (x[0] = l("span", { class: "fm-typo-en-body-md-600" }, "Inventory plan", -1)),
|
|
667
|
+
w(v).loadState.status === "error" ? (o(), r("span", Nt, "Could not load plan")) : w(v).isLoaded ? w(v).premium ? (o(), z(Re, {
|
|
668
|
+
key: 2,
|
|
700
669
|
tier: "premium"
|
|
701
|
-
})) :
|
|
670
|
+
})) : (o(), r("span", Rt, "Standard")) : (o(), r("span", Mt, "Loading…"))
|
|
702
671
|
]));
|
|
703
672
|
}
|
|
704
|
-
}),
|
|
673
|
+
}), Kt = { class: "flex min-h-0 w-full flex-col gap-12" }, qt = { class: "flex w-full flex-wrap items-center gap-8" }, Gt = /* @__PURE__ */ ee({
|
|
705
674
|
__name: "FeatureFlagView",
|
|
706
|
-
setup(
|
|
707
|
-
const
|
|
675
|
+
setup(H) {
|
|
676
|
+
const v = _e(), T = Le(), x = ye(), S = Ue(), m = X.FmSwitch, O = X.FmTable, f = X.FmMenu, g = X.FmMenuDivider, c = X.FmMenuHeader, u = X.FmMenuItem, b = /* @__PURE__ */ new Set(), _ = {
|
|
708
677
|
inventory_pos_closing_v1: "Use v2: Closing Draft and Closing Template.",
|
|
709
678
|
inventory_pos_convert_v1: "Use Production Item instead."
|
|
710
|
-
},
|
|
679
|
+
}, h = k([]), a = k(null), $ = ["In use", "Deprecate Soon", "Deprecated"], d = k(null), V = k({}), W = k(!1), j = {
|
|
711
680
|
inventory_netsuite_inventory_transfer_out: ["netsuite"],
|
|
712
681
|
inventory_portal_accept_require_fulfillment: ["mobile"],
|
|
713
682
|
inventory_portal_must_use_transfer_template: ["mobile"],
|
|
@@ -723,64 +692,67 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
723
692
|
inventory_pos_stock_return: ["mobile"],
|
|
724
693
|
inventory_pos_transfer_require_fulfillment: ["mobile", "pos-v7", "pos-7.8"],
|
|
725
694
|
inventory_purchase_order_approval: ["mobile"]
|
|
726
|
-
}, Q =
|
|
727
|
-
() => Object.values(
|
|
728
|
-
const s =
|
|
695
|
+
}, Q = A(
|
|
696
|
+
() => Object.values(Ae).map((t) => {
|
|
697
|
+
const s = v.flags.find((D) => D.name === t);
|
|
729
698
|
return {
|
|
730
699
|
name: t,
|
|
731
700
|
enabled: (s == null ? void 0 : s.enabled) ?? null,
|
|
732
|
-
domains: ["portal", ...
|
|
733
|
-
features:
|
|
701
|
+
domains: ["portal", ...j[t] ?? []],
|
|
702
|
+
features: je(t)
|
|
734
703
|
};
|
|
735
704
|
})
|
|
736
|
-
), U =
|
|
705
|
+
), U = A(
|
|
737
706
|
() => [...new Set(Q.value.flatMap((t) => t.domains))].sort()
|
|
738
|
-
),
|
|
707
|
+
), N = A(
|
|
739
708
|
() => Q.value.filter(
|
|
740
|
-
(t) => (
|
|
709
|
+
(t) => (h.value.length === 0 || h.value.some((s) => t.domains.includes(s))) && (!a.value || re(t) === a.value)
|
|
741
710
|
)
|
|
742
711
|
);
|
|
743
712
|
function ne(t) {
|
|
744
|
-
|
|
713
|
+
h.value = h.value.includes(t) ? h.value.filter((s) => s !== t) : [...h.value, t];
|
|
745
714
|
}
|
|
746
715
|
function te() {
|
|
747
|
-
|
|
716
|
+
h.value = [], a.value = null;
|
|
748
717
|
}
|
|
749
718
|
function le(t) {
|
|
750
719
|
return t.domains.includes("mobile") || t.domains.some((s) => s.startsWith("pos-"));
|
|
751
720
|
}
|
|
752
721
|
function ce(t) {
|
|
753
|
-
return d.value && le(t) ?
|
|
722
|
+
return d.value && le(t) ? V.value[t.name] === !0 : t.enabled === !0;
|
|
754
723
|
}
|
|
755
724
|
async function de(t) {
|
|
756
725
|
if (!t) {
|
|
757
|
-
|
|
726
|
+
V.value = {};
|
|
758
727
|
return;
|
|
759
728
|
}
|
|
760
729
|
const s = t;
|
|
761
730
|
W.value = !0;
|
|
762
731
|
try {
|
|
763
|
-
const { flags:
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
732
|
+
const [{ flags: D }] = await Promise.all([
|
|
733
|
+
S.listForScope(s),
|
|
734
|
+
v.retryLoad()
|
|
735
|
+
]);
|
|
736
|
+
d.value === s && (V.value = Object.fromEntries(D.map((K) => [K.name, K.enabled])));
|
|
737
|
+
} catch (D) {
|
|
738
|
+
console.error("Unable to load feature flags for the selected scope", D), d.value === s && (V.value = {});
|
|
767
739
|
} finally {
|
|
768
740
|
d.value === s && (W.value = !1);
|
|
769
741
|
}
|
|
770
742
|
}
|
|
771
|
-
|
|
743
|
+
J(
|
|
772
744
|
() => {
|
|
773
745
|
var t;
|
|
774
|
-
return (t =
|
|
746
|
+
return (t = x.currentBusiness.value) != null && t._id ? `business_${x.currentBusiness.value._id}` : null;
|
|
775
747
|
},
|
|
776
748
|
(t) => {
|
|
777
749
|
var s;
|
|
778
750
|
d.value || (d.value = ((s = T._currentLocation) == null ? void 0 : s.dbName) ?? t);
|
|
779
751
|
},
|
|
780
752
|
{ immediate: !0 }
|
|
781
|
-
),
|
|
753
|
+
), J(d, de, { immediate: !0 });
|
|
782
754
|
function re(t) {
|
|
783
|
-
return
|
|
755
|
+
return b.has(t.name) ? "Deprecated" : _[t.name] ? "Deprecate Soon" : "In use";
|
|
784
756
|
}
|
|
785
757
|
function pe(t) {
|
|
786
758
|
return t === "Deprecated" ? "bg-red-50 text-red-700" : t === "Deprecate Soon" ? "bg-fm-color-state-warning-subtle text-fm-color-state-warning-base" : "bg-green-50 text-green-700";
|
|
@@ -789,17 +761,17 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
789
761
|
return t.features.length === 0 ? ["Controls the availability of this inventory feature."] : t.features.length === 1 ? [t.features[0].controls] : t.features.map((s) => `${s.label}: ${s.controls}`);
|
|
790
762
|
}
|
|
791
763
|
function ve(t) {
|
|
792
|
-
return
|
|
764
|
+
return b.has(t.name) ? "This flag is deprecated. Use its supported replacement for new work." : _[t.name];
|
|
793
765
|
}
|
|
794
|
-
const fe =
|
|
766
|
+
const fe = A(() => [
|
|
795
767
|
{
|
|
796
768
|
accessorKey: "name",
|
|
797
769
|
header: "Feature flag",
|
|
798
770
|
meta: { width: "27%" },
|
|
799
|
-
cell: ({ row: t }) =>
|
|
800
|
-
|
|
771
|
+
cell: ({ row: t }) => B("div", { class: "flex flex-wrap items-center gap-2" }, [
|
|
772
|
+
B("span", { class: "break-all font-mono text-xs text-gray-700" }, t.original.name),
|
|
801
773
|
...t.original.features.slice(0, 1).map(
|
|
802
|
-
(s) =>
|
|
774
|
+
(s) => B(He, {
|
|
803
775
|
tier: s.category === "premium" ? "premium" : "standard",
|
|
804
776
|
category: s.category,
|
|
805
777
|
deprecateSoon: s.deprecateSoon,
|
|
@@ -812,11 +784,11 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
812
784
|
id: "domains",
|
|
813
785
|
header: "Domains",
|
|
814
786
|
meta: { width: "19%" },
|
|
815
|
-
cell: ({ row: t }) =>
|
|
787
|
+
cell: ({ row: t }) => B(
|
|
816
788
|
"div",
|
|
817
789
|
{ class: "flex flex-wrap gap-2" },
|
|
818
790
|
t.original.domains.map(
|
|
819
|
-
(s) =>
|
|
791
|
+
(s) => B(
|
|
820
792
|
"span",
|
|
821
793
|
{
|
|
822
794
|
class: "rounded-full bg-fm-color-neutral-gray-100 px-2 py-0.5 text-xs font-medium text-fm-color-typo-secondary"
|
|
@@ -832,11 +804,11 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
832
804
|
meta: { width: "29%" },
|
|
833
805
|
cell: ({ row: t }) => {
|
|
834
806
|
const s = ve(t.original);
|
|
835
|
-
return
|
|
807
|
+
return B("div", { class: "flex flex-col gap-2 text-xs" }, [
|
|
836
808
|
...me(t.original).map(
|
|
837
|
-
(
|
|
809
|
+
(D) => B("span", { class: "text-fm-color-typo-secondary" }, D)
|
|
838
810
|
),
|
|
839
|
-
...s ? [
|
|
811
|
+
...s ? [B("span", { class: "text-fm-color-state-warning-base" }, s)] : []
|
|
840
812
|
]);
|
|
841
813
|
}
|
|
842
814
|
},
|
|
@@ -846,7 +818,7 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
846
818
|
meta: { width: "13%" },
|
|
847
819
|
cell: ({ row: t }) => {
|
|
848
820
|
const s = re(t.original);
|
|
849
|
-
return s === "Deprecate Soon" ?
|
|
821
|
+
return s === "Deprecate Soon" ? B(Ne) : B(
|
|
850
822
|
"span",
|
|
851
823
|
{
|
|
852
824
|
class: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${pe(s)}`
|
|
@@ -861,63 +833,63 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
861
833
|
meta: { width: "12%" },
|
|
862
834
|
cell: ({ row: t }) => {
|
|
863
835
|
const s = !!d.value && le(t.original);
|
|
864
|
-
return
|
|
865
|
-
|
|
866
|
-
...s && W.value ? [
|
|
867
|
-
...t.original.features.some((
|
|
836
|
+
return B("div", { class: "flex flex-col items-end gap-2" }, [
|
|
837
|
+
B(m, { modelValue: ce(t.original), disabled: !0, showIcon: !0 }),
|
|
838
|
+
...s && W.value ? [B("span", { class: "text-xs text-gray-500" }, "Loading location value…")] : [],
|
|
839
|
+
...t.original.features.some((D) => D.category === "premium") && t.original.enabled !== !0 && !s ? [B("span", { class: "text-xs text-gray-500" }, "Controlled by the Premium plan")] : []
|
|
868
840
|
]);
|
|
869
841
|
}
|
|
870
842
|
}
|
|
871
843
|
]);
|
|
872
844
|
return (t, s) => {
|
|
873
|
-
const
|
|
874
|
-
return o(),
|
|
875
|
-
|
|
876
|
-
l("div",
|
|
877
|
-
|
|
845
|
+
const D = L("FmChip"), K = L("FmButton");
|
|
846
|
+
return o(), r("div", Kt, [
|
|
847
|
+
p(jt),
|
|
848
|
+
l("div", qt, [
|
|
849
|
+
p(Me, {
|
|
878
850
|
"model-value": d.value,
|
|
879
851
|
"onUpdate:modelValue": s[0] || (s[0] = (F) => d.value = F),
|
|
880
852
|
"selection-only": "",
|
|
881
853
|
"show-business": ""
|
|
882
854
|
}, null, 8, ["model-value"]),
|
|
883
|
-
(o(!0),
|
|
855
|
+
(o(!0), r(E, null, Y(h.value, (F) => (o(), z(D, {
|
|
884
856
|
key: F,
|
|
885
857
|
label: `domain in ${F}`,
|
|
886
858
|
removable: "",
|
|
887
859
|
onChipClosed: (ie) => ne(F)
|
|
888
860
|
}, null, 8, ["label", "onChipClosed"]))), 128)),
|
|
889
|
-
a.value ? (o(),
|
|
861
|
+
a.value ? (o(), z(D, {
|
|
890
862
|
key: 0,
|
|
891
863
|
label: `status in ${a.value}`,
|
|
892
864
|
removable: "",
|
|
893
865
|
onChipClosed: s[1] || (s[1] = (F) => a.value = null)
|
|
894
866
|
}, null, 8, ["label"])) : Z("", !0),
|
|
895
|
-
|
|
867
|
+
p(w(f), {
|
|
896
868
|
"close-on-click": !1,
|
|
897
869
|
width: 288,
|
|
898
870
|
"max-height": 420,
|
|
899
871
|
placement: "bottom-start"
|
|
900
872
|
}, {
|
|
901
|
-
"menu-button":
|
|
902
|
-
|
|
873
|
+
"menu-button": P(() => [
|
|
874
|
+
p(K, {
|
|
903
875
|
label: "Filter",
|
|
904
876
|
"prepend-icon": "add",
|
|
905
877
|
variant: "secondary"
|
|
906
878
|
})
|
|
907
879
|
]),
|
|
908
|
-
default:
|
|
909
|
-
|
|
910
|
-
(o(!0),
|
|
880
|
+
default: P(() => [
|
|
881
|
+
p(w(c), { label: "Domains" }),
|
|
882
|
+
(o(!0), r(E, null, Y(U.value, (F) => (o(), z(w(u), {
|
|
911
883
|
key: F,
|
|
912
884
|
label: F,
|
|
913
885
|
selectable: "",
|
|
914
886
|
"has-checkbox": "",
|
|
915
|
-
"model-value":
|
|
887
|
+
"model-value": h.value.includes(F),
|
|
916
888
|
onClick: (ie) => ne(F)
|
|
917
889
|
}, null, 8, ["label", "model-value", "onClick"]))), 128)),
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
(o(),
|
|
890
|
+
p(w(g)),
|
|
891
|
+
p(w(c), { label: "Status" }),
|
|
892
|
+
(o(), r(E, null, Y($, (F) => p(w(u), {
|
|
921
893
|
key: F,
|
|
922
894
|
label: F,
|
|
923
895
|
selectable: "",
|
|
@@ -928,16 +900,16 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
928
900
|
]),
|
|
929
901
|
_: 1
|
|
930
902
|
}),
|
|
931
|
-
|
|
903
|
+
h.value.length || a.value ? (o(), z(K, {
|
|
932
904
|
key: 1,
|
|
933
905
|
label: "Clear all",
|
|
934
906
|
variant: "tertiary",
|
|
935
907
|
onClick: te
|
|
936
908
|
})) : Z("", !0)
|
|
937
909
|
]),
|
|
938
|
-
|
|
910
|
+
p(w(O), {
|
|
939
911
|
"column-defs": fe.value,
|
|
940
|
-
"row-data":
|
|
912
|
+
"row-data": N.value,
|
|
941
913
|
"page-size": 50,
|
|
942
914
|
"hide-footer": "",
|
|
943
915
|
"shrink-at": !1
|
|
@@ -945,81 +917,81 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
945
917
|
]);
|
|
946
918
|
};
|
|
947
919
|
}
|
|
948
|
-
}),
|
|
920
|
+
}), Yt = { class: "flex w-full flex-col gap-16 p-16" }, Jt = {
|
|
949
921
|
key: 0,
|
|
950
922
|
class: "py-32 text-center"
|
|
951
|
-
},
|
|
923
|
+
}, Wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qt = {
|
|
952
924
|
class: "flex gap-2 border-b border-gray-200",
|
|
953
925
|
role: "tablist"
|
|
954
|
-
},
|
|
926
|
+
}, Xt = ["aria-selected"], Zt = ["aria-selected"], el = { key: 0 }, tl = { class: "flex items-center justify-between gap-12" }, ll = { class: "fm-typo-en-heading-sm-600 text-fm-color-typo-primary" }, ol = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, al = {
|
|
955
927
|
key: 1,
|
|
956
928
|
class: "w-full"
|
|
957
|
-
},
|
|
929
|
+
}, sl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _l = /* @__PURE__ */ ee({
|
|
958
930
|
__name: "SettingsView",
|
|
959
|
-
setup(
|
|
960
|
-
const { t:
|
|
961
|
-
var
|
|
962
|
-
return ((
|
|
931
|
+
setup(H) {
|
|
932
|
+
const { t: v } = Ee(), T = ye(), x = Ie(), S = k(!1), m = k("order"), O = A(() => {
|
|
933
|
+
var c, u;
|
|
934
|
+
return ((u = (c = T.sessionUser.value) == null ? void 0 : c.role) == null ? void 0 : u.isAdmin) === !0;
|
|
963
935
|
});
|
|
964
|
-
function
|
|
965
|
-
|
|
936
|
+
function f() {
|
|
937
|
+
x.invalidate(), x.fetchTemplates();
|
|
966
938
|
}
|
|
967
|
-
function
|
|
968
|
-
|
|
939
|
+
function g() {
|
|
940
|
+
x.fetchTemplates(), S.value = !0;
|
|
969
941
|
}
|
|
970
|
-
return (
|
|
971
|
-
const
|
|
972
|
-
return o(),
|
|
973
|
-
title:
|
|
942
|
+
return (c, u) => {
|
|
943
|
+
const b = L("FmButton");
|
|
944
|
+
return o(), z(Fe, {
|
|
945
|
+
title: w(v)("inventory.settings.title")
|
|
974
946
|
}, {
|
|
975
|
-
default:
|
|
976
|
-
l("div",
|
|
977
|
-
|
|
978
|
-
l("div",
|
|
947
|
+
default: P(() => [
|
|
948
|
+
l("div", Yt, [
|
|
949
|
+
O.value ? (o(), r(E, { key: 1 }, [
|
|
950
|
+
l("div", Qt, [
|
|
979
951
|
l("button", {
|
|
980
952
|
type: "button",
|
|
981
953
|
role: "tab",
|
|
982
|
-
"aria-selected":
|
|
954
|
+
"aria-selected": m.value === "order",
|
|
983
955
|
class: ue([
|
|
984
956
|
"border-b-2 px-3 py-2 text-sm font-medium",
|
|
985
|
-
|
|
957
|
+
m.value === "order" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
|
|
986
958
|
]),
|
|
987
|
-
onClick:
|
|
988
|
-
}, C(
|
|
959
|
+
onClick: u[0] || (u[0] = (_) => m.value = "order")
|
|
960
|
+
}, C(w(v)("inventory.settings.order.title")), 11, Xt),
|
|
989
961
|
l("button", {
|
|
990
962
|
type: "button",
|
|
991
963
|
role: "tab",
|
|
992
|
-
"aria-selected":
|
|
964
|
+
"aria-selected": m.value === "features",
|
|
993
965
|
class: ue([
|
|
994
966
|
"border-b-2 px-3 py-2 text-sm font-medium",
|
|
995
|
-
|
|
967
|
+
m.value === "features" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
|
|
996
968
|
]),
|
|
997
|
-
onClick:
|
|
998
|
-
}, C(
|
|
969
|
+
onClick: u[1] || (u[1] = (_) => m.value = "features")
|
|
970
|
+
}, C(w(v)("inventory.settings.features.title")), 11, Zt)
|
|
999
971
|
]),
|
|
1000
|
-
|
|
1001
|
-
l("div",
|
|
1002
|
-
l("h2",
|
|
1003
|
-
|
|
1004
|
-
onClick:
|
|
972
|
+
m.value === "order" ? (o(), r("div", el, [
|
|
973
|
+
l("div", tl, [
|
|
974
|
+
l("h2", ll, C(w(v)("inventory.settings.order.printTemplates")), 1),
|
|
975
|
+
p(b, {
|
|
976
|
+
onClick: g,
|
|
1005
977
|
variant: "secondary",
|
|
1006
|
-
label:
|
|
978
|
+
label: w(v)("inventory.settings.printTemplate.edit")
|
|
1007
979
|
}, null, 8, ["label"])
|
|
1008
980
|
]),
|
|
1009
|
-
l("p",
|
|
1010
|
-
])) : (o(),
|
|
1011
|
-
l("p",
|
|
1012
|
-
|
|
981
|
+
l("p", ol, C(w(v)("inventory.settings.printTemplate.description")), 1)
|
|
982
|
+
])) : (o(), r("div", al, [
|
|
983
|
+
l("p", sl, C(w(v)("inventory.settings.features.description")), 1),
|
|
984
|
+
p(Gt)
|
|
1013
985
|
]))
|
|
1014
|
-
], 64)) : (o(),
|
|
1015
|
-
l("p",
|
|
986
|
+
], 64)) : (o(), r("div", Jt, [
|
|
987
|
+
l("p", Wt, C(w(v)("inventory.settings.adminOnly")), 1)
|
|
1016
988
|
]))
|
|
1017
989
|
]),
|
|
1018
|
-
(o(),
|
|
1019
|
-
|
|
1020
|
-
modelValue:
|
|
1021
|
-
"onUpdate:modelValue":
|
|
1022
|
-
onSaved:
|
|
990
|
+
(o(), z(we, { to: "body" }, [
|
|
991
|
+
p(At, {
|
|
992
|
+
modelValue: S.value,
|
|
993
|
+
"onUpdate:modelValue": u[2] || (u[2] = (_) => S.value = _),
|
|
994
|
+
onSaved: f
|
|
1023
995
|
}, null, 8, ["modelValue"])
|
|
1024
996
|
]))
|
|
1025
997
|
]),
|
|
@@ -1029,5 +1001,5 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
|
|
|
1029
1001
|
}
|
|
1030
1002
|
});
|
|
1031
1003
|
export {
|
|
1032
|
-
|
|
1004
|
+
_l as default
|
|
1033
1005
|
};
|