@feedmepos/mf-inventory-portal 1.8.0-dev.3 → 1.8.0-dev.5
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-DEbWEOwe.js +1537 -0
- package/dist/{ApprovalView-hV1msz5Y.js → ApprovalView-BEnYHIlU.js} +9 -9
- package/dist/{BindingsDialog-BX1Lopf0.js → BindingsDialog-CJVkMoBS.js} +2 -2
- package/dist/{BindingsPicker-BNKW8-XY.js → BindingsPicker-CX9o-xdQ.js} +2 -2
- package/dist/{BindingsTable-DiLDsL83.js → BindingsTable-Cil4LJ7l.js} +4 -4
- package/dist/{BulkReceiveRequestView-oQh6kFLc.js → BulkReceiveRequestView-DYEc2jPw.js} +21 -22
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BaMcGU-x.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DoAv2mHA.js} +1 -1
- package/dist/{ClosingDraftView-sgLoaSf4.js → ClosingDraftView-Bz94Iejf.js} +20 -20
- package/dist/{ClosingHistoryView-BnE9HrzA.js → ClosingHistoryView-B479Y-mH.js} +5 -5
- package/dist/{ClosingTemplateView-BD3Pa11r.js → ClosingTemplateView-F_nx43n6.js} +18 -18
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DlbyxkMQ.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DddYGHxQ.js} +1 -1
- package/dist/{DefaultView-CuzvVkfE.js → DefaultView-CkZOl0ov.js} +5 -5
- package/dist/{DeliveryOrderPrintPreview-w-1aAOY1.js → DeliveryOrderPrintPreview-BJEpwAX6.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-CxD12Qct.js → EmailDialog.vue_vue_type_script_setup_true_lang-BW988AoC.js} +29 -30
- package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CMoQKl_a.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-Izn-hTjK.js} +107 -118
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BqCh_vTP.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CoUWxHlj.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CAXnmdUy.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Ci81xTbl.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-NhOdW33O.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CnaHTAUZ.js} +2 -2
- package/dist/{FmMultiselectDialog-CULwA_hi.js → FmMultiselectDialog-BE8BlO6_.js} +2 -2
- package/dist/FmMultiselectDialog-COKgBmPZ.js +123 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CI3Y9kDl.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BQHd3NjM.js} +6 -6
- package/dist/ImportView-Crb_yrNb.js +1291 -0
- package/dist/{IngredientsView-pzpP6oXT.js → IngredientsView-lDypeR4c.js} +34 -35
- package/dist/{IntegrationExplorerView-C5aAhB6e.js → IntegrationExplorerView-DgOFGj7H.js} +4 -4
- package/dist/{IntegrationView-Bqun7nX0.js → IntegrationView-0sbjINo5.js} +973 -974
- package/dist/{InventoryBindingForm-r_Ua1C4a.js → InventoryBindingForm-BhyrjIXJ.js} +1 -1
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-KCz_BQ6T.js +472 -0
- package/dist/{InventoryBindingSummary-BQuZLohR.js → InventoryBindingSummary-CsfNKd1r.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-7r-QcJdU.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C32OoIBz.js} +1 -1
- package/dist/{ProductionRunDetailView-95fu_CfH.js → ProductionRunDetailView-BxbDtGMo.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CdOca1tV.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BdJVvwSP.js} +9 -9
- package/dist/{ProductionRunView-DIjor_Ix.js → ProductionRunView-CJhNEIzT.js} +3 -3
- package/dist/{PublishView-DYObyHQq.js → PublishView-vkt6-D6P.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-C0jCmI9L.js → PurchaseOrderPrintPreview-25dHfVKp.js} +2 -2
- package/dist/{ReceiveRequestView-i7ibPfIE.js → ReceiveRequestView-BO4Z2dZu.js} +15 -16
- package/dist/RecipeView-B_AE7QQv.js +3428 -0
- package/dist/{SettingsView-CdBloj9k.js → SettingsView-qTUvQCuu.js} +163 -168
- package/dist/{StockView-g_6eJ62R.js → StockView-yh6qkYUS.js} +269 -270
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-C1rKc7MA.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Cn_fx9qG.js} +1 -1
- package/dist/{SupplierView-DkYp_Frj.js → SupplierView-Dqzu1Bvh.js} +14 -14
- package/dist/{SurchargeView-CfkV4Y3y.js → SurchargeView-CDosn36c.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-2MtN1p5t.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DZ3Gdlp9.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CYMjKXq4.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CWoh2FqQ.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D0zNr_vQ.js → TransferDetails.vue_vue_type_script_setup_true_lang-BtjKnIwf.js} +867 -844
- package/dist/{TransferTemplateView-Ne2gYUSn.js → TransferTemplateView-fDZcC9i4.js} +22 -23
- package/dist/{UnitCostHistoryView-Db0_otOb.js → UnitCostHistoryView-CmTTIXAp.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BzO1lq7j.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DZihCM0T.js} +4 -4
- package/dist/{UnitView-CiCeQ63i.js → UnitView-BTx59sFK.js} +8 -8
- package/dist/{WarehouseView-BcuJSOMF.js → WarehouseView-BIFe08FJ.js} +8 -8
- package/dist/{WastageTemplateView-CPQmtOKQ.js → WastageTemplateView-B_oJqm0_.js} +15 -15
- package/dist/api/feature-flags.d.ts +2 -0
- package/dist/api/license.d.ts +0 -2
- package/dist/{app-DqJp3dcI.js → app-DyEvx3Em.js} +1628 -1817
- package/dist/app.d.ts +0 -150
- package/dist/app.js +1 -1
- package/dist/{closing-template-BNlgZviN.js → closing-template-FgcLy4RT.js} +1 -1
- package/dist/components/FeatureCapabilityBadge.vue.d.ts +1 -1
- package/dist/{date2-Ci7521dn.js → date2-Rv4IwT9a.js} +1 -1
- package/dist/{dayjs.min-Cyp32v4J.js → dayjs.min-DOq1QM_M.js} +1 -1
- package/dist/{decimal-BGdm5R3A.js → decimal-7vA05AaD.js} +2 -2
- package/dist/{defineDeepModel-B2cJ-rtd.js → defineDeepModel-22Md2SKY.js} +1 -1
- package/dist/{duplicate-template-By5WeKZ0.js → duplicate-template-D2tjCY7C.js} +1 -1
- package/dist/{core-Js7d-3Pv.js → feature-BMTKl6PK.js} +732 -389
- package/dist/feature-flags/core.d.ts +3 -2
- package/dist/feature-flags/portal-feature-catalog.d.ts +0 -5
- package/dist/feature-flags/vue.d.ts +2 -0
- package/dist/{format-time-from-id-Q8C2P96H.js → format-time-from-id-DXhm_Ji1.js} +1 -1
- package/dist/{format-unit-display-CICrmm8r.js → format-unit-display-DxWLjFPz.js} +13 -13
- package/dist/helper/menu-usage-module.d.ts +1 -1
- package/dist/{id-to-date-DeN5x0LR.js → id-to-date-VKlOL3mN.js} +1 -1
- package/dist/{import-export.helper-BOTQWxr6.js → import-export.helper-BiF5aKUp.js} +28 -28
- package/dist/{index-BbbqCCfp.js → index-DEl_gZn0.js} +3 -3
- package/dist/{index-tCYhLCKP.js → index-DdtsVAcv.js} +1 -1
- package/dist/{index-Cxm3Sgfv.js → index-DoBWE4Ci.js} +1 -1
- package/dist/{lz-string-Dy4Pg8mh.js → lz-string-BwQj8QRN.js} +1 -1
- package/dist/{netsuite-BaJjkDM8.js → netsuite-s1S33-lP.js} +2 -2
- package/dist/{number-CB36d2PQ.js → number-BmKjsNrc.js} +3 -3
- package/dist/{predefined-templates-DLm93Bpx.js → predefined-templates-BZ2KqNix.js} +1 -1
- package/dist/{purchase-order-template-CDhn9ZIF.js → purchase-order-template-CINU4my1.js} +1 -1
- package/dist/{recalculationUtils-Cqvefakh.js → recalculationUtils-R5tFu_ts.js} +1 -1
- package/dist/router/name.d.ts +0 -1
- package/dist/{row-action.enum-NTfVmGY8.js → row-action.enum-ePO-Py0V.js} +1 -1
- package/dist/{rules-C8dfM84-.js → rules-BZrZVzw7.js} +2 -2
- package/dist/{stock-BGB0Siue.js → stock-C2HOKq0k.js} +8 -8
- package/dist/{stock-Qu5IiN2_.js → stock-Ce1UvAZ3.js} +1 -1
- package/dist/stores/feature.d.ts +10 -9
- package/dist/stores/inventory.d.ts +0 -47
- package/dist/stores/supplier.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-CZdNOSMN.js → supplier-DgT66emI.js} +17 -17
- package/dist/{surcharge-Cm40oJvU.js → surcharge-CsVMuzPM.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-L-IW4Nwk.js → uom-rules-CR1XukyM.js} +1 -1
- package/dist/{use-ingredient-select-dialog-B2TDVJM6.js → use-ingredient-select-dialog-CJkG4hEX.js} +2 -2
- package/dist/use-inventory-binding-dialog-B36kPj4V.js +113 -0
- package/dist/{use-template-enabled-locations-DYAPMvo9.js → use-template-enabled-locations-Boa9QLPV.js} +2 -2
- package/dist/{use-transfer-locations-w-9tymYS.js → use-transfer-locations-BxOygSUg.js} +2 -2
- package/dist/{useHrmPermission-BFCIo5sA.js → useHrmPermission-DLHAqbLV.js} +1 -1
- package/dist/{useNavigationMenu-BPHAH5sJ.js → useNavigationMenu-D6abZMGz.js} +102 -109
- package/dist/{useSseClient-CWjRacRs.js → useSseClient-C7pff-EW.js} +1 -1
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -1
- package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +1 -1
- package/dist/views/integration/components/IntegrationCard.vue.d.ts +3 -3
- package/dist/views/recipe/helper/bulk-edit-simulation.helper.d.ts +0 -1
- package/dist/views/recipe/helper/import-recipe.d.ts +2 -2
- package/dist/{vue-i18n-S4YQ9w6a.js → vue-i18n-CpOOFhVU.js} +219 -219
- package/dist/{xlsx.util-CP8_VajN.js → xlsx.util-xwI5tVz6.js} +2 -2
- package/package.json +5 -5
- package/dist/App-DRXADP0k.js +0 -1498
- package/dist/DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-Bp8bjDU1.js +0 -58
- package/dist/FmMultiselectDialog-BqZgHP8s.js +0 -77
- package/dist/ImportView-DqQG673_.js +0 -1302
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-DfvNUu80.js +0 -51
- package/dist/IngredientGroupView-CyngKxPo.js +0 -1000
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CYDuu4kU.js +0 -563
- package/dist/RecipeView-C5VO7yr3.js +0 -3625
- package/dist/feature-fG7d73oi.js +0 -371
- package/dist/index-Dqf27vLH.js +0 -841
- package/dist/random-CSbEbElR.js +0 -10
- package/dist/use-inventory-binding-dialog-BJ00hl5f.js +0 -152
- package/dist/usePromise-CbVUCxhj.js +0 -29
- package/dist/views/ingredient-group/IngredientGroupView.vue.d.ts +0 -3
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +0 -31
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +0 -10
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -21
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +0 -12
- package/dist/views/ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +0 -37
- package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +0 -24
- package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +0 -31
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +0 -77
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { defineComponent as oe, ref as
|
|
1
|
+
import { defineComponent as oe, ref as h, computed as H, watch as W, resolveComponent as E, createElementBlock as c, openBlock as o, createElementVNode as l, toDisplayString as D, Fragment as U, renderList as Y, createBlock as O, createCommentVNode as X, createVNode as m, nextTick as _e, createSlots as xe, withCtx as z, normalizeClass as ie, unref as T, withModifiers as he, h as $, Teleport as ke } from "vue";
|
|
2
2
|
import { _ as we } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
|
|
3
|
-
import { B as G, g as Fe, r as Te, s as Se, u as Ce, a as te, b as De, c as $e, d as ye, e as Be, f as Ve } from "./predefined-templates-
|
|
3
|
+
import { B as G, g as Fe, r as Te, s as Se, u as Ce, a as te, b as De, c as $e, d as ye, e as Be, f as Ve } from "./predefined-templates-BZ2KqNix.js";
|
|
4
4
|
import { useSnackbar as Ie, components as Q } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import { H as le, I as Oe
|
|
7
|
-
import { useCoreStore as fe, useI18n as
|
|
8
|
-
import "./dayjs.min-
|
|
9
|
-
import { I as Ue } from "./
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { _ as Me } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BaMcGU-x.js";
|
|
6
|
+
import { H as le, I as Oe } from "./app-DyEvx3Em.js";
|
|
7
|
+
import { useCoreStore as fe, useI18n as Pe } from "@feedmepos/mf-common";
|
|
8
|
+
import "./dayjs.min-DOq1QM_M.js";
|
|
9
|
+
import { a as Ee, I as Ue, u as Ae } from "./feature-BMTKl6PK.js";
|
|
10
|
+
import { b as Le, a as He, D as Ne } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-Izn-hTjK.js";
|
|
11
|
+
import { _ as Me } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DoAv2mHA.js";
|
|
13
12
|
const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700 mb-4 pb-2 border-b border-gray-200" }, Ke = { class: "flex flex-col gap-3" }, qe = {
|
|
14
13
|
key: 0,
|
|
15
14
|
class: "flex items-center justify-between py-1"
|
|
@@ -22,40 +21,40 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
22
21
|
block: {}
|
|
23
22
|
},
|
|
24
23
|
emits: ["update"],
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
24
|
+
setup(j, { emit: k }) {
|
|
25
|
+
const S = j, F = k;
|
|
27
26
|
function C(u) {
|
|
28
|
-
var
|
|
29
|
-
if ((
|
|
30
|
-
const d = u.config.configFields.map((v) => ({ ...v })),
|
|
27
|
+
var _;
|
|
28
|
+
if ((_ = u.config) != null && _.configFields && Array.isArray(u.config.configFields)) {
|
|
29
|
+
const d = u.config.configFields.map((v) => ({ ...v })), x = new Set(d.map((v) => v.key)), a = G[u.tag], b = a ? a.initialConfigFields().filter((v) => !x.has(v.key)) : [];
|
|
31
30
|
return [...d, ...b];
|
|
32
31
|
}
|
|
33
32
|
const i = G[u.tag];
|
|
34
33
|
return i ? i.initialConfigFields() : [];
|
|
35
34
|
}
|
|
36
|
-
const p =
|
|
37
|
-
const u = G[
|
|
38
|
-
return (u == null ? void 0 : u.label) ??
|
|
35
|
+
const p = h(C(S.block)), P = H(() => {
|
|
36
|
+
const u = G[S.block.tag];
|
|
37
|
+
return (u == null ? void 0 : u.label) ?? S.block.tag;
|
|
39
38
|
});
|
|
40
39
|
W(
|
|
41
|
-
() =>
|
|
40
|
+
() => S.block,
|
|
42
41
|
(u) => {
|
|
43
42
|
p.value = C(u);
|
|
44
43
|
},
|
|
45
44
|
{ deep: !0 }
|
|
46
45
|
);
|
|
47
46
|
function f(u, i) {
|
|
48
|
-
const
|
|
49
|
-
|
|
47
|
+
const _ = p.value[u];
|
|
48
|
+
_ && (_.value = i, y());
|
|
50
49
|
}
|
|
51
50
|
function y() {
|
|
52
|
-
|
|
53
|
-
...
|
|
51
|
+
F("update", {
|
|
52
|
+
...S.block.config || {},
|
|
54
53
|
configFields: p.value.map((u) => ({ ...u }))
|
|
55
54
|
});
|
|
56
55
|
}
|
|
57
56
|
return (u, i) => {
|
|
58
|
-
const
|
|
57
|
+
const _ = E("FmSwitch"), d = E("FmTextField"), x = E("FmSelect");
|
|
59
58
|
return o(), c("div", Re, [
|
|
60
59
|
l("div", je, D(P.value) + " Settings ", 1),
|
|
61
60
|
l("div", Ke, [
|
|
@@ -64,7 +63,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
64
63
|
}, [
|
|
65
64
|
a.type === "toggle" ? (o(), c("div", qe, [
|
|
66
65
|
l("label", Ge, D(a.label), 1),
|
|
67
|
-
m(
|
|
66
|
+
m(_, {
|
|
68
67
|
"model-value": a.value,
|
|
69
68
|
"onUpdate:modelValue": (v) => f(b, v)
|
|
70
69
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
@@ -83,7 +82,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
83
82
|
placeholder: a.placeholder,
|
|
84
83
|
onInput: (v) => f(b, v.target.value)
|
|
85
84
|
}, null, 40, We)
|
|
86
|
-
], 64)) : a.type === "select" ? (o(), O(
|
|
85
|
+
], 64)) : a.type === "select" ? (o(), O(x, {
|
|
87
86
|
key: 3,
|
|
88
87
|
label: a.label,
|
|
89
88
|
"model-value": a.value,
|
|
@@ -119,20 +118,20 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
119
118
|
selectedBlockId: {},
|
|
120
119
|
templateType: {}
|
|
121
120
|
},
|
|
122
|
-
setup(
|
|
123
|
-
const
|
|
124
|
-
let
|
|
121
|
+
setup(j) {
|
|
122
|
+
const k = j, S = h(null);
|
|
123
|
+
let F = null;
|
|
125
124
|
function C() {
|
|
126
|
-
return !
|
|
125
|
+
return !F && S.value && (F = S.value.attachShadow({ mode: "open" })), F;
|
|
127
126
|
}
|
|
128
|
-
const p =
|
|
127
|
+
const p = H(() => k.previewData ?? Fe(k.templateType));
|
|
129
128
|
W(
|
|
130
|
-
() => [
|
|
129
|
+
() => [k.blocks, p.value, S.value],
|
|
131
130
|
() => {
|
|
132
131
|
const f = C();
|
|
133
132
|
if (f) {
|
|
134
133
|
try {
|
|
135
|
-
const y = Te(
|
|
134
|
+
const y = Te(k.blocks, p.value), u = Se(y);
|
|
136
135
|
f.innerHTML = `
|
|
137
136
|
<style>
|
|
138
137
|
:host { display: block; }
|
|
@@ -161,19 +160,19 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
161
160
|
} catch (y) {
|
|
162
161
|
f.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${y}</div>`;
|
|
163
162
|
}
|
|
164
|
-
_e(() => P(
|
|
163
|
+
_e(() => P(k.selectedBlockId));
|
|
165
164
|
}
|
|
166
165
|
},
|
|
167
166
|
{ deep: !0, immediate: !0 }
|
|
168
167
|
), W(
|
|
169
|
-
() =>
|
|
168
|
+
() => k.selectedBlockId,
|
|
170
169
|
(f) => P(f)
|
|
171
170
|
);
|
|
172
171
|
function P(f) {
|
|
173
|
-
if (!
|
|
172
|
+
if (!F || (F.querySelectorAll("[data-block-id].highlight").forEach((u) => {
|
|
174
173
|
u.classList.remove("highlight");
|
|
175
174
|
}), !f)) return;
|
|
176
|
-
const y =
|
|
175
|
+
const y = F.querySelector(`[data-block-id="${f}"]`);
|
|
177
176
|
y && (y.classList.add("highlight"), y.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
178
177
|
}
|
|
179
178
|
return (f, y) => (o(), c("div", tt, [
|
|
@@ -181,7 +180,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
181
180
|
l("div", lt, [
|
|
182
181
|
l("div", {
|
|
183
182
|
ref_key: "shadowHost",
|
|
184
|
-
ref:
|
|
183
|
+
ref: S
|
|
185
184
|
}, null, 512)
|
|
186
185
|
])
|
|
187
186
|
]));
|
|
@@ -222,11 +221,11 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
222
221
|
modelValue: { type: Boolean }
|
|
223
222
|
},
|
|
224
223
|
emits: ["update:modelValue", "saved"],
|
|
225
|
-
setup(
|
|
226
|
-
const
|
|
227
|
-
get: () =>
|
|
228
|
-
set: (n) =>
|
|
229
|
-
}), y =
|
|
224
|
+
setup(j, { emit: k }) {
|
|
225
|
+
const S = j, F = k, C = Ce(), p = Ie(), P = fe(), f = H({
|
|
226
|
+
get: () => S.modelValue,
|
|
227
|
+
set: (n) => F("update:modelValue", n)
|
|
228
|
+
}), y = h(!1), u = h(!1), i = h(te()), _ = h(null), d = h(le.Enum.purchaseOrder), x = h("Purchase Order Template"), a = h(null), b = h(!1), v = h(!1), V = h("select-type"), ae = [
|
|
230
229
|
{
|
|
231
230
|
label: "Purchase Order",
|
|
232
231
|
value: le.Enum.purchaseOrder,
|
|
@@ -251,22 +250,22 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
251
250
|
icon: "local_shipping",
|
|
252
251
|
description: "Customize the layout for delivery order printouts"
|
|
253
252
|
}
|
|
254
|
-
],
|
|
255
|
-
() => i.value.find((n) => n.id ===
|
|
256
|
-
),
|
|
253
|
+
], N = h(/* @__PURE__ */ new Set()), Z = H(
|
|
254
|
+
() => i.value.find((n) => n.id === _.value) ?? null
|
|
255
|
+
), A = h(null), L = h(null);
|
|
257
256
|
W(f, async (n) => {
|
|
258
257
|
if (n) {
|
|
259
258
|
V.value = "select-type", y.value = !0;
|
|
260
259
|
try {
|
|
261
260
|
const e = await C.browse();
|
|
262
|
-
|
|
261
|
+
N.value = new Set(e.map((g) => g.type));
|
|
263
262
|
} catch {
|
|
264
263
|
} finally {
|
|
265
264
|
y.value = !1;
|
|
266
265
|
}
|
|
267
266
|
}
|
|
268
267
|
}), W(d, async () => {
|
|
269
|
-
|
|
268
|
+
_.value = null, await ne();
|
|
270
269
|
});
|
|
271
270
|
async function ue(n) {
|
|
272
271
|
d.value = n, await ne(), V.value = "editor";
|
|
@@ -283,11 +282,11 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
283
282
|
y.value = !0;
|
|
284
283
|
try {
|
|
285
284
|
const n = await C.browse();
|
|
286
|
-
|
|
285
|
+
N.value = new Set(n.map((g) => g.type));
|
|
287
286
|
const e = n.find((g) => g.type === d.value);
|
|
288
|
-
e ? (a.value = e._id,
|
|
287
|
+
e ? (a.value = e._id, x.value = e.name, i.value = e.blocks.map((g) => ({ ...g }))) : (a.value = null, i.value = te(), x.value = J());
|
|
289
288
|
} catch {
|
|
290
|
-
i.value = te(),
|
|
289
|
+
i.value = te(), x.value = J();
|
|
291
290
|
} finally {
|
|
292
291
|
y.value = !1;
|
|
293
292
|
}
|
|
@@ -298,38 +297,38 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
298
297
|
tag: n,
|
|
299
298
|
config: De(n)
|
|
300
299
|
};
|
|
301
|
-
i.value.push(e),
|
|
300
|
+
i.value.push(e), _.value = e.id;
|
|
302
301
|
}
|
|
303
302
|
function se(n) {
|
|
304
303
|
const e = i.value.findIndex((g) => g.id === n);
|
|
305
|
-
e >= 0 && (i.value.splice(e, 1),
|
|
304
|
+
e >= 0 && (i.value.splice(e, 1), _.value === n && (_.value = null));
|
|
306
305
|
}
|
|
307
306
|
function de(n) {
|
|
308
|
-
const e = i.value.find((g) => g.id ===
|
|
307
|
+
const e = i.value.find((g) => g.id === _.value);
|
|
309
308
|
if (e) {
|
|
310
309
|
const g = n.configFields || [], ee = ye(e.tag);
|
|
311
310
|
e.config = { configFields: g, templateHtml: ee };
|
|
312
311
|
}
|
|
313
312
|
}
|
|
314
313
|
function pe(n) {
|
|
315
|
-
|
|
314
|
+
A.value = n;
|
|
316
315
|
}
|
|
317
316
|
function me(n, e) {
|
|
318
|
-
n.preventDefault(),
|
|
317
|
+
n.preventDefault(), L.value = e;
|
|
319
318
|
}
|
|
320
319
|
function ve() {
|
|
321
|
-
|
|
320
|
+
L.value = null;
|
|
322
321
|
}
|
|
323
322
|
function t(n) {
|
|
324
|
-
if (
|
|
325
|
-
|
|
323
|
+
if (A.value === null || A.value === n) {
|
|
324
|
+
A.value = null, L.value = null;
|
|
326
325
|
return;
|
|
327
326
|
}
|
|
328
|
-
const e = i.value.splice(
|
|
329
|
-
i.value.splice(n, 0, e),
|
|
327
|
+
const e = i.value.splice(A.value, 1)[0];
|
|
328
|
+
i.value.splice(n, 0, e), A.value = null, L.value = null;
|
|
330
329
|
}
|
|
331
330
|
function s() {
|
|
332
|
-
|
|
331
|
+
A.value = null, L.value = null;
|
|
333
332
|
}
|
|
334
333
|
async function B() {
|
|
335
334
|
var n;
|
|
@@ -345,23 +344,23 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
345
344
|
...r,
|
|
346
345
|
config: { configFields: I, templateHtml: q }
|
|
347
346
|
};
|
|
348
|
-
}), ee = Be(g),
|
|
349
|
-
name:
|
|
347
|
+
}), ee = Be(g), M = {
|
|
348
|
+
name: x.value,
|
|
350
349
|
type: d.value,
|
|
351
350
|
blocks: ee,
|
|
352
351
|
businessId: e,
|
|
353
352
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
354
353
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
355
354
|
};
|
|
356
|
-
let
|
|
357
|
-
a.value ?
|
|
355
|
+
let R;
|
|
356
|
+
a.value ? R = await C.update(a.value, {
|
|
358
357
|
_id: a.value,
|
|
359
|
-
...
|
|
360
|
-
}) : (
|
|
358
|
+
...M
|
|
359
|
+
}) : (R = await C.create(M), a.value = R._id), N.value.add(d.value), v.value = !1, p == null || p.open({
|
|
361
360
|
title: "Success",
|
|
362
361
|
message: "Print template saved",
|
|
363
362
|
type: "success"
|
|
364
|
-
}),
|
|
363
|
+
}), F("saved", R), f.value = !1;
|
|
365
364
|
} catch (e) {
|
|
366
365
|
p == null || p.open({
|
|
367
366
|
title: "Error",
|
|
@@ -376,11 +375,11 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
376
375
|
if (a.value) {
|
|
377
376
|
u.value = !0;
|
|
378
377
|
try {
|
|
379
|
-
await C.delete(a.value), a.value = null, i.value = te(),
|
|
378
|
+
await C.delete(a.value), a.value = null, i.value = te(), x.value = J(), N.value.delete(d.value), b.value = !1, p == null || p.open({
|
|
380
379
|
title: "Deleted",
|
|
381
380
|
message: "Print template deleted. Default layout will be used.",
|
|
382
381
|
type: "success"
|
|
383
|
-
}),
|
|
382
|
+
}), F("saved", null), f.value = !1;
|
|
384
383
|
} catch (n) {
|
|
385
384
|
p == null || p.open({
|
|
386
385
|
title: "Error",
|
|
@@ -392,8 +391,8 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
392
391
|
}
|
|
393
392
|
}
|
|
394
393
|
}
|
|
395
|
-
function
|
|
396
|
-
i.value = te(),
|
|
394
|
+
function w() {
|
|
395
|
+
i.value = te(), _.value = null;
|
|
397
396
|
}
|
|
398
397
|
function re(n) {
|
|
399
398
|
var e;
|
|
@@ -404,9 +403,9 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
404
403
|
return ((e = G[n]) == null ? void 0 : e.icon) ?? "widgets";
|
|
405
404
|
}
|
|
406
405
|
return (n, e) => {
|
|
407
|
-
const g = E("FmIcon"), ee = E("FmTextField"),
|
|
406
|
+
const g = E("FmIcon"), ee = E("FmTextField"), M = E("FmButton"), R = E("FmDialog");
|
|
408
407
|
return o(), c(U, null, [
|
|
409
|
-
m(
|
|
408
|
+
m(R, {
|
|
410
409
|
modelValue: f.value,
|
|
411
410
|
"onUpdate:modelValue": e[4] || (e[4] = (r) => f.value = r),
|
|
412
411
|
overlay: !0,
|
|
@@ -453,7 +452,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
453
452
|
l("div", mt, D(r.label), 1),
|
|
454
453
|
l("div", vt, D(r.description), 1)
|
|
455
454
|
]),
|
|
456
|
-
|
|
455
|
+
N.value.has(r.value) ? (o(), c("span", ft, "Customized")) : (o(), c("span", gt, "Default"))
|
|
457
456
|
], 10, ct)), 64))
|
|
458
457
|
]))
|
|
459
458
|
])) : y.value ? (o(), c("div", yt, e[8] || (e[8] = [
|
|
@@ -462,24 +461,24 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
462
461
|
l("div", _t, [
|
|
463
462
|
l("div", xt, [
|
|
464
463
|
m(ee, {
|
|
465
|
-
modelValue:
|
|
466
|
-
"onUpdate:modelValue": e[1] || (e[1] = (r) =>
|
|
464
|
+
modelValue: x.value,
|
|
465
|
+
"onUpdate:modelValue": e[1] || (e[1] = (r) => x.value = r),
|
|
467
466
|
placeholder: "Template name",
|
|
468
467
|
label: "Template Name"
|
|
469
468
|
}, null, 8, ["modelValue"])
|
|
470
469
|
]),
|
|
471
470
|
e[9] || (e[9] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2" }, " Add Blocks ", -1)),
|
|
472
471
|
l("div", ht, [
|
|
473
|
-
(o(!0), c(U, null, Y(
|
|
472
|
+
(o(!0), c(U, null, Y(T(Oe).Values, (r) => (o(), c("div", {
|
|
474
473
|
key: r,
|
|
475
474
|
class: "group flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 transition-colors hover:bg-gray-100",
|
|
476
475
|
onClick: (I) => ce(r)
|
|
477
476
|
}, [
|
|
478
477
|
m(g, {
|
|
479
|
-
name:
|
|
478
|
+
name: T(G)[r].icon,
|
|
480
479
|
size: "sm"
|
|
481
480
|
}, null, 8, ["name"]),
|
|
482
|
-
l("span", null, D(
|
|
481
|
+
l("span", null, D(T(G)[r].label), 1),
|
|
483
482
|
m(g, {
|
|
484
483
|
name: "add",
|
|
485
484
|
size: "sm",
|
|
@@ -492,8 +491,8 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
492
491
|
(o(!0), c(U, null, Y(i.value, (r, I) => (o(), c("div", {
|
|
493
492
|
key: r.id,
|
|
494
493
|
class: ie(["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", {
|
|
495
|
-
"bg-blue-50 border-l-[3px] border-l-blue-600": r.id ===
|
|
496
|
-
"border-t-2 border-t-blue-600":
|
|
494
|
+
"bg-blue-50 border-l-[3px] border-l-blue-600": r.id === _.value,
|
|
495
|
+
"border-t-2 border-t-blue-600": L.value === I
|
|
497
496
|
}]),
|
|
498
497
|
draggable: "true",
|
|
499
498
|
onDragstart: (q) => pe(I),
|
|
@@ -501,7 +500,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
501
500
|
onDragleave: ve,
|
|
502
501
|
onDrop: (q) => t(I),
|
|
503
502
|
onDragend: s,
|
|
504
|
-
onClick: (q) =>
|
|
503
|
+
onClick: (q) => _.value = r.id
|
|
505
504
|
}, [
|
|
506
505
|
m(g, {
|
|
507
506
|
name: "drag_indicator",
|
|
@@ -532,18 +531,18 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
532
531
|
}, null, 8, ["block"]))
|
|
533
532
|
])) : (o(), c("div", $t, " Select a block to configure it ")),
|
|
534
533
|
l("div", Bt, [
|
|
535
|
-
m(
|
|
534
|
+
m(M, {
|
|
536
535
|
label: "Reset to Default",
|
|
537
536
|
variant: "plain",
|
|
538
537
|
size: "md",
|
|
539
|
-
onClick:
|
|
538
|
+
onClick: w
|
|
540
539
|
})
|
|
541
540
|
])
|
|
542
541
|
]),
|
|
543
542
|
l("div", Vt, [
|
|
544
543
|
m(ot, {
|
|
545
544
|
blocks: i.value,
|
|
546
|
-
"selected-block-id":
|
|
545
|
+
"selected-block-id": _.value,
|
|
547
546
|
"template-type": d.value
|
|
548
547
|
}, null, 8, ["blocks", "selected-block-id", "template-type"])
|
|
549
548
|
])
|
|
@@ -555,14 +554,14 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
555
554
|
name: "dialog-footer",
|
|
556
555
|
fn: z(() => [
|
|
557
556
|
l("div", It, [
|
|
558
|
-
a.value ? (o(), O(
|
|
557
|
+
a.value ? (o(), O(M, {
|
|
559
558
|
key: 0,
|
|
560
559
|
label: "Delete Template",
|
|
561
560
|
variant: "destructive",
|
|
562
561
|
size: "md",
|
|
563
562
|
onClick: e[2] || (e[2] = (r) => b.value = !0)
|
|
564
563
|
})) : X("", !0),
|
|
565
|
-
m(
|
|
564
|
+
m(M, {
|
|
566
565
|
label: "Save Template",
|
|
567
566
|
variant: "primary",
|
|
568
567
|
size: "md",
|
|
@@ -573,7 +572,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
573
572
|
key: "0"
|
|
574
573
|
} : void 0
|
|
575
574
|
]), 1032, ["modelValue"]),
|
|
576
|
-
m(
|
|
575
|
+
m(R, {
|
|
577
576
|
modelValue: v.value,
|
|
578
577
|
"onUpdate:modelValue": e[5] || (e[5] = (r) => v.value = r),
|
|
579
578
|
overlay: !0,
|
|
@@ -585,7 +584,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
585
584
|
l("span", null, "Save Print Template?", -1)
|
|
586
585
|
])),
|
|
587
586
|
"dialog-footer": z(() => [
|
|
588
|
-
m(
|
|
587
|
+
m(M, {
|
|
589
588
|
class: "ml-auto",
|
|
590
589
|
label: "Save",
|
|
591
590
|
variant: "primary",
|
|
@@ -609,7 +608,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
609
608
|
]),
|
|
610
609
|
_: 1
|
|
611
610
|
}, 8, ["modelValue"]),
|
|
612
|
-
m(
|
|
611
|
+
m(R, {
|
|
613
612
|
modelValue: b.value,
|
|
614
613
|
"onUpdate:modelValue": e[6] || (e[6] = (r) => b.value = r),
|
|
615
614
|
overlay: !0,
|
|
@@ -621,7 +620,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
621
620
|
l("span", null, "Delete Print Template?", -1)
|
|
622
621
|
])),
|
|
623
622
|
"dialog-footer": z(() => [
|
|
624
|
-
m(
|
|
623
|
+
m(M, {
|
|
625
624
|
class: "ml-auto",
|
|
626
625
|
label: "Delete",
|
|
627
626
|
variant: "destructive",
|
|
@@ -648,17 +647,13 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
648
647
|
], 64);
|
|
649
648
|
};
|
|
650
649
|
}
|
|
651
|
-
}), At =
|
|
652
|
-
async listForScope(w) {
|
|
653
|
-
return await _.get(`${A.inventoryBackendUrl}/${w}/feature-flags`);
|
|
654
|
-
}
|
|
655
|
-
})), Lt = { class: "flex min-h-0 w-full flex-col gap-12" }, Ht = { class: "flex w-full flex-wrap items-center gap-8" }, Nt = /* @__PURE__ */ oe({
|
|
650
|
+
}), At = { class: "flex min-h-0 w-full flex-col gap-12" }, Lt = { class: "flex w-full flex-wrap items-center gap-8" }, Ht = /* @__PURE__ */ oe({
|
|
656
651
|
__name: "FeatureFlagView",
|
|
657
|
-
setup(
|
|
658
|
-
const
|
|
652
|
+
setup(j) {
|
|
653
|
+
const k = Ae(), S = fe(), F = Ee(), C = Q.FmSwitch, p = Q.FmTable, P = Q.FmMenu, f = Q.FmMenuDivider, y = Q.FmMenuHeader, u = Q.FmMenuItem, i = /* @__PURE__ */ new Set(), _ = {
|
|
659
654
|
inventory_pos_closing_v1: "Use v2: Closing Draft and Closing Template.",
|
|
660
655
|
inventory_pos_convert_v1: "Use Production Item instead."
|
|
661
|
-
}, d =
|
|
656
|
+
}, d = h([]), x = h(null), a = ["In use", "Deprecate Soon", "Deprecated"], b = h(null), v = h({}), V = h(!1), ae = {
|
|
662
657
|
inventory_netsuite_inventory_transfer_out: ["netsuite"],
|
|
663
658
|
inventory_portal_accept_require_fulfillment: ["mobile"],
|
|
664
659
|
inventory_portal_must_use_transfer_template: ["mobile"],
|
|
@@ -675,9 +670,9 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
675
670
|
inventory_pos_stock_return: ["mobile"],
|
|
676
671
|
inventory_pos_transfer_require_fulfillment: ["mobile", "pos-v7", "pos-7.8"],
|
|
677
672
|
inventory_purchase_order_approval: ["mobile"]
|
|
678
|
-
},
|
|
673
|
+
}, N = H(
|
|
679
674
|
() => Object.values(Ue).map((t) => {
|
|
680
|
-
const s =
|
|
675
|
+
const s = k.flags.find((B) => B.name === t);
|
|
681
676
|
return {
|
|
682
677
|
name: t,
|
|
683
678
|
enabled: (s == null ? void 0 : s.enabled) ?? null,
|
|
@@ -685,18 +680,18 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
685
680
|
feature: Le(t)
|
|
686
681
|
};
|
|
687
682
|
})
|
|
688
|
-
), Z =
|
|
689
|
-
() => [...new Set(
|
|
690
|
-
),
|
|
691
|
-
() =>
|
|
692
|
-
(t) => (d.value.length === 0 || d.value.some((s) => t.domains.includes(s))) && (!
|
|
683
|
+
), Z = H(
|
|
684
|
+
() => [...new Set(N.value.flatMap((t) => t.domains))].sort()
|
|
685
|
+
), A = H(
|
|
686
|
+
() => N.value.filter(
|
|
687
|
+
(t) => (d.value.length === 0 || d.value.some((s) => t.domains.includes(s))) && (!x.value || se(t) === x.value)
|
|
693
688
|
)
|
|
694
689
|
);
|
|
695
|
-
function
|
|
690
|
+
function L(t) {
|
|
696
691
|
d.value = d.value.includes(t) ? d.value.filter((s) => s !== t) : [...d.value, t];
|
|
697
692
|
}
|
|
698
693
|
function ue() {
|
|
699
|
-
d.value = [],
|
|
694
|
+
d.value = [], x.value = null;
|
|
700
695
|
}
|
|
701
696
|
function J(t) {
|
|
702
697
|
return t.domains.includes("mobile") || t.domains.some((s) => s.startsWith("pos-"));
|
|
@@ -712,7 +707,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
712
707
|
const s = t;
|
|
713
708
|
V.value = !0;
|
|
714
709
|
try {
|
|
715
|
-
const { flags: B } = await
|
|
710
|
+
const { flags: B } = await F.listForScope(s);
|
|
716
711
|
b.value === s && (v.value = Object.fromEntries(B.map((K) => [K.name, K.enabled])));
|
|
717
712
|
} catch (B) {
|
|
718
713
|
console.error("Unable to load feature flags for the selected scope", B), b.value === s && (v.value = {});
|
|
@@ -723,7 +718,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
723
718
|
W(
|
|
724
719
|
() => {
|
|
725
720
|
var t;
|
|
726
|
-
return (t =
|
|
721
|
+
return (t = S.currentBusiness.value) != null && t._id ? `business_${S.currentBusiness.value._id}` : null;
|
|
727
722
|
},
|
|
728
723
|
(t) => {
|
|
729
724
|
b.value || (b.value = t);
|
|
@@ -731,7 +726,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
731
726
|
{ immediate: !0 }
|
|
732
727
|
), W(b, ce, { immediate: !0 });
|
|
733
728
|
function se(t) {
|
|
734
|
-
return i.has(t.name) ? "Deprecated" :
|
|
729
|
+
return i.has(t.name) ? "Deprecated" : _[t.name] ? "Deprecate Soon" : "In use";
|
|
735
730
|
}
|
|
736
731
|
function de(t) {
|
|
737
732
|
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";
|
|
@@ -741,9 +736,9 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
741
736
|
return ((s = t.feature) == null ? void 0 : s.controls) ?? "Controls the availability of this inventory feature.";
|
|
742
737
|
}
|
|
743
738
|
function me(t) {
|
|
744
|
-
return i.has(t.name) ? "This flag is deprecated. Use its supported replacement for new work." :
|
|
739
|
+
return i.has(t.name) ? "This flag is deprecated. Use its supported replacement for new work." : _[t.name];
|
|
745
740
|
}
|
|
746
|
-
const ve =
|
|
741
|
+
const ve = H(() => [
|
|
747
742
|
{
|
|
748
743
|
accessorKey: "name",
|
|
749
744
|
header: "Feature flag",
|
|
@@ -822,27 +817,27 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
822
817
|
]);
|
|
823
818
|
return (t, s) => {
|
|
824
819
|
const B = E("FmChip"), K = E("FmButton");
|
|
825
|
-
return o(), c("div",
|
|
826
|
-
l("div",
|
|
820
|
+
return o(), c("div", At, [
|
|
821
|
+
l("div", Lt, [
|
|
827
822
|
m(Me, {
|
|
828
823
|
"model-value": b.value,
|
|
829
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
824
|
+
"onUpdate:modelValue": s[0] || (s[0] = (w) => b.value = w),
|
|
830
825
|
"selection-only": "",
|
|
831
826
|
"show-business": ""
|
|
832
827
|
}, null, 8, ["model-value"]),
|
|
833
|
-
(o(!0), c(U, null, Y(d.value, (
|
|
834
|
-
key:
|
|
835
|
-
label: `domain in ${
|
|
828
|
+
(o(!0), c(U, null, Y(d.value, (w) => (o(), O(B, {
|
|
829
|
+
key: w,
|
|
830
|
+
label: `domain in ${w}`,
|
|
836
831
|
removable: "",
|
|
837
|
-
onChipClosed: (re) =>
|
|
832
|
+
onChipClosed: (re) => L(w)
|
|
838
833
|
}, null, 8, ["label", "onChipClosed"]))), 128)),
|
|
839
|
-
|
|
834
|
+
x.value ? (o(), O(B, {
|
|
840
835
|
key: 0,
|
|
841
|
-
label: `status in ${
|
|
836
|
+
label: `status in ${x.value}`,
|
|
842
837
|
removable: "",
|
|
843
|
-
onChipClosed: s[1] || (s[1] = (
|
|
838
|
+
onChipClosed: s[1] || (s[1] = (w) => x.value = null)
|
|
844
839
|
}, null, 8, ["label"])) : X("", !0),
|
|
845
|
-
m(
|
|
840
|
+
m(T(P), {
|
|
846
841
|
"close-on-click": !1,
|
|
847
842
|
width: 288,
|
|
848
843
|
"max-height": 420,
|
|
@@ -856,38 +851,38 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
856
851
|
})
|
|
857
852
|
]),
|
|
858
853
|
default: z(() => [
|
|
859
|
-
m(
|
|
860
|
-
(o(!0), c(U, null, Y(Z.value, (
|
|
861
|
-
key:
|
|
862
|
-
label:
|
|
854
|
+
m(T(y), { label: "Domains" }),
|
|
855
|
+
(o(!0), c(U, null, Y(Z.value, (w) => (o(), O(T(u), {
|
|
856
|
+
key: w,
|
|
857
|
+
label: w,
|
|
863
858
|
selectable: "",
|
|
864
859
|
"has-checkbox": "",
|
|
865
|
-
"model-value": d.value.includes(
|
|
866
|
-
onClick: (re) =>
|
|
860
|
+
"model-value": d.value.includes(w),
|
|
861
|
+
onClick: (re) => L(w)
|
|
867
862
|
}, null, 8, ["label", "model-value", "onClick"]))), 128)),
|
|
868
|
-
m(
|
|
869
|
-
m(
|
|
870
|
-
(o(), c(U, null, Y(a, (
|
|
871
|
-
key:
|
|
872
|
-
label:
|
|
863
|
+
m(T(f)),
|
|
864
|
+
m(T(y), { label: "Status" }),
|
|
865
|
+
(o(), c(U, null, Y(a, (w) => m(T(u), {
|
|
866
|
+
key: w,
|
|
867
|
+
label: w,
|
|
873
868
|
selectable: "",
|
|
874
869
|
"has-checkbox": "",
|
|
875
|
-
"model-value":
|
|
876
|
-
onClick: (re) =>
|
|
870
|
+
"model-value": x.value === w,
|
|
871
|
+
onClick: (re) => x.value = x.value === w ? null : w
|
|
877
872
|
}, null, 8, ["label", "model-value", "onClick"])), 64))
|
|
878
873
|
]),
|
|
879
874
|
_: 1
|
|
880
875
|
}),
|
|
881
|
-
d.value.length ||
|
|
876
|
+
d.value.length || x.value ? (o(), O(K, {
|
|
882
877
|
key: 1,
|
|
883
878
|
label: "Clear all",
|
|
884
879
|
variant: "tertiary",
|
|
885
880
|
onClick: ue
|
|
886
881
|
})) : X("", !0)
|
|
887
882
|
]),
|
|
888
|
-
m(
|
|
883
|
+
m(T(p), {
|
|
889
884
|
"column-defs": ve.value,
|
|
890
|
-
"row-data":
|
|
885
|
+
"row-data": A.value,
|
|
891
886
|
"page-size": 50,
|
|
892
887
|
"hide-footer": "",
|
|
893
888
|
"shrink-at": !1
|
|
@@ -895,37 +890,37 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
895
890
|
]);
|
|
896
891
|
};
|
|
897
892
|
}
|
|
898
|
-
}),
|
|
893
|
+
}), Nt = { class: "flex w-full flex-col gap-16 p-16" }, Mt = {
|
|
899
894
|
key: 0,
|
|
900
895
|
class: "py-32 text-center"
|
|
901
|
-
},
|
|
896
|
+
}, Rt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jt = {
|
|
902
897
|
class: "flex gap-2 border-b border-gray-200",
|
|
903
898
|
role: "tablist"
|
|
904
|
-
},
|
|
899
|
+
}, Kt = ["aria-selected"], qt = ["aria-selected"], Gt = { key: 0 }, Yt = { class: "flex items-center justify-between gap-12" }, Wt = { class: "fm-typo-en-heading-sm-600 text-fm-color-typo-primary" }, Jt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qt = {
|
|
905
900
|
key: 1,
|
|
906
901
|
class: "w-full"
|
|
907
|
-
},
|
|
902
|
+
}, Xt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, cl = /* @__PURE__ */ oe({
|
|
908
903
|
__name: "SettingsView",
|
|
909
|
-
setup(
|
|
910
|
-
const { t:
|
|
904
|
+
setup(j) {
|
|
905
|
+
const { t: k } = Pe(), S = fe(), F = Ve(), C = h(!1), p = h("order"), P = H(() => {
|
|
911
906
|
var u, i;
|
|
912
|
-
return ((i = (u =
|
|
907
|
+
return ((i = (u = S.sessionUser.value) == null ? void 0 : u.role) == null ? void 0 : i.isAdmin) === !0;
|
|
913
908
|
});
|
|
914
909
|
function f() {
|
|
915
|
-
|
|
910
|
+
F.invalidate(), F.fetchTemplates();
|
|
916
911
|
}
|
|
917
912
|
function y() {
|
|
918
|
-
|
|
913
|
+
F.fetchTemplates(), C.value = !0;
|
|
919
914
|
}
|
|
920
915
|
return (u, i) => {
|
|
921
|
-
const
|
|
916
|
+
const _ = E("FmButton");
|
|
922
917
|
return o(), O(we, {
|
|
923
|
-
title:
|
|
918
|
+
title: T(k)("inventory.settings.title")
|
|
924
919
|
}, {
|
|
925
920
|
default: z(() => [
|
|
926
|
-
l("div",
|
|
921
|
+
l("div", Nt, [
|
|
927
922
|
P.value ? (o(), c(U, { key: 1 }, [
|
|
928
|
-
l("div",
|
|
923
|
+
l("div", jt, [
|
|
929
924
|
l("button", {
|
|
930
925
|
type: "button",
|
|
931
926
|
role: "tab",
|
|
@@ -935,7 +930,7 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
935
930
|
p.value === "order" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
|
|
936
931
|
]),
|
|
937
932
|
onClick: i[0] || (i[0] = (d) => p.value = "order")
|
|
938
|
-
}, D(
|
|
933
|
+
}, D(T(k)("inventory.settings.order.title")), 11, Kt),
|
|
939
934
|
l("button", {
|
|
940
935
|
type: "button",
|
|
941
936
|
role: "tab",
|
|
@@ -945,24 +940,24 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
945
940
|
p.value === "features" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
|
|
946
941
|
]),
|
|
947
942
|
onClick: i[1] || (i[1] = (d) => p.value = "features")
|
|
948
|
-
}, D(
|
|
943
|
+
}, D(T(k)("inventory.settings.features.title")), 11, qt)
|
|
949
944
|
]),
|
|
950
|
-
p.value === "order" ? (o(), c("div",
|
|
951
|
-
l("div",
|
|
952
|
-
l("h2",
|
|
953
|
-
m(
|
|
945
|
+
p.value === "order" ? (o(), c("div", Gt, [
|
|
946
|
+
l("div", Yt, [
|
|
947
|
+
l("h2", Wt, D(T(k)("inventory.settings.order.printTemplates")), 1),
|
|
948
|
+
m(_, {
|
|
954
949
|
onClick: y,
|
|
955
950
|
variant: "secondary",
|
|
956
|
-
label:
|
|
951
|
+
label: T(k)("inventory.settings.printTemplate.edit")
|
|
957
952
|
}, null, 8, ["label"])
|
|
958
953
|
]),
|
|
959
|
-
l("p",
|
|
960
|
-
])) : (o(), c("div",
|
|
961
|
-
l("p",
|
|
962
|
-
m(
|
|
954
|
+
l("p", Jt, D(T(k)("inventory.settings.printTemplate.description")), 1)
|
|
955
|
+
])) : (o(), c("div", Qt, [
|
|
956
|
+
l("p", Xt, D(T(k)("inventory.settings.features.description")), 1),
|
|
957
|
+
m(Ht)
|
|
963
958
|
]))
|
|
964
|
-
], 64)) : (o(), c("div",
|
|
965
|
-
l("p",
|
|
959
|
+
], 64)) : (o(), c("div", Mt, [
|
|
960
|
+
l("p", Rt, D(T(k)("inventory.settings.adminOnly")), 1)
|
|
966
961
|
]))
|
|
967
962
|
]),
|
|
968
963
|
(o(), O(ke, { to: "body" }, [
|
|
@@ -979,5 +974,5 @@ const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700
|
|
|
979
974
|
}
|
|
980
975
|
});
|
|
981
976
|
export {
|
|
982
|
-
|
|
977
|
+
cl as default
|
|
983
978
|
};
|