@feedmepos/mf-inventory-portal 1.3.11 → 1.3.12-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-CBd6w_qA.js → App-CNtTZWS5.js} +3 -3
- package/dist/{ApprovalView-T5ukxJT2.js → ApprovalView-CEl22JiC.js} +7 -7
- package/dist/{BindingsDialog-wnUUvDbJ.js → BindingsDialog-CfKXCpBU.js} +2 -2
- package/dist/{BindingsPicker-DfxWEsuD.js → BindingsPicker-Cs5tz33G.js} +2 -2
- package/dist/{BindingsTable-C4osZe4g.js → BindingsTable-BfnpZ-KA.js} +3 -3
- package/dist/ClosingDraftView-DkhhKjNZ.js +3005 -0
- package/dist/{ClosingHistoryView-DVkRqMby.js → ClosingHistoryView-BZGgnEMk.js} +5 -5
- package/dist/{ClosingTemplateView-CWVFpLQp.js → ClosingTemplateView-CePW41Zv.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-CYJ-N_nT.js → DeliveryOrderPrintPreview-CMiT6FFJ.js} +9 -9
- package/dist/FmConfirmationButton.vue_vue_type_script_setup_true_lang-DLrMEGFR.js +62 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DqNegFEz.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cy37JvjC.js} +17 -17
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CmJ1-ez_.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D1F76xVX.js} +2 -2
- package/dist/{FmMultiselectDialog-DVmf2SUo.js → FmMultiselectDialog-BsvCwcJc.js} +1 -1
- package/dist/{FmMultiselectDialog-BlQ73-mq.js → FmMultiselectDialog-DhMpDoSp.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-QjHZgy15.js → FmUnitInput.vue_vue_type_script_setup_true_lang-nHP7zkk1.js} +4 -4
- package/dist/{ImportView-2Lv-F8mA.js → ImportView-i_QNJOjX.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BrBwx7H_.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-9mBpcrHT.js} +1 -1
- package/dist/{IngredientGroupView-6ehuvvaQ.js → IngredientGroupView-BRXP6KA8.js} +5 -5
- package/dist/{IngredientsView-CblSczx0.js → IngredientsView-Ctxhsn56.js} +15 -15
- package/dist/{IntegrationExplorerView-B1_QbRxN.js → IntegrationExplorerView-Bh04rXi3.js} +5 -5
- package/dist/{IntegrationView-O07aQ73D.js → IntegrationView-D21VT578.js} +13 -13
- package/dist/{InventoryBindingForm-D6ZEMcBv.js → InventoryBindingForm-DRN9QJi0.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D4m2EmK1.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BLoIOdb3.js} +5 -5
- package/dist/{InventoryBindingSummary-CtpcQqQH.js → InventoryBindingSummary-PAiqx015.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang--DMDGodL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BIvMfYs0.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DUMRp4XY.js → PremiumBadge.vue_vue_type_script_setup_true_lang--ld9yYXG.js} +1 -1
- package/dist/{PublishView-BDl-gijS.js → PublishView-Dnltnb2q.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-BegfBpk1.js → PurchaseOrderPrintPreview-C117AdbG.js} +9 -9
- package/dist/{ReceiveRequestView-BOwtvG9t.js → ReceiveRequestView-CEGAD0Ng.js} +23 -23
- package/dist/{RecipeView-CH24uIHd.js → RecipeView-BPoXX96N.js} +15 -15
- package/dist/{SettingsView-BS1TIbEG.js → SettingsView-5wcHwBbj.js} +4 -4
- package/dist/StockView-QpWVITjo.js +2431 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DAeIe9L0.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DoBOG20i.js} +1 -1
- package/dist/{SupplierView-BGuEnnrq.js → SupplierView-CXztXTGJ.js} +12 -12
- package/dist/{SurchargeView-CNG75X-N.js → SurchargeView-mA1cNQGF.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-peUaqYJf.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CbEb8v1Q.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-7_GwFKXj.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D1hykQLi.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CFDPN904.js → TransferDetails.vue_vue_type_script_setup_true_lang-zeZt-Xni.js} +91 -91
- package/dist/{TransferTemplateView-BWvtu-wX.js → TransferTemplateView-RD0i6kb6.js} +584 -638
- package/dist/{UnitCostHistoryView-DOJE-1OS.js → UnitCostHistoryView-BWCq8Po_.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-CscoVkhG.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CZjt9Tph.js} +4 -4
- package/dist/{UnitView-DuAu2apH.js → UnitView-CDqc3Tlc.js} +7 -7
- package/dist/{WarehouseView-or9SYlSw.js → WarehouseView-Dn9Y1pfn.js} +5 -5
- package/dist/{WastageTemplateView-COW_V0fj.js → WastageTemplateView-DqNfxcrF.js} +14 -14
- package/dist/api/closing-draft.d.ts +2 -0
- package/dist/{app-D54yDxFV.js → app-BMCau-r9.js} +22168 -21063
- package/dist/app.d.ts +391 -0
- package/dist/app.js +2 -2
- package/dist/{closing-template-ldiEKhOl.js → closing-template-PafmbL9x.js} +1 -1
- package/dist/components/ui-library/FmConfirmationButton.vue.d.ts +2 -0
- package/dist/{date2-BLeYHVHx.js → date2-NGc-US7r.js} +1 -1
- package/dist/{dayjs.min-DGQ4zttU.js → dayjs.min-D6CbxpmT.js} +1 -1
- package/dist/{decimal-xstA267T.js → decimal-CZC4S20U.js} +2 -2
- package/dist/{defineDeepModel-Cr10VhS5.js → defineDeepModel-BWzoo1Yl.js} +1 -1
- package/dist/{duplicate-template-CyE0xzx2.js → duplicate-template-BxSUC5LI.js} +1 -1
- package/dist/{export-Dg8UUfiF.js → export-Df2CdXk-.js} +1 -1
- package/dist/{feature-DjgoqZRe.js → feature-Byu94DG1.js} +28 -28
- package/dist/{format-time-from-id-BUfvjuAI.js → format-time-from-id-hx4F-i1-.js} +1 -1
- package/dist/{format-unit-display-CjcUbFWk.js → format-unit-display-CDw8VsCc.js} +11 -11
- package/dist/{import-export.helper-CgtFAIYx.js → import-export.helper-DYFRZAI2.js} +6 -6
- package/dist/{index-DhmQ_-Xs.js → index-Bfe8USZ3.js} +1 -1
- package/dist/{index-DjsWOEAk.js → index-CsMpGUvS.js} +1 -1
- package/dist/{index-D1DXcz-1.js → index-DodBVGPe.js} +3 -3
- package/dist/{inventory-core-dart.default-BPi15AEL.js → inventory-core-dart.default-Do9H1oK-.js} +1 -1
- package/dist/{lodash-BKR9tW9Z.js → lodash-jqyiF2Jy.js} +1 -1
- package/dist/{lz-string-CXAZq-_B.js → lz-string-CZH3sbUP.js} +1 -1
- package/dist/{netsuite-BtyQlk6P.js → netsuite-D7C_nhsL.js} +37 -37
- package/dist/{number-DcJHR1ZR.js → number-Dzj3ENjG.js} +3 -3
- package/dist/{predefined-templates-msHan4_0.js → predefined-templates-BZ9EyGnO.js} +1 -1
- package/dist/{purchase-order-template-CYXcyeQV.js → purchase-order-template-DE9pQpEF.js} +1 -1
- package/dist/{recalculationUtils-1IqGhVdW.js → recalculationUtils-BvTzacgL.js} +1 -1
- package/dist/{rules-DXbirS4I.js → rules-Cb9NgTav.js} +2 -2
- package/dist/{stock-CEQ8o0P7.js → stock-BVdxOXPo.js} +1 -1
- package/dist/{stock-Co5liDhH.js → stock-CoJZvuG_.js} +3 -3
- package/dist/{supplier-DAiM8u9g.js → supplier-B7nSOpfH.js} +2 -2
- package/dist/{surcharge-DFgeEcwF.js → surcharge-F1vEGWak.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-RBp06_Ny.js → use-ingredient-select-dialog-BqBdVzw-.js} +2 -2
- package/dist/{use-inventory-binding-dialog-BJUDORac.js → use-inventory-binding-dialog-CsQ8GQND.js} +2 -2
- package/dist/{use-template-enabled-locations-DCgY6X-O.js → use-template-enabled-locations-BzZBqRYv.js} +2 -2
- package/dist/views/closing-draft/components/closing-draft-create/ClosingDraftCreatePreviewTable.vue.d.ts +18 -0
- package/dist/views/closing-draft/components/closing-draft-create/ClosingDraftCreateSideSheet.vue.d.ts +21 -0
- package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +559 -0
- package/dist/views/closing-draft/helpers/closing-draft-import.helper.d.ts +26 -0
- package/dist/views/stock/composables/use-stock-adjustment-permission.d.ts +3 -0
- package/dist/views/stock/composables/use-stock-adjustment-permission.test.d.ts +1 -0
- package/dist/{vue-i18n-CcG2seRc.js → vue-i18n-Gpl_Em6v.js} +252 -252
- package/dist/{xlsx-DQZhwN-j.js → xlsx-Cq--BOe0.js} +2 -2
- package/dist/{xlsx.util-BVyHdIH5.js → xlsx.util-BD4BK3XO.js} +1 -1
- package/package.json +4 -3
- package/dist/ClosingDraftView-g90vlE4b.js +0 -2476
- package/dist/StockView-D9hMA7Q6.js +0 -2406
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { defineComponent as ae, onMounted as
|
|
1
|
+
import { defineComponent as ae, onMounted as Te, computed as B, ref as H, watch as Fe, inject as ot, resolveComponent as R, openBlock as O, createElementBlock as L, createElementVNode as t, createVNode as b, withCtx as N, renderSlot as Ue, withDirectives as Pe, normalizeClass as le, vModelText as Be, reactive as st, h as Q, toDisplayString as M, unref as e, createCommentVNode as oe, Fragment as pe, normalizeStyle as _e, renderList as Qe, createBlock as ne, mergeProps as Ye, createTextVNode as re, mergeModels as Le, useModel as nt, isRef as He, Teleport as lt, normalizeProps as rt, guardReactiveProps as at } from "vue";
|
|
2
2
|
import { u as it, _ as ut } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-sUxHOj47.js";
|
|
3
3
|
import { useI18n as me } from "@feedmepos/mf-common";
|
|
4
|
-
import { f as dt, t as mt, u as Ne, a as pt } from "./format-unit-display-
|
|
4
|
+
import { f as dt, t as mt, u as Ne, a as pt } from "./format-unit-display-CDw8VsCc.js";
|
|
5
5
|
import { R as Ee } from "./row-action.enum-Co_O4qD9.js";
|
|
6
|
-
import { a as We, s as ct, t as X, u as Ge, v as ft, k as ye } from "./app-
|
|
7
|
-
import { _ as yt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { a as We, s as ct, t as X, u as Ge, v as ft, k as ye } from "./app-BMCau-r9.js";
|
|
7
|
+
import { _ as yt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D1F76xVX.js";
|
|
8
8
|
import { components as ue, useSnackbar as vt, useProxiedModel as Ke, useBreakpoints as bt } from "@feedmepos/ui-library";
|
|
9
|
-
import { defineStore as
|
|
9
|
+
import { defineStore as ht, storeToRefs as ze } from "pinia";
|
|
10
10
|
import { F as de } from "./form-mode.enum-BKiNVH6A.js";
|
|
11
|
-
import { I as
|
|
12
|
-
import { u as
|
|
13
|
-
import { d as Ze } from "./defineDeepModel-
|
|
14
|
-
import { _ as Ft, F as Ct, a as It, b as Mt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { u as
|
|
16
|
-
import { u as Je } from "./netsuite-
|
|
17
|
-
import { F as
|
|
18
|
-
import { u as
|
|
19
|
-
import { u as
|
|
11
|
+
import { I as gt, a as xt, R as ke, A as we, M as _t } from "./rules-Cb9NgTav.js";
|
|
12
|
+
import { u as ge, t as je, b as kt, n as wt, a as se, g as be, c as ve, d as Tt } from "./number-Dzj3ENjG.js";
|
|
13
|
+
import { d as Ze } from "./defineDeepModel-BWzoo1Yl.js";
|
|
14
|
+
import { _ as Ft, F as Ct, a as It, b as Mt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-nHP7zkk1.js";
|
|
15
|
+
import { u as he } from "./feature-Byu94DG1.js";
|
|
16
|
+
import { u as Je } from "./netsuite-D7C_nhsL.js";
|
|
17
|
+
import { F as xe } from "./inventory-core-dart.default-Do9H1oK-.js";
|
|
18
|
+
import { u as St } from "./supplier-B7nSOpfH.js";
|
|
19
|
+
import { u as Ot } from "./use-ingredient-select-dialog-BqBdVzw-.js";
|
|
20
20
|
import { F as ee, _ as Xe } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
|
|
21
|
-
import { u as
|
|
22
|
-
import { u as Dt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-
|
|
23
|
-
import { u as At } from "./purchase-order-template-
|
|
24
|
-
import {
|
|
25
|
-
import { f as
|
|
26
|
-
|
|
21
|
+
import { u as $t } from "./use-template-enabled-locations-BzZBqRYv.js";
|
|
22
|
+
import { u as Dt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cy37JvjC.js";
|
|
23
|
+
import { u as At } from "./purchase-order-template-DE9pQpEF.js";
|
|
24
|
+
import { _ as Rt } from "./FmConfirmationButton.vue_vue_type_script_setup_true_lang-DLrMEGFR.js";
|
|
25
|
+
import { f as qt } from "./format-time-from-id-hx4F-i1-.js";
|
|
26
|
+
import { f as Ut } from "./date2-NGc-US7r.js";
|
|
27
|
+
const Pt = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, Lt = { class: "flex-1" }, Nt = { class: "flex items-center" }, Et = { class: "flex-1" }, zt = { class: "flex-1" }, jt = /* @__PURE__ */ ae({
|
|
27
28
|
__name: "FmMinMaxInput",
|
|
28
29
|
props: {
|
|
29
30
|
rules: {},
|
|
@@ -61,111 +62,111 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Pt = { c
|
|
|
61
62
|
helperState: {}
|
|
62
63
|
},
|
|
63
64
|
setup(f) {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
const { min: p, max:
|
|
67
|
-
if (!(!p || !
|
|
68
|
-
const w = Math.max(p.precision,
|
|
69
|
-
|
|
65
|
+
const x = f, h = Ze("modelValue"), r = gt();
|
|
66
|
+
Te(() => {
|
|
67
|
+
const { min: p, max: c } = h ?? {};
|
|
68
|
+
if (!(!p || !c) && p.precision !== c.precision) {
|
|
69
|
+
const w = Math.max(p.precision, c.precision), a = ge(p, w), v = ge(c, w);
|
|
70
|
+
h.min = a, h.max = v;
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
|
-
const
|
|
73
|
-
const { min: p, max:
|
|
74
|
-
return Math.max((p == null ? void 0 : p.precision) ?? 0, (
|
|
73
|
+
const i = B(() => {
|
|
74
|
+
const { min: p, max: c } = h ?? {};
|
|
75
|
+
return Math.max((p == null ? void 0 : p.precision) ?? 0, (c == null ? void 0 : c.precision) ?? 0, x.precision ?? 0);
|
|
75
76
|
}), s = (p) => {
|
|
76
77
|
if (!p) return "";
|
|
77
|
-
const
|
|
78
|
+
const c = kt(p), w = i.value, a = ge(c, w);
|
|
78
79
|
return wt(
|
|
79
|
-
+se(
|
|
80
|
-
|
|
80
|
+
+se(a),
|
|
81
|
+
a.precision
|
|
81
82
|
);
|
|
82
|
-
}, u = H(s(
|
|
83
|
-
|
|
84
|
-
const w =
|
|
85
|
-
if (p !== "" &&
|
|
86
|
-
const
|
|
87
|
-
w.min =
|
|
83
|
+
}, u = H(s(h.min)), _ = H(s(h.max));
|
|
84
|
+
Fe([u, _], ([p, c]) => {
|
|
85
|
+
const w = h ?? {}, a = r(p), v = r(c), S = i.value;
|
|
86
|
+
if (p !== "" && a === !0) {
|
|
87
|
+
const I = je(+p, S);
|
|
88
|
+
w.min = I;
|
|
88
89
|
} else
|
|
89
90
|
w.min = null;
|
|
90
|
-
if (
|
|
91
|
-
const
|
|
92
|
-
w.max =
|
|
91
|
+
if (c !== "" && v === !0) {
|
|
92
|
+
const I = je(+c, S);
|
|
93
|
+
w.max = I;
|
|
93
94
|
} else
|
|
94
95
|
w.max = null;
|
|
95
|
-
|
|
96
|
+
h.min = w.min, h.max = w.max;
|
|
96
97
|
});
|
|
97
|
-
const
|
|
98
|
+
const $ = Symbol.for("fm:form-state"), y = ot($, null), o = B(() => x.disabled ?? (y == null ? void 0 : y.getDisabled()) ?? !1), d = H(), m = H(), k = H(!1), T = H(!1), A = B(() => k.value || T.value), q = B(() => [...[
|
|
98
99
|
function() {
|
|
99
|
-
return typeof
|
|
100
|
+
return typeof r(u.value) == "string" || typeof r(_.value) == "string" ? "Must be a number" : !0;
|
|
100
101
|
},
|
|
101
102
|
function(w) {
|
|
102
103
|
return !w || !w.min || !w.max ? !0 : +se(w.min) > +se(w.max) ? "Min must be less than or equal to max" : !0;
|
|
103
104
|
}
|
|
104
|
-
], ...
|
|
105
|
-
return (p,
|
|
106
|
-
const w =
|
|
107
|
-
return
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
], ...x.rules ?? []]);
|
|
106
|
+
return (p, c) => {
|
|
107
|
+
const w = R("FmLabel"), a = R("FmField"), v = R("FmFormGroup");
|
|
108
|
+
return O(), L("div", Pt, [
|
|
109
|
+
t("div", Bt, [
|
|
110
|
+
t("div", Lt, [
|
|
111
|
+
b(w, {
|
|
111
112
|
label: p.label,
|
|
112
113
|
disabled: p.disabled,
|
|
113
114
|
required: p.labelMark === "required",
|
|
114
115
|
optional: p.labelMark === "optional"
|
|
115
116
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
116
117
|
]),
|
|
117
|
-
|
|
118
|
-
default:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
118
|
+
b(a, { focused: A.value }, {
|
|
119
|
+
default: N(() => [
|
|
120
|
+
t("div", Nt, [
|
|
121
|
+
Ue(p.$slots, "prepend"),
|
|
122
|
+
c[6] || (c[6] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
|
|
123
|
+
t("div", Et, [
|
|
124
|
+
Pe(t("input", {
|
|
124
125
|
type: "text",
|
|
125
126
|
ref_key: "minInputRef",
|
|
126
127
|
ref: d,
|
|
127
|
-
onFocus:
|
|
128
|
-
onBlur:
|
|
129
|
-
"onUpdate:modelValue":
|
|
130
|
-
class:
|
|
128
|
+
onFocus: c[0] || (c[0] = () => k.value = !0),
|
|
129
|
+
onBlur: c[1] || (c[1] = () => k.value = !1),
|
|
130
|
+
"onUpdate:modelValue": c[2] || (c[2] = (S) => u.value = S),
|
|
131
|
+
class: le({
|
|
131
132
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
132
133
|
"text-fm-color-typo-primary": !o.value,
|
|
133
134
|
"text-fm-color-typo-disabled": o.value
|
|
134
135
|
})
|
|
135
136
|
}, null, 34), [
|
|
136
|
-
[
|
|
137
|
+
[Be, u.value]
|
|
137
138
|
])
|
|
138
139
|
]),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
c[7] || (c[7] = t("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
|
|
141
|
+
c[8] || (c[8] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
|
|
142
|
+
t("div", zt, [
|
|
143
|
+
Pe(t("input", {
|
|
143
144
|
type: "text",
|
|
144
145
|
ref_key: "maxInputRef",
|
|
145
146
|
ref: m,
|
|
146
|
-
onFocus:
|
|
147
|
-
onBlur:
|
|
148
|
-
"onUpdate:modelValue":
|
|
149
|
-
class:
|
|
147
|
+
onFocus: c[3] || (c[3] = () => T.value = !0),
|
|
148
|
+
onBlur: c[4] || (c[4] = () => T.value = !1),
|
|
149
|
+
"onUpdate:modelValue": c[5] || (c[5] = (S) => _.value = S),
|
|
150
|
+
class: le({
|
|
150
151
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
151
152
|
"text-fm-color-typo-primary": !o.value,
|
|
152
153
|
"text-fm-color-typo-disabled": o.value
|
|
153
154
|
})
|
|
154
155
|
}, null, 34), [
|
|
155
|
-
[
|
|
156
|
+
[Be, _.value]
|
|
156
157
|
])
|
|
157
158
|
]),
|
|
158
|
-
|
|
159
|
+
Ue(p.$slots, "append")
|
|
159
160
|
])
|
|
160
161
|
]),
|
|
161
162
|
_: 3
|
|
162
163
|
}, 8, ["focused"])
|
|
163
164
|
]),
|
|
164
|
-
|
|
165
|
+
b(v, {
|
|
165
166
|
class: "flex-1",
|
|
166
167
|
"model-value": p.modelValue,
|
|
167
168
|
info: p.labelInfo,
|
|
168
|
-
rules:
|
|
169
|
+
rules: q.value,
|
|
169
170
|
"helper-text": p.helperText,
|
|
170
171
|
"helper-state": p.helperState
|
|
171
172
|
}, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
|
|
@@ -173,71 +174,71 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Pt = { c
|
|
|
173
174
|
};
|
|
174
175
|
}
|
|
175
176
|
});
|
|
176
|
-
function
|
|
177
|
-
return function(
|
|
178
|
-
return !
|
|
177
|
+
function Qt({ min: f, max: x } = { min: !0, max: !0 }) {
|
|
178
|
+
return function(r) {
|
|
179
|
+
return !r || !r.min && f != !1 || !r.max && x != !1 ? "Required" : !0;
|
|
179
180
|
};
|
|
180
181
|
}
|
|
181
|
-
function
|
|
182
|
-
return function(
|
|
183
|
-
return !
|
|
182
|
+
function Yt(f, x) {
|
|
183
|
+
return function(r) {
|
|
184
|
+
return !r || !r.min || !r.max ? !0 : +se(r.min) < f ? `Must be between ${f} and ${x}` : +se(r.max) > x ? `Must be between ${f} and ${x}` : !0;
|
|
184
185
|
};
|
|
185
186
|
}
|
|
186
|
-
function
|
|
187
|
-
const
|
|
188
|
-
return function(
|
|
189
|
-
const s = !(
|
|
190
|
-
return !s && !u ? `Min & max must be a multiple of ${
|
|
187
|
+
function Ht(f) {
|
|
188
|
+
const x = xt(f), h = se(f);
|
|
189
|
+
return function(i) {
|
|
190
|
+
const s = !(i != null && i.min) || x(i.min) === !0, u = !(i != null && i.max) || x(i.max) === !0;
|
|
191
|
+
return !s && !u ? `Min & max must be a multiple of ${h}` : s ? u ? !0 : `Max must be a multiple of ${h}` : `Min must be a multiple of ${h}`;
|
|
191
192
|
};
|
|
192
193
|
}
|
|
193
|
-
const et =
|
|
194
|
+
const et = ht("netsuite-custom-field-helper", () => {
|
|
194
195
|
const f = Je();
|
|
195
|
-
function h
|
|
196
|
-
var
|
|
197
|
-
if (!
|
|
196
|
+
function x(h, r, i, s, u) {
|
|
197
|
+
var y, o, d;
|
|
198
|
+
if (!i) {
|
|
198
199
|
u == null || u("Unit is not valid");
|
|
199
200
|
return;
|
|
200
201
|
}
|
|
201
|
-
let _ =
|
|
202
|
-
if (((
|
|
203
|
-
const m = f.getItemCustomCode(
|
|
202
|
+
let _ = h.code;
|
|
203
|
+
if (((y = h.measurement) == null ? void 0 : y.id) !== ((o = i.measurement) == null ? void 0 : o.id) && f.isEnabled) {
|
|
204
|
+
const m = f.getItemCustomCode(r, (d = i.measurement) == null ? void 0 : d.id);
|
|
204
205
|
m && (_ = m);
|
|
205
206
|
}
|
|
206
207
|
s({
|
|
207
|
-
...
|
|
208
|
-
quantity:
|
|
209
|
-
measurement:
|
|
208
|
+
...h,
|
|
209
|
+
quantity: i.amount,
|
|
210
|
+
measurement: i.measurement ?? null,
|
|
210
211
|
code: _
|
|
211
212
|
});
|
|
212
213
|
}
|
|
213
214
|
return {
|
|
214
|
-
validateUnitInput:
|
|
215
|
+
validateUnitInput: x
|
|
215
216
|
};
|
|
216
217
|
});
|
|
217
218
|
var Y = /* @__PURE__ */ ((f) => (f.Code = "Code", f.Name = "Name", f.DefaultAmount = "DefaultAmount", f.Limit = "Limit", f.Step = "Step", f.Cost = "Cost", f.Delete = "Delete", f))(Y || {});
|
|
218
|
-
function
|
|
219
|
-
const { t:
|
|
220
|
-
|
|
221
|
-
for (const
|
|
222
|
-
if (!
|
|
219
|
+
function Wt(f, x = {}) {
|
|
220
|
+
const { t: h } = me(), r = We(), i = he(), s = st({}), u = et();
|
|
221
|
+
Te(() => {
|
|
222
|
+
for (const y of f.items) {
|
|
223
|
+
if (!y.totalCost)
|
|
223
224
|
continue;
|
|
224
|
-
const { cost: o } =
|
|
225
|
-
item:
|
|
226
|
-
amount:
|
|
227
|
-
measurement:
|
|
225
|
+
const { cost: o } = xe.calculateDefaultCost({
|
|
226
|
+
item: y.sku,
|
|
227
|
+
amount: y.quantity,
|
|
228
|
+
measurement: y.measurement,
|
|
228
229
|
overrides: {
|
|
229
230
|
supplier: f.supplier
|
|
230
231
|
},
|
|
231
232
|
defaultCurrency: ct()
|
|
232
|
-
}), d =
|
|
233
|
-
o ? s[
|
|
233
|
+
}), d = y.totalCost ?? xe.reset();
|
|
234
|
+
o ? s[y.sku._id] = o.amount !== d.amount || o.precision !== d.precision : s[y.sku._id] = !0;
|
|
234
235
|
}
|
|
235
236
|
});
|
|
236
237
|
const _ = [
|
|
237
238
|
{
|
|
238
239
|
id: "Code",
|
|
239
240
|
header: () => Q("div", { class: "flex-col" }, [
|
|
240
|
-
Q("div",
|
|
241
|
+
Q("div", h("inventory.transfer.form.items.table.Code")),
|
|
241
242
|
Q(
|
|
242
243
|
"div",
|
|
243
244
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
@@ -246,8 +247,8 @@ function Ht(f, h = {}) {
|
|
|
246
247
|
]),
|
|
247
248
|
accessorKey: "code",
|
|
248
249
|
size: 180,
|
|
249
|
-
cell(
|
|
250
|
-
const o =
|
|
250
|
+
cell(y) {
|
|
251
|
+
const o = y.row.original;
|
|
251
252
|
return Q("div", [
|
|
252
253
|
Q(ue.FmTextField, {
|
|
253
254
|
modelValue: o.code,
|
|
@@ -259,7 +260,7 @@ function Ht(f, h = {}) {
|
|
|
259
260
|
},
|
|
260
261
|
helperText: o.sku.code,
|
|
261
262
|
key: o.sku._id,
|
|
262
|
-
rules: [
|
|
263
|
+
rules: [ke()],
|
|
263
264
|
labelMark: "required"
|
|
264
265
|
})
|
|
265
266
|
]);
|
|
@@ -269,7 +270,7 @@ function Ht(f, h = {}) {
|
|
|
269
270
|
{
|
|
270
271
|
id: "Name",
|
|
271
272
|
header: () => Q("div", { class: "flex-col" }, [
|
|
272
|
-
Q("div",
|
|
273
|
+
Q("div", h("inventory.transfer.form.items.table.Name")),
|
|
273
274
|
Q(
|
|
274
275
|
"div",
|
|
275
276
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
@@ -277,8 +278,8 @@ function Ht(f, h = {}) {
|
|
|
277
278
|
)
|
|
278
279
|
]),
|
|
279
280
|
minSize: 300,
|
|
280
|
-
cell(
|
|
281
|
-
const o =
|
|
281
|
+
cell(y) {
|
|
282
|
+
const o = y.row.original;
|
|
282
283
|
return Q("div", [
|
|
283
284
|
Q(ue.FmTextField, {
|
|
284
285
|
modelValue: o.name,
|
|
@@ -290,7 +291,7 @@ function Ht(f, h = {}) {
|
|
|
290
291
|
},
|
|
291
292
|
helperText: o.sku.name,
|
|
292
293
|
key: o.sku._id,
|
|
293
|
-
rules: [
|
|
294
|
+
rules: [ke()],
|
|
294
295
|
labelMark: "required"
|
|
295
296
|
})
|
|
296
297
|
]);
|
|
@@ -299,13 +300,13 @@ function Ht(f, h = {}) {
|
|
|
299
300
|
},
|
|
300
301
|
{
|
|
301
302
|
id: "DefaultAmount",
|
|
302
|
-
header: () =>
|
|
303
|
+
header: () => h("inventory.transfer.form.items.table.DefaultAmount"),
|
|
303
304
|
minSize: 200,
|
|
304
|
-
cell(
|
|
305
|
-
var
|
|
306
|
-
const o =
|
|
305
|
+
cell(y) {
|
|
306
|
+
var A;
|
|
307
|
+
const o = y.row.original, d = r.skuById[o.sku._id], m = r.unitById[(A = d.unit) == null ? void 0 : A._id], k = m.measurements.find((q) => {
|
|
307
308
|
var p;
|
|
308
|
-
return ((p = o.measurement) == null ? void 0 : p.id) ===
|
|
309
|
+
return ((p = o.measurement) == null ? void 0 : p.id) === q.id;
|
|
309
310
|
}), T = o.sku.unit._id !== d.unit._id || !m || o.measurement && !k;
|
|
310
311
|
return Q(Ft, {
|
|
311
312
|
style: {
|
|
@@ -319,11 +320,11 @@ function Ht(f, h = {}) {
|
|
|
319
320
|
disabled: f.disabled,
|
|
320
321
|
key: o.sku._id,
|
|
321
322
|
unit: m,
|
|
322
|
-
"onUpdate:modelValue": (
|
|
323
|
+
"onUpdate:modelValue": (q) => {
|
|
323
324
|
u.validateUnitInput(
|
|
324
325
|
o,
|
|
325
326
|
d,
|
|
326
|
-
|
|
327
|
+
q,
|
|
327
328
|
(p) => {
|
|
328
329
|
f.updateItem({
|
|
329
330
|
...o,
|
|
@@ -364,9 +365,9 @@ function Ht(f, h = {}) {
|
|
|
364
365
|
header: () => "Limit",
|
|
365
366
|
// TODO: i18n,
|
|
366
367
|
minSize: 280,
|
|
367
|
-
cell(
|
|
368
|
-
const o =
|
|
369
|
-
return Q(
|
|
368
|
+
cell(y) {
|
|
369
|
+
const o = y.row.original;
|
|
370
|
+
return Q(jt, {
|
|
370
371
|
style: {
|
|
371
372
|
flex: "1 1 0%"
|
|
372
373
|
},
|
|
@@ -382,9 +383,9 @@ function Ht(f, h = {}) {
|
|
|
382
383
|
d != null && d.min ? m.minimumQuantity = d.min : m.minimumQuantity = null, d != null && d.max ? m.maximumQuantity = d.max : m.maximumQuantity = null, f.updateItem(m);
|
|
383
384
|
},
|
|
384
385
|
rules: [
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
386
|
+
Qt({ max: !1 }),
|
|
387
|
+
Ht(o.quantityStep),
|
|
388
|
+
Yt(
|
|
388
389
|
+se({
|
|
389
390
|
amount: 0,
|
|
390
391
|
precision: be(o.sku.unit, o.measurement)
|
|
@@ -399,12 +400,12 @@ function Ht(f, h = {}) {
|
|
|
399
400
|
},
|
|
400
401
|
{
|
|
401
402
|
id: "Step",
|
|
402
|
-
header: () =>
|
|
403
|
+
header: () => h("inventory.transfer.form.items.table.Step"),
|
|
403
404
|
minSize: 100,
|
|
404
|
-
cell(
|
|
405
|
-
const o =
|
|
405
|
+
cell(y) {
|
|
406
|
+
const o = y.row.original;
|
|
406
407
|
return Q(ue.FmTextField, {
|
|
407
|
-
modelValue: se(o.quantityStep ??
|
|
408
|
+
modelValue: se(o.quantityStep ?? xe.reset(), !1),
|
|
408
409
|
key: o.sku._id,
|
|
409
410
|
"onUpdate:modelValue": (d) => {
|
|
410
411
|
f.updateItem({
|
|
@@ -413,11 +414,11 @@ function Ht(f, h = {}) {
|
|
|
413
414
|
});
|
|
414
415
|
},
|
|
415
416
|
rules: [
|
|
416
|
-
|
|
417
|
+
we({
|
|
417
418
|
amount: 1,
|
|
418
419
|
precision: be(o.sku.unit, o.measurement)
|
|
419
420
|
}),
|
|
420
|
-
|
|
421
|
+
_t(o.sku.unit, o.measurement)
|
|
421
422
|
]
|
|
422
423
|
});
|
|
423
424
|
},
|
|
@@ -426,10 +427,10 @@ function Ht(f, h = {}) {
|
|
|
426
427
|
{
|
|
427
428
|
id: "Delete",
|
|
428
429
|
header: "",
|
|
429
|
-
cell(
|
|
430
|
-
const o =
|
|
430
|
+
cell(y) {
|
|
431
|
+
const o = y.row.original;
|
|
431
432
|
return Q("div", { class: "flex items-center" }, [
|
|
432
|
-
|
|
433
|
+
i.usePurchaseOrderV2 ? Q(
|
|
433
434
|
ue.FmTooltip,
|
|
434
435
|
{
|
|
435
436
|
zIndex: 50,
|
|
@@ -496,108 +497,108 @@ function Ht(f, h = {}) {
|
|
|
496
497
|
}
|
|
497
498
|
];
|
|
498
499
|
return {
|
|
499
|
-
columnDefs:
|
|
500
|
-
const
|
|
501
|
-
if (Object.keys(
|
|
502
|
-
for (const [d, m] of Object.entries(
|
|
500
|
+
columnDefs: B(() => {
|
|
501
|
+
const y = he(), o = [..._];
|
|
502
|
+
if (Object.keys(x).length > 0)
|
|
503
|
+
for (const [d, m] of Object.entries(x))
|
|
503
504
|
o.splice(Number(d), 0, {
|
|
504
505
|
...m,
|
|
505
506
|
id: d
|
|
506
507
|
});
|
|
507
|
-
return
|
|
508
|
+
return y.enableTotalCost && f.transferType === X.enum.purchase ? o : o.filter((d) => d.id !== "Cost");
|
|
508
509
|
})
|
|
509
510
|
};
|
|
510
511
|
}
|
|
511
|
-
const
|
|
512
|
+
const Gt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-center" }, Zt = { class: "flex-1 flex gap-1 items-center" }, Jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Xt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, eo = { class: "flex gap-8 w-full" }, to = { class: "flex-1 flex flex-col gap-4" }, oo = { class: "flex-1 flex flex-col gap-4" }, so = {
|
|
512
513
|
key: 0,
|
|
513
514
|
class: "flex gap-8 w-full"
|
|
514
|
-
},
|
|
515
|
+
}, no = { class: "flex-1 flex flex-col gap-4" }, lo = { class: "flex-1 flex flex-col gap-4" }, ro = { class: "flex gap-8 w-full" }, ao = { class: "flex-1 flex flex-col gap-4" }, io = /* @__PURE__ */ ae({
|
|
515
516
|
__name: "TransferTemplateItem",
|
|
516
517
|
props: {
|
|
517
518
|
cellByColId: {},
|
|
518
519
|
row: {}
|
|
519
520
|
},
|
|
520
521
|
setup(f) {
|
|
521
|
-
const { t:
|
|
522
|
-
function
|
|
523
|
-
return
|
|
522
|
+
const { t: x } = me();
|
|
523
|
+
function h(r) {
|
|
524
|
+
return r;
|
|
524
525
|
}
|
|
525
|
-
return (
|
|
526
|
-
var u, _,
|
|
527
|
-
const s =
|
|
528
|
-
return
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
526
|
+
return (r, i) => {
|
|
527
|
+
var u, _, $, y, o, d, m, k, T, A, q, p, c, w, a, v, S, I, g, W, te, E, U, Z, n, l, F, P, z, G;
|
|
528
|
+
const s = R("FmLabel");
|
|
529
|
+
return O(), L("div", Gt, [
|
|
530
|
+
t("div", Kt, [
|
|
531
|
+
t("div", Zt, [
|
|
532
|
+
t("span", Jt, " (" + M(r.row.original.sku.code) + ") ", 1),
|
|
533
|
+
t("span", Xt, M(r.row.original.sku.name), 1)
|
|
533
534
|
]),
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
render: (
|
|
537
|
-
props: (o = (
|
|
535
|
+
t("div", null, [
|
|
536
|
+
b(e(ee), {
|
|
537
|
+
render: ($ = (_ = (u = r.cellByColId.Delete) == null ? void 0 : u.column) == null ? void 0 : _.columnDef) == null ? void 0 : $.cell,
|
|
538
|
+
props: (o = (y = r.cellByColId.Delete) == null ? void 0 : y.getContext) == null ? void 0 : o.call(y)
|
|
538
539
|
}, null, 8, ["render", "props"])
|
|
539
540
|
])
|
|
540
541
|
]),
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
label:
|
|
542
|
+
t("div", eo, [
|
|
543
|
+
t("div", to, [
|
|
544
|
+
b(s, {
|
|
545
|
+
label: e(x)(`inventory.transfer.form.items.table.${e(Y).Code}`)
|
|
545
546
|
}, null, 8, ["label"]),
|
|
546
|
-
|
|
547
|
-
render: (k = (m = (d =
|
|
548
|
-
props: (
|
|
547
|
+
b(e(ee), {
|
|
548
|
+
render: (k = (m = (d = r.cellByColId[e(Y).Code]) == null ? void 0 : d.column) == null ? void 0 : m.columnDef) == null ? void 0 : k.cell,
|
|
549
|
+
props: (A = (T = r.cellByColId[e(Y).Code]) == null ? void 0 : T.getContext) == null ? void 0 : A.call(T)
|
|
549
550
|
}, null, 8, ["render", "props"]),
|
|
550
|
-
|
|
551
|
+
i[0] || (i[0] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
551
552
|
]),
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
label:
|
|
553
|
+
t("div", oo, [
|
|
554
|
+
b(s, {
|
|
555
|
+
label: e(x)(`inventory.transfer.form.items.table.${e(Y).Name}`)
|
|
555
556
|
}, null, 8, ["label"]),
|
|
556
|
-
|
|
557
|
-
render: (
|
|
558
|
-
props: (
|
|
557
|
+
b(e(ee), {
|
|
558
|
+
render: (c = (p = (q = r.cellByColId[e(Y).Name]) == null ? void 0 : q.column) == null ? void 0 : p.columnDef) == null ? void 0 : c.cell,
|
|
559
|
+
props: (a = (w = r.cellByColId[e(Y).Name]) == null ? void 0 : w.getContext) == null ? void 0 : a.call(w)
|
|
559
560
|
}, null, 8, ["render", "props"]),
|
|
560
|
-
|
|
561
|
+
i[1] || (i[1] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
561
562
|
])
|
|
562
563
|
]),
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
label:
|
|
564
|
+
r.row.original ? (O(), L("div", so, [
|
|
565
|
+
t("div", no, [
|
|
566
|
+
b(s, {
|
|
567
|
+
label: e(x)(`inventory.transfer.form.items.table.${e(Y).DefaultAmount}`)
|
|
567
568
|
}, null, 8, ["label"]),
|
|
568
|
-
|
|
569
|
-
render: (
|
|
570
|
-
props: (W = (
|
|
569
|
+
b(e(ee), {
|
|
570
|
+
render: (I = (S = (v = r.cellByColId[e(Y).DefaultAmount]) == null ? void 0 : v.column) == null ? void 0 : S.columnDef) == null ? void 0 : I.cell,
|
|
571
|
+
props: (W = (g = r.cellByColId[e(Y).DefaultAmount]) == null ? void 0 : g.getContext) == null ? void 0 : W.call(g)
|
|
571
572
|
}, null, 8, ["render", "props"]),
|
|
572
|
-
|
|
573
|
+
i[2] || (i[2] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
573
574
|
]),
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
label:
|
|
575
|
+
t("div", lo, [
|
|
576
|
+
b(s, {
|
|
577
|
+
label: e(x)(`inventory.transfer.form.items.table.${e(Y).Step}`)
|
|
577
578
|
}, null, 8, ["label"]),
|
|
578
|
-
|
|
579
|
-
render: (
|
|
580
|
-
props: (n = (Z =
|
|
579
|
+
b(e(ee), {
|
|
580
|
+
render: (U = (E = (te = r.cellByColId[e(Y).Step]) == null ? void 0 : te.column) == null ? void 0 : E.columnDef) == null ? void 0 : U.cell,
|
|
581
|
+
props: (n = (Z = r.cellByColId[e(Y).Step]) == null ? void 0 : Z.getContext) == null ? void 0 : n.call(Z)
|
|
581
582
|
}, null, 8, ["render", "props"]),
|
|
582
|
-
|
|
583
|
+
i[3] || (i[3] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
583
584
|
])
|
|
584
585
|
])) : oe("", !0),
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
label:
|
|
586
|
+
t("div", ro, [
|
|
587
|
+
t("div", ao, [
|
|
588
|
+
b(s, {
|
|
589
|
+
label: e(x)(`inventory.transfer.form.items.table.${e(Y).Limit}`)
|
|
589
590
|
}, null, 8, ["label"]),
|
|
590
|
-
|
|
591
|
-
render: (P = (F = (l =
|
|
592
|
-
props: (G = (z =
|
|
591
|
+
b(e(ee), {
|
|
592
|
+
render: (P = (F = (l = r.cellByColId[e(Y).Limit]) == null ? void 0 : l.column) == null ? void 0 : F.columnDef) == null ? void 0 : P.cell,
|
|
593
|
+
props: (G = (z = r.cellByColId[e(Y).Limit]) == null ? void 0 : z.getContext) == null ? void 0 : G.call(z)
|
|
593
594
|
}, null, 8, ["render", "props"]),
|
|
594
|
-
|
|
595
|
+
i[4] || (i[4] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
595
596
|
])
|
|
596
597
|
])
|
|
597
598
|
]);
|
|
598
599
|
};
|
|
599
600
|
}
|
|
600
|
-
}),
|
|
601
|
+
}), uo = { class: "fm-typo-en-body-md-400 line-clamp-2 w-full" }, mo = { key: 0 }, po = ["colspan"], co = /* @__PURE__ */ ae({
|
|
601
602
|
__name: "TransferTemplateItemTable",
|
|
602
603
|
props: {
|
|
603
604
|
row: {},
|
|
@@ -606,60 +607,60 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
606
607
|
},
|
|
607
608
|
emits: ["update:item"],
|
|
608
609
|
setup(f) {
|
|
609
|
-
function h
|
|
610
|
-
return
|
|
610
|
+
function x(h) {
|
|
611
|
+
return h.column.columnDef.meta;
|
|
611
612
|
}
|
|
612
|
-
return (
|
|
613
|
-
|
|
613
|
+
return (h, r) => (O(), L(pe, null, [
|
|
614
|
+
t("tr", {
|
|
614
615
|
class: "hover:bg-fm-color-opacity-sm border-b border-fm-color-neutral-gray-100",
|
|
615
|
-
style:
|
|
616
|
+
style: _e({ backgroundColor: h.errorMessage ? "#ffd6d6" : void 0 })
|
|
616
617
|
}, [
|
|
617
|
-
(
|
|
618
|
-
var s, u, _,
|
|
619
|
-
return
|
|
620
|
-
key:
|
|
621
|
-
class:
|
|
622
|
-
style:
|
|
623
|
-
width: (u =
|
|
624
|
-
maxWidth: (
|
|
625
|
-
textAlign: ((
|
|
618
|
+
(O(!0), L(pe, null, Qe(h.row.getVisibleCells(), (i) => {
|
|
619
|
+
var s, u, _, $, y;
|
|
620
|
+
return O(), L("td", {
|
|
621
|
+
key: i.id,
|
|
622
|
+
class: le(["text-fm-color-typo-primary", ((s = x(i)) == null ? void 0 : s.cellClass) ?? "px-16", "py-2"]),
|
|
623
|
+
style: _e({
|
|
624
|
+
width: (u = x(i)) != null && u.width ? (_ = x(i)) == null ? void 0 : _.width : i.column.getSize() !== 0 ? `${i.column.getSize()}px` : void 0,
|
|
625
|
+
maxWidth: ($ = x(i)) == null ? void 0 : $.maxWidth,
|
|
626
|
+
textAlign: ((y = x(i)) == null ? void 0 : y.textAlign) ?? "left"
|
|
626
627
|
})
|
|
627
628
|
}, [
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
props:
|
|
631
|
-
render:
|
|
629
|
+
t("span", uo, [
|
|
630
|
+
b(e(ee), {
|
|
631
|
+
props: i.getContext(),
|
|
632
|
+
render: i.column.columnDef.cell
|
|
632
633
|
}, null, 8, ["props", "render"])
|
|
633
634
|
])
|
|
634
635
|
], 6);
|
|
635
636
|
}), 128))
|
|
636
637
|
], 4),
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
colspan:
|
|
638
|
+
h.errorMessage ? (O(), L("tr", mo, [
|
|
639
|
+
t("td", {
|
|
640
|
+
colspan: h.row.getVisibleCells().length,
|
|
640
641
|
class: "text-red-600 px-16 py-2"
|
|
641
|
-
},
|
|
642
|
+
}, M(h.errorMessage), 9, po)
|
|
642
643
|
])) : oe("", !0)
|
|
643
644
|
], 64));
|
|
644
645
|
}
|
|
645
|
-
}),
|
|
646
|
+
}), fo = { class: "flex flex-col gap-16" }, yo = { class: "flex flex-col gap-24" }, vo = { class: "flex flex-col gap-16" }, bo = { class: "flex items-center" }, ho = { class: "flex flex-col" }, go = { class: "flex flex-col gap-16" }, xo = { class: "flex gap-3" }, _o = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, ko = {
|
|
646
647
|
key: 0,
|
|
647
648
|
class: "border rounded-sm px-8 py-2 bg-fm-color-system-warning-100 fm-typo-en-body-lg-400"
|
|
648
|
-
},
|
|
649
|
+
}, wo = { class: "border rounded-sm px-8 py-2 bg-fm-color-system-info-100 fm-typo-en-body-lg-400" }, To = { class: "mb-2" }, Fo = /* @__PURE__ */ ae({
|
|
649
650
|
__name: "TransferTemplateForm",
|
|
650
651
|
props: {
|
|
651
652
|
modelValue: {},
|
|
652
653
|
disabled: { type: Boolean }
|
|
653
654
|
},
|
|
654
655
|
emits: ["update:disabled"],
|
|
655
|
-
setup(f, { expose:
|
|
656
|
-
const
|
|
657
|
-
|
|
656
|
+
setup(f, { expose: x, emit: h }) {
|
|
657
|
+
const r = f, i = h, s = Ze(), { t: u } = me(), _ = H({}), $ = Ge(), y = We(), o = St(), d = he(), m = Je(), k = et();
|
|
658
|
+
Fe(
|
|
658
659
|
() => s.purchaseOrder.items.length,
|
|
659
660
|
() => {
|
|
660
661
|
_.value = {};
|
|
661
662
|
}
|
|
662
|
-
),
|
|
663
|
+
), $.watchLocation(async () => {
|
|
663
664
|
location && (s.purchaseOrder.supplier || (s.purchaseOrder.supplier = o.suppliers.find((n) => n) ?? s.purchaseOrder.supplier));
|
|
664
665
|
});
|
|
665
666
|
const T = Dt(
|
|
@@ -670,7 +671,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
670
671
|
supplier: n.supplier ?? (s == null ? void 0 : s.purchaseOrder.supplier)
|
|
671
672
|
};
|
|
672
673
|
}
|
|
673
|
-
),
|
|
674
|
+
), A = B({
|
|
674
675
|
get() {
|
|
675
676
|
var n, l;
|
|
676
677
|
return typeof ((l = (n = s.purchaseOrder) == null ? void 0 : n.supplier) == null ? void 0 : l.internal) == "string" ? X.enum.transfer : X.enum.purchase;
|
|
@@ -680,7 +681,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
680
681
|
const l = typeof ((P = (F = s.purchaseOrder) == null ? void 0 : F.supplier) == null ? void 0 : P.internal) == "string" ? X.enum.transfer : X.enum.purchase;
|
|
681
682
|
n !== l && (s.purchaseOrder.supplier = n === X.enum.purchase ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
|
|
682
683
|
}
|
|
683
|
-
}),
|
|
684
|
+
}), q = B(() => T.transferLocationOptions.value), p = B({
|
|
684
685
|
get() {
|
|
685
686
|
var n;
|
|
686
687
|
return (n = s.purchaseOrder.supplier) == null ? void 0 : n._id;
|
|
@@ -689,20 +690,20 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
689
690
|
T.transferLocationModel.value = n;
|
|
690
691
|
}
|
|
691
692
|
});
|
|
692
|
-
async function
|
|
693
|
+
async function c() {
|
|
693
694
|
const n = await m.checkCustomFieldCodes({
|
|
694
695
|
beforeStart: async () => {
|
|
695
|
-
|
|
696
|
+
i("update:disabled", !0);
|
|
696
697
|
},
|
|
697
698
|
templateItems: s.purchaseOrder.items
|
|
698
699
|
});
|
|
699
|
-
_.value = n,
|
|
700
|
+
_.value = n, i("update:disabled", !1);
|
|
700
701
|
}
|
|
701
702
|
const {
|
|
702
703
|
promptSelectLocations: w,
|
|
703
|
-
columnDefs:
|
|
704
|
-
rowData:
|
|
705
|
-
} =
|
|
704
|
+
columnDefs: a,
|
|
705
|
+
rowData: v
|
|
706
|
+
} = $t({
|
|
706
707
|
getLocations() {
|
|
707
708
|
return s.locations;
|
|
708
709
|
},
|
|
@@ -710,36 +711,36 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
710
711
|
s.locations = n;
|
|
711
712
|
}
|
|
712
713
|
});
|
|
713
|
-
function
|
|
714
|
+
function S() {
|
|
714
715
|
var n, l;
|
|
715
716
|
return (n = s.locations) != null && n.find((F) => {
|
|
716
717
|
var P, z;
|
|
717
718
|
return ((P = F.doc) == null ? void 0 : P._id) === ((z = s.purchaseOrder.supplier) == null ? void 0 : z._id);
|
|
718
719
|
}) ? `Location ${(l = s.purchaseOrder.supplier) == null ? void 0 : l.name} must be removed because template cannot be used to transfer to itself.` : !0;
|
|
719
720
|
}
|
|
720
|
-
const
|
|
721
|
+
const I = B({
|
|
721
722
|
get() {
|
|
722
723
|
return s.purchaseOrder.remark ?? void 0;
|
|
723
724
|
},
|
|
724
725
|
set(n) {
|
|
725
726
|
s.purchaseOrder.remark = n;
|
|
726
727
|
}
|
|
727
|
-
}),
|
|
728
|
-
|
|
728
|
+
}), g = H();
|
|
729
|
+
x({
|
|
729
730
|
validateInputs: () => {
|
|
730
731
|
var n, l;
|
|
731
|
-
(l = (n =
|
|
732
|
+
(l = (n = g.value) == null ? void 0 : n.validateInputs) == null || l.call(n);
|
|
732
733
|
},
|
|
733
734
|
resetInputsValidation: () => {
|
|
734
735
|
var n, l;
|
|
735
|
-
(l = (n =
|
|
736
|
+
(l = (n = g.value) == null ? void 0 : n.resetInputsValidation) == null || l.call(n);
|
|
736
737
|
},
|
|
737
738
|
resetInputs: () => {
|
|
738
739
|
var n, l;
|
|
739
|
-
(l = (n =
|
|
740
|
+
(l = (n = g.value) == null ? void 0 : n.resetInputs) == null || l.call(n);
|
|
740
741
|
}
|
|
741
742
|
});
|
|
742
|
-
const W =
|
|
743
|
+
const W = B(() => ({
|
|
743
744
|
duplicateItem: (n) => {
|
|
744
745
|
s.purchaseOrder.items = [
|
|
745
746
|
...s.purchaseOrder.items,
|
|
@@ -757,7 +758,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
757
758
|
let l = [];
|
|
758
759
|
n.id ? l = s.purchaseOrder.items.filter((F) => F.id !== n.id) : l = s.purchaseOrder.items.filter((F) => F.sku._id !== n.sku._id), s.purchaseOrder.items = l;
|
|
759
760
|
}
|
|
760
|
-
})), te =
|
|
761
|
+
})), te = Wt(
|
|
761
762
|
{
|
|
762
763
|
duplicateItem: W.value.duplicateItem,
|
|
763
764
|
updateItem: W.value.updateItem,
|
|
@@ -772,7 +773,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
772
773
|
return X.enum.purchase;
|
|
773
774
|
},
|
|
774
775
|
get disabled() {
|
|
775
|
-
return
|
|
776
|
+
return r.disabled;
|
|
776
777
|
}
|
|
777
778
|
},
|
|
778
779
|
m.transferTemplateColumnDefs({
|
|
@@ -788,27 +789,27 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
788
789
|
});
|
|
789
790
|
}
|
|
790
791
|
})
|
|
791
|
-
), E =
|
|
792
|
+
), E = B(() => te.columnDefs.value), { promptSelectIngredients: U } = Ot();
|
|
792
793
|
async function Z() {
|
|
793
|
-
const l =
|
|
794
|
+
const l = y.skus.map((D) => ({
|
|
794
795
|
label: D.name,
|
|
795
796
|
sublabel: D.code,
|
|
796
797
|
value: D
|
|
797
798
|
})).filter((D) => {
|
|
798
|
-
var
|
|
799
|
-
return (
|
|
800
|
-
}).map((D) => D.value), F = s.purchaseOrder.items ?? [], P = await
|
|
799
|
+
var V;
|
|
800
|
+
return (V = s.purchaseOrder.items) == null ? void 0 : V.find((K) => K.sku._id === D.value._id);
|
|
801
|
+
}).map((D) => D.value), F = s.purchaseOrder.items ?? [], P = await U(
|
|
801
802
|
l.map((D) => D._id),
|
|
802
803
|
(D) => {
|
|
803
|
-
const
|
|
804
|
+
const V = y.skuById[D], K = F.find((j) => j.sku._id === V._id);
|
|
804
805
|
if (K)
|
|
805
806
|
return K;
|
|
806
|
-
const J = { amount: 1, precision: be(
|
|
807
|
+
const J = { amount: 1, precision: be(V.unit) };
|
|
807
808
|
let C = {
|
|
808
809
|
id: d.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
|
|
809
|
-
sku:
|
|
810
|
-
code:
|
|
811
|
-
name:
|
|
810
|
+
sku: V,
|
|
811
|
+
code: V.code,
|
|
812
|
+
name: V.name,
|
|
812
813
|
quantity: J,
|
|
813
814
|
minimumQuantity: J,
|
|
814
815
|
// maximumQuantity: adjustmentAmountMultiplyDecimal(minimumQuantity, {
|
|
@@ -819,7 +820,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
819
820
|
};
|
|
820
821
|
return k.validateUnitInput(
|
|
821
822
|
C,
|
|
822
|
-
|
|
823
|
+
V,
|
|
823
824
|
{
|
|
824
825
|
amount: J,
|
|
825
826
|
measurement: null
|
|
@@ -833,153 +834,153 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
833
834
|
if (!P) return;
|
|
834
835
|
const z = P.map((D) => D.sku._id), G = [];
|
|
835
836
|
for (const D of z) {
|
|
836
|
-
const
|
|
837
|
-
if (
|
|
838
|
-
G.push(...
|
|
837
|
+
const V = F.filter((K) => K.sku._id === D);
|
|
838
|
+
if (V.length > 0)
|
|
839
|
+
G.push(...V);
|
|
839
840
|
else {
|
|
840
841
|
const K = P.find((J) => J.sku._id === D);
|
|
841
842
|
K && G.push(K);
|
|
842
843
|
}
|
|
843
844
|
}
|
|
844
|
-
G.sort((D,
|
|
845
|
+
G.sort((D, V) => D.sku.code.localeCompare(V.sku.code)), s.purchaseOrder.items = G;
|
|
845
846
|
}
|
|
846
847
|
return (n, l) => {
|
|
847
|
-
const F =
|
|
848
|
-
return
|
|
848
|
+
const F = R("FmTextField"), P = R("FmSelect"), z = R("FmTextarea"), G = R("FmButton"), D = R("FmTable"), V = R("FmFormGroup"), K = R("FmForm");
|
|
849
|
+
return O(), ne(K, {
|
|
849
850
|
ref_key: "formRef",
|
|
850
|
-
ref:
|
|
851
|
+
ref: g,
|
|
851
852
|
class: "flex flex-col gap-32",
|
|
852
853
|
disabled: n.disabled
|
|
853
854
|
}, {
|
|
854
|
-
default:
|
|
855
|
+
default: N(() => {
|
|
855
856
|
var J;
|
|
856
857
|
return [
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
label:
|
|
858
|
+
t("div", fo, [
|
|
859
|
+
t("div", yo, [
|
|
860
|
+
b(F, {
|
|
861
|
+
label: e(u)("inventory.transfer.form.name"),
|
|
861
862
|
"label-mark": "required",
|
|
862
|
-
modelValue:
|
|
863
|
-
"onUpdate:modelValue": l[0] || (l[0] = (C) =>
|
|
864
|
-
rules: [
|
|
863
|
+
modelValue: e(s).name,
|
|
864
|
+
"onUpdate:modelValue": l[0] || (l[0] = (C) => e(s).name = C),
|
|
865
|
+
rules: [e(ke)()]
|
|
865
866
|
}, null, 8, ["label", "modelValue", "rules"]),
|
|
866
|
-
|
|
867
|
-
label:
|
|
868
|
-
"model-value":
|
|
869
|
-
"onUpdate:modelValue": l[1] || (l[1] = (C) =>
|
|
867
|
+
b(P, {
|
|
868
|
+
label: e(u)("inventory.transfer.form.type.title"),
|
|
869
|
+
"model-value": A.value,
|
|
870
|
+
"onUpdate:modelValue": l[1] || (l[1] = (C) => A.value = C),
|
|
870
871
|
items: [
|
|
871
872
|
{
|
|
872
|
-
label:
|
|
873
|
-
value:
|
|
874
|
-
disabled: !
|
|
875
|
-
sublabel:
|
|
873
|
+
label: e(u)("inventory.transfer.form.type.purchase"),
|
|
874
|
+
value: e(X).enum.purchase,
|
|
875
|
+
disabled: !e(T).locationOptionsTypePurchase.value.length,
|
|
876
|
+
sublabel: e(T).locationOptionsTypePurchase.value.length ? void 0 : e(u)("inventory.transfer.form.noSupplierAvailable")
|
|
876
877
|
},
|
|
877
878
|
{
|
|
878
|
-
label:
|
|
879
|
-
value:
|
|
880
|
-
disabled: !
|
|
881
|
-
sublabel:
|
|
879
|
+
label: e(u)("inventory.transfer.form.type.transfer"),
|
|
880
|
+
value: e(X).enum.transfer,
|
|
881
|
+
disabled: !e(T).locationOptionsTypeTransfer.value.length,
|
|
882
|
+
sublabel: e(T).locationOptionsTypeTransfer.value.length ? void 0 : e(u)("inventory.transfer.form.noLocationAvailable")
|
|
882
883
|
}
|
|
883
884
|
],
|
|
884
|
-
rules: [
|
|
885
|
+
rules: [e(we)(1)(q.value)]
|
|
885
886
|
}, {
|
|
886
|
-
default:
|
|
887
|
-
|
|
888
|
-
class:
|
|
887
|
+
default: N(() => [
|
|
888
|
+
t("span", {
|
|
889
|
+
class: le([
|
|
889
890
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
890
891
|
n.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
891
892
|
])
|
|
892
|
-
},
|
|
893
|
+
}, M(e(ft)(A.value)), 3)
|
|
893
894
|
]),
|
|
894
895
|
_: 1
|
|
895
896
|
}, 8, ["label", "model-value", "items", "rules"]),
|
|
896
|
-
|
|
897
|
-
label:
|
|
897
|
+
b(P, {
|
|
898
|
+
label: A.value === e(X).enum.purchase ? e(u)("inventory.transfer.form.purchaseFrom") : e(u)("inventory.transfer.form.transferFrom"),
|
|
898
899
|
modelValue: p.value,
|
|
899
900
|
"onUpdate:modelValue": l[2] || (l[2] = (C) => p.value = C),
|
|
900
|
-
items:
|
|
901
|
+
items: q.value
|
|
901
902
|
}, {
|
|
902
|
-
"menu-wrapper":
|
|
903
|
+
"menu-wrapper": N((C) => {
|
|
903
904
|
var j;
|
|
904
905
|
return [
|
|
905
|
-
|
|
906
|
-
items:
|
|
906
|
+
b(Vt, Ye(C, {
|
|
907
|
+
items: q.value,
|
|
907
908
|
"model-value": (j = n.modelValue.purchaseOrder.supplier) == null ? void 0 : j._id
|
|
908
909
|
}), null, 16, ["items", "model-value"])
|
|
909
910
|
];
|
|
910
911
|
}),
|
|
911
|
-
default:
|
|
912
|
+
default: N(() => {
|
|
912
913
|
var C;
|
|
913
914
|
return [
|
|
914
|
-
|
|
915
|
-
class:
|
|
915
|
+
t("span", {
|
|
916
|
+
class: le([
|
|
916
917
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
917
918
|
n.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
918
919
|
])
|
|
919
|
-
},
|
|
920
|
+
}, M((C = q.value.find((j) => j.value === p.value)) == null ? void 0 : C.label), 3)
|
|
920
921
|
];
|
|
921
922
|
}),
|
|
922
923
|
_: 1
|
|
923
924
|
}, 8, ["label", "modelValue", "items"]),
|
|
924
|
-
|
|
925
|
-
label:
|
|
925
|
+
b(F, {
|
|
926
|
+
label: e(u)("inventory.transfer.form.reference"),
|
|
926
927
|
"label-mark": "optional",
|
|
927
|
-
modelValue:
|
|
928
|
-
"onUpdate:modelValue": l[3] || (l[3] = (C) =>
|
|
928
|
+
modelValue: e(s).purchaseOrder.ref,
|
|
929
|
+
"onUpdate:modelValue": l[3] || (l[3] = (C) => e(s).purchaseOrder.ref = C)
|
|
929
930
|
}, null, 8, ["label", "modelValue"]),
|
|
930
|
-
|
|
931
|
-
label:
|
|
931
|
+
b(z, {
|
|
932
|
+
label: e(u)("inventory.transfer.form.remark"),
|
|
932
933
|
"label-mark": "optional",
|
|
933
934
|
"max-length": 240,
|
|
934
|
-
modelValue:
|
|
935
|
-
"onUpdate:modelValue": l[4] || (l[4] = (C) =>
|
|
936
|
-
class:
|
|
935
|
+
modelValue: I.value,
|
|
936
|
+
"onUpdate:modelValue": l[4] || (l[4] = (C) => I.value = C),
|
|
937
|
+
class: le({ "text-fm-color-typo-disabled": n.disabled })
|
|
937
938
|
}, null, 8, ["label", "modelValue", "class"])
|
|
938
939
|
])
|
|
939
940
|
]),
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
l[8] || (l[8] =
|
|
943
|
-
|
|
941
|
+
t("div", vo, [
|
|
942
|
+
t("div", bo, [
|
|
943
|
+
l[8] || (l[8] = t("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
|
|
944
|
+
b(G, {
|
|
944
945
|
disabled: n.disabled,
|
|
945
946
|
label: "Select location",
|
|
946
947
|
"prepend-icon": "add",
|
|
947
948
|
variant: "plain",
|
|
948
949
|
class: "border-2 rounded-lg border-fm-color-primary",
|
|
949
|
-
onClick:
|
|
950
|
+
onClick: e(w)
|
|
950
951
|
}, null, 8, ["disabled", "onClick"])
|
|
951
952
|
]),
|
|
952
|
-
|
|
953
|
-
"column-defs":
|
|
954
|
-
"row-data":
|
|
953
|
+
b(D, {
|
|
954
|
+
"column-defs": e(a),
|
|
955
|
+
"row-data": e(v),
|
|
955
956
|
"shrink-at": 9999,
|
|
956
|
-
onRowClick:
|
|
957
|
+
onRowClick: e(w),
|
|
957
958
|
"hide-footer": ""
|
|
958
959
|
}, null, 8, ["column-defs", "row-data", "onRowClick"]),
|
|
959
|
-
|
|
960
|
-
|
|
960
|
+
t("div", ho, [
|
|
961
|
+
b(V, {
|
|
961
962
|
"model-value": [
|
|
962
|
-
(J =
|
|
963
|
-
...
|
|
963
|
+
(J = r.modelValue.purchaseOrder.supplier) == null ? void 0 : J._id,
|
|
964
|
+
...r.modelValue.locations ?? []
|
|
964
965
|
].join(","),
|
|
965
|
-
rules: [
|
|
966
|
+
rules: [S]
|
|
966
967
|
}, null, 8, ["model-value", "rules"])
|
|
967
968
|
])
|
|
968
969
|
]),
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
970
|
+
t("div", go, [
|
|
971
|
+
t("div", xo, [
|
|
972
|
+
t("div", _o, M(e(u)("inventory.transfer.form.items.title")), 1),
|
|
973
|
+
e(m).isEnabled ? (O(), ne(G, {
|
|
973
974
|
key: 0,
|
|
974
975
|
label: "Check NetSuite",
|
|
975
976
|
"prepend-icon": "troubleshoot",
|
|
976
977
|
variant: "secondary",
|
|
977
|
-
onClick:
|
|
978
|
+
onClick: c,
|
|
978
979
|
size: "md"
|
|
979
980
|
})) : oe("", !0),
|
|
980
|
-
|
|
981
|
+
b(G, {
|
|
981
982
|
disabled: n.disabled,
|
|
982
|
-
label:
|
|
983
|
+
label: e(u)("inventory.transfer.form.items.addItem"),
|
|
983
984
|
"prepend-icon": "add",
|
|
984
985
|
variant: "plain",
|
|
985
986
|
class: "border-2 rounded-lg border-fm-color-primary",
|
|
@@ -987,44 +988,44 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
987
988
|
size: "md"
|
|
988
989
|
}, null, 8, ["disabled", "label"])
|
|
989
990
|
]),
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
991
|
+
e(m).isEnabled ? (O(), L("div", ko, l[9] || (l[9] = [
|
|
992
|
+
re(" NetSuite is enabled. "),
|
|
993
|
+
t("ul", { style: { "list-style": "initial", "margin-left": "20px" } }, [
|
|
994
|
+
t("li", null, ' When adding new item or changing UOM, the first match available custom code (if any) will be applied to "Code" for each item by default. '),
|
|
995
|
+
t("li", null, ' You can also choose to change the code by selecting from the "NetSuite" button in each row. ')
|
|
995
996
|
], -1),
|
|
996
|
-
|
|
997
|
+
t("p", { class: "fm-typo-en-body-lg-600 mt-2" }, " If you use custom code for certain items, please make sure that the custom code is correct before saving the template. ", -1)
|
|
997
998
|
]))) : oe("", !0),
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
l[10] || (l[10] =
|
|
1002
|
-
l[11] || (l[11] =
|
|
999
|
+
t("div", wo, [
|
|
1000
|
+
t("p", To, [
|
|
1001
|
+
re(' Set "' + M(e(u)("inventory.transfer.form.items.table.DefaultAmount")) + '" to "0" to mark the item as ', 1),
|
|
1002
|
+
l[10] || (l[10] = t("b", null, "optional", -1)),
|
|
1003
|
+
l[11] || (l[11] = re(" when creating an order request. "))
|
|
1003
1004
|
]),
|
|
1004
|
-
l[12] || (l[12] =
|
|
1005
|
+
l[12] || (l[12] = t("p", null, ' You can leave "Max" empty to remove the limit on the maximum quantity of the item when creating an order request. ', -1))
|
|
1005
1006
|
]),
|
|
1006
|
-
(
|
|
1007
|
+
(O(), ne(D, {
|
|
1007
1008
|
"column-defs": E.value,
|
|
1008
|
-
"row-data":
|
|
1009
|
-
key:
|
|
1009
|
+
"row-data": e(s).purchaseOrder.items,
|
|
1010
|
+
key: e(s).purchaseOrder.items.map((C) => C.sku._id).join("."),
|
|
1010
1011
|
"hide-footer": "",
|
|
1011
|
-
"page-size":
|
|
1012
|
+
"page-size": e(s).purchaseOrder.items.length
|
|
1012
1013
|
}, {
|
|
1013
|
-
"table-row":
|
|
1014
|
-
|
|
1014
|
+
"table-row": N((C) => [
|
|
1015
|
+
b(co, {
|
|
1015
1016
|
row: C,
|
|
1016
1017
|
errorMessage: _.value[C.index],
|
|
1017
1018
|
"onUpdate:item": l[6] || (l[6] = (j) => W.value.updateItem(j)),
|
|
1018
1019
|
disabled: n.disabled
|
|
1019
1020
|
}, null, 8, ["row", "errorMessage", "disabled"])
|
|
1020
1021
|
]),
|
|
1021
|
-
"list-row":
|
|
1022
|
-
(
|
|
1022
|
+
"list-row": N((C) => [
|
|
1023
|
+
(O(), ne(Xe, {
|
|
1023
1024
|
row: C,
|
|
1024
|
-
key:
|
|
1025
|
+
key: e(s).purchaseOrder.items.map((j) => j.sku._id).join(".")
|
|
1025
1026
|
}, {
|
|
1026
|
-
default:
|
|
1027
|
-
|
|
1027
|
+
default: N((j) => [
|
|
1028
|
+
b(io, {
|
|
1028
1029
|
row: C,
|
|
1029
1030
|
"cell-by-col-id": j,
|
|
1030
1031
|
"onUpdate:item": l[7] || (l[7] = (ie) => W.value.updateItem(ie)),
|
|
@@ -1036,9 +1037,9 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1036
1037
|
]),
|
|
1037
1038
|
_: 1
|
|
1038
1039
|
}, 8, ["column-defs", "row-data", "page-size"])),
|
|
1039
|
-
|
|
1040
|
-
"model-value":
|
|
1041
|
-
rules: [
|
|
1040
|
+
b(V, {
|
|
1041
|
+
"model-value": e(s).purchaseOrder.items.length,
|
|
1042
|
+
rules: [e(we)(1)]
|
|
1042
1043
|
}, null, 8, ["model-value", "rules"])
|
|
1043
1044
|
])
|
|
1044
1045
|
];
|
|
@@ -1047,62 +1048,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1047
1048
|
}, 8, ["disabled"]);
|
|
1048
1049
|
};
|
|
1049
1050
|
}
|
|
1050
|
-
}),
|
|
1051
|
-
__name: "FmConfirmationButton",
|
|
1052
|
-
props: {
|
|
1053
|
-
label: {},
|
|
1054
|
-
loading: { type: Boolean },
|
|
1055
|
-
confirmTitle: {},
|
|
1056
|
-
confirmMessage: {}
|
|
1057
|
-
},
|
|
1058
|
-
emits: ["confirm"],
|
|
1059
|
-
setup(f, { emit: h }) {
|
|
1060
|
-
const y = f, a = h, r = H(!1);
|
|
1061
|
-
function s() {
|
|
1062
|
-
r.value = !1, a("confirm");
|
|
1063
|
-
}
|
|
1064
|
-
return (u, _) => {
|
|
1065
|
-
const M = V("FmButton"), v = V("FmDialog");
|
|
1066
|
-
return S(), L("div", null, [
|
|
1067
|
-
c(M, {
|
|
1068
|
-
label: y.label,
|
|
1069
|
-
loading: y.loading,
|
|
1070
|
-
onClick: _[0] || (_[0] = (o) => r.value = !0)
|
|
1071
|
-
}, null, 8, ["label", "loading"]),
|
|
1072
|
-
c(v, {
|
|
1073
|
-
modelValue: r.value,
|
|
1074
|
-
"onUpdate:modelValue": _[2] || (_[2] = (o) => r.value = o),
|
|
1075
|
-
overlay: !0
|
|
1076
|
-
}, {
|
|
1077
|
-
"dialog-header": B(() => [
|
|
1078
|
-
e("div", null, I(y.confirmTitle || "Confirm"), 1)
|
|
1079
|
-
]),
|
|
1080
|
-
"dialog-footer": B(() => [
|
|
1081
|
-
e("div", Fo, [
|
|
1082
|
-
c(M, {
|
|
1083
|
-
label: "Cancel",
|
|
1084
|
-
variant: "tertiary",
|
|
1085
|
-
onClick: _[1] || (_[1] = (o) => r.value = !1)
|
|
1086
|
-
}),
|
|
1087
|
-
c(M, {
|
|
1088
|
-
class: "ml-auto",
|
|
1089
|
-
label: "Confirm",
|
|
1090
|
-
variant: "primary",
|
|
1091
|
-
onClick: s
|
|
1092
|
-
})
|
|
1093
|
-
])
|
|
1094
|
-
]),
|
|
1095
|
-
default: B(() => [
|
|
1096
|
-
xe(u.$slots, "dialog-content", {}, () => [
|
|
1097
|
-
le(I(y.confirmMessage || "Are you sure you want to proceed?"), 1)
|
|
1098
|
-
])
|
|
1099
|
-
]),
|
|
1100
|
-
_: 3
|
|
1101
|
-
}, 8, ["modelValue"])
|
|
1102
|
-
]);
|
|
1103
|
-
};
|
|
1104
|
-
}
|
|
1105
|
-
}), Io = { class: "flex items-center" }, Mo = { class: "fm-typo-en-title-md-800" }, $o = { class: "flex gap-4" }, So = /* @__PURE__ */ ae({
|
|
1051
|
+
}), Co = { class: "flex items-center" }, Io = { class: "fm-typo-en-title-md-800" }, Mo = { class: "flex gap-4" }, So = /* @__PURE__ */ ae({
|
|
1106
1052
|
__name: "TransferTemplateDialog",
|
|
1107
1053
|
props: /* @__PURE__ */ Le({
|
|
1108
1054
|
mode: {},
|
|
@@ -1113,10 +1059,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1113
1059
|
disabledModifiers: {}
|
|
1114
1060
|
}),
|
|
1115
1061
|
emits: /* @__PURE__ */ Le(["update:show", "submitted"], ["update:disabled"]),
|
|
1116
|
-
setup(f, { expose:
|
|
1062
|
+
setup(f, { expose: x, emit: h }) {
|
|
1117
1063
|
var w;
|
|
1118
|
-
const
|
|
1119
|
-
function
|
|
1064
|
+
const r = f, i = h, s = At(), u = vt(), { t: _ } = me(), $ = Ke(r, "show");
|
|
1065
|
+
function y() {
|
|
1120
1066
|
return {
|
|
1121
1067
|
_id: "",
|
|
1122
1068
|
name: "",
|
|
@@ -1146,16 +1092,16 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1146
1092
|
}
|
|
1147
1093
|
};
|
|
1148
1094
|
}
|
|
1149
|
-
const o = H(
|
|
1150
|
-
|
|
1151
|
-
() =>
|
|
1152
|
-
(
|
|
1153
|
-
var
|
|
1154
|
-
|
|
1095
|
+
const o = H(r.modelValue ?? y()), d = H(((w = r.modelValue) == null ? void 0 : w._id) ?? `${Math.random()}`);
|
|
1096
|
+
Fe(
|
|
1097
|
+
() => r.show,
|
|
1098
|
+
(a) => {
|
|
1099
|
+
var v;
|
|
1100
|
+
a && (o.value = r.modelValue ?? y(), d.value = ((v = r.modelValue) == null ? void 0 : v._id) ?? `${Math.random()}`);
|
|
1155
1101
|
}
|
|
1156
1102
|
);
|
|
1157
|
-
const m = nt(f, "disabled"), k =
|
|
1158
|
-
switch (
|
|
1103
|
+
const m = nt(f, "disabled"), k = B(() => {
|
|
1104
|
+
switch (r.mode) {
|
|
1159
1105
|
case de.READ:
|
|
1160
1106
|
return "";
|
|
1161
1107
|
case de.CREATE:
|
|
@@ -1165,129 +1111,129 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1165
1111
|
}
|
|
1166
1112
|
return "";
|
|
1167
1113
|
}), T = H();
|
|
1168
|
-
|
|
1114
|
+
x({
|
|
1169
1115
|
validateInputs: () => {
|
|
1170
|
-
var
|
|
1171
|
-
(
|
|
1116
|
+
var a, v;
|
|
1117
|
+
(v = (a = T.value) == null ? void 0 : a.validateInputs) == null || v.call(a);
|
|
1172
1118
|
},
|
|
1173
1119
|
resetInputsValidation: () => {
|
|
1174
|
-
var
|
|
1175
|
-
(
|
|
1120
|
+
var a, v;
|
|
1121
|
+
(v = (a = T.value) == null ? void 0 : a.resetInputsValidation) == null || v.call(a);
|
|
1176
1122
|
},
|
|
1177
1123
|
resetInputs: () => {
|
|
1178
|
-
var
|
|
1179
|
-
(
|
|
1124
|
+
var a, v;
|
|
1125
|
+
(v = (a = T.value) == null ? void 0 : a.resetInputs) == null || v.call(a);
|
|
1180
1126
|
}
|
|
1181
1127
|
});
|
|
1182
|
-
async function
|
|
1183
|
-
var
|
|
1184
|
-
const
|
|
1185
|
-
if (
|
|
1186
|
-
m.value = !0, (((
|
|
1187
|
-
({ totalCost:
|
|
1128
|
+
async function A() {
|
|
1129
|
+
var v, S;
|
|
1130
|
+
const a = o.value;
|
|
1131
|
+
if (a) {
|
|
1132
|
+
m.value = !0, (((v = a.purchaseOrder.supplier) == null ? void 0 : v.internal) === ye.enum.warehouse || ((S = a.purchaseOrder.supplier) == null ? void 0 : S.internal) === ye.enum.restaurant) && (a.purchaseOrder.items = a.purchaseOrder.items.map(
|
|
1133
|
+
({ totalCost: I, ...g }) => g
|
|
1188
1134
|
));
|
|
1189
1135
|
try {
|
|
1190
|
-
await s.createTemplate(
|
|
1136
|
+
await s.createTemplate(a), await new Promise((I) => setTimeout(I, 1e3)), u.open({
|
|
1191
1137
|
title: _("inventory.transfer.template.create.success"),
|
|
1192
1138
|
message: _("inventory.transfer.template.create.successMessage"),
|
|
1193
1139
|
type: "success"
|
|
1194
|
-
}),
|
|
1195
|
-
} catch (
|
|
1140
|
+
}), i("update:show", !1), i("submitted");
|
|
1141
|
+
} catch (I) {
|
|
1196
1142
|
u.open({
|
|
1197
1143
|
title: _("inventory.transfer.template.create.error"),
|
|
1198
1144
|
message: _("inventory.transfer.template.create.errorMessage"),
|
|
1199
1145
|
type: "error"
|
|
1200
|
-
}), console.error("Error in creating transfer template",
|
|
1146
|
+
}), console.error("Error in creating transfer template", I);
|
|
1201
1147
|
} finally {
|
|
1202
1148
|
m.value = !1;
|
|
1203
1149
|
}
|
|
1204
1150
|
}
|
|
1205
1151
|
}
|
|
1206
|
-
async function
|
|
1207
|
-
var
|
|
1208
|
-
const
|
|
1209
|
-
if (
|
|
1210
|
-
m.value = !0, (((
|
|
1211
|
-
({ totalCost:
|
|
1152
|
+
async function q() {
|
|
1153
|
+
var v, S;
|
|
1154
|
+
const a = o.value;
|
|
1155
|
+
if (a) {
|
|
1156
|
+
m.value = !0, (((v = a.purchaseOrder.supplier) == null ? void 0 : v.internal) === ye.enum.warehouse || ((S = a.purchaseOrder.supplier) == null ? void 0 : S.internal) === ye.enum.restaurant) && (a.purchaseOrder.items = a.purchaseOrder.items.map(
|
|
1157
|
+
({ totalCost: I, ...g }) => g
|
|
1212
1158
|
));
|
|
1213
1159
|
try {
|
|
1214
|
-
await s.updateTemplate(
|
|
1160
|
+
await s.updateTemplate(a), await new Promise((I) => setTimeout(I, 1e3)), u.open({
|
|
1215
1161
|
title: _("inventory.transfer.template.update.success"),
|
|
1216
1162
|
message: _("inventory.transfer.template.update.successMessage"),
|
|
1217
1163
|
type: "success"
|
|
1218
|
-
}),
|
|
1219
|
-
} catch (
|
|
1164
|
+
}), i("update:show", !1), i("submitted");
|
|
1165
|
+
} catch (I) {
|
|
1220
1166
|
u.open({
|
|
1221
1167
|
title: _("inventory.transfer.template.update.error"),
|
|
1222
1168
|
message: _("inventory.transfer.template.update.errorMessage"),
|
|
1223
1169
|
type: "error"
|
|
1224
|
-
}), console.error("Error in updating transfer template",
|
|
1170
|
+
}), console.error("Error in updating transfer template", I);
|
|
1225
1171
|
} finally {
|
|
1226
1172
|
m.value = !1;
|
|
1227
1173
|
}
|
|
1228
1174
|
}
|
|
1229
1175
|
}
|
|
1230
1176
|
function p() {
|
|
1231
|
-
switch (
|
|
1177
|
+
switch (r.mode) {
|
|
1232
1178
|
case de.CREATE:
|
|
1233
|
-
return
|
|
1179
|
+
return A();
|
|
1234
1180
|
case de.UPDATE:
|
|
1235
|
-
return
|
|
1181
|
+
return q();
|
|
1236
1182
|
}
|
|
1237
1183
|
}
|
|
1238
|
-
function
|
|
1239
|
-
var
|
|
1240
|
-
(
|
|
1184
|
+
function c() {
|
|
1185
|
+
var a, v;
|
|
1186
|
+
(v = (a = T.value) == null ? void 0 : a.validateInputs) == null || v.call(a);
|
|
1241
1187
|
}
|
|
1242
|
-
return (
|
|
1243
|
-
const
|
|
1244
|
-
return
|
|
1245
|
-
modelValue:
|
|
1246
|
-
"onUpdate:modelValue":
|
|
1188
|
+
return (a, v) => {
|
|
1189
|
+
const S = R("FmButton"), I = R("FmSideSheet");
|
|
1190
|
+
return O(), ne(I, {
|
|
1191
|
+
modelValue: e($),
|
|
1192
|
+
"onUpdate:modelValue": v[3] || (v[3] = (g) => He($) ? $.value = g : null),
|
|
1247
1193
|
"dismiss-away": "",
|
|
1248
1194
|
"close-button": "",
|
|
1249
1195
|
"max-width": 1600
|
|
1250
1196
|
}, {
|
|
1251
|
-
"side-sheet-header":
|
|
1252
|
-
|
|
1253
|
-
|
|
1197
|
+
"side-sheet-header": N(() => [
|
|
1198
|
+
t("div", Co, [
|
|
1199
|
+
t("div", Io, M(k.value), 1)
|
|
1254
1200
|
])
|
|
1255
1201
|
]),
|
|
1256
|
-
default:
|
|
1257
|
-
(
|
|
1202
|
+
default: N(() => [
|
|
1203
|
+
(O(), ne(Fo, {
|
|
1258
1204
|
class: "w-full",
|
|
1259
1205
|
ref_key: "formRef",
|
|
1260
1206
|
ref: T,
|
|
1261
1207
|
onValidationSuccess: p,
|
|
1262
1208
|
"model-value": o.value,
|
|
1263
|
-
"onUpdate:modelValue":
|
|
1209
|
+
"onUpdate:modelValue": v[0] || (v[0] = (g) => o.value = g),
|
|
1264
1210
|
disabled: m.value,
|
|
1265
|
-
"onUpdate:disabled":
|
|
1211
|
+
"onUpdate:disabled": v[1] || (v[1] = (g) => m.value = g),
|
|
1266
1212
|
key: d.value
|
|
1267
1213
|
}, null, 8, ["model-value", "disabled"]))
|
|
1268
1214
|
]),
|
|
1269
|
-
"side-sheet-footer":
|
|
1270
|
-
|
|
1271
|
-
|
|
1215
|
+
"side-sheet-footer": N(() => [
|
|
1216
|
+
t("div", Mo, [
|
|
1217
|
+
b(Rt, {
|
|
1272
1218
|
loading: m.value,
|
|
1273
|
-
label:
|
|
1274
|
-
"confirm-title": `Save ${
|
|
1275
|
-
onConfirm:
|
|
1219
|
+
label: e(_)("common.save"),
|
|
1220
|
+
"confirm-title": `Save ${r.mode === e(de).CREATE ? "Template" : "Changes"}`,
|
|
1221
|
+
onConfirm: c
|
|
1276
1222
|
}, {
|
|
1277
|
-
"dialog-content":
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1223
|
+
"dialog-content": N(() => v[4] || (v[4] = [
|
|
1224
|
+
t("div", { class: "fm-typo-en-body-md-400 bg-fm-color-primary-oats p-8 rounded" }, [
|
|
1225
|
+
re(" Warning: This action "),
|
|
1226
|
+
t("span", { class: "text-fm-color-system-error-300" }, "will not"),
|
|
1227
|
+
re(" create or update any order request, but only a template. ")
|
|
1282
1228
|
], -1)
|
|
1283
1229
|
])),
|
|
1284
1230
|
_: 1
|
|
1285
1231
|
}, 8, ["loading", "label", "confirm-title"]),
|
|
1286
|
-
|
|
1232
|
+
b(S, {
|
|
1287
1233
|
disabled: m.value,
|
|
1288
1234
|
variant: "tertiary",
|
|
1289
|
-
label:
|
|
1290
|
-
onClick:
|
|
1235
|
+
label: e(_)("common.close"),
|
|
1236
|
+
onClick: v[2] || (v[2] = (g) => i("update:show", !1))
|
|
1291
1237
|
}, null, 8, ["disabled", "label"])
|
|
1292
1238
|
])
|
|
1293
1239
|
]),
|
|
@@ -1295,103 +1241,103 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1295
1241
|
}, 8, ["modelValue"]);
|
|
1296
1242
|
};
|
|
1297
1243
|
}
|
|
1298
|
-
}), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" },
|
|
1244
|
+
}), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, $o = { class: "flex justify-between" }, Do = { class: "fm-typo-en-body-lg-600" }, Vo = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ao = { class: "flex flex-col gap-8" }, Ro = { class: "flex flex-col gap-4" }, qo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Uo = { class: "flex gap-1" }, Po = { class: "fm-typo-en-body-lg-600" }, Bo = {
|
|
1299
1245
|
key: 0,
|
|
1300
1246
|
class: "flex flex-col gap-4"
|
|
1301
|
-
},
|
|
1247
|
+
}, Lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, No = { class: "flex gap-1" }, Eo = { class: "fm-typo-en-body-lg-600" }, zo = {
|
|
1302
1248
|
key: 1,
|
|
1303
1249
|
class: "flex flex-col gap-4"
|
|
1304
|
-
},
|
|
1250
|
+
}, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qo = { class: "fm-typo-en-body-lg-600" }, Yo = {
|
|
1305
1251
|
key: 2,
|
|
1306
1252
|
class: "flex flex-col gap-4"
|
|
1307
|
-
},
|
|
1253
|
+
}, Ho = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wo = { class: "fm-typo-en-body-lg-600" }, Go = {
|
|
1308
1254
|
key: 3,
|
|
1309
1255
|
class: "flex flex-col gap-4"
|
|
1310
|
-
},
|
|
1256
|
+
}, Ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Zo = { class: "fm-typo-en-body-lg-600" }, Jo = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Xo = { class: "flex flex-col gap-8" }, es = { class: "fm-typo-en-body-lg-600" }, ts = { class: "flex w-full gap-4" }, os = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, ss = { class: "fm-typo-en-body-lg-600 shrink-0" }, ns = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, ls = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, rs = {
|
|
1311
1257
|
key: 0,
|
|
1312
1258
|
class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1313
|
-
},
|
|
1259
|
+
}, as = {
|
|
1314
1260
|
key: 0,
|
|
1315
1261
|
class: "flex gap-4 items-center"
|
|
1316
|
-
},
|
|
1262
|
+
}, is = { class: "flex flex-col gap-12" }, us = { class: "flex flex-col gap-8" }, ds = { class: "flex gap-8 xs:flex-col" }, ms = /* @__PURE__ */ ae({
|
|
1317
1263
|
__name: "TransferTemplateDetails",
|
|
1318
1264
|
props: {
|
|
1319
1265
|
template: {},
|
|
1320
1266
|
show: { type: Boolean }
|
|
1321
1267
|
},
|
|
1322
1268
|
emits: ["update:show", "action:edit"],
|
|
1323
|
-
setup(f, { emit:
|
|
1324
|
-
const
|
|
1269
|
+
setup(f, { emit: x }) {
|
|
1270
|
+
const h = f, r = x, i = he(), { t: s } = me(), u = B(() => {
|
|
1325
1271
|
var m;
|
|
1326
|
-
return (m =
|
|
1272
|
+
return (m = h.template) == null ? void 0 : m.purchaseOrder;
|
|
1327
1273
|
}), _ = [
|
|
1328
1274
|
{ accessorKey: "name", header: () => "Name" },
|
|
1329
1275
|
{ accessorKey: "type", header: () => "Type" }
|
|
1330
|
-
],
|
|
1276
|
+
], $ = H(""), y = B(
|
|
1331
1277
|
() => {
|
|
1332
|
-
var m, k, T,
|
|
1333
|
-
return ((k = (m = u.value) == null ? void 0 : m.supplier) == null ? void 0 : k.internal) === "restaurant" || ((
|
|
1278
|
+
var m, k, T, A;
|
|
1279
|
+
return ((k = (m = u.value) == null ? void 0 : m.supplier) == null ? void 0 : k.internal) === "restaurant" || ((A = (T = u.value) == null ? void 0 : T.supplier) == null ? void 0 : A.internal) === "warehouse" ? X.enum.transfer : X.enum.purchase;
|
|
1334
1280
|
}
|
|
1335
|
-
), o = H(!0), d = Ke(
|
|
1281
|
+
), o = H(!0), d = Ke(h, "show");
|
|
1336
1282
|
return (m, k) => {
|
|
1337
|
-
var
|
|
1338
|
-
const T =
|
|
1339
|
-
return
|
|
1340
|
-
header:
|
|
1341
|
-
modelValue:
|
|
1342
|
-
"onUpdate:modelValue": k[2] || (k[2] = (
|
|
1283
|
+
var v;
|
|
1284
|
+
const T = R("FmMenuDivider"), A = R("FmCard"), q = R("FmIcon"), p = R("FmTextField"), c = R("FmTable"), w = R("FmButton"), a = R("FmSideSheet");
|
|
1285
|
+
return O(), ne(a, {
|
|
1286
|
+
header: e(s)("inventory.transfer.template.details.view", { template: (v = m.template) == null ? void 0 : v.name }),
|
|
1287
|
+
modelValue: e(d),
|
|
1288
|
+
"onUpdate:modelValue": k[2] || (k[2] = (S) => He(d) ? d.value = S : null),
|
|
1343
1289
|
"dismiss-away": o.value,
|
|
1344
1290
|
"close-button": "",
|
|
1345
1291
|
"max-width": 1200
|
|
1346
1292
|
}, {
|
|
1347
|
-
default:
|
|
1348
|
-
var
|
|
1293
|
+
default: N(() => {
|
|
1294
|
+
var S, I;
|
|
1349
1295
|
return [
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1296
|
+
t("div", Oo, [
|
|
1297
|
+
t("div", null, [
|
|
1298
|
+
b(A, {
|
|
1353
1299
|
variant: "outlined",
|
|
1354
1300
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1355
1301
|
}, {
|
|
1356
|
-
default:
|
|
1357
|
-
var
|
|
1302
|
+
default: N(() => {
|
|
1303
|
+
var g, W, te, E, U, Z, n, l, F;
|
|
1358
1304
|
return [
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
`inventory.transfer.receiveRequest.details.type.${
|
|
1305
|
+
t("div", $o, [
|
|
1306
|
+
t("div", Do, M(e(s)("inventory.transfer.template.details.templateSummary")), 1),
|
|
1307
|
+
t("div", Vo, M(e(s)(
|
|
1308
|
+
`inventory.transfer.receiveRequest.details.type.${y.value.toLocaleLowerCase("en-US")}`
|
|
1363
1309
|
)), 1)
|
|
1364
1310
|
]),
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1311
|
+
b(T),
|
|
1312
|
+
t("div", Ao, [
|
|
1313
|
+
t("div", Ro, [
|
|
1314
|
+
t("div", qo, [
|
|
1315
|
+
t("div", Uo, M(e(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1370
1316
|
]),
|
|
1371
|
-
|
|
1317
|
+
t("div", Po, M(e(qt)(((g = m.template) == null ? void 0 : g._id) ?? "")), 1)
|
|
1372
1318
|
]),
|
|
1373
|
-
(W = m.template) != null && W.updatedAt ? (
|
|
1374
|
-
|
|
1375
|
-
|
|
1319
|
+
(W = m.template) != null && W.updatedAt ? (O(), L("div", Bo, [
|
|
1320
|
+
t("div", Lo, [
|
|
1321
|
+
t("div", No, M(e(s)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
|
|
1376
1322
|
]),
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
(te = m.template.updatedBy) != null && te.name ? (
|
|
1380
|
-
|
|
1323
|
+
t("div", Eo, [
|
|
1324
|
+
re(M(e(Ut)(new Date(m.template.updatedAt))) + " ", 1),
|
|
1325
|
+
(te = m.template.updatedBy) != null && te.name ? (O(), L(pe, { key: 0 }, [
|
|
1326
|
+
re(" (" + M(m.template.updatedBy.name) + ") ", 1)
|
|
1381
1327
|
], 64)) : oe("", !0)
|
|
1382
1328
|
])
|
|
1383
1329
|
])) : oe("", !0),
|
|
1384
|
-
(
|
|
1385
|
-
|
|
1386
|
-
|
|
1330
|
+
(U = (E = u.value) == null ? void 0 : E.supplier) != null && U.name ? (O(), L("div", zo, [
|
|
1331
|
+
t("div", jo, M(e(s)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1332
|
+
t("div", Qo, M((n = (Z = u.value) == null ? void 0 : Z.supplier) == null ? void 0 : n.name), 1)
|
|
1387
1333
|
])) : oe("", !0),
|
|
1388
|
-
(l = u.value) != null && l.ref ? (
|
|
1389
|
-
|
|
1390
|
-
|
|
1334
|
+
(l = u.value) != null && l.ref ? (O(), L("div", Yo, [
|
|
1335
|
+
t("div", Ho, M(e(s)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1336
|
+
t("div", Wo, M(u.value.ref), 1)
|
|
1391
1337
|
])) : oe("", !0),
|
|
1392
|
-
(F = u.value) != null && F.remark ? (
|
|
1393
|
-
|
|
1394
|
-
|
|
1338
|
+
(F = u.value) != null && F.remark ? (O(), L("div", Go, [
|
|
1339
|
+
t("div", Ko, M(e(s)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1340
|
+
t("div", Zo, M(u.value.remark), 1)
|
|
1395
1341
|
])) : oe("", !0)
|
|
1396
1342
|
])
|
|
1397
1343
|
];
|
|
@@ -1399,64 +1345,64 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1399
1345
|
_: 1
|
|
1400
1346
|
})
|
|
1401
1347
|
]),
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
(
|
|
1406
|
-
key:
|
|
1348
|
+
t("div", Jo, [
|
|
1349
|
+
t("div", Xo, [
|
|
1350
|
+
t("div", es, M(e(s)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
1351
|
+
(O(!0), L(pe, null, Qe(((S = u.value) == null ? void 0 : S.items) ?? [], (g) => (O(), L("div", {
|
|
1352
|
+
key: g.code,
|
|
1407
1353
|
class: "flex flex-col"
|
|
1408
1354
|
}, [
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
k[3] || (k[3] =
|
|
1412
|
-
|
|
1355
|
+
t("div", ts, [
|
|
1356
|
+
t("div", os, M(g.name), 1),
|
|
1357
|
+
k[3] || (k[3] = t("div", { class: "flex-1 min-w-32" }, null, -1)),
|
|
1358
|
+
t("div", ss, M(e(dt)(g.quantity, g.sku.unit, g.measurement)), 1)
|
|
1413
1359
|
]),
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1360
|
+
t("div", ns, [
|
|
1361
|
+
t("div", ls, M(g.code), 1),
|
|
1362
|
+
g.totalCost && e(i).enableTotalCost ? (O(), L("div", rs, " (" + M(e(Tt)(g.totalCost)) + ") ", 1)) : oe("", !0)
|
|
1417
1363
|
]),
|
|
1418
|
-
|
|
1419
|
-
|
|
1364
|
+
e(mt)(g) ? (O(), L("div", as, [
|
|
1365
|
+
b(q, {
|
|
1420
1366
|
name: "error",
|
|
1421
1367
|
color: "system-error-300",
|
|
1422
1368
|
size: "sm"
|
|
1423
1369
|
}),
|
|
1424
|
-
k[4] || (k[4] =
|
|
1370
|
+
k[4] || (k[4] = t("div", { class: "fm-typo-en-body-sm-400 text-fm-color-system-error-400" }, " This item has invalid unit configuration. Apply update on this item. ", -1))
|
|
1425
1371
|
])) : oe("", !0)
|
|
1426
1372
|
]))), 128))
|
|
1427
1373
|
])
|
|
1428
1374
|
]),
|
|
1429
|
-
k[6] || (k[6] =
|
|
1430
|
-
k[7] || (k[7] =
|
|
1431
|
-
|
|
1432
|
-
k[5] || (k[5] =
|
|
1433
|
-
|
|
1434
|
-
|
|
1375
|
+
k[6] || (k[6] = t("div", null, null, -1)),
|
|
1376
|
+
k[7] || (k[7] = t("div", null, null, -1)),
|
|
1377
|
+
t("div", is, [
|
|
1378
|
+
k[5] || (k[5] = t("div", { class: "flex flex-col" }, [
|
|
1379
|
+
t("div", { class: "fm-typo-en-body-lg-600" }, "Enabled locations"),
|
|
1380
|
+
t("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is only usable for the following locations. ")
|
|
1435
1381
|
], -1)),
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
modelValue:
|
|
1439
|
-
"onUpdate:modelValue": k[0] || (k[0] = (
|
|
1382
|
+
t("div", us, [
|
|
1383
|
+
b(p, {
|
|
1384
|
+
modelValue: $.value,
|
|
1385
|
+
"onUpdate:modelValue": k[0] || (k[0] = (g) => $.value = g),
|
|
1440
1386
|
placeholder: "Filter locations",
|
|
1441
1387
|
"prepend-icon": "search"
|
|
1442
1388
|
}, null, 8, ["modelValue"]),
|
|
1443
|
-
c
|
|
1389
|
+
b(c, {
|
|
1444
1390
|
"hide-footer": "",
|
|
1445
1391
|
style: { height: "500px" },
|
|
1446
1392
|
"column-defs": _,
|
|
1447
|
-
"search-value":
|
|
1448
|
-
"row-data": ((
|
|
1393
|
+
"search-value": $.value,
|
|
1394
|
+
"row-data": ((I = h.template) == null ? void 0 : I.locations) ?? [{ name: "All locations" }]
|
|
1449
1395
|
}, null, 8, ["search-value", "row-data"])
|
|
1450
1396
|
])
|
|
1451
1397
|
])
|
|
1452
1398
|
])
|
|
1453
1399
|
];
|
|
1454
1400
|
}),
|
|
1455
|
-
"side-sheet-footer":
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
label:
|
|
1459
|
-
onClick: k[1] || (k[1] = (
|
|
1401
|
+
"side-sheet-footer": N(() => [
|
|
1402
|
+
t("div", ds, [
|
|
1403
|
+
b(w, {
|
|
1404
|
+
label: e(s)("common.edit"),
|
|
1405
|
+
onClick: k[1] || (k[1] = (S) => r("action:edit")),
|
|
1460
1406
|
variant: "tertiary"
|
|
1461
1407
|
}, null, 8, ["label"])
|
|
1462
1408
|
])
|
|
@@ -1465,128 +1411,128 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1465
1411
|
}, 8, ["header", "modelValue", "dismiss-away"]);
|
|
1466
1412
|
};
|
|
1467
1413
|
}
|
|
1468
|
-
}),
|
|
1414
|
+
}), ps = { class: "flex-1 flex flex-col gap-8" }, cs = { class: "flex flex-col" }, fs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ys = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, vs = { class: "fm-typo-en-body-lg-400" }, bs = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, hs = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Qs = /* @__PURE__ */ ae({
|
|
1469
1415
|
__name: "TransferTemplateView",
|
|
1470
1416
|
setup(f) {
|
|
1471
|
-
const { t:
|
|
1472
|
-
|
|
1473
|
-
const
|
|
1474
|
-
() => d.value ||
|
|
1475
|
-
),
|
|
1476
|
-
function
|
|
1477
|
-
switch (
|
|
1417
|
+
const { t: x } = me(), { createTemplate: h, viewTemplate: r, importTemplates: i, exportTemplates: s } = Ne(), { templateDialogProps: u, templateDetailsProps: _ } = ze(Ne()), $ = pt(), { loading: y, templates: o } = ze($), d = H(!1), m = it(), k = Ge(), { breakpoints: T } = bt();
|
|
1418
|
+
Te($.fetchTemplates);
|
|
1419
|
+
const A = B(
|
|
1420
|
+
() => d.value || y.value || !k._currentLocation
|
|
1421
|
+
), q = B(() => o.value), p = H(""), c = B(() => T.value.xs || T.value.sm), w = B(() => c.value ? 10 : 20);
|
|
1422
|
+
function a(I) {
|
|
1423
|
+
switch (I) {
|
|
1478
1424
|
case Ee.Add:
|
|
1479
|
-
return
|
|
1425
|
+
return h();
|
|
1480
1426
|
case "refresh":
|
|
1481
|
-
return
|
|
1427
|
+
return $.fetchTemplates();
|
|
1482
1428
|
case "import":
|
|
1483
|
-
return
|
|
1429
|
+
return i();
|
|
1484
1430
|
case "export":
|
|
1485
1431
|
return s();
|
|
1486
1432
|
}
|
|
1487
1433
|
}
|
|
1488
|
-
function
|
|
1489
|
-
return
|
|
1434
|
+
function v(I) {
|
|
1435
|
+
return I;
|
|
1490
1436
|
}
|
|
1491
|
-
const
|
|
1437
|
+
const S = B(() => [
|
|
1492
1438
|
{
|
|
1493
|
-
label:
|
|
1439
|
+
label: x("inventory.closing.template.create.title"),
|
|
1494
1440
|
value: Ee.Add,
|
|
1495
1441
|
isPrimary: !0,
|
|
1496
1442
|
prependIcon: "add"
|
|
1497
1443
|
},
|
|
1498
1444
|
{
|
|
1499
|
-
label:
|
|
1445
|
+
label: x("inventory.common.refresh"),
|
|
1500
1446
|
value: "refresh",
|
|
1501
1447
|
isPrimary: !1
|
|
1502
1448
|
},
|
|
1503
1449
|
{
|
|
1504
|
-
label:
|
|
1450
|
+
label: x("inventory.common.import"),
|
|
1505
1451
|
value: "import",
|
|
1506
1452
|
isPrimary: !1
|
|
1507
1453
|
},
|
|
1508
1454
|
{
|
|
1509
|
-
label:
|
|
1455
|
+
label: x("inventory.common.export"),
|
|
1510
1456
|
value: "export",
|
|
1511
1457
|
isPrimary: !1
|
|
1512
1458
|
}
|
|
1513
1459
|
]);
|
|
1514
|
-
return (
|
|
1515
|
-
const W =
|
|
1516
|
-
return
|
|
1517
|
-
|
|
1518
|
-
title:
|
|
1519
|
-
actions:
|
|
1520
|
-
"onClick:action":
|
|
1460
|
+
return (I, g) => {
|
|
1461
|
+
const W = R("FmTable");
|
|
1462
|
+
return O(), L(pe, null, [
|
|
1463
|
+
b(ut, {
|
|
1464
|
+
title: e(x)("inventory.transfer.template.title2"),
|
|
1465
|
+
actions: S.value,
|
|
1466
|
+
"onClick:action": a
|
|
1521
1467
|
}, {
|
|
1522
|
-
default:
|
|
1468
|
+
default: N(() => {
|
|
1523
1469
|
var te;
|
|
1524
1470
|
return [
|
|
1525
|
-
|
|
1526
|
-
class:
|
|
1471
|
+
t("div", {
|
|
1472
|
+
class: le([
|
|
1527
1473
|
"flex flex-col gap-8 max-h-full",
|
|
1528
1474
|
{
|
|
1529
|
-
"p-0":
|
|
1530
|
-
"px-24 ": !
|
|
1475
|
+
"p-0": c.value,
|
|
1476
|
+
"px-24 ": !c.value
|
|
1531
1477
|
}
|
|
1532
1478
|
])
|
|
1533
1479
|
}, [
|
|
1534
|
-
|
|
1480
|
+
b(yt, {
|
|
1535
1481
|
searchable: "",
|
|
1536
1482
|
search: p.value,
|
|
1537
|
-
"onUpdate:search":
|
|
1483
|
+
"onUpdate:search": g[0] || (g[0] = (E) => p.value = E)
|
|
1538
1484
|
}, null, 8, ["search"]),
|
|
1539
|
-
(
|
|
1540
|
-
style:
|
|
1541
|
-
"column-defs":
|
|
1542
|
-
"row-data":
|
|
1485
|
+
(O(), ne(W, {
|
|
1486
|
+
style: _e(e(m).tableHeight),
|
|
1487
|
+
"column-defs": e($).columnDefs,
|
|
1488
|
+
"row-data": q.value,
|
|
1543
1489
|
"search-value": p.value,
|
|
1544
|
-
loading:
|
|
1545
|
-
key: (te =
|
|
1546
|
-
onRowClick:
|
|
1490
|
+
loading: A.value,
|
|
1491
|
+
key: (te = e(k)._currentLocation) == null ? void 0 : te.dbName,
|
|
1492
|
+
onRowClick: g[1] || (g[1] = (E) => e(r)(E.original)),
|
|
1547
1493
|
"page-size": w.value
|
|
1548
1494
|
}, {
|
|
1549
|
-
"list-row":
|
|
1550
|
-
|
|
1495
|
+
"list-row": N((E) => [
|
|
1496
|
+
b(Xe, {
|
|
1551
1497
|
row: E,
|
|
1552
|
-
onRowClick: (
|
|
1498
|
+
onRowClick: (U) => e(r)(U)
|
|
1553
1499
|
}, {
|
|
1554
|
-
default:
|
|
1555
|
-
var Z, n, l, F, P, z, G, D,
|
|
1500
|
+
default: N((U) => {
|
|
1501
|
+
var Z, n, l, F, P, z, G, D, V, K, J, C, j, ie, Ce, Ie, Me, Se, Oe, $e, ce, De, Ve, Ae, Re, fe, qe;
|
|
1556
1502
|
return [
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
render: (l = (n = (Z =
|
|
1562
|
-
props: (P = (F =
|
|
1503
|
+
t("div", ps, [
|
|
1504
|
+
t("div", cs, [
|
|
1505
|
+
t("div", fs, [
|
|
1506
|
+
b(e(ee), {
|
|
1507
|
+
render: (l = (n = (Z = U._id) == null ? void 0 : Z.column) == null ? void 0 : n.columnDef) == null ? void 0 : l.cell,
|
|
1508
|
+
props: (P = (F = U._id) == null ? void 0 : F.getContext) == null ? void 0 : P.call(F)
|
|
1563
1509
|
}, null, 8, ["render", "props"])
|
|
1564
1510
|
]),
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
render: (D = (G = (z =
|
|
1568
|
-
props: (K = (
|
|
1511
|
+
t("div", ys, [
|
|
1512
|
+
b(e(ee), {
|
|
1513
|
+
render: (D = (G = (z = U.name) == null ? void 0 : z.column) == null ? void 0 : G.columnDef) == null ? void 0 : D.cell,
|
|
1514
|
+
props: (K = (V = U.name) == null ? void 0 : V.getContext) == null ? void 0 : K.call(V)
|
|
1569
1515
|
}, null, 8, ["render", "props"])
|
|
1570
1516
|
]),
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
render: (j = (C = (J =
|
|
1574
|
-
props: (
|
|
1517
|
+
t("div", vs, [
|
|
1518
|
+
b(e(ee), {
|
|
1519
|
+
render: (j = (C = (J = U.supplier) == null ? void 0 : J.column) == null ? void 0 : C.columnDef) == null ? void 0 : j.cell,
|
|
1520
|
+
props: (Ce = (ie = U.supplier) == null ? void 0 : ie.getContext) == null ? void 0 : Ce.call(ie)
|
|
1575
1521
|
}, null, 8, ["render", "props"])
|
|
1576
1522
|
]),
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
render: (
|
|
1582
|
-
props: (
|
|
1523
|
+
t("div", null, M((Ie = E.original.locations) != null && Ie.length ? `Enabled for ${(Me = E.original.locations) == null ? void 0 : Me.length} outlets` : "Enabled for all outlets"), 1),
|
|
1524
|
+
t("div", bs, M(E.original.purchaseOrder.items.length ? E.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
|
|
1525
|
+
t("div", hs, [
|
|
1526
|
+
b(e(ee), {
|
|
1527
|
+
render: ($e = (Oe = (Se = U.ref) == null ? void 0 : Se.column) == null ? void 0 : Oe.columnDef) == null ? void 0 : $e.cell,
|
|
1528
|
+
props: (De = (ce = U.ref) == null ? void 0 : ce.getContext) == null ? void 0 : De.call(ce)
|
|
1583
1529
|
}, null, 8, ["render", "props"])
|
|
1584
1530
|
])
|
|
1585
1531
|
]),
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
render: (
|
|
1589
|
-
props: (
|
|
1532
|
+
t("div", null, [
|
|
1533
|
+
b(e(ee), {
|
|
1534
|
+
render: (Re = (Ae = (Ve = U.type) == null ? void 0 : Ve.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : Re.cell,
|
|
1535
|
+
props: (qe = (fe = U.type) == null ? void 0 : fe.getContext) == null ? void 0 : qe.call(fe)
|
|
1590
1536
|
}, null, 8, ["render", "props"])
|
|
1591
1537
|
])
|
|
1592
1538
|
])
|
|
@@ -1602,10 +1548,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1602
1548
|
}),
|
|
1603
1549
|
_: 1
|
|
1604
1550
|
}, 8, ["title", "actions"]),
|
|
1605
|
-
(
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
onSubmitted:
|
|
1551
|
+
(O(), ne(lt, { to: "body" }, [
|
|
1552
|
+
b(ms, rt(at(e(_))), null, 16),
|
|
1553
|
+
b(So, Ye(e(u), {
|
|
1554
|
+
onSubmitted: g[2] || (g[2] = (te) => e($).fetchTemplates())
|
|
1609
1555
|
}), null, 16)
|
|
1610
1556
|
]))
|
|
1611
1557
|
], 64);
|