@feedmepos/mf-inventory-portal 1.2.43-dev.2 → 1.2.43-dev.3
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-BbyuDs4s.js → App-DkzM4M0_.js} +3 -3
- package/dist/{ApprovalView-Cz_p_Lsw.js → ApprovalView-Dd5bg0yE.js} +5 -5
- package/dist/{BindingsDialog-CdzxKfim.js → BindingsDialog-FoyqtujI.js} +2 -2
- package/dist/{BindingsPicker-DjcQepRu.js → BindingsPicker-D-DS3PdA.js} +2 -2
- package/dist/{BindingsTable-iiKRFs5i.js → BindingsTable-viPFJCPm.js} +3 -3
- package/dist/{ClosingDraftView-D-uXfKco.js → ClosingDraftView-BlaIq6iS.js} +8 -8
- package/dist/{ClosingHistoryView-BfdrQu-A.js → ClosingHistoryView-Byb3JIG8.js} +3 -3
- package/dist/{ClosingTemplateView-LwppyZ5b.js → ClosingTemplateView-Dil7tncI.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-WK5TSktz.js → DeliveryOrderPrintPreview-zvfi--WO.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-E9wucZOG.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-_dZiJ1_p.js} +4 -4
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DoxdSsGn.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DBSjX9GC.js} +2 -2
- package/dist/{FmMultiselectDialog-BgIQ2r8r.js → FmMultiselectDialog-CEnIfKkK.js} +2 -2
- package/dist/{FmMultiselectDialog-DvUYz6Ul.js → FmMultiselectDialog-D0HzUEWj.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CaDJCKdQ.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BG2lia-P.js} +3 -3
- package/dist/{ImportView-CKJIAruz.js → ImportView-XUXFdNd5.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DQpWXkc7.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DgutuH9i.js} +1 -1
- package/dist/{IngredientGroupView-6VHopHiE.js → IngredientGroupView-7UTiTjiy.js} +5 -5
- package/dist/{IngredientsView-B7UkNty2.js → IngredientsView-BkK-S9zb.js} +14 -14
- package/dist/{IntegrationView-CkZ7OjrL.js → IntegrationView-BTXcGlp6.js} +12 -12
- package/dist/{InventoryBindingForm-Dz6CZw0B.js → InventoryBindingForm-Ch3ltUK8.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BFnuXwP7.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dnv5PN-O.js} +4 -4
- package/dist/{InventoryBindingSummary-1xTRivY0.js → InventoryBindingSummary-BVKjiIfs.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-d4gbhGU-.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CbK0JN-7.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-B7lTpDiy.js → PremiumBadge.vue_vue_type_script_setup_true_lang-dv4OBeHd.js} +2 -2
- package/dist/{PublishView-DRmrmmp2.js → PublishView-g_HbS6jK.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview--zKqcQn3.js → PurchaseOrderPrintPreview-BReNCrqT.js} +1 -1
- package/dist/{ReceiveRequestView-BJBMP8Ar.js → ReceiveRequestView-ClT4-xel.js} +752 -731
- package/dist/{RecipeView-n9sgnYOt.js → RecipeView-CtpQ2a0y.js} +8 -8
- package/dist/{StockView-liy9NHzK.js → StockView-CEbdj6YL.js} +15 -15
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-92RCScC2.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bofw0-xa.js} +1 -1
- package/dist/{SupplierView-Bx1uOxMB.js → SupplierView-DzmEjA3j.js} +11 -11
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-BPevvNvn.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-0A8OWe8S.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-COwkY-i-.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-bxporBJ4.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-C4yvTr1c.js → TransferDetails.vue_vue_type_script_setup_true_lang-cDwtvgIk.js} +14 -14
- package/dist/{TransferTemplateView-NPyHN1G4.js → TransferTemplateView-ySDW6lRS.js} +15 -15
- package/dist/{UnitView-BvcR_hw8.js → UnitView-Bv91T6ab.js} +6 -6
- package/dist/{WarehouseView-Db3uvU-3.js → WarehouseView-kPmRof7c.js} +5 -5
- package/dist/{WastageTemplateView-HpRjMvfN.js → WastageTemplateView-CZq9b3sy.js} +14 -14
- package/dist/{app-CfvY1AOd.js → app-CV3h70p4.js} +7 -7
- package/dist/app.js +1 -1
- package/dist/{closing-template-Bbpuo75y.js → closing-template-BBIWBX0k.js} +1 -1
- package/dist/{date2-D1gn7jmq.js → date2-CkCGGaAb.js} +1 -1
- package/dist/{dayjs.min-DbsvCLS8.js → dayjs.min-Dd-afiDx.js} +1 -1
- package/dist/{decimal-BCDuHTBo.js → decimal-CS-CxyFz.js} +2 -2
- package/dist/{defineDeepModel-CLGS2klM.js → defineDeepModel-D_bZeRgl.js} +1 -1
- package/dist/{duplicate-template-CXMGnpJz.js → duplicate-template-DPXszoh-.js} +1 -1
- package/dist/{feature-ChCO3yeg.js → feature-B_VTGztb.js} +2 -2
- package/dist/{format-time-from-id-xSDapR5o.js → format-time-from-id-BmBEi-Jw.js} +1 -1
- package/dist/{format-unit-display-Cp6WprtD.js → format-unit-display-CDKsLgE4.js} +10 -10
- package/dist/helper/form.d.ts +1 -0
- package/dist/{import-export.helper-5P37g041.js → import-export.helper-BLfWO3Yr.js} +5 -5
- package/dist/{index-JqiUbL75.js → index-BRDlwURl.js} +3 -3
- package/dist/{index-DMJDBclT.js → index-DAnsA0Mm.js} +1 -1
- package/dist/{index-DK-p2yA1.js → index-DU9SwtH5.js} +1 -1
- package/dist/{lodash-BVHTOpPM.js → lodash-CYR2InSF.js} +1 -1
- package/dist/{netsuite-o-fSOtMC.js → netsuite-CPkzurdj.js} +3 -3
- package/dist/{purchase-order-template-Rrk1HDqX.js → purchase-order-template-DNQiObjY.js} +1 -1
- package/dist/{rules-DogleRGn.js → rules-2RvCSF3q.js} +3 -3
- package/dist/{stock-phn4lZeu.js → stock-BWBlXMgT.js} +3 -3
- package/dist/{stock-CT6I1Xuk.js → stock-RjFuloPL.js} +1 -1
- package/dist/{supplier-kX-AFjUa.js → supplier-8UMBjffB.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-DrEOPCUZ.js → use-ingredient-select-dialog-DsrecsJw.js} +2 -2
- package/dist/{use-inventory-binding-dialog-B0dwowy5.js → use-inventory-binding-dialog-C4bcTum8.js} +2 -2
- package/dist/{use-template-enabled-locations-2-BY2uc5aF.js → use-template-enabled-locations-2-_G7NryCx.js} +2 -2
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +1 -0
- package/dist/views/receive-request/constants/purchase-order-transaction-type.d.ts +4 -0
- package/dist/{vue-i18n-S4lpudXL.js → vue-i18n-BU7aJfqP.js} +431 -431
- package/dist/{xlsx-Doxq0pFC.js → xlsx-JEiDJdww.js} +398 -398
- package/dist/{xlsx.util-CUdXfcyP.js → xlsx.util-Cc50iTml.js} +1 -1
- package/package.json +4 -4
- /package/dist/views/receive-request/components/transfer-form/{TransferForm.vue.d.ts → TransferFormWithController.vue.d.ts} +0 -0
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { reactive as It, onMounted as We, watch as
|
|
2
|
-
import { s as lt, t as pe, I as zt, f as Dt, L as Lt, A as Ht, u as Ge, a as Je, M as ht, O as jt, P as Qt, Q as Yt, T as Kt, v as Xt, m as Xe } from "./app-
|
|
3
|
-
import { i as kt, _ as Zt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { u as Wt, P as at, a as Gt, _ as Jt, g as es } from "./TransferDetails.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { R as
|
|
6
|
-
import { _ as Tt, u as os, i as ns, e as ls } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { d as xt } from "./dayjs.min-
|
|
1
|
+
import { reactive as It, onMounted as We, watch as _e, computed as q, h as Q, defineComponent as de, openBlock as x, createElementBlock as T, Fragment as re, renderList as xe, createElementVNode as l, toDisplayString as E, unref as t, resolveComponent as V, createVNode as f, withCtx as A, createCommentVNode as K, ref as N, createBlock as se, normalizeClass as Z, normalizeStyle as $t, createTextVNode as Pe, toRaw as At, shallowRef as _t, onUnmounted as Et, triggerRef as Mt, mergeProps as nt, isRef as Se, createSlots as qt, Teleport as Nt, normalizeProps as Ut, guardReactiveProps as Bt } from "vue";
|
|
2
|
+
import { s as lt, t as pe, I as zt, f as Dt, L as Lt, A as Ht, u as Ge, a as Je, M as ht, O as jt, P as Qt, Q as Yt, T as Kt, v as Xt, m as Xe } from "./app-CV3h70p4.js";
|
|
3
|
+
import { i as kt, _ as Zt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DBSjX9GC.js";
|
|
4
|
+
import { u as Wt, P as at, a as Gt, _ as Jt, g as es } from "./TransferDetails.vue_vue_type_script_setup_true_lang-cDwtvgIk.js";
|
|
5
|
+
import { R as Ne, a as we, e as Ze, d as ts, A as Ue, M as ss, B as as } from "./rules-2RvCSF3q.js";
|
|
6
|
+
import { _ as Tt, u as os, i as ns, e as ls } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-dv4OBeHd.js";
|
|
7
|
+
import { d as xt } from "./dayjs.min-Dd-afiDx.js";
|
|
8
8
|
import { u as rs } from "./useTabStorage-BkIVScW_.js";
|
|
9
9
|
import { u as is, _ as us } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
10
|
-
import { useBreakpoints as rt, components as
|
|
10
|
+
import { useBreakpoints as rt, components as ge, FmButtonVariant as ds, useSnackbar as Re, useDialog as cs, useProxiedModel as Vt } from "@feedmepos/ui-library";
|
|
11
11
|
import { F as qe } from "./form-mode.enum-BKiNVH6A.js";
|
|
12
|
-
import { _ as ms, a as ps, b as fs, F as vs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
13
|
-
import { u as et, c as ys, P as bs } from "./feature-
|
|
14
|
-
import { u as Be } from "./netsuite-
|
|
15
|
-
import { c as Te, u as gs, _ as _s } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { useI18n as
|
|
17
|
-
import { a as hs } from "./FmMultiselectDialog-
|
|
18
|
-
import { F as
|
|
19
|
-
import { u as it } from "./supplier-
|
|
20
|
-
import { d as ut, e as ks, g as xs, b as Cs } from "./date2-
|
|
21
|
-
import { _ as
|
|
22
|
-
import { a as Rt } from "./format-unit-display-
|
|
23
|
-
import { u as dt } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-
|
|
24
|
-
import { u as
|
|
25
|
-
import { s as Fs, r as Is } from "./xlsx.util-
|
|
12
|
+
import { _ as ms, a as ps, b as fs, F as vs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BG2lia-P.js";
|
|
13
|
+
import { u as et, c as ys, P as bs } from "./feature-B_VTGztb.js";
|
|
14
|
+
import { u as Be } from "./netsuite-CPkzurdj.js";
|
|
15
|
+
import { c as Te, u as gs, _ as _s } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-_dZiJ1_p.js";
|
|
16
|
+
import { useI18n as he } from "@feedmepos/mf-common";
|
|
17
|
+
import { a as hs } from "./FmMultiselectDialog-CEnIfKkK.js";
|
|
18
|
+
import { F as ve, _ as Pt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js";
|
|
19
|
+
import { u as it } from "./supplier-8UMBjffB.js";
|
|
20
|
+
import { d as ut, e as ks, g as xs, b as Cs } from "./date2-CkCGGaAb.js";
|
|
21
|
+
import { _ as Ss } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
22
|
+
import { a as Rt } from "./format-unit-display-CDKsLgE4.js";
|
|
23
|
+
import { u as dt } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-0A8OWe8S.js";
|
|
24
|
+
import { u as ws } from "./vue-i18n-BU7aJfqP.js";
|
|
25
|
+
import { s as Fs, r as Is } from "./xlsx.util-Cc50iTml.js";
|
|
26
26
|
import { F as $s } from "./FmDroppableField-J0xUsOTV.js";
|
|
27
|
-
import { d as Ds } from "./defineDeepModel-
|
|
27
|
+
import { d as Ds } from "./defineDeepModel-D_bZeRgl.js";
|
|
28
28
|
import { N as Ts, H as Vs } from "./app-uBuHtW8m.js";
|
|
29
29
|
var te = /* @__PURE__ */ ((m) => (m.Code = "Code", m.Name = "Name", m.TemplateName = "TemplateName", m.Amount = "Amount", m.Cost = "Cost", m.TotalCost = "TotalCost", m.Delete = "Delete", m))(te || {});
|
|
30
|
-
const Ps = () => (
|
|
30
|
+
const Ps = () => (he(), Q(
|
|
31
31
|
Tt,
|
|
32
32
|
{
|
|
33
33
|
zIndex: 50,
|
|
@@ -36,7 +36,7 @@ const Ps = () => (_e(), j(
|
|
|
36
36
|
`Total (${Dt()})`
|
|
37
37
|
));
|
|
38
38
|
function Rs(m) {
|
|
39
|
-
const { t: b } =
|
|
39
|
+
const { t: b } = he(), r = It({}), { breakpoints: d } = rt(), y = et(), o = Be();
|
|
40
40
|
We(() => {
|
|
41
41
|
for (const c of m.items) {
|
|
42
42
|
if (!c.totalCost)
|
|
@@ -51,7 +51,7 @@ function Rs(m) {
|
|
|
51
51
|
), n = c.totalCost ?? lt.reset();
|
|
52
52
|
e ? r[c.sku._id] = e.amount !== n.amount || e.precision !== n.precision : r[c.sku._id] = !0;
|
|
53
53
|
}
|
|
54
|
-
}),
|
|
54
|
+
}), _e(
|
|
55
55
|
() => {
|
|
56
56
|
var c;
|
|
57
57
|
return (c = m.supplier) == null ? void 0 : c._id;
|
|
@@ -74,10 +74,10 @@ function Rs(m) {
|
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
76
|
function k(c) {
|
|
77
|
-
var n, p, s, i,
|
|
78
|
-
return !!(((p = (n = c.defaultCost) == null ? void 0 : n.costPerUnit) == null ? void 0 : p.amount) ?? ((S = (h = (
|
|
77
|
+
var n, p, s, i, u, h, S;
|
|
78
|
+
return !!(((p = (n = c.defaultCost) == null ? void 0 : n.costPerUnit) == null ? void 0 : p.amount) ?? ((S = (h = (u = (i = (s = m.supplier) == null ? void 0 : s.supplyItems) == null ? void 0 : i.find((v) => v.skuId === c._id)) == null ? void 0 : u.defaultCost) == null ? void 0 : h.costPerUnit) == null ? void 0 : S.amount));
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const C = [
|
|
81
81
|
{
|
|
82
82
|
id: "Code",
|
|
83
83
|
header: () => b("inventory.transfer.form.items.table.Code"),
|
|
@@ -85,22 +85,22 @@ function Rs(m) {
|
|
|
85
85
|
size: 200,
|
|
86
86
|
cell(c) {
|
|
87
87
|
const e = c.row.original;
|
|
88
|
-
return
|
|
89
|
-
|
|
88
|
+
return o.isEnabled ? Q(
|
|
89
|
+
ge.FmTooltip,
|
|
90
90
|
{
|
|
91
91
|
content: e.code,
|
|
92
92
|
placement: "top",
|
|
93
93
|
variant: "plain",
|
|
94
94
|
zIndex: 50
|
|
95
95
|
},
|
|
96
|
-
|
|
96
|
+
Q(
|
|
97
97
|
"span",
|
|
98
98
|
{
|
|
99
99
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
100
100
|
},
|
|
101
101
|
e.code
|
|
102
102
|
)
|
|
103
|
-
) :
|
|
103
|
+
) : Q(ge.FmTextField, {
|
|
104
104
|
modelValue: e.code,
|
|
105
105
|
"onUpdate:modelValue": (n) => {
|
|
106
106
|
m.updateItem({
|
|
@@ -109,7 +109,7 @@ function Rs(m) {
|
|
|
109
109
|
});
|
|
110
110
|
},
|
|
111
111
|
key: e.sku._id,
|
|
112
|
-
rules: [
|
|
112
|
+
rules: [Ne()],
|
|
113
113
|
labelMark: "required"
|
|
114
114
|
});
|
|
115
115
|
},
|
|
@@ -121,22 +121,22 @@ function Rs(m) {
|
|
|
121
121
|
minSize: 300,
|
|
122
122
|
cell(c) {
|
|
123
123
|
const e = c.row.original;
|
|
124
|
-
return
|
|
125
|
-
|
|
124
|
+
return o.isEnabled ? Q(
|
|
125
|
+
ge.FmTooltip,
|
|
126
126
|
{
|
|
127
127
|
content: e.name,
|
|
128
128
|
placement: "top",
|
|
129
129
|
variant: "plain",
|
|
130
130
|
zIndex: 50
|
|
131
131
|
},
|
|
132
|
-
|
|
132
|
+
Q(
|
|
133
133
|
"span",
|
|
134
134
|
{
|
|
135
135
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
136
136
|
},
|
|
137
137
|
e.name
|
|
138
138
|
)
|
|
139
|
-
) :
|
|
139
|
+
) : Q(ge.FmTextField, {
|
|
140
140
|
modelValue: e.name,
|
|
141
141
|
"onUpdate:modelValue": (n) => {
|
|
142
142
|
m.updateItem({
|
|
@@ -145,7 +145,7 @@ function Rs(m) {
|
|
|
145
145
|
});
|
|
146
146
|
},
|
|
147
147
|
key: e.sku._id,
|
|
148
|
-
rules: [
|
|
148
|
+
rules: [Ne()],
|
|
149
149
|
labelMark: "required"
|
|
150
150
|
});
|
|
151
151
|
},
|
|
@@ -158,18 +158,18 @@ function Rs(m) {
|
|
|
158
158
|
enableSorting: !1,
|
|
159
159
|
cell(c) {
|
|
160
160
|
const e = c.row.original, n = e.code, p = e.name;
|
|
161
|
-
return
|
|
162
|
-
|
|
161
|
+
return Q(
|
|
162
|
+
ge.FmTooltip,
|
|
163
163
|
{ zIndex: 50 },
|
|
164
164
|
{
|
|
165
165
|
default() {
|
|
166
|
-
return
|
|
167
|
-
|
|
166
|
+
return Q("div", { class: "flex flex-col w-full" }, [
|
|
167
|
+
Q(
|
|
168
168
|
"div",
|
|
169
169
|
{ class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-primary" },
|
|
170
170
|
p
|
|
171
171
|
),
|
|
172
|
-
|
|
172
|
+
Q(
|
|
173
173
|
"div",
|
|
174
174
|
{
|
|
175
175
|
class: "line-clamp-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
@@ -190,11 +190,11 @@ function Rs(m) {
|
|
|
190
190
|
header: () => b("inventory.transfer.form.items.table.Amount"),
|
|
191
191
|
minSize: 200,
|
|
192
192
|
cell(c) {
|
|
193
|
-
var i,
|
|
194
|
-
const e = c.row.original, n = (i = m.forecastAmounts) == null ? void 0 : i.find((g) => g.skuId === e.sku._id), p = n ? n.helperState === "error" ? `Predicted: ${n.amount} (out of range)` : `Predicted: ${n.amount}` : void 0, s = (S = (h = (
|
|
193
|
+
var i, u, h, S, v;
|
|
194
|
+
const e = c.row.original, n = (i = m.forecastAmounts) == null ? void 0 : i.find((g) => g.skuId === e.sku._id), p = n ? n.helperState === "error" ? `Predicted: ${n.amount} (out of range)` : `Predicted: ${n.amount}` : void 0, s = (S = (h = (u = m.template) == null ? void 0 : u.purchaseOrder) == null ? void 0 : h.items) == null ? void 0 : S.find(
|
|
195
195
|
(g) => g.sku._id === e.sku._id
|
|
196
196
|
);
|
|
197
|
-
return
|
|
197
|
+
return Q(ms, {
|
|
198
198
|
style: {
|
|
199
199
|
flex: "1 1 0%"
|
|
200
200
|
},
|
|
@@ -208,38 +208,38 @@ function Rs(m) {
|
|
|
208
208
|
helperState: n == null ? void 0 : n.helperState,
|
|
209
209
|
"onUpdate:modelValue": (g) => {
|
|
210
210
|
if (!g) return;
|
|
211
|
-
const
|
|
211
|
+
const $ = {
|
|
212
212
|
...e,
|
|
213
213
|
quantity: g.amount,
|
|
214
214
|
measurement: g.measurement
|
|
215
215
|
};
|
|
216
216
|
if (y.enableTotalCost) {
|
|
217
217
|
const { cost: B } = Te(
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
218
|
+
$.sku,
|
|
219
|
+
$.quantity,
|
|
220
|
+
$.measurement,
|
|
221
221
|
{
|
|
222
222
|
supplier: m.supplier,
|
|
223
223
|
// NOTE: set undefined here if `manualTotalCost[updatedRow.sku._id] = false`, so that the function
|
|
224
224
|
// will return the auto calculated default cost instead of the manual total cost
|
|
225
|
-
manualTotalCost: r[
|
|
225
|
+
manualTotalCost: r[$.sku._id] ? $.totalCost : void 0
|
|
226
226
|
}
|
|
227
227
|
);
|
|
228
|
-
|
|
228
|
+
$.totalCost = B;
|
|
229
229
|
}
|
|
230
|
-
m.updateItem(
|
|
230
|
+
m.updateItem($);
|
|
231
231
|
},
|
|
232
232
|
stepper: s == null ? void 0 : s.quantityStep,
|
|
233
233
|
disableUnit: !!s,
|
|
234
234
|
disabled: m.disabled,
|
|
235
235
|
rules: [
|
|
236
236
|
ps(
|
|
237
|
-
+
|
|
237
|
+
+we(
|
|
238
238
|
((v = e.quantity) == null ? void 0 : v.amount) === 0 ? { amount: 0, precision: 0 } : (s == null ? void 0 : s.minimumQuantity) ?? { amount: 0, precision: 0 }
|
|
239
239
|
)
|
|
240
240
|
),
|
|
241
241
|
fs(
|
|
242
|
-
s != null && s.maximumQuantity ? +
|
|
242
|
+
s != null && s.maximumQuantity ? +we(s == null ? void 0 : s.maximumQuantity) : 1 / 0
|
|
243
243
|
),
|
|
244
244
|
...s != null && s.quantityStep ? [vs(s.quantityStep)] : []
|
|
245
245
|
],
|
|
@@ -253,7 +253,7 @@ function Rs(m) {
|
|
|
253
253
|
header: Ps,
|
|
254
254
|
size: 180,
|
|
255
255
|
cell(c) {
|
|
256
|
-
const e = c.row.original, n = k(e.sku), p =
|
|
256
|
+
const e = c.row.original, n = k(e.sku), p = d.value.xs || d.value.sm;
|
|
257
257
|
if (!r[e.sku._id] && n) {
|
|
258
258
|
const { cost: s, supplierOverrideCost: i } = Te(
|
|
259
259
|
e.sku,
|
|
@@ -263,7 +263,7 @@ function Rs(m) {
|
|
|
263
263
|
supplier: m.supplier
|
|
264
264
|
}
|
|
265
265
|
);
|
|
266
|
-
return
|
|
266
|
+
return Q(
|
|
267
267
|
"div",
|
|
268
268
|
{
|
|
269
269
|
class: [
|
|
@@ -273,7 +273,7 @@ function Rs(m) {
|
|
|
273
273
|
key: e.sku._id
|
|
274
274
|
},
|
|
275
275
|
[
|
|
276
|
-
|
|
276
|
+
Q(ge.FmButton, {
|
|
277
277
|
prependIcon: "edit",
|
|
278
278
|
variant: ds.Tertiary,
|
|
279
279
|
disabled: m.disabled,
|
|
@@ -284,17 +284,17 @@ function Rs(m) {
|
|
|
284
284
|
}), r[e.sku._id] = !0;
|
|
285
285
|
}
|
|
286
286
|
}),
|
|
287
|
-
|
|
287
|
+
Q(
|
|
288
288
|
"div",
|
|
289
289
|
{
|
|
290
290
|
class: "flex flex-col"
|
|
291
291
|
},
|
|
292
292
|
[
|
|
293
|
-
|
|
293
|
+
Q(
|
|
294
294
|
"span",
|
|
295
|
-
p ? Ze(s) :
|
|
295
|
+
p ? Ze(s) : we(s)
|
|
296
296
|
),
|
|
297
|
-
|
|
297
|
+
Q(
|
|
298
298
|
"span",
|
|
299
299
|
{
|
|
300
300
|
class: [
|
|
@@ -304,7 +304,7 @@ function Rs(m) {
|
|
|
304
304
|
},
|
|
305
305
|
b("inventory.transfer.form.items.autoCalculated")
|
|
306
306
|
),
|
|
307
|
-
i ?
|
|
307
|
+
i ? Q(
|
|
308
308
|
"span",
|
|
309
309
|
{
|
|
310
310
|
class: [
|
|
@@ -315,11 +315,11 @@ function Rs(m) {
|
|
|
315
315
|
[
|
|
316
316
|
Ze(i.costPerUnit),
|
|
317
317
|
"/",
|
|
318
|
-
i.measurement ?
|
|
318
|
+
i.measurement ? Q(
|
|
319
319
|
"span",
|
|
320
320
|
{ class: "text-blue-500 font-semibold" },
|
|
321
321
|
i.measurement.abbrev
|
|
322
|
-
) :
|
|
322
|
+
) : Q("span", { class: "text-green-500 font-bold" }, e.sku.unit.abbrev)
|
|
323
323
|
// base unit style
|
|
324
324
|
]
|
|
325
325
|
) : null
|
|
@@ -328,10 +328,10 @@ function Rs(m) {
|
|
|
328
328
|
]
|
|
329
329
|
);
|
|
330
330
|
}
|
|
331
|
-
return
|
|
332
|
-
|
|
331
|
+
return Q(
|
|
332
|
+
ge.FmTextField,
|
|
333
333
|
{
|
|
334
|
-
modelValue:
|
|
334
|
+
modelValue: we(e.totalCost ?? { amount: 0, precision: 0 }),
|
|
335
335
|
key: e.sku._id,
|
|
336
336
|
"onUpdate:modelValue": (s) => {
|
|
337
337
|
m.updateItem({
|
|
@@ -342,11 +342,11 @@ function Rs(m) {
|
|
|
342
342
|
}
|
|
343
343
|
});
|
|
344
344
|
},
|
|
345
|
-
rules: [
|
|
345
|
+
rules: [Ue(0), ss(2)]
|
|
346
346
|
},
|
|
347
347
|
{
|
|
348
348
|
prepend() {
|
|
349
|
-
return p ?
|
|
349
|
+
return p ? Q(
|
|
350
350
|
"div",
|
|
351
351
|
{
|
|
352
352
|
class: [
|
|
@@ -358,7 +358,7 @@ function Rs(m) {
|
|
|
358
358
|
) : null;
|
|
359
359
|
},
|
|
360
360
|
append() {
|
|
361
|
-
return n ?
|
|
361
|
+
return n ? Q(ge.FmButton, {
|
|
362
362
|
prependIcon: "close",
|
|
363
363
|
variant: "tertiary",
|
|
364
364
|
disabled: m.disabled,
|
|
@@ -390,8 +390,8 @@ function Rs(m) {
|
|
|
390
390
|
header: "",
|
|
391
391
|
cell(c) {
|
|
392
392
|
const e = c.row.original;
|
|
393
|
-
return
|
|
394
|
-
|
|
393
|
+
return Q("div", { class: "flex justify-end" }, [
|
|
394
|
+
Q(ge.FmButton, {
|
|
395
395
|
key: e.sku._id,
|
|
396
396
|
class: "delete-button",
|
|
397
397
|
type: "button",
|
|
@@ -414,47 +414,47 @@ function Rs(m) {
|
|
|
414
414
|
}
|
|
415
415
|
];
|
|
416
416
|
return {
|
|
417
|
-
columnDefs: q(() => y.enableTotalCost && m.transferType === pe.enum.purchase ?
|
|
417
|
+
columnDefs: q(() => y.enableTotalCost && m.transferType === pe.enum.purchase ? C : C.filter(
|
|
418
418
|
(c) => c.id !== "Cost"
|
|
419
419
|
/* Cost */
|
|
420
420
|
))
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
|
-
const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center" }, As = { class: "fm-typo-en-body-lg-600 xs:fm-typo-en-body-md-600 mr-auto xs:w-full" }, Es = { class: "w-[450px] xs:w-full flex" }, Ms = { class: "fm-typo-en-body-md-400 whitespace-nowrap" }, qs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ot = /* @__PURE__ */
|
|
423
|
+
const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center" }, As = { class: "fm-typo-en-body-lg-600 xs:fm-typo-en-body-md-600 mr-auto xs:w-full" }, Es = { class: "w-[450px] xs:w-full flex" }, Ms = { class: "fm-typo-en-body-md-400 whitespace-nowrap" }, qs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ot = /* @__PURE__ */ de({
|
|
424
424
|
__name: "SupplierPriceHistory",
|
|
425
425
|
props: {
|
|
426
426
|
prices: {}
|
|
427
427
|
},
|
|
428
428
|
setup(m) {
|
|
429
429
|
const b = it();
|
|
430
|
-
function r(
|
|
431
|
-
return b.suppliers.find((y) => y._id ===
|
|
430
|
+
function r(d) {
|
|
431
|
+
return b.suppliers.find((y) => y._id === d);
|
|
432
432
|
}
|
|
433
|
-
return (
|
|
434
|
-
(
|
|
433
|
+
return (d, y) => (x(), T("div", Os, [
|
|
434
|
+
(x(!0), T(re, null, xe(Object.keys(d.prices), (o) => {
|
|
435
435
|
var k;
|
|
436
|
-
return
|
|
437
|
-
key:
|
|
436
|
+
return x(), T("div", {
|
|
437
|
+
key: o,
|
|
438
438
|
class: "flex items-center gap-12 xs:gap-4 xs:flex-wrap w-full"
|
|
439
439
|
}, [
|
|
440
|
-
l("div", As, E((k = r(
|
|
440
|
+
l("div", As, E((k = r(o)) == null ? void 0 : k.name), 1),
|
|
441
441
|
l("div", Es, [
|
|
442
|
-
(
|
|
443
|
-
var
|
|
444
|
-
return
|
|
445
|
-
key:
|
|
442
|
+
(x(!0), T(re, null, xe(d.prices[o].slice(0, 3), (C) => {
|
|
443
|
+
var I;
|
|
444
|
+
return x(), T("div", {
|
|
445
|
+
key: C.date,
|
|
446
446
|
class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
|
|
447
447
|
}, [
|
|
448
448
|
l("div", Ms, [
|
|
449
|
-
l("span", null, E(
|
|
449
|
+
l("span", null, E(C.totalCost ? t(Ze)(C.totalCost) : "No data"), 1),
|
|
450
450
|
y[0] || (y[0] = l("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
|
|
451
|
-
l("span", null, E(t(
|
|
452
|
-
l("span", null, E(((
|
|
451
|
+
l("span", null, E(t(we)(C.totalUnit, !1)), 1),
|
|
452
|
+
l("span", null, E(((I = C.measurement) == null ? void 0 : I.abbrev) ?? C.unit.abbrev), 1)
|
|
453
453
|
]),
|
|
454
454
|
l("div", qs, [
|
|
455
|
-
l("span", null, "(#" + E(
|
|
455
|
+
l("span", null, "(#" + E(C.seqNumber) + ")", 1),
|
|
456
456
|
y[1] || (y[1] = l("span", null, E(" "), -1)),
|
|
457
|
-
l("span", null, E(t(ut)(new Date(
|
|
457
|
+
l("span", null, E(t(ut)(new Date(C.date))), 1)
|
|
458
458
|
])
|
|
459
459
|
]);
|
|
460
460
|
}), 128))
|
|
@@ -463,10 +463,10 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
463
463
|
}), 128))
|
|
464
464
|
]));
|
|
465
465
|
}
|
|
466
|
-
}),
|
|
466
|
+
}), Ns = { class: "flex flex-col gap-8 py-16" }, Us = { class: "flex items-center" }, Bs = { class: "flex-1 flex gap-1 items-center" }, zs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ls = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Hs = { class: "flex gap-8 w-full" }, js = { class: "flex-1 flex flex-col gap-4" }, Qs = { class: "flex-1 flex flex-col gap-4" }, Ys = { class: "flex gap-8 w-full" }, Ks = { class: "flex-1 flex flex-col gap-4" }, Xs = {
|
|
467
467
|
key: 0,
|
|
468
468
|
class: "flex-1 flex flex-col gap-4"
|
|
469
|
-
}, Zs = /* @__PURE__ */
|
|
469
|
+
}, Zs = /* @__PURE__ */ de({
|
|
470
470
|
__name: "TransferItem",
|
|
471
471
|
props: {
|
|
472
472
|
cellByColId: {},
|
|
@@ -475,19 +475,19 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
475
475
|
row: {}
|
|
476
476
|
},
|
|
477
477
|
setup(m) {
|
|
478
|
-
const { t: b } =
|
|
479
|
-
return (r,
|
|
480
|
-
var k,
|
|
481
|
-
const y = V("FmLabel"),
|
|
482
|
-
return
|
|
483
|
-
l("div",
|
|
478
|
+
const { t: b } = he();
|
|
479
|
+
return (r, d) => {
|
|
480
|
+
var k, C, I, c, e, n, p, s, i, u, h, S, v, g, $, B, z, W, J, U, P, R, D, M, L, X, ae;
|
|
481
|
+
const y = V("FmLabel"), o = V("FmSpacer");
|
|
482
|
+
return x(), T("div", Ns, [
|
|
483
|
+
l("div", Us, [
|
|
484
484
|
l("div", Bs, [
|
|
485
485
|
l("span", zs, " (" + E(r.row.original.sku.code) + ") ", 1),
|
|
486
486
|
l("span", Ls, E(r.row.original.sku.name), 1)
|
|
487
487
|
]),
|
|
488
488
|
l("div", null, [
|
|
489
|
-
f(t(
|
|
490
|
-
render: (
|
|
489
|
+
f(t(ve), {
|
|
490
|
+
render: (I = (C = (k = r.cellByColId.Delete) == null ? void 0 : k.column) == null ? void 0 : C.columnDef) == null ? void 0 : I.cell,
|
|
491
491
|
props: (e = (c = r.cellByColId.Delete) == null ? void 0 : c.getContext) == null ? void 0 : e.call(c)
|
|
492
492
|
}, null, 8, ["render", "props"])
|
|
493
493
|
])
|
|
@@ -497,21 +497,21 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
497
497
|
f(y, {
|
|
498
498
|
label: t(b)(`inventory.transfer.form.items.table.${t(te).Code}`)
|
|
499
499
|
}, null, 8, ["label"]),
|
|
500
|
-
f(t(
|
|
500
|
+
f(t(ve), {
|
|
501
501
|
render: (s = (p = (n = r.cellByColId[t(te).Code]) == null ? void 0 : n.column) == null ? void 0 : p.columnDef) == null ? void 0 : s.cell,
|
|
502
|
-
props: (
|
|
502
|
+
props: (u = (i = r.cellByColId[t(te).Code]) == null ? void 0 : i.getContext) == null ? void 0 : u.call(i)
|
|
503
503
|
}, null, 8, ["render", "props"]),
|
|
504
|
-
|
|
504
|
+
d[0] || (d[0] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
505
505
|
]),
|
|
506
506
|
l("div", Qs, [
|
|
507
507
|
f(y, {
|
|
508
508
|
label: t(b)(`inventory.transfer.form.items.table.${t(te).Name}`)
|
|
509
509
|
}, null, 8, ["label"]),
|
|
510
|
-
f(t(
|
|
510
|
+
f(t(ve), {
|
|
511
511
|
render: (v = (S = (h = r.cellByColId[t(te).Name]) == null ? void 0 : h.column) == null ? void 0 : S.columnDef) == null ? void 0 : v.cell,
|
|
512
|
-
props: (
|
|
512
|
+
props: ($ = (g = r.cellByColId[t(te).Name]) == null ? void 0 : g.getContext) == null ? void 0 : $.call(g)
|
|
513
513
|
}, null, 8, ["render", "props"]),
|
|
514
|
-
|
|
514
|
+
d[1] || (d[1] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
515
515
|
])
|
|
516
516
|
]),
|
|
517
517
|
l("div", Ys, [
|
|
@@ -519,13 +519,13 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
519
519
|
f(y, {
|
|
520
520
|
label: t(b)(`inventory.transfer.form.items.table.${t(te).Amount}`)
|
|
521
521
|
}, null, 8, ["label"]),
|
|
522
|
-
f(t(
|
|
522
|
+
f(t(ve), {
|
|
523
523
|
render: (W = (z = (B = r.cellByColId[t(te).Amount]) == null ? void 0 : B.column) == null ? void 0 : z.columnDef) == null ? void 0 : W.cell,
|
|
524
|
-
props: (
|
|
524
|
+
props: (U = (J = r.cellByColId[t(te).Amount]) == null ? void 0 : J.getContext) == null ? void 0 : U.call(J)
|
|
525
525
|
}, null, 8, ["render", "props"]),
|
|
526
|
-
|
|
526
|
+
d[2] || (d[2] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
527
527
|
]),
|
|
528
|
-
r.cellByColId[t(te).Cost] ? (
|
|
528
|
+
r.cellByColId[t(te).Cost] ? (x(), T("div", Xs, [
|
|
529
529
|
f(Tt, { "z-index": 50 }, {
|
|
530
530
|
default: A(() => [
|
|
531
531
|
f(y, {
|
|
@@ -534,19 +534,19 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
534
534
|
]),
|
|
535
535
|
_: 1
|
|
536
536
|
}),
|
|
537
|
-
f(t(
|
|
537
|
+
f(t(ve), {
|
|
538
538
|
render: (D = (R = (P = r.cellByColId[t(te).Cost]) == null ? void 0 : P.column) == null ? void 0 : R.columnDef) == null ? void 0 : D.cell,
|
|
539
|
-
props: (
|
|
539
|
+
props: (L = (M = r.cellByColId[t(te).Cost]) == null ? void 0 : M.getContext) == null ? void 0 : L.call(M)
|
|
540
540
|
}, null, 8, ["render", "props"]),
|
|
541
|
-
|
|
542
|
-
])) :
|
|
541
|
+
d[3] || (d[3] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
542
|
+
])) : K("", !0)
|
|
543
543
|
]),
|
|
544
|
-
r.showComparePrice && Object.keys(r.comparePriceBySku[(
|
|
545
|
-
f(
|
|
544
|
+
r.showComparePrice && Object.keys(r.comparePriceBySku[(X = r.row.original.sku) == null ? void 0 : X._id] ?? {}).length > 0 ? (x(), T(re, { key: 0 }, [
|
|
545
|
+
f(o, { class: "h-8" }),
|
|
546
546
|
f(Ot, {
|
|
547
|
-
prices: r.comparePriceBySku[(
|
|
547
|
+
prices: r.comparePriceBySku[(ae = r.row.original.sku) == null ? void 0 : ae._id]
|
|
548
548
|
}, null, 8, ["prices"])
|
|
549
|
-
], 64)) :
|
|
549
|
+
], 64)) : K("", !0)
|
|
550
550
|
]);
|
|
551
551
|
};
|
|
552
552
|
}
|
|
@@ -554,38 +554,38 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
554
554
|
function Ws(m) {
|
|
555
555
|
const b = q({
|
|
556
556
|
get() {
|
|
557
|
-
const
|
|
558
|
-
return
|
|
557
|
+
const o = m.getEffectiveAt();
|
|
558
|
+
return o ? new Date(o) : null;
|
|
559
559
|
},
|
|
560
|
-
set(
|
|
561
|
-
m.setEffectiveAt((
|
|
560
|
+
set(o) {
|
|
561
|
+
m.setEffectiveAt((o == null ? void 0 : o.toISOString()) ?? null);
|
|
562
562
|
}
|
|
563
563
|
}), r = q({
|
|
564
564
|
get() {
|
|
565
565
|
return !!b.value;
|
|
566
566
|
},
|
|
567
|
-
set(
|
|
568
|
-
|
|
567
|
+
set(o) {
|
|
568
|
+
o ? b.value = /* @__PURE__ */ new Date() : b.value = null;
|
|
569
569
|
}
|
|
570
|
-
}),
|
|
570
|
+
}), d = q({
|
|
571
571
|
get() {
|
|
572
572
|
return b.value === null ? "" : ut(b.value);
|
|
573
573
|
},
|
|
574
|
-
set(
|
|
575
|
-
|
|
574
|
+
set(o) {
|
|
575
|
+
o ? b.value = /* @__PURE__ */ new Date(`${o} ${y.value}`) : b.value = null;
|
|
576
576
|
}
|
|
577
577
|
}), y = q({
|
|
578
578
|
get() {
|
|
579
579
|
return b.value === null ? "" : ks(b.value);
|
|
580
580
|
},
|
|
581
|
-
set(
|
|
582
|
-
|
|
581
|
+
set(o) {
|
|
582
|
+
o ? b.value = /* @__PURE__ */ new Date(`${d.value} ${o}`) : b.value = null;
|
|
583
583
|
}
|
|
584
584
|
});
|
|
585
585
|
return {
|
|
586
586
|
backdatePo: b,
|
|
587
587
|
backdateSwitch: r,
|
|
588
|
-
backdateModel:
|
|
588
|
+
backdateModel: d,
|
|
589
589
|
backdateTimeModel: y
|
|
590
590
|
};
|
|
591
591
|
}
|
|
@@ -595,7 +595,7 @@ const Gs = {
|
|
|
595
595
|
viewBox: "0 0 24 24",
|
|
596
596
|
fill: "none",
|
|
597
597
|
xmlns: "http://www.w3.org/2000/svg"
|
|
598
|
-
}, Js = ["fill"], ea = ["fill"], ta = ["stroke"], sa = ["stroke"], aa = /* @__PURE__ */
|
|
598
|
+
}, Js = ["fill"], ea = ["fill"], ta = ["stroke"], sa = ["stroke"], aa = /* @__PURE__ */ de({
|
|
599
599
|
__name: "SparkIcon",
|
|
600
600
|
props: {
|
|
601
601
|
size: {
|
|
@@ -608,7 +608,7 @@ const Gs = {
|
|
|
608
608
|
}
|
|
609
609
|
},
|
|
610
610
|
setup(m) {
|
|
611
|
-
return (b, r) => (
|
|
611
|
+
return (b, r) => (x(), T("svg", Gs, [
|
|
612
612
|
l("path", {
|
|
613
613
|
d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
|
|
614
614
|
fill: m.color
|
|
@@ -633,7 +633,7 @@ const Gs = {
|
|
|
633
633
|
}, null, 8, sa)
|
|
634
634
|
]));
|
|
635
635
|
}
|
|
636
|
-
}), oa = { class: "flex gap-8 items-center" }, na = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, la = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, ra = { class: "flex items-center w-full" }, ia = { class: "flex-1" }, ua = { class: "fm-typo-en-title-sm-800" }, da = { class: "flex items-start gap-8" }, ca = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ma = { class: "flex gap-1" }, pa = /* @__PURE__ */
|
|
636
|
+
}), oa = { class: "flex gap-8 items-center" }, na = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, la = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, ra = { class: "flex items-center w-full" }, ia = { class: "flex-1" }, ua = { class: "fm-typo-en-title-sm-800" }, da = { class: "flex items-start gap-8" }, ca = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ma = { class: "flex gap-1" }, pa = /* @__PURE__ */ de({
|
|
637
637
|
__name: "ForecastStock",
|
|
638
638
|
props: {
|
|
639
639
|
templateId: {},
|
|
@@ -643,9 +643,9 @@ const Gs = {
|
|
|
643
643
|
},
|
|
644
644
|
emits: ["update:poItems", "update:forecastAmounts"],
|
|
645
645
|
setup(m, { emit: b }) {
|
|
646
|
-
const r = m,
|
|
647
|
-
function c(s, i,
|
|
648
|
-
return i != null && s < i && (s = i),
|
|
646
|
+
const r = m, d = b, y = N(!1), o = N(7), k = os(), C = Re(), { t: I } = he();
|
|
647
|
+
function c(s, i, u) {
|
|
648
|
+
return i != null && s < i && (s = i), u != null && s > u && (s = u), s;
|
|
649
649
|
}
|
|
650
650
|
function e(s) {
|
|
651
651
|
if (!((s == null ? void 0 : s.amount) == null || (s == null ? void 0 : s.precision) == null))
|
|
@@ -654,40 +654,40 @@ const Gs = {
|
|
|
654
654
|
function n({
|
|
655
655
|
sku: s,
|
|
656
656
|
code: i,
|
|
657
|
-
name:
|
|
657
|
+
name: u,
|
|
658
658
|
baseAmount: h,
|
|
659
659
|
measurement: S,
|
|
660
660
|
min: v,
|
|
661
661
|
max: g
|
|
662
662
|
}) {
|
|
663
663
|
if (S) {
|
|
664
|
-
const
|
|
665
|
-
let B = Math.ceil(h /
|
|
664
|
+
const $ = S.conversion.amount;
|
|
665
|
+
let B = Math.ceil(h / $);
|
|
666
666
|
return B = c(B, v, g), {
|
|
667
667
|
sku: s,
|
|
668
668
|
code: i,
|
|
669
|
-
name:
|
|
669
|
+
name: u,
|
|
670
670
|
quantity: { amount: B, precision: 0 },
|
|
671
671
|
measurement: S
|
|
672
672
|
};
|
|
673
673
|
} else {
|
|
674
|
-
const
|
|
674
|
+
const $ = Math.ceil(c(h, v, g));
|
|
675
675
|
return {
|
|
676
676
|
sku: s,
|
|
677
677
|
code: i,
|
|
678
|
-
name:
|
|
679
|
-
quantity: { amount:
|
|
678
|
+
name: u,
|
|
679
|
+
quantity: { amount: $, precision: 0 },
|
|
680
680
|
measurement: null
|
|
681
681
|
};
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
async function p() {
|
|
685
|
-
if (
|
|
686
|
-
y.value = !1, await k.readPurchaseOrder(
|
|
685
|
+
if (o.value < 1) return;
|
|
686
|
+
y.value = !1, await k.readPurchaseOrder(o.value, r.templateId);
|
|
687
687
|
const s = k.purchaseOrderForecast.skus;
|
|
688
688
|
if (s.length === 0) {
|
|
689
|
-
|
|
690
|
-
message:
|
|
689
|
+
C.open({
|
|
690
|
+
message: I("inventory.transfer.form.items.forecastStock.notAvailable"),
|
|
691
691
|
type: "info"
|
|
692
692
|
});
|
|
693
693
|
return;
|
|
@@ -698,19 +698,19 @@ const Gs = {
|
|
|
698
698
|
if (!g)
|
|
699
699
|
return v && h.push(v), h;
|
|
700
700
|
if (!r.templateId && g.amount <= 0) return h;
|
|
701
|
-
const
|
|
701
|
+
const $ = g.amount ?? e(v == null ? void 0 : v.quantity) ?? 0;
|
|
702
702
|
return h.push(
|
|
703
703
|
n({
|
|
704
704
|
sku: S.sku,
|
|
705
705
|
code: S.code,
|
|
706
706
|
name: S.name,
|
|
707
|
-
baseAmount:
|
|
707
|
+
baseAmount: $,
|
|
708
708
|
measurement: S.measurement || null,
|
|
709
709
|
min: e(S.minimumQuantity),
|
|
710
710
|
max: e(S.maximumQuantity)
|
|
711
711
|
})
|
|
712
712
|
), h;
|
|
713
|
-
}, []),
|
|
713
|
+
}, []), u = s.map((h) => {
|
|
714
714
|
const S = r.templateItems.find((W) => W.sku._id === h.id);
|
|
715
715
|
let v = h.amount, g = 0;
|
|
716
716
|
if (S != null && S.measurement) {
|
|
@@ -718,21 +718,21 @@ const Gs = {
|
|
|
718
718
|
v = Math.ceil(h.amount / W);
|
|
719
719
|
} else
|
|
720
720
|
v = Math.ceil(h.amount);
|
|
721
|
-
const
|
|
721
|
+
const $ = e(S == null ? void 0 : S.minimumQuantity) ?? 0, B = e(S == null ? void 0 : S.maximumQuantity) ?? 1 / 0, z = v < $ || v > B ? "error" : "success";
|
|
722
722
|
return { skuId: h.id, amount: v, precision: g, helperState: z };
|
|
723
723
|
});
|
|
724
|
-
|
|
724
|
+
d("update:poItems", i), d("update:forecastAmounts", u);
|
|
725
725
|
}
|
|
726
726
|
return (s, i) => {
|
|
727
|
-
const
|
|
728
|
-
return
|
|
727
|
+
const u = V("FmButton"), h = V("FmIcon"), S = V("FmStepperField"), v = V("FmPopover");
|
|
728
|
+
return x(), se(v, {
|
|
729
729
|
disabled: s.disabled,
|
|
730
730
|
class: "flex",
|
|
731
731
|
"show-popover": y.value,
|
|
732
732
|
onPopoverChanged: i[3] || (i[3] = (g) => y.value = g)
|
|
733
733
|
}, {
|
|
734
734
|
"popover-button": A(() => [
|
|
735
|
-
f(
|
|
735
|
+
f(u, {
|
|
736
736
|
label: "unused",
|
|
737
737
|
variant: "secondary",
|
|
738
738
|
"text-color": s.disabled ? "disabled" : "primary",
|
|
@@ -746,7 +746,7 @@ const Gs = {
|
|
|
746
746
|
size: 24,
|
|
747
747
|
color: s.disabled ? "#c7c7cc" : "#ff7823"
|
|
748
748
|
}, null, 8, ["color"]),
|
|
749
|
-
l("div", na, E(t(
|
|
749
|
+
l("div", na, E(t(I)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
750
750
|
])
|
|
751
751
|
]),
|
|
752
752
|
_: 1
|
|
@@ -756,14 +756,14 @@ const Gs = {
|
|
|
756
756
|
l("div", la, [
|
|
757
757
|
l("div", ra, [
|
|
758
758
|
l("div", ia, [
|
|
759
|
-
f(
|
|
759
|
+
f(Ss, { "z-index": 99 }, {
|
|
760
760
|
default: A(() => [
|
|
761
|
-
l("p", ua, E(t(
|
|
761
|
+
l("p", ua, E(t(I)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
762
762
|
]),
|
|
763
763
|
_: 1
|
|
764
764
|
})
|
|
765
765
|
]),
|
|
766
|
-
f(
|
|
766
|
+
f(u, {
|
|
767
767
|
icon: "close",
|
|
768
768
|
size: "md",
|
|
769
769
|
variant: "tertiary",
|
|
@@ -771,10 +771,10 @@ const Gs = {
|
|
|
771
771
|
})
|
|
772
772
|
]),
|
|
773
773
|
f(S, {
|
|
774
|
-
modelValue:
|
|
775
|
-
"onUpdate:modelValue": i[1] || (i[1] = (g) =>
|
|
776
|
-
label: t(
|
|
777
|
-
rules: [t(
|
|
774
|
+
modelValue: o.value,
|
|
775
|
+
"onUpdate:modelValue": i[1] || (i[1] = (g) => o.value = g),
|
|
776
|
+
label: t(I)("inventory.transfer.form.items.forecastStock.days"),
|
|
777
|
+
rules: [t(Ue)(1)]
|
|
778
778
|
}, {
|
|
779
779
|
"helper-text": A(() => [
|
|
780
780
|
l("div", da, [
|
|
@@ -783,20 +783,20 @@ const Gs = {
|
|
|
783
783
|
size: "sm",
|
|
784
784
|
class: "text-fm-color-system-warning-300"
|
|
785
785
|
}),
|
|
786
|
-
l("div", ca, E(t(
|
|
786
|
+
l("div", ca, E(t(I)("inventory.transfer.form.items.forecastStock.replace")), 1)
|
|
787
787
|
])
|
|
788
788
|
]),
|
|
789
789
|
_: 1
|
|
790
790
|
}, 8, ["modelValue", "label", "rules"]),
|
|
791
791
|
l("div", ma, [
|
|
792
792
|
i[4] || (i[4] = l("div", { class: "grow" }, null, -1)),
|
|
793
|
-
f(
|
|
794
|
-
label: t(
|
|
793
|
+
f(u, {
|
|
794
|
+
label: t(I)("common.cancel"),
|
|
795
795
|
variant: "tertiary",
|
|
796
796
|
onClick: i[2] || (i[2] = (g) => y.value = !1)
|
|
797
797
|
}, null, 8, ["label"]),
|
|
798
|
-
f(
|
|
799
|
-
label: t(
|
|
798
|
+
f(u, {
|
|
799
|
+
label: t(I)("inventory.transfer.form.items.forecastStock.generate"),
|
|
800
800
|
onClick: p
|
|
801
801
|
}, null, 8, ["label"])
|
|
802
802
|
])
|
|
@@ -808,36 +808,36 @@ const Gs = {
|
|
|
808
808
|
}
|
|
809
809
|
});
|
|
810
810
|
function fa() {
|
|
811
|
-
const m = Re(), b = dt(), r =
|
|
812
|
-
|
|
813
|
-
k && (y.value = !0,
|
|
811
|
+
const m = Re(), b = dt(), r = N(!1);
|
|
812
|
+
_e(r, (k) => {
|
|
813
|
+
k && (y.value = !0, d().finally(() => {
|
|
814
814
|
y.value = !1;
|
|
815
815
|
}));
|
|
816
816
|
});
|
|
817
|
-
async function
|
|
817
|
+
async function d() {
|
|
818
818
|
try {
|
|
819
|
-
const { startDate: k, endDate:
|
|
819
|
+
const { startDate: k, endDate: C } = xs(6), e = (await b.getPurchaseOrders({ start: k, end: C })).filter(
|
|
820
820
|
(n) => {
|
|
821
821
|
var p, s;
|
|
822
822
|
return n.status === Lt.enum.COMPLETE && ((p = n.supplier) == null ? void 0 : p.internal) !== "warehouse" && ((s = n.supplier) == null ? void 0 : s.internal) !== "restaurant";
|
|
823
823
|
}
|
|
824
824
|
).reduce((n, p) => {
|
|
825
825
|
const s = new Date(Ht(p._id)), i = p.supplier._id;
|
|
826
|
-
for (const
|
|
827
|
-
if (!
|
|
828
|
-
const h = n[
|
|
826
|
+
for (const u of p.items) {
|
|
827
|
+
if (!u.totalCost) continue;
|
|
828
|
+
const h = n[u.sku._id] ?? {}, S = h[i] ?? [];
|
|
829
829
|
S.push({
|
|
830
830
|
date: s.toISOString(),
|
|
831
|
-
totalUnit:
|
|
832
|
-
totalCost:
|
|
833
|
-
unit:
|
|
834
|
-
measurement:
|
|
831
|
+
totalUnit: u.quantity,
|
|
832
|
+
totalCost: u.totalCost,
|
|
833
|
+
unit: u.sku.unit,
|
|
834
|
+
measurement: u.measurement,
|
|
835
835
|
seqNumber: p.seqNumber
|
|
836
|
-
}), h[i] = S, n[
|
|
836
|
+
}), h[i] = S, n[u.sku._id] = h;
|
|
837
837
|
}
|
|
838
838
|
return n;
|
|
839
839
|
}, {});
|
|
840
|
-
|
|
840
|
+
o.value = e;
|
|
841
841
|
} catch {
|
|
842
842
|
m.open({
|
|
843
843
|
title: "Something went wrong",
|
|
@@ -845,14 +845,14 @@ function fa() {
|
|
|
845
845
|
}), r.value = !1;
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
|
-
const y =
|
|
848
|
+
const y = N(!1), o = N({});
|
|
849
849
|
return {
|
|
850
850
|
comparePricesToggle: r,
|
|
851
851
|
comparePriceFetching: y,
|
|
852
|
-
comparePriceBySku:
|
|
852
|
+
comparePriceBySku: o
|
|
853
853
|
};
|
|
854
854
|
}
|
|
855
|
-
const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }, ba = ["colspan"], ga = /* @__PURE__ */
|
|
855
|
+
const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }, ba = ["colspan"], ga = /* @__PURE__ */ de({
|
|
856
856
|
__name: "TransferItemTable",
|
|
857
857
|
props: {
|
|
858
858
|
templateItem: {},
|
|
@@ -866,27 +866,27 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
|
|
|
866
866
|
function b(r) {
|
|
867
867
|
return r.column.columnDef.meta;
|
|
868
868
|
}
|
|
869
|
-
return (r,
|
|
870
|
-
var y,
|
|
871
|
-
return
|
|
869
|
+
return (r, d) => {
|
|
870
|
+
var y, o;
|
|
871
|
+
return x(), T(re, null, [
|
|
872
872
|
l("tr", {
|
|
873
873
|
class: Z(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm", {
|
|
874
874
|
"bg-fm-color-neutral-gray-100": r.row.getIsSelected()
|
|
875
875
|
}])
|
|
876
876
|
}, [
|
|
877
|
-
(
|
|
878
|
-
var
|
|
879
|
-
return
|
|
877
|
+
(x(!0), T(re, null, xe(r.row.getVisibleCells(), (k) => {
|
|
878
|
+
var C, I, c, e;
|
|
879
|
+
return x(), T("td", {
|
|
880
880
|
key: k.id,
|
|
881
|
-
class: Z(["h-[56px] text-fm-color-typo-primary", ((
|
|
881
|
+
class: Z(["h-[56px] text-fm-color-typo-primary", ((C = b(k)) == null ? void 0 : C.cellClass) ?? "px-16"]),
|
|
882
882
|
style: $t({
|
|
883
|
-
width: (
|
|
883
|
+
width: (I = b(k)) == null ? void 0 : I.width,
|
|
884
884
|
maxWidth: (c = b(k)) == null ? void 0 : c.maxWidth,
|
|
885
885
|
textAlign: ((e = b(k)) == null ? void 0 : e.textAlign) ?? "left"
|
|
886
886
|
})
|
|
887
887
|
}, [
|
|
888
888
|
l("span", va, [
|
|
889
|
-
f(t(
|
|
889
|
+
f(t(ve), {
|
|
890
890
|
render: k.column.columnDef.cell,
|
|
891
891
|
props: k.getContext()
|
|
892
892
|
}, null, 8, ["render", "props"])
|
|
@@ -894,15 +894,15 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
|
|
|
894
894
|
], 6);
|
|
895
895
|
}), 128))
|
|
896
896
|
], 2),
|
|
897
|
-
r.showComparePrice && Object.keys(r.comparePriceBySku[(y = r.row.original.sku) == null ? void 0 : y._id] ?? {}).length > 0 ? (
|
|
897
|
+
r.showComparePrice && Object.keys(r.comparePriceBySku[(y = r.row.original.sku) == null ? void 0 : y._id] ?? {}).length > 0 ? (x(), T("tr", ya, [
|
|
898
898
|
l("td", {
|
|
899
899
|
colspan: r.row.getVisibleCells().length
|
|
900
900
|
}, [
|
|
901
901
|
f(Ot, {
|
|
902
|
-
prices: r.comparePriceBySku[(
|
|
902
|
+
prices: r.comparePriceBySku[(o = r.row.original.sku) == null ? void 0 : o._id]
|
|
903
903
|
}, null, 8, ["prices"])
|
|
904
904
|
], 8, ba)
|
|
905
|
-
])) :
|
|
905
|
+
])) : K("", !0)
|
|
906
906
|
], 64);
|
|
907
907
|
};
|
|
908
908
|
}
|
|
@@ -912,7 +912,7 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
|
|
|
912
912
|
}, ha = { class: "flex flex-col gap-4" }, ka = { class: "flex items-center gap-4" }, xa = {
|
|
913
913
|
key: 0,
|
|
914
914
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
915
|
-
}, Ca = /* @__PURE__ */
|
|
915
|
+
}, Ca = /* @__PURE__ */ de({
|
|
916
916
|
__name: "NetSuiteField",
|
|
917
917
|
props: {
|
|
918
918
|
required: { type: Boolean },
|
|
@@ -925,20 +925,20 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
|
|
|
925
925
|
},
|
|
926
926
|
emits: ["netsuite:ready"],
|
|
927
927
|
setup(m, { emit: b }) {
|
|
928
|
-
const r = Be(),
|
|
929
|
-
function
|
|
930
|
-
var s, i,
|
|
931
|
-
if (!
|
|
932
|
-
|
|
933
|
-
`${
|
|
934
|
-
) :
|
|
935
|
-
const n =
|
|
928
|
+
const r = Be(), d = m, y = b, { t: o } = ws(), k = N(!1), C = N();
|
|
929
|
+
function I() {
|
|
930
|
+
var s, i, u, h;
|
|
931
|
+
if (!d.supplier) return;
|
|
932
|
+
d.supplier.internal ? C.value = r.getNetSuiteLocation(
|
|
933
|
+
`${d.supplier.internal}_${d.supplier._id}`
|
|
934
|
+
) : C.value = r.getNetSuiteVendor(d.supplier._id);
|
|
935
|
+
const n = d.supplier.internal ? r.getLocationSubsidiary((s = C.value) == null ? void 0 : s.netSuiteId).id : (i = C.value) == null ? void 0 : i.subsidiaryId, p = d.supplier.internal ? (u = r.currentLocationSubsidiary()) == null ? void 0 : u.id : (h = r.currentVendorSubsidiary(d.supplier._id)) == null ? void 0 : h.id;
|
|
936
936
|
k.value = !(!r.isEnabled || n && r.isEnabled && n == p);
|
|
937
937
|
}
|
|
938
|
-
|
|
939
|
-
() =>
|
|
938
|
+
_e(
|
|
939
|
+
() => d.supplier,
|
|
940
940
|
() => {
|
|
941
|
-
|
|
941
|
+
d.subsidiaryOptional && I();
|
|
942
942
|
},
|
|
943
943
|
{ deep: !0 }
|
|
944
944
|
), We(() => {
|
|
@@ -947,14 +947,14 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
|
|
|
947
947
|
subsidiary: { id: "", name: "" },
|
|
948
948
|
errors: []
|
|
949
949
|
};
|
|
950
|
-
if (!r.isEnabled || !
|
|
950
|
+
if (!r.isEnabled || !d.required) {
|
|
951
951
|
y("netsuite:ready", n);
|
|
952
952
|
return;
|
|
953
953
|
}
|
|
954
954
|
try {
|
|
955
955
|
const p = r.currentLocationSubsidiary();
|
|
956
|
-
|
|
957
|
-
...
|
|
956
|
+
d.setting ? n = {
|
|
957
|
+
...d.setting,
|
|
958
958
|
subsidiary: {
|
|
959
959
|
id: p.id || "",
|
|
960
960
|
name: p.name
|
|
@@ -966,36 +966,36 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
|
|
|
966
966
|
name: p.name
|
|
967
967
|
}
|
|
968
968
|
};
|
|
969
|
-
const s = r.getAvailableItems(p.id), i =
|
|
970
|
-
if (
|
|
969
|
+
const s = r.getAvailableItems(p.id), i = d.items.filter((u) => {
|
|
970
|
+
if (u.measurement != null) {
|
|
971
971
|
const h = r.getAvailableMeasurements(
|
|
972
|
-
|
|
972
|
+
u.sku._id,
|
|
973
973
|
p.id
|
|
974
974
|
);
|
|
975
|
-
return s.includes(
|
|
975
|
+
return s.includes(u.sku._id) && h.includes(u.measurement.id);
|
|
976
976
|
}
|
|
977
|
-
return s.includes(
|
|
978
|
-
}).map((
|
|
979
|
-
|
|
980
|
-
|
|
977
|
+
return s.includes(u.sku._id);
|
|
978
|
+
}).map((u) => u.sku._id);
|
|
979
|
+
d.onChange(
|
|
980
|
+
d.items.filter((u) => i.includes(u.sku._id)),
|
|
981
981
|
n
|
|
982
982
|
);
|
|
983
983
|
} finally {
|
|
984
|
-
|
|
984
|
+
I(), k.value ? d.subsidiaryOptional && y("netsuite:ready", n) : y("netsuite:ready", n);
|
|
985
985
|
}
|
|
986
986
|
});
|
|
987
987
|
const c = q(
|
|
988
|
-
() =>
|
|
988
|
+
() => d.supplier.internal ? r.currentLocationSubsidiary() : r.currentVendorSubsidiary(d.supplier._id)
|
|
989
989
|
), e = q(() => {
|
|
990
990
|
var n, p;
|
|
991
|
-
return
|
|
992
|
-
location is ${(p = r.getLocationSubsidiary((n =
|
|
991
|
+
return C.value == null ? `Cannot find the NetSuite location for "${d.supplier.name}"` : `The subsidiary of the request
|
|
992
|
+
location is ${(p = r.getLocationSubsidiary((n = C.value) == null ? void 0 : n.netSuiteId)) == null ? void 0 : p.fullName}`;
|
|
993
993
|
});
|
|
994
994
|
return (n, p) => {
|
|
995
|
-
const s = V("FmLabel"), i = V("FmIcon"),
|
|
996
|
-
return t(r).isEnabled &&
|
|
995
|
+
const s = V("FmLabel"), i = V("FmIcon"), u = V("FmField"), h = V("FmTooltip");
|
|
996
|
+
return t(r).isEnabled && d.required ? (x(), T("div", _a, [
|
|
997
997
|
f(s, {
|
|
998
|
-
label: `NetSuite ${t(
|
|
998
|
+
label: `NetSuite ${t(o)("inventory.transfer.form.netsuite.subsidiary")}`
|
|
999
999
|
}, null, 8, ["label"]),
|
|
1000
1000
|
l("div", ha, [
|
|
1001
1001
|
f(h, {
|
|
@@ -1007,7 +1007,7 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
|
|
|
1007
1007
|
Pe("This field is locked and based on the location of the request.")
|
|
1008
1008
|
])),
|
|
1009
1009
|
default: A(() => [
|
|
1010
|
-
f(
|
|
1010
|
+
f(u, null, {
|
|
1011
1011
|
default: A(() => {
|
|
1012
1012
|
var S;
|
|
1013
1013
|
return [
|
|
@@ -1028,9 +1028,9 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
|
|
|
1028
1028
|
]),
|
|
1029
1029
|
_: 1
|
|
1030
1030
|
}, 8, ["disabled"]),
|
|
1031
|
-
k.value ? (
|
|
1031
|
+
k.value ? (x(), T("div", xa, E(e.value), 1)) : K("", !0)
|
|
1032
1032
|
])
|
|
1033
|
-
])) :
|
|
1033
|
+
])) : K("", !0);
|
|
1034
1034
|
};
|
|
1035
1035
|
}
|
|
1036
1036
|
});
|
|
@@ -1040,8 +1040,8 @@ function Ve(m) {
|
|
|
1040
1040
|
return b.map(Ve);
|
|
1041
1041
|
if (b !== null && typeof b == "object") {
|
|
1042
1042
|
const r = {};
|
|
1043
|
-
for (const
|
|
1044
|
-
Object.prototype.hasOwnProperty.call(b,
|
|
1043
|
+
for (const d in b)
|
|
1044
|
+
Object.prototype.hasOwnProperty.call(b, d) && (r[d] = Ve(b[d]));
|
|
1045
1045
|
return r;
|
|
1046
1046
|
}
|
|
1047
1047
|
return b;
|
|
@@ -1060,44 +1060,44 @@ function Ct(m) {
|
|
|
1060
1060
|
doc: m.doc
|
|
1061
1061
|
};
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1064
|
-
const
|
|
1063
|
+
function St(m, b, r) {
|
|
1064
|
+
const d = Ve(m.suppliers ?? []), y = Ve(b.allLocations ?? []).map(Ct), o = b._currentLocation ? Ct(Ve(b._currentLocation)) : null, k = r.inventory ? [Ve(r.inventory)] : [];
|
|
1065
1065
|
return {
|
|
1066
|
-
suppliers:
|
|
1066
|
+
suppliers: d,
|
|
1067
1067
|
locations: y,
|
|
1068
|
-
currentLocation:
|
|
1068
|
+
currentLocation: o,
|
|
1069
1069
|
inventoryDoc: k
|
|
1070
1070
|
};
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
const m = it(), b = Ge(), r = Je(),
|
|
1072
|
+
function Sa() {
|
|
1073
|
+
const m = it(), b = Ge(), r = Je(), d = St(m, b, r), y = _t(ys({ env: d }));
|
|
1074
1074
|
y.value.setUsePartialUpdates(!0);
|
|
1075
|
-
const
|
|
1076
|
-
|
|
1075
|
+
const o = _t(y.value.state()), k = (e) => {
|
|
1076
|
+
o.value = e;
|
|
1077
1077
|
};
|
|
1078
1078
|
y.value.addListener(k);
|
|
1079
|
-
const
|
|
1079
|
+
const C = (e, n, p) => {
|
|
1080
1080
|
switch (e) {
|
|
1081
1081
|
case ot.set:
|
|
1082
|
-
ht(
|
|
1082
|
+
ht(o.value, n, p);
|
|
1083
1083
|
break;
|
|
1084
1084
|
case ot.add:
|
|
1085
|
-
Qt(
|
|
1085
|
+
Qt(o.value, n, p);
|
|
1086
1086
|
break;
|
|
1087
1087
|
case ot.delete:
|
|
1088
|
-
jt(
|
|
1088
|
+
jt(o.value, n);
|
|
1089
1089
|
break;
|
|
1090
1090
|
default:
|
|
1091
|
-
console.warn(`Unknown partial update operation: ${e}, falling back to 'set'`), ht(
|
|
1091
|
+
console.warn(`Unknown partial update operation: ${e}, falling back to 'set'`), ht(o.value, n, p);
|
|
1092
1092
|
}
|
|
1093
|
-
n !== "remark" && n !== "ref" && Mt(
|
|
1093
|
+
n !== "remark" && n !== "ref" && Mt(o);
|
|
1094
1094
|
};
|
|
1095
|
-
y.value.addPartialListener(
|
|
1096
|
-
function
|
|
1097
|
-
const e =
|
|
1098
|
-
y.value.updateFullEnv(e),
|
|
1095
|
+
y.value.addPartialListener(C);
|
|
1096
|
+
function I() {
|
|
1097
|
+
const e = St(m, b, r);
|
|
1098
|
+
y.value.updateFullEnv(e), o.value = y.value.state();
|
|
1099
1099
|
}
|
|
1100
|
-
|
|
1100
|
+
_e(
|
|
1101
1101
|
[
|
|
1102
1102
|
() => m.suppliers,
|
|
1103
1103
|
() => b.allLocations,
|
|
@@ -1105,11 +1105,11 @@ function wa() {
|
|
|
1105
1105
|
() => r.inventory
|
|
1106
1106
|
],
|
|
1107
1107
|
() => {
|
|
1108
|
-
|
|
1108
|
+
I();
|
|
1109
1109
|
},
|
|
1110
1110
|
{ deep: !0 }
|
|
1111
1111
|
), Et(() => {
|
|
1112
|
-
y.value.removeListener(k), y.value.removePartialListener(
|
|
1112
|
+
y.value.removeListener(k), y.value.removePartialListener(C);
|
|
1113
1113
|
});
|
|
1114
1114
|
function c(e) {
|
|
1115
1115
|
var n;
|
|
@@ -1117,21 +1117,21 @@ function wa() {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
return {
|
|
1119
1119
|
controller: y,
|
|
1120
|
-
state:
|
|
1120
|
+
state: o,
|
|
1121
1121
|
init: c
|
|
1122
1122
|
};
|
|
1123
1123
|
}
|
|
1124
|
-
const
|
|
1124
|
+
const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center gap-8 overflow-x-auto pb-12" }, Ia = { class: "flex flex-col gap-16" }, $a = { class: "flex flex-col gap-24" }, Da = { class: "flex flex-col gap-8" }, Ta = { class: "flex flex-col gap-4" }, Va = { class: "flex items-center gap-4" }, Pa = { class: "flex flex-col gap-8" }, Ra = { class: "flex flex-col gap-4" }, Oa = { class: "flex items-center gap-4" }, Aa = {
|
|
1125
1125
|
key: 3,
|
|
1126
1126
|
class: "p-16 border border-fm-color-neutral-gray-300 fm-corner-radius-md flex flex-col"
|
|
1127
1127
|
}, Ea = {
|
|
1128
1128
|
key: 0,
|
|
1129
1129
|
class: "flex-1 flex gap-8 h-48 xs:flex-col xs:pt-16 sm:flex-col sm:pt-16"
|
|
1130
|
-
}, Ma = { class: "flex-1" }, qa = { class: "flex-1" },
|
|
1130
|
+
}, Ma = { class: "flex-1" }, qa = { class: "flex-1" }, Na = {
|
|
1131
1131
|
key: 1,
|
|
1132
1132
|
class: "flex items-center gap-4"
|
|
1133
|
-
},
|
|
1134
|
-
__name: "
|
|
1133
|
+
}, Ua = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" }, Ba = { class: "flex flex-col gap-16" }, za = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, La = { class: "flex gap-8" }, Ha = { key: 0 }, ja = /* @__PURE__ */ de({
|
|
1134
|
+
__name: "TransferFormWithController",
|
|
1135
1135
|
props: {
|
|
1136
1136
|
modelValue: {},
|
|
1137
1137
|
request: {},
|
|
@@ -1142,110 +1142,123 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1142
1142
|
},
|
|
1143
1143
|
emits: ["validation-success", "form:ready"],
|
|
1144
1144
|
setup(m, { expose: b, emit: r }) {
|
|
1145
|
-
const
|
|
1146
|
-
s.init(
|
|
1147
|
-
const { controller: i, state:
|
|
1145
|
+
const d = m, y = r, { t: o } = he(), k = Ge(), C = Je(), I = Be(), c = et(), e = Rt(), { breakpoints: n } = rt(), p = q(() => n.value.xs || n.value.sm), s = Sa();
|
|
1146
|
+
s.init(d.modelValue);
|
|
1147
|
+
const { controller: i, state: u } = s, h = It({
|
|
1148
1148
|
value: !1
|
|
1149
|
-
}), S =
|
|
1149
|
+
}), S = N(!1), v = N(0), g = N([]), $ = q(
|
|
1150
1150
|
() => {
|
|
1151
|
-
var
|
|
1152
|
-
return ((
|
|
1153
|
-
var
|
|
1154
|
-
return _._id === ((
|
|
1151
|
+
var a;
|
|
1152
|
+
return ((a = d.modelValue) == null ? void 0 : a.templateDoc) ?? e.templates.find((_) => {
|
|
1153
|
+
var Y;
|
|
1154
|
+
return _._id === ((Y = d.modelValue) == null ? void 0 : Y.template);
|
|
1155
1155
|
});
|
|
1156
1156
|
}
|
|
1157
|
-
), B = q(() =>
|
|
1157
|
+
), B = q(() => u.value.status === "DRAFT" || !u.value.rev), z = q(
|
|
1158
1158
|
() => {
|
|
1159
|
-
var
|
|
1160
|
-
return ((
|
|
1159
|
+
var a;
|
|
1160
|
+
return ((a = u.value.items) == null ? void 0 : a.map((_) => _.item)) || [];
|
|
1161
1161
|
}
|
|
1162
1162
|
);
|
|
1163
1163
|
We(() => {
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1164
|
+
var a, _, Y, le;
|
|
1165
|
+
try {
|
|
1166
|
+
I.isEnabled && I.businessSubsidiaryId && !((_ = (a = u.value.netSuite) == null ? void 0 : a.subsidiary) != null && _.id) && i.value.setNetSuiteSetting({
|
|
1167
|
+
...u.value.netSuite,
|
|
1168
|
+
id: ((Y = u.value.netSuite) == null ? void 0 : Y.id) ?? "",
|
|
1169
|
+
subsidiary: {
|
|
1170
|
+
id: I.businessSubsidiaryId,
|
|
1171
|
+
name: I.businessSubsidiaryName ?? ""
|
|
1172
|
+
},
|
|
1173
|
+
errors: ((le = u.value.netSuite) == null ? void 0 : le.errors) ?? []
|
|
1174
|
+
});
|
|
1175
|
+
} finally {
|
|
1176
|
+
S.value = !0;
|
|
1177
|
+
}
|
|
1178
|
+
}), _e([S, h], ([a, _], [Y, le]) => {
|
|
1179
|
+
_.value && le.value && y("form:ready");
|
|
1167
1180
|
});
|
|
1168
1181
|
const W = q(
|
|
1169
1182
|
() => k.currentLocation.type === Yt.restaurant
|
|
1170
|
-
), J = cs(),
|
|
1171
|
-
() =>
|
|
1172
|
-
(
|
|
1173
|
-
i.value.setSupplier(
|
|
1183
|
+
), J = cs(), U = gs(
|
|
1184
|
+
() => u.value,
|
|
1185
|
+
(a) => {
|
|
1186
|
+
i.value.setSupplier(a.supplier);
|
|
1174
1187
|
},
|
|
1175
1188
|
!0,
|
|
1176
|
-
!
|
|
1189
|
+
!c.businessSupplierOnly
|
|
1177
1190
|
), P = q({
|
|
1178
1191
|
get() {
|
|
1179
|
-
var
|
|
1180
|
-
return typeof ((
|
|
1192
|
+
var a;
|
|
1193
|
+
return typeof ((a = u.value.supplier) == null ? void 0 : a.internal) == "string" ? pe.enum.transfer : pe.enum.purchase;
|
|
1181
1194
|
},
|
|
1182
|
-
set(
|
|
1183
|
-
i.value.selectType(
|
|
1195
|
+
set(a) {
|
|
1196
|
+
i.value.selectType(a);
|
|
1184
1197
|
}
|
|
1185
1198
|
}), R = q(() => {
|
|
1186
|
-
let
|
|
1187
|
-
return c.mustUsePoTemplate && !
|
|
1188
|
-
var
|
|
1189
|
-
return (
|
|
1190
|
-
})),
|
|
1199
|
+
let a = U.transferLocationOptions.value;
|
|
1200
|
+
return c.mustUsePoTemplate && !u.value.template && (a = a.filter((_) => {
|
|
1201
|
+
var Y;
|
|
1202
|
+
return (Y = _.sublabel) == null ? void 0 : Y.startsWith("restaurant");
|
|
1203
|
+
})), a;
|
|
1191
1204
|
}), D = q({
|
|
1192
1205
|
get() {
|
|
1193
|
-
var
|
|
1194
|
-
return (
|
|
1206
|
+
var a;
|
|
1207
|
+
return (a = u.value.supplier) == null ? void 0 : a._id;
|
|
1195
1208
|
},
|
|
1196
|
-
set(
|
|
1197
|
-
|
|
1209
|
+
set(a) {
|
|
1210
|
+
U.transferLocationModel.value = a;
|
|
1198
1211
|
}
|
|
1199
1212
|
}), M = q({
|
|
1200
1213
|
get() {
|
|
1201
|
-
return
|
|
1214
|
+
return u.value.remark ?? "";
|
|
1202
1215
|
},
|
|
1203
|
-
set(
|
|
1204
|
-
i.value.addRemark(
|
|
1216
|
+
set(a) {
|
|
1217
|
+
i.value.addRemark(a ?? "");
|
|
1205
1218
|
}
|
|
1206
|
-
}),
|
|
1219
|
+
}), L = q({
|
|
1207
1220
|
get() {
|
|
1208
|
-
return
|
|
1221
|
+
return u.value.ref ?? "";
|
|
1209
1222
|
},
|
|
1210
|
-
set(
|
|
1211
|
-
i.value.addReference(
|
|
1223
|
+
set(a) {
|
|
1224
|
+
i.value.addReference(a ?? "");
|
|
1212
1225
|
}
|
|
1213
|
-
}), { backdatePo:
|
|
1226
|
+
}), { backdatePo: X, backdateSwitch: ae, backdateModel: F, backdateTimeModel: w } = Ws({
|
|
1214
1227
|
getEffectiveAt() {
|
|
1215
|
-
return
|
|
1228
|
+
return u.value.effectiveAt;
|
|
1216
1229
|
},
|
|
1217
|
-
setEffectiveAt(
|
|
1218
|
-
i.value.setEffectiveAt(
|
|
1230
|
+
setEffectiveAt(a) {
|
|
1231
|
+
i.value.setEffectiveAt(a);
|
|
1219
1232
|
}
|
|
1220
|
-
}), { comparePricesToggle:
|
|
1233
|
+
}), { comparePricesToggle: H, comparePriceFetching: fe, comparePriceBySku: ce } = fa(), G = N();
|
|
1221
1234
|
b({
|
|
1222
1235
|
validateInputs: () => {
|
|
1223
|
-
var
|
|
1224
|
-
(_ = (
|
|
1236
|
+
var a, _;
|
|
1237
|
+
(_ = (a = G.value) == null ? void 0 : a.validateInputs) == null || _.call(a);
|
|
1225
1238
|
},
|
|
1226
1239
|
resetInputsValidation: () => {
|
|
1227
|
-
var
|
|
1228
|
-
(_ = (
|
|
1240
|
+
var a, _;
|
|
1241
|
+
(_ = (a = G.value) == null ? void 0 : a.resetInputsValidation) == null || _.call(a);
|
|
1229
1242
|
},
|
|
1230
1243
|
resetInputs: () => {
|
|
1231
|
-
var
|
|
1232
|
-
(_ = (
|
|
1244
|
+
var a, _;
|
|
1245
|
+
(_ = (a = G.value) == null ? void 0 : a.resetInputs) == null || _.call(a);
|
|
1233
1246
|
},
|
|
1234
|
-
getFormData: () =>
|
|
1247
|
+
getFormData: () => u.value.id && u.value.rev ? i.value.toUpdateData() : i.value.toCreateData()
|
|
1235
1248
|
});
|
|
1236
1249
|
const Fe = q(() => ({
|
|
1237
|
-
updateItem: (
|
|
1238
|
-
const _ = Kt.parse(
|
|
1239
|
-
i.value.updateSkuInfo(
|
|
1250
|
+
updateItem: (a) => {
|
|
1251
|
+
const _ = Kt.parse(a), Y = i.value.toFdtoPOItem(_);
|
|
1252
|
+
i.value.updateSkuInfo(Y);
|
|
1240
1253
|
},
|
|
1241
|
-
deleteItem: (
|
|
1242
|
-
i.value.removeSku(
|
|
1254
|
+
deleteItem: (a) => {
|
|
1255
|
+
i.value.removeSku(a.sku);
|
|
1243
1256
|
}
|
|
1244
1257
|
})), Ie = Rs({
|
|
1245
|
-
updateItem: (
|
|
1246
|
-
deleteItem: (
|
|
1258
|
+
updateItem: (a) => Fe.value.updateItem(a),
|
|
1259
|
+
deleteItem: (a) => Fe.value.deleteItem(a),
|
|
1247
1260
|
get supplier() {
|
|
1248
|
-
return
|
|
1261
|
+
return u.value.supplier;
|
|
1249
1262
|
},
|
|
1250
1263
|
get items() {
|
|
1251
1264
|
return z.value;
|
|
@@ -1254,10 +1267,10 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1254
1267
|
return P.value;
|
|
1255
1268
|
},
|
|
1256
1269
|
get template() {
|
|
1257
|
-
return
|
|
1270
|
+
return $.value;
|
|
1258
1271
|
},
|
|
1259
1272
|
get disabled() {
|
|
1260
|
-
return
|
|
1273
|
+
return d.disabled;
|
|
1261
1274
|
},
|
|
1262
1275
|
get forecastAmounts() {
|
|
1263
1276
|
return g.value;
|
|
@@ -1265,34 +1278,34 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1265
1278
|
}), ze = q(() => Ie.columnDefs.value);
|
|
1266
1279
|
function Le() {
|
|
1267
1280
|
var Ae, Qe, Ye, Ee, Ke;
|
|
1268
|
-
const
|
|
1269
|
-
var
|
|
1270
|
-
const ee = (oe = (
|
|
1271
|
-
(
|
|
1281
|
+
const a = (Ye = (Qe = (Ae = $.value) == null ? void 0 : Ae.purchaseOrder) == null ? void 0 : Qe.items) == null ? void 0 : Ye.groupBy((j) => j.sku._id), _ = I.isEnabled ? I.getAvailableItems((Ke = (Ee = u.value.netSuite) == null ? void 0 : Ee.subsidiary) == null ? void 0 : Ke.id) : [], Y = a != null && a.size ? C.skus.filter((j) => a.has(j._id)) : C.skus, le = I.isEnabled ? Y.filter((j) => {
|
|
1282
|
+
var ie, oe, ue, me;
|
|
1283
|
+
const ee = (oe = (ie = $.value) == null ? void 0 : ie.purchaseOrder) == null ? void 0 : oe.items.find(
|
|
1284
|
+
(be) => be.sku._id === j._id
|
|
1272
1285
|
);
|
|
1273
1286
|
if (ee != null && ee.measurement != null) {
|
|
1274
|
-
const
|
|
1287
|
+
const be = I.getAvailableMeasurements(
|
|
1275
1288
|
ee.sku._id,
|
|
1276
|
-
(me = (
|
|
1289
|
+
(me = (ue = u.value.netSuite) == null ? void 0 : ue.subsidiary) == null ? void 0 : me.id
|
|
1277
1290
|
);
|
|
1278
|
-
return _.includes(ee.sku._id) &&
|
|
1291
|
+
return _.includes(ee.sku._id) && be.includes(ee.measurement.id);
|
|
1279
1292
|
}
|
|
1280
|
-
return _.includes(
|
|
1281
|
-
}).map((
|
|
1282
|
-
(
|
|
1283
|
-
var ee,
|
|
1293
|
+
return _.includes(j._id);
|
|
1294
|
+
}).map((j) => j._id) : Y.map((j) => j._id), ye = Y.map(
|
|
1295
|
+
(j) => {
|
|
1296
|
+
var ee, ie, oe, ue;
|
|
1284
1297
|
return {
|
|
1285
|
-
label: ((
|
|
1286
|
-
sublabel: ((
|
|
1287
|
-
value:
|
|
1288
|
-
disabled: !!(!
|
|
1289
|
-
tags:
|
|
1298
|
+
label: ((ie = (ee = a == null ? void 0 : a.get(j._id)) == null ? void 0 : ee[0]) == null ? void 0 : ie.name) ?? j.name,
|
|
1299
|
+
sublabel: ((ue = (oe = a == null ? void 0 : a.get(j._id)) == null ? void 0 : oe[0]) == null ? void 0 : ue.code) ?? j.code,
|
|
1300
|
+
value: j,
|
|
1301
|
+
disabled: !!(!le.includes(j._id) || j.isInactive),
|
|
1302
|
+
tags: j.isInactive ? ["Inactive"] : ["Active"]
|
|
1290
1303
|
};
|
|
1291
1304
|
}
|
|
1292
|
-
), $e =
|
|
1305
|
+
), $e = ye.filter((j) => {
|
|
1293
1306
|
var ee;
|
|
1294
|
-
return (ee = z.value) == null ? void 0 : ee.find((
|
|
1295
|
-
}).map((
|
|
1307
|
+
return (ee = z.value) == null ? void 0 : ee.find((ie) => ie.sku._id === j.value._id);
|
|
1308
|
+
}).map((j) => j.value), je = [
|
|
1296
1309
|
{
|
|
1297
1310
|
type: "string",
|
|
1298
1311
|
key: "tags",
|
|
@@ -1301,32 +1314,32 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1301
1314
|
}
|
|
1302
1315
|
];
|
|
1303
1316
|
J.open({
|
|
1304
|
-
title:
|
|
1317
|
+
title: o("inventory.transfer.form.items.selectItem"),
|
|
1305
1318
|
closeButton: !0,
|
|
1306
1319
|
contentComponent: hs,
|
|
1307
1320
|
contentComponentProps: {
|
|
1308
1321
|
modelValue: $e,
|
|
1309
|
-
items:
|
|
1322
|
+
items: ye,
|
|
1310
1323
|
virtualScroll: !0,
|
|
1311
1324
|
filterAttributes: je
|
|
1312
1325
|
},
|
|
1313
1326
|
primaryActions: {
|
|
1314
|
-
text:
|
|
1327
|
+
text: o("common.confirm"),
|
|
1315
1328
|
close: !0
|
|
1316
1329
|
},
|
|
1317
1330
|
secondaryActions: {
|
|
1318
|
-
text:
|
|
1331
|
+
text: o("common.close"),
|
|
1319
1332
|
close: !0,
|
|
1320
1333
|
variant: "tertiary"
|
|
1321
1334
|
}
|
|
1322
|
-
}).onPrimary((
|
|
1323
|
-
const ee = z.value ?? [],
|
|
1324
|
-
var
|
|
1325
|
-
const
|
|
1326
|
-
if (
|
|
1327
|
-
return
|
|
1328
|
-
const me = ((De = (
|
|
1329
|
-
(
|
|
1335
|
+
}).onPrimary((j) => {
|
|
1336
|
+
const ee = z.value ?? [], ie = j.map((oe) => {
|
|
1337
|
+
var be, De;
|
|
1338
|
+
const ue = ee.find((ke) => ke.sku._id === oe._id);
|
|
1339
|
+
if (ue)
|
|
1340
|
+
return ue;
|
|
1341
|
+
const me = ((De = (be = $.value) == null ? void 0 : be.purchaseOrder.items) == null ? void 0 : De.find(
|
|
1342
|
+
(ke) => ke.sku._id === oe._id
|
|
1330
1343
|
)) ?? {
|
|
1331
1344
|
sku: oe,
|
|
1332
1345
|
code: oe.code,
|
|
@@ -1337,27 +1350,27 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1337
1350
|
}
|
|
1338
1351
|
};
|
|
1339
1352
|
if (P.value == pe.enum.purchase) {
|
|
1340
|
-
const { cost:
|
|
1353
|
+
const { cost: ke } = Te(
|
|
1341
1354
|
me.sku,
|
|
1342
1355
|
me.quantity,
|
|
1343
1356
|
me.measurement,
|
|
1344
1357
|
{
|
|
1345
|
-
supplier:
|
|
1358
|
+
supplier: u.value.supplier
|
|
1346
1359
|
}
|
|
1347
1360
|
);
|
|
1348
|
-
me.totalCost =
|
|
1361
|
+
me.totalCost = ke;
|
|
1349
1362
|
}
|
|
1350
1363
|
return me;
|
|
1351
1364
|
});
|
|
1352
|
-
|
|
1365
|
+
ie.sort((oe, ue) => oe.sku.code.localeCompare(ue.sku.code)), i.value.updateItems(ie);
|
|
1353
1366
|
});
|
|
1354
1367
|
}
|
|
1355
|
-
function tt(
|
|
1356
|
-
return
|
|
1368
|
+
function tt(a) {
|
|
1369
|
+
return a;
|
|
1357
1370
|
}
|
|
1358
1371
|
const He = q(() => {
|
|
1359
|
-
var
|
|
1360
|
-
return
|
|
1372
|
+
var a;
|
|
1373
|
+
return $.value ? ((a = $.value) == null ? void 0 : a.purchaseOrder.items) || [] : C.skus.map((_) => ({
|
|
1361
1374
|
quantity: {
|
|
1362
1375
|
amount: 0,
|
|
1363
1376
|
precision: 0
|
|
@@ -1369,68 +1382,70 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1369
1382
|
amount: 0,
|
|
1370
1383
|
precision: 0
|
|
1371
1384
|
},
|
|
1372
|
-
measurement: _.trackingMeasurement ? _.unit.measurements.find((
|
|
1385
|
+
measurement: _.trackingMeasurement ? _.unit.measurements.find((Y) => Y.id === _.trackingMeasurement) : null
|
|
1373
1386
|
}));
|
|
1374
1387
|
}), Ce = q(() => {
|
|
1375
|
-
const
|
|
1376
|
-
return (!c.mustUsePoTemplate || c.mustUsePoTemplate &&
|
|
1377
|
-
label:
|
|
1388
|
+
const a = [];
|
|
1389
|
+
return (!c.mustUsePoTemplate || c.mustUsePoTemplate && u.value.template) && a.push({
|
|
1390
|
+
label: o("inventory.transfer.form.type.purchase"),
|
|
1378
1391
|
value: pe.enum.purchase
|
|
1379
|
-
}),
|
|
1380
|
-
label:
|
|
1392
|
+
}), a.push({
|
|
1393
|
+
label: o("inventory.transfer.form.type.transfer"),
|
|
1381
1394
|
value: pe.enum.transfer
|
|
1382
|
-
}),
|
|
1383
|
-
}), Oe = q(
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1395
|
+
}), a;
|
|
1396
|
+
}), Oe = q(
|
|
1397
|
+
() => {
|
|
1398
|
+
var a;
|
|
1399
|
+
return ((a = u.value.items) == null ? void 0 : a.every((_) => _.item.quantity.amount <= 0)) ?? !0;
|
|
1400
|
+
}
|
|
1401
|
+
);
|
|
1402
|
+
return (a, _) => {
|
|
1403
|
+
var me, be;
|
|
1404
|
+
const Y = V("FmChip"), le = V("FmLabel"), ye = V("FmIcon"), $e = V("FmField"), je = V("FmTooltip"), Ae = V("FmSelect"), Qe = V("FmTextField"), Ye = V("FmTextarea"), Ee = V("FmSwitch"), Ke = V("FmDatePicker"), j = V("FmTimePicker"), ee = V("FmFormGroup"), ie = V("FmButton"), oe = V("FmTable"), ue = V("FmForm");
|
|
1405
|
+
return x(), T("div", wa, [
|
|
1391
1406
|
l("div", Fa, [
|
|
1392
|
-
(me =
|
|
1407
|
+
(me = d.modelValue) != null && me.template ? (x(), se(Y, {
|
|
1393
1408
|
key: 0,
|
|
1394
|
-
variant:
|
|
1395
|
-
label: `${t(
|
|
1409
|
+
variant: a.disabled ? "warning" : void 0,
|
|
1410
|
+
label: `${t(o)("inventory.transfer.template.title")}: ${((be = $.value) == null ? void 0 : be.name) ?? t(o)("inventory.transfer.form.loading")}`,
|
|
1396
1411
|
icon: "summarize",
|
|
1397
1412
|
compact: ""
|
|
1398
|
-
}, null, 8, ["variant", "label"])) :
|
|
1399
|
-
f(
|
|
1413
|
+
}, null, 8, ["variant", "label"])) : K("", !0),
|
|
1414
|
+
f(Y, {
|
|
1400
1415
|
label: t(k).currentLocation.name,
|
|
1401
1416
|
icon: "storefront",
|
|
1402
1417
|
compact: ""
|
|
1403
1418
|
}, null, 8, ["label"]),
|
|
1404
|
-
|
|
1419
|
+
a.lastClosingDate ? (x(), se(Y, {
|
|
1405
1420
|
key: 1,
|
|
1406
|
-
label: `${t(
|
|
1421
|
+
label: `${t(o)("inventory.transfer.form.lastClosing")}: ${t(ut)(a.lastClosingDate)} ${t(Cs)(a.lastClosingDate)}`,
|
|
1407
1422
|
icon: "calendar_month",
|
|
1408
1423
|
compact: ""
|
|
1409
|
-
}, null, 8, ["label"])) :
|
|
1424
|
+
}, null, 8, ["label"])) : K("", !0)
|
|
1410
1425
|
]),
|
|
1411
|
-
f(
|
|
1426
|
+
f(ue, {
|
|
1412
1427
|
ref_key: "formRef",
|
|
1413
|
-
ref:
|
|
1428
|
+
ref: G,
|
|
1414
1429
|
class: "flex flex-col gap-32",
|
|
1415
|
-
disabled:
|
|
1430
|
+
disabled: a.disabled,
|
|
1416
1431
|
onValidationFailed: console.log,
|
|
1417
1432
|
onValidationSuccess: _[14] || (_[14] = (De) => y("validation-success"))
|
|
1418
1433
|
}, {
|
|
1419
1434
|
default: A(() => {
|
|
1420
|
-
var De,
|
|
1435
|
+
var De, ke, ct, mt, pt, ft, vt, yt;
|
|
1421
1436
|
return [
|
|
1422
1437
|
l("div", Ia, [
|
|
1423
1438
|
l("div", $a, [
|
|
1424
|
-
(De =
|
|
1439
|
+
(De = d.modelValue) != null && De.template ? (x(), T(re, { key: 0 }, [
|
|
1425
1440
|
l("div", Da, [
|
|
1426
|
-
f(
|
|
1427
|
-
label: t(
|
|
1441
|
+
f(le, {
|
|
1442
|
+
label: t(o)("inventory.transfer.form.type.title")
|
|
1428
1443
|
}, null, 8, ["label"]),
|
|
1429
1444
|
l("div", Ta, [
|
|
1430
1445
|
f(je, {
|
|
1431
1446
|
"z-index": 51,
|
|
1432
1447
|
placement: "left",
|
|
1433
|
-
disabled:
|
|
1448
|
+
disabled: a.disabled
|
|
1434
1449
|
}, {
|
|
1435
1450
|
content: A(() => _[15] || (_[15] = [
|
|
1436
1451
|
Pe("This field is locked from template.")
|
|
@@ -1439,14 +1454,14 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1439
1454
|
f($e, null, {
|
|
1440
1455
|
default: A(() => [
|
|
1441
1456
|
l("div", Va, [
|
|
1442
|
-
f(
|
|
1457
|
+
f(ye, {
|
|
1443
1458
|
name: "lock_outline",
|
|
1444
1459
|
size: "sm",
|
|
1445
|
-
color:
|
|
1460
|
+
color: a.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
1446
1461
|
}, null, 8, ["color"]),
|
|
1447
1462
|
l("div", {
|
|
1448
|
-
class: Z({ "text-fm-color-typo-disabled":
|
|
1449
|
-
}, E(t(
|
|
1463
|
+
class: Z({ "text-fm-color-typo-disabled": a.disabled })
|
|
1464
|
+
}, E(t(o)(`inventory.transfer.form.type.${P.value.toLocaleLowerCase("en-us")}`)), 3)
|
|
1450
1465
|
])
|
|
1451
1466
|
]),
|
|
1452
1467
|
_: 1
|
|
@@ -1457,20 +1472,20 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1457
1472
|
l("div", {
|
|
1458
1473
|
class: Z([
|
|
1459
1474
|
"fm-typo-en-body-sm-400",
|
|
1460
|
-
|
|
1475
|
+
a.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"
|
|
1461
1476
|
])
|
|
1462
1477
|
}, null, 2)
|
|
1463
1478
|
])
|
|
1464
1479
|
]),
|
|
1465
1480
|
l("div", Pa, [
|
|
1466
|
-
f(
|
|
1467
|
-
label: P.value === t(pe).enum.purchase ? t(
|
|
1481
|
+
f(le, {
|
|
1482
|
+
label: P.value === t(pe).enum.purchase ? t(o)("inventory.transfer.form.purchaseFrom") : t(o)("inventory.transfer.form.transferFrom")
|
|
1468
1483
|
}, null, 8, ["label"]),
|
|
1469
1484
|
l("div", Ra, [
|
|
1470
1485
|
f(je, {
|
|
1471
1486
|
"z-index": 51,
|
|
1472
1487
|
placement: "left",
|
|
1473
|
-
disabled:
|
|
1488
|
+
disabled: a.disabled
|
|
1474
1489
|
}, {
|
|
1475
1490
|
content: A(() => _[16] || (_[16] = [
|
|
1476
1491
|
Pe("This field is locked from template.")
|
|
@@ -1481,13 +1496,13 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1481
1496
|
var O;
|
|
1482
1497
|
return [
|
|
1483
1498
|
l("div", Oa, [
|
|
1484
|
-
f(
|
|
1499
|
+
f(ye, {
|
|
1485
1500
|
name: "lock_outline",
|
|
1486
1501
|
size: "sm",
|
|
1487
|
-
color:
|
|
1502
|
+
color: a.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
1488
1503
|
}, null, 8, ["color"]),
|
|
1489
1504
|
l("div", {
|
|
1490
|
-
class: Z({ "text-fm-color-typo-disabled":
|
|
1505
|
+
class: Z({ "text-fm-color-typo-disabled": a.disabled })
|
|
1491
1506
|
}, E((O = R.value.find((ne) => ne.value === D.value)) == null ? void 0 : O.label), 3)
|
|
1492
1507
|
])
|
|
1493
1508
|
];
|
|
@@ -1499,39 +1514,39 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1499
1514
|
}, 8, ["disabled"])
|
|
1500
1515
|
])
|
|
1501
1516
|
])
|
|
1502
|
-
], 64)) : (
|
|
1517
|
+
], 64)) : (x(), T(re, { key: 1 }, [
|
|
1503
1518
|
f(Ae, {
|
|
1504
|
-
label: t(
|
|
1519
|
+
label: t(o)("inventory.transfer.form.type.title"),
|
|
1505
1520
|
"label-mark": "required",
|
|
1506
1521
|
modelValue: P.value,
|
|
1507
1522
|
"onUpdate:modelValue": _[0] || (_[0] = (O) => P.value = O),
|
|
1508
1523
|
items: Ce.value,
|
|
1509
|
-
rules: [t(
|
|
1524
|
+
rules: [t(Ue)(1)(Ce.value)]
|
|
1510
1525
|
}, {
|
|
1511
1526
|
default: A(() => [
|
|
1512
1527
|
l("span", {
|
|
1513
1528
|
class: Z([
|
|
1514
1529
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
1515
|
-
|
|
1530
|
+
a.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
1516
1531
|
])
|
|
1517
1532
|
}, E(t(Xt)(P.value)), 3)
|
|
1518
1533
|
]),
|
|
1519
1534
|
_: 1
|
|
1520
1535
|
}, 8, ["label", "modelValue", "items", "rules"]),
|
|
1521
1536
|
f(Ae, {
|
|
1522
|
-
label: P.value === t(pe).enum.purchase ? t(
|
|
1537
|
+
label: P.value === t(pe).enum.purchase ? t(o)("inventory.transfer.form.purchaseFrom") : t(o)("inventory.transfer.form.transferFrom"),
|
|
1523
1538
|
"label-mark": "required",
|
|
1524
1539
|
modelValue: D.value,
|
|
1525
1540
|
"onUpdate:modelValue": _[1] || (_[1] = (O) => D.value = O),
|
|
1526
1541
|
items: R.value,
|
|
1527
|
-
rules: [t(
|
|
1542
|
+
rules: [t(Ue)(1)(R.value)]
|
|
1528
1543
|
}, {
|
|
1529
1544
|
"menu-wrapper": A((O) => {
|
|
1530
1545
|
var ne, Me;
|
|
1531
1546
|
return [
|
|
1532
1547
|
f(_s, nt(O, {
|
|
1533
1548
|
items: R.value,
|
|
1534
|
-
"model-value": (Me = (ne =
|
|
1549
|
+
"model-value": (Me = (ne = a.modelValue) == null ? void 0 : ne.supplier) == null ? void 0 : Me._id
|
|
1535
1550
|
}), null, 16, ["items", "model-value"])
|
|
1536
1551
|
];
|
|
1537
1552
|
}),
|
|
@@ -1541,7 +1556,7 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1541
1556
|
l("span", {
|
|
1542
1557
|
class: Z([
|
|
1543
1558
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
1544
|
-
|
|
1559
|
+
a.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
1545
1560
|
])
|
|
1546
1561
|
}, E((O = R.value.find((ne) => ne.value === D.value)) == null ? void 0 : O.label), 3)
|
|
1547
1562
|
];
|
|
@@ -1550,25 +1565,26 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1550
1565
|
}, 8, ["label", "modelValue", "items", "rules"])
|
|
1551
1566
|
], 64)),
|
|
1552
1567
|
f(Qe, {
|
|
1553
|
-
label: t(
|
|
1568
|
+
label: t(o)("inventory.transfer.form.reference"),
|
|
1554
1569
|
"label-mark": "optional",
|
|
1555
|
-
modelValue:
|
|
1556
|
-
"onUpdate:modelValue": _[2] || (_[2] = (O) =>
|
|
1570
|
+
modelValue: L.value,
|
|
1571
|
+
"onUpdate:modelValue": _[2] || (_[2] = (O) => L.value = O)
|
|
1557
1572
|
}, null, 8, ["label", "modelValue"]),
|
|
1558
1573
|
f(Ye, {
|
|
1559
|
-
label: t(
|
|
1574
|
+
label: t(o)("inventory.transfer.form.remark"),
|
|
1560
1575
|
"label-mark": "optional",
|
|
1561
1576
|
"max-length": 240,
|
|
1562
1577
|
modelValue: M.value,
|
|
1563
1578
|
"onUpdate:modelValue": _[3] || (_[3] = (O) => M.value = O),
|
|
1564
|
-
class: Z([
|
|
1579
|
+
class: Z([a.disabled ? "text-fm-color-typo-disabled " : ""])
|
|
1565
1580
|
}, null, 8, ["label", "modelValue", "class"]),
|
|
1566
|
-
S.value ? (
|
|
1581
|
+
S.value ? (x(), se(Ca, {
|
|
1567
1582
|
key: 2,
|
|
1568
|
-
required: t(
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1583
|
+
required: t(u).template != null || t(u).netSuite != null,
|
|
1584
|
+
subsidiaryOptional: t(u).template == null,
|
|
1585
|
+
disabled: a.disabled,
|
|
1586
|
+
supplier: t(u).supplier,
|
|
1587
|
+
setting: t(u).netSuite,
|
|
1572
1588
|
items: z.value,
|
|
1573
1589
|
onChange: (O, ne) => {
|
|
1574
1590
|
t(i).updateItems(O), t(i).setNetSuiteSetting(ne);
|
|
@@ -1576,8 +1592,8 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1576
1592
|
"onNetsuite:ready": _[4] || (_[4] = (O) => {
|
|
1577
1593
|
h.value = !0;
|
|
1578
1594
|
})
|
|
1579
|
-
}, null, 8, ["required", "disabled", "supplier", "setting", "items", "onChange"])) :
|
|
1580
|
-
t(c).enableBackdatePo ? (
|
|
1595
|
+
}, null, 8, ["required", "subsidiaryOptional", "disabled", "supplier", "setting", "items", "onChange"])) : K("", !0),
|
|
1596
|
+
t(c).enableBackdatePo ? (x(), T("div", Aa, [
|
|
1581
1597
|
l("div", {
|
|
1582
1598
|
class: Z([
|
|
1583
1599
|
"flex",
|
|
@@ -1587,52 +1603,52 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1587
1603
|
])
|
|
1588
1604
|
}, [
|
|
1589
1605
|
f(Ee, {
|
|
1590
|
-
modelValue: t(
|
|
1591
|
-
"onUpdate:modelValue": _[5] || (_[5] = (O) =>
|
|
1592
|
-
label: t(
|
|
1593
|
-
sublabel: t(
|
|
1606
|
+
modelValue: t(ae),
|
|
1607
|
+
"onUpdate:modelValue": _[5] || (_[5] = (O) => Se(ae) ? ae.value = O : null),
|
|
1608
|
+
label: t(o)("inventory.transfer.form.backdate.title"),
|
|
1609
|
+
sublabel: t(o)("inventory.transfer.form.backdate.subtitle"),
|
|
1594
1610
|
"label-placement": "right",
|
|
1595
|
-
disabled: W.value && !
|
|
1611
|
+
disabled: W.value && !a.lastClosingDate || a.disabled
|
|
1596
1612
|
}, null, 8, ["modelValue", "label", "sublabel", "disabled"]),
|
|
1597
1613
|
l("div", {
|
|
1598
1614
|
class: Z({ hidden: p.value, "w-16": !p.value })
|
|
1599
1615
|
}, null, 2),
|
|
1600
|
-
t(
|
|
1616
|
+
t(ae) ? (x(), T("div", Ea, [
|
|
1601
1617
|
l("div", Ma, [
|
|
1602
1618
|
f(Ke, {
|
|
1603
1619
|
modelValue: t(F),
|
|
1604
|
-
"onUpdate:modelValue": _[6] || (_[6] = (O) =>
|
|
1620
|
+
"onUpdate:modelValue": _[6] || (_[6] = (O) => Se(F) ? F.value = O : null)
|
|
1605
1621
|
}, null, 8, ["modelValue"])
|
|
1606
1622
|
]),
|
|
1607
1623
|
l("div", qa, [
|
|
1608
|
-
f(
|
|
1609
|
-
modelValue: t(
|
|
1610
|
-
"onUpdate:modelValue": _[7] || (_[7] = (O) =>
|
|
1624
|
+
f(j, {
|
|
1625
|
+
modelValue: t(w),
|
|
1626
|
+
"onUpdate:modelValue": _[7] || (_[7] = (O) => Se(w) ? w.value = O : null)
|
|
1611
1627
|
}, null, 8, ["modelValue"])
|
|
1612
1628
|
])
|
|
1613
|
-
])) :
|
|
1629
|
+
])) : K("", !0)
|
|
1614
1630
|
], 2),
|
|
1615
|
-
t(
|
|
1631
|
+
t(X) ? (x(), se(ee, {
|
|
1616
1632
|
key: 0,
|
|
1617
|
-
modelValue: t(
|
|
1618
|
-
"onUpdate:modelValue": _[8] || (_[8] = (O) =>
|
|
1619
|
-
rules: [t(as)(new Date(
|
|
1620
|
-
}, null, 8, ["modelValue", "rules"])) :
|
|
1621
|
-
W.value && !
|
|
1622
|
-
f(
|
|
1633
|
+
modelValue: t(X),
|
|
1634
|
+
"onUpdate:modelValue": _[8] || (_[8] = (O) => Se(X) ? X.value = O : null),
|
|
1635
|
+
rules: [t(as)(new Date(a.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1636
|
+
}, null, 8, ["modelValue", "rules"])) : K("", !0),
|
|
1637
|
+
W.value && !a.lastClosingDate ? (x(), T("div", Na, [
|
|
1638
|
+
f(ye, {
|
|
1623
1639
|
name: "error",
|
|
1624
1640
|
size: "sm",
|
|
1625
1641
|
class: "text-fm-color-typo-warning"
|
|
1626
1642
|
}),
|
|
1627
|
-
l("span",
|
|
1628
|
-
])) :
|
|
1629
|
-
])) :
|
|
1643
|
+
l("span", Ua, E(t(o)("inventory.transfer.form.backdate.error")), 1)
|
|
1644
|
+
])) : K("", !0)
|
|
1645
|
+
])) : K("", !0)
|
|
1630
1646
|
])
|
|
1631
1647
|
]),
|
|
1632
1648
|
l("div", Ba, [
|
|
1633
1649
|
f(ee, {
|
|
1634
1650
|
"model-value": z.value,
|
|
1635
|
-
rules: [t(
|
|
1651
|
+
rules: [t(Ue)(1)]
|
|
1636
1652
|
}, null, 8, ["model-value", "rules"]),
|
|
1637
1653
|
l("div", {
|
|
1638
1654
|
class: Z([
|
|
@@ -1643,11 +1659,11 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1643
1659
|
}
|
|
1644
1660
|
])
|
|
1645
1661
|
}, [
|
|
1646
|
-
l("div", za, E(t(
|
|
1662
|
+
l("div", za, E(t(o)("inventory.transfer.form.items.title")), 1),
|
|
1647
1663
|
l("div", La, [
|
|
1648
|
-
f(
|
|
1649
|
-
disabled:
|
|
1650
|
-
label: t(
|
|
1664
|
+
f(ie, {
|
|
1665
|
+
disabled: a.disabled,
|
|
1666
|
+
label: t(o)("inventory.transfer.form.items.addItem"),
|
|
1651
1667
|
"prepend-icon": "add",
|
|
1652
1668
|
variant: "secondary",
|
|
1653
1669
|
"text-color": "primary",
|
|
@@ -1657,7 +1673,7 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1657
1673
|
size: "md"
|
|
1658
1674
|
}, null, 8, ["disabled", "label"]),
|
|
1659
1675
|
f(pa, {
|
|
1660
|
-
"template-id": t(
|
|
1676
|
+
"template-id": t(u).template || void 0,
|
|
1661
1677
|
"template-items": He.value,
|
|
1662
1678
|
"po-items": z.value,
|
|
1663
1679
|
"onUpdate:forecastAmounts": _[10] || (_[10] = (O) => {
|
|
@@ -1669,26 +1685,26 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1669
1685
|
}, null, 8, ["template-id", "template-items", "po-items"])
|
|
1670
1686
|
])
|
|
1671
1687
|
], 2),
|
|
1672
|
-
P.value === t(pe).enum.purchase && B.value && t(c).enableTotalCost && ((
|
|
1688
|
+
P.value === t(pe).enum.purchase && B.value && t(c).enableTotalCost && ((ke = a.modelValue) != null && ke.items.length) ? (x(), T("div", Ha, [
|
|
1673
1689
|
f(Ee, {
|
|
1674
|
-
label: t(
|
|
1690
|
+
label: t(fe) ? t(o)("inventory.transfer.form.items.fetchingData") : t(o)("inventory.transfer.form.items.comparePriceHistory"),
|
|
1675
1691
|
"prepend-icon": "compare_arrows",
|
|
1676
1692
|
"label-placement": "right",
|
|
1677
|
-
"model-value": t(
|
|
1678
|
-
"onUpdate:modelValue": _[12] || (_[12] = (O) =>
|
|
1679
|
-
disabled: t(
|
|
1693
|
+
"model-value": t(H),
|
|
1694
|
+
"onUpdate:modelValue": _[12] || (_[12] = (O) => Se(H) ? H.value = O : null),
|
|
1695
|
+
disabled: t(fe) || a.disabled
|
|
1680
1696
|
}, null, 8, ["label", "model-value", "disabled"])
|
|
1681
|
-
])) :
|
|
1697
|
+
])) : K("", !0),
|
|
1682
1698
|
f(ee, {
|
|
1683
1699
|
"model-value": Oe.value,
|
|
1684
1700
|
rules: [() => Oe.value ? "Must have at least one non-zero item" : !0]
|
|
1685
1701
|
}, null, 8, ["model-value", "rules"]),
|
|
1686
|
-
(
|
|
1702
|
+
(x(), se(oe, {
|
|
1687
1703
|
"column-defs": ze.value,
|
|
1688
1704
|
"column-visibility": {
|
|
1689
|
-
[t(te).Code]: !(((ct =
|
|
1690
|
-
[t(te).Name]: !(((pt =
|
|
1691
|
-
[t(te).TemplateName]: !!(((vt =
|
|
1705
|
+
[t(te).Code]: !(((ct = a.modelValue) == null ? void 0 : ct.template) ?? ((mt = a.modelValue) == null ? void 0 : mt.templateDoc)),
|
|
1706
|
+
[t(te).Name]: !(((pt = a.modelValue) == null ? void 0 : pt.template) ?? ((ft = a.modelValue) == null ? void 0 : ft.templateDoc)),
|
|
1707
|
+
[t(te).TemplateName]: !!(((vt = a.modelValue) == null ? void 0 : vt.template) ?? ((yt = a.modelValue) == null ? void 0 : yt.templateDoc))
|
|
1692
1708
|
},
|
|
1693
1709
|
"row-data": z.value,
|
|
1694
1710
|
key: v.value,
|
|
@@ -1699,26 +1715,26 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1699
1715
|
var ne, Me, bt, gt;
|
|
1700
1716
|
return [
|
|
1701
1717
|
f(ga, {
|
|
1702
|
-
"compare-price-by-sku": t(
|
|
1703
|
-
"show-compare-price": P.value === t(pe).enum.purchase && t(
|
|
1718
|
+
"compare-price-by-sku": t(ce),
|
|
1719
|
+
"show-compare-price": P.value === t(pe).enum.purchase && t(H),
|
|
1704
1720
|
row: O,
|
|
1705
|
-
"template-item": (gt = (bt = (Me = (ne =
|
|
1721
|
+
"template-item": (gt = (bt = (Me = (ne = a.modelValue) == null ? void 0 : ne.templateDoc) == null ? void 0 : Me.purchaseOrder) == null ? void 0 : bt.items) == null ? void 0 : gt.find(
|
|
1706
1722
|
(st) => st.sku._id === O.original.sku._id
|
|
1707
1723
|
),
|
|
1708
1724
|
"onUpdate:item": _[13] || (_[13] = (st) => Fe.value.updateItem(st)),
|
|
1709
|
-
disabled:
|
|
1725
|
+
disabled: a.disabled
|
|
1710
1726
|
}, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "template-item", "disabled"])
|
|
1711
1727
|
];
|
|
1712
1728
|
}),
|
|
1713
1729
|
"list-row": A((O) => [
|
|
1714
|
-
(
|
|
1730
|
+
(x(), se(Pt, {
|
|
1715
1731
|
row: O,
|
|
1716
1732
|
key: z.value.map((ne) => ne.sku._id).join(".")
|
|
1717
1733
|
}, {
|
|
1718
1734
|
default: A((ne) => [
|
|
1719
1735
|
f(Zs, {
|
|
1720
|
-
"compare-price-by-sku": t(
|
|
1721
|
-
"show-compare-price": P.value === t(pe).enum.purchase && t(
|
|
1736
|
+
"compare-price-by-sku": t(ce),
|
|
1737
|
+
"show-compare-price": P.value === t(pe).enum.purchase && t(H),
|
|
1722
1738
|
row: O,
|
|
1723
1739
|
"cell-by-col-id": ne
|
|
1724
1740
|
}, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "cell-by-col-id"])
|
|
@@ -1736,7 +1752,7 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1736
1752
|
]);
|
|
1737
1753
|
};
|
|
1738
1754
|
}
|
|
1739
|
-
}), Qa = { class: "flex items-center" }, Ya = { class: "fm-typo-en-title-md-800" }, Ka = { class: "flex gap-4" }, Xa = { class: "fm-typo-en-title-md-600" }, Za = { class: "flex flex-col gap-16" }, Wa = { class: "fm-typo-en-body-md-400" }, Ga = { class: "max-h-[300px] overflow-y-auto" }, Ja = { class: "list-disc pl-16" }, eo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, to = { class: "flex w-full gap-8 justify-end" }, so = /* @__PURE__ */
|
|
1755
|
+
}), Qa = { class: "flex items-center" }, Ya = { class: "fm-typo-en-title-md-800" }, Ka = { class: "flex gap-4" }, Xa = { class: "fm-typo-en-title-md-600" }, Za = { class: "flex flex-col gap-16" }, Wa = { class: "fm-typo-en-body-md-400" }, Ga = { class: "max-h-[300px] overflow-y-auto" }, Ja = { class: "list-disc pl-16" }, eo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, to = { class: "flex w-full gap-8 justify-end" }, so = /* @__PURE__ */ de({
|
|
1740
1756
|
__name: "TransferDialog",
|
|
1741
1757
|
props: {
|
|
1742
1758
|
mode: {},
|
|
@@ -1747,18 +1763,18 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1747
1763
|
},
|
|
1748
1764
|
emits: ["update:show", "submitted"],
|
|
1749
1765
|
setup(m, { expose: b, emit: r }) {
|
|
1750
|
-
var
|
|
1751
|
-
const
|
|
1752
|
-
var
|
|
1753
|
-
return ((
|
|
1766
|
+
var ae;
|
|
1767
|
+
const d = m, y = r, o = dt(), k = Rt(), C = Re(), I = it(), c = Je(), e = Ge(), { t: n } = he(), p = N(!1), s = N(!1), i = N(!1), u = N(!1), h = q(() => {
|
|
1768
|
+
var F;
|
|
1769
|
+
return ((F = $.value.items) == null ? void 0 : F.filter((w) => w.quantity.amount === 0)) ?? [];
|
|
1754
1770
|
});
|
|
1755
|
-
async function S(
|
|
1756
|
-
if (
|
|
1771
|
+
async function S(F) {
|
|
1772
|
+
if (F) {
|
|
1757
1773
|
s.value = !1;
|
|
1758
1774
|
try {
|
|
1759
|
-
await
|
|
1775
|
+
await I.readSuppliers(), s.value = !0;
|
|
1760
1776
|
} catch {
|
|
1761
|
-
|
|
1777
|
+
C.open({
|
|
1762
1778
|
title: n("inventory.transfer.form.unableToFetchListOfSuppliers.title"),
|
|
1763
1779
|
message: n("inventory.transfer.form.unableToFetchListOfSuppliers.message"),
|
|
1764
1780
|
type: "error"
|
|
@@ -1797,20 +1813,20 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1797
1813
|
_id: "",
|
|
1798
1814
|
seqNumber: 0,
|
|
1799
1815
|
deliveryOrder: [],
|
|
1800
|
-
template:
|
|
1801
|
-
templateDoc: k.templates.find((
|
|
1816
|
+
template: d.templateId,
|
|
1817
|
+
templateDoc: k.templates.find((w) => w._id === d.templateId)
|
|
1802
1818
|
};
|
|
1803
1819
|
}
|
|
1804
|
-
const g = Vt(
|
|
1805
|
-
|
|
1806
|
-
() =>
|
|
1807
|
-
(
|
|
1808
|
-
var
|
|
1809
|
-
|
|
1820
|
+
const g = Vt(d, "show"), $ = N(d.modelValue ?? v()), B = N(((ae = d.modelValue) == null ? void 0 : ae._id) ?? `${Math.random()}`);
|
|
1821
|
+
_e(
|
|
1822
|
+
() => d.show,
|
|
1823
|
+
(F) => {
|
|
1824
|
+
var w;
|
|
1825
|
+
F && (i.value = !1, $.value = d.modelValue ?? v(), B.value = ((w = d.modelValue) == null ? void 0 : w._id) ?? `${Math.random()}`);
|
|
1810
1826
|
}
|
|
1811
1827
|
);
|
|
1812
1828
|
const z = q(() => !s.value || !i.value), W = q(() => {
|
|
1813
|
-
switch (
|
|
1829
|
+
switch (d.mode) {
|
|
1814
1830
|
case qe.READ:
|
|
1815
1831
|
return "View transfer";
|
|
1816
1832
|
case qe.CREATE:
|
|
@@ -1819,117 +1835,121 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1819
1835
|
return n("inventory.transfer.receiveRequest.update.title");
|
|
1820
1836
|
}
|
|
1821
1837
|
return "";
|
|
1822
|
-
}), J =
|
|
1838
|
+
}), J = N();
|
|
1823
1839
|
b({
|
|
1824
1840
|
validateInputs: () => {
|
|
1825
|
-
var
|
|
1826
|
-
(
|
|
1841
|
+
var F, w;
|
|
1842
|
+
(w = (F = J.value) == null ? void 0 : F.validateInputs) == null || w.call(F);
|
|
1827
1843
|
},
|
|
1828
1844
|
resetInputsValidation: () => {
|
|
1829
|
-
var
|
|
1830
|
-
(
|
|
1845
|
+
var F, w;
|
|
1846
|
+
(w = (F = J.value) == null ? void 0 : F.resetInputsValidation) == null || w.call(F);
|
|
1831
1847
|
},
|
|
1832
1848
|
resetInputs: () => {
|
|
1833
|
-
var
|
|
1834
|
-
(
|
|
1849
|
+
var F, w;
|
|
1850
|
+
(w = (F = J.value) == null ? void 0 : F.resetInputs) == null || w.call(F);
|
|
1835
1851
|
}
|
|
1836
1852
|
});
|
|
1837
|
-
async function
|
|
1838
|
-
const
|
|
1839
|
-
if (p.value = !0,
|
|
1840
|
-
|
|
1853
|
+
async function U() {
|
|
1854
|
+
const F = $.value;
|
|
1855
|
+
if (p.value = !0, F.items = F.items.filter((w) => w.quantity.amount > 0), !F.items.length) {
|
|
1856
|
+
C.open({
|
|
1841
1857
|
title: "Cannot create order",
|
|
1842
1858
|
message: "There are no items with non-zero amount in your request.",
|
|
1843
1859
|
type: "error"
|
|
1844
1860
|
});
|
|
1845
1861
|
return;
|
|
1846
1862
|
}
|
|
1847
|
-
(
|
|
1863
|
+
(F.supplier.internal === "warehouse" || F.supplier.internal === "restaurant") && (F.items = F.items.map(({ totalCost: w, ...H }) => H));
|
|
1848
1864
|
try {
|
|
1849
|
-
await
|
|
1865
|
+
await o.createPurchaseOrder(F), await new Promise((w) => setTimeout(w, 1e3)), C.open({
|
|
1850
1866
|
title: n("inventory.transfer.receiveRequest.create.success"),
|
|
1851
1867
|
message: n("inventory.transfer.receiveRequest.create.successMessage"),
|
|
1852
1868
|
type: "success"
|
|
1853
1869
|
}), y("update:show", !1), y("submitted");
|
|
1854
|
-
} catch (
|
|
1855
|
-
|
|
1870
|
+
} catch (w) {
|
|
1871
|
+
C.open({
|
|
1856
1872
|
title: n("inventory.transfer.receiveRequest.create.error.title"),
|
|
1857
1873
|
message: n("inventory.transfer.receiveRequest.create.error.message"),
|
|
1858
1874
|
type: "error"
|
|
1859
|
-
}), console.error("Error in creating purchase order",
|
|
1875
|
+
}), console.error("Error in creating purchase order", w);
|
|
1860
1876
|
} finally {
|
|
1861
1877
|
p.value = !1;
|
|
1862
1878
|
}
|
|
1863
1879
|
}
|
|
1864
1880
|
async function P() {
|
|
1865
|
-
const
|
|
1866
|
-
if (p.value = !0,
|
|
1867
|
-
|
|
1881
|
+
const F = $.value;
|
|
1882
|
+
if (p.value = !0, F.items = F.items.filter((w) => w.quantity.amount > 0), !F.items.length) {
|
|
1883
|
+
C.open({
|
|
1868
1884
|
title: "Cannot create order",
|
|
1869
1885
|
message: "There are no items with non-zero amount in your request.",
|
|
1870
1886
|
type: "error"
|
|
1871
1887
|
});
|
|
1872
1888
|
return;
|
|
1873
1889
|
}
|
|
1874
|
-
(
|
|
1890
|
+
(F.supplier.internal === "warehouse" || F.supplier.internal === "restaurant") && (F.items = F.items.map(({ totalCost: w, ...H }) => H));
|
|
1875
1891
|
try {
|
|
1876
|
-
await
|
|
1892
|
+
await o.updatePurchaseOrder(F), await new Promise((w) => setTimeout(w, 1e3)), C.open({
|
|
1877
1893
|
title: n("inventory.transfer.receiveRequest.update.success"),
|
|
1878
1894
|
message: n("inventory.transfer.receiveRequest.update.successMessage"),
|
|
1879
1895
|
type: "success"
|
|
1880
1896
|
}), y("update:show", !1), y("submitted");
|
|
1881
|
-
} catch (
|
|
1882
|
-
|
|
1897
|
+
} catch (w) {
|
|
1898
|
+
C.open({
|
|
1883
1899
|
title: n("inventory.transfer.receiveRequest.update.error.title"),
|
|
1884
1900
|
message: n("inventory.transfer.receiveRequest.update.error.message"),
|
|
1885
1901
|
type: "error"
|
|
1886
|
-
}), console.error("Error in updating purchase order",
|
|
1902
|
+
}), console.error("Error in updating purchase order", w);
|
|
1887
1903
|
} finally {
|
|
1888
1904
|
p.value = !1;
|
|
1889
1905
|
}
|
|
1890
1906
|
}
|
|
1891
1907
|
function R() {
|
|
1892
|
-
switch (
|
|
1908
|
+
switch (d.mode) {
|
|
1893
1909
|
case qe.CREATE:
|
|
1894
|
-
return
|
|
1910
|
+
return U();
|
|
1895
1911
|
case qe.UPDATE:
|
|
1896
1912
|
return P();
|
|
1897
1913
|
}
|
|
1898
1914
|
}
|
|
1899
1915
|
function D() {
|
|
1900
|
-
var
|
|
1901
|
-
|
|
1916
|
+
var F;
|
|
1917
|
+
$.value.items = ((F = $.value.items) == null ? void 0 : F.filter((w) => w.quantity.amount > 0)) ?? [], u.value = !1, L();
|
|
1902
1918
|
}
|
|
1903
1919
|
function M() {
|
|
1904
|
-
|
|
1905
|
-
|
|
1920
|
+
J.value.getFormData && ($.value = J.value.getFormData());
|
|
1921
|
+
}
|
|
1922
|
+
function L() {
|
|
1923
|
+
var H, fe;
|
|
1924
|
+
M();
|
|
1925
|
+
const F = bs.validatePurchaseOrderItems({
|
|
1906
1926
|
skusById: c.skuById ?? {},
|
|
1907
|
-
items:
|
|
1908
|
-
}),
|
|
1909
|
-
if (
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1912
|
-
title: `[Row ${
|
|
1913
|
-
message: `${
|
|
1927
|
+
items: $.value.items ?? []
|
|
1928
|
+
}), w = Object.values(F).flat();
|
|
1929
|
+
if (w.length > 0) {
|
|
1930
|
+
const ce = w[0];
|
|
1931
|
+
C.open({
|
|
1932
|
+
title: `[Row ${ce.index + 1}] "${ce.poItem.sku.name}"`,
|
|
1933
|
+
message: `${ce.message}`,
|
|
1914
1934
|
type: "error"
|
|
1915
1935
|
});
|
|
1916
1936
|
return;
|
|
1917
1937
|
}
|
|
1918
|
-
(
|
|
1938
|
+
(fe = (H = J.value) == null ? void 0 : H.validateInputs) == null || fe.call(H);
|
|
1919
1939
|
}
|
|
1920
|
-
function
|
|
1921
|
-
if (h.value.length > 0) {
|
|
1922
|
-
|
|
1940
|
+
function X() {
|
|
1941
|
+
if (M(), h.value.length > 0) {
|
|
1942
|
+
u.value = !0;
|
|
1923
1943
|
return;
|
|
1924
1944
|
}
|
|
1925
|
-
|
|
1945
|
+
L();
|
|
1926
1946
|
}
|
|
1927
|
-
return (
|
|
1928
|
-
const
|
|
1929
|
-
return
|
|
1930
|
-
f(
|
|
1947
|
+
return (F, w) => {
|
|
1948
|
+
const H = V("FmButton"), fe = V("FmSideSheet"), ce = V("FmDialog");
|
|
1949
|
+
return x(), T(re, null, [
|
|
1950
|
+
f(fe, {
|
|
1931
1951
|
modelValue: t(g),
|
|
1932
|
-
"onUpdate:modelValue":
|
|
1952
|
+
"onUpdate:modelValue": w[3] || (w[3] = (G) => Se(g) ? g.value = G : null),
|
|
1933
1953
|
"dismiss-away": "",
|
|
1934
1954
|
"close-button": "",
|
|
1935
1955
|
"max-width": 900
|
|
@@ -1940,41 +1960,42 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1940
1960
|
])
|
|
1941
1961
|
]),
|
|
1942
1962
|
default: A(() => [
|
|
1943
|
-
(
|
|
1963
|
+
(x(), se(ja, {
|
|
1944
1964
|
class: "w-full",
|
|
1945
1965
|
ref_key: "formRef",
|
|
1946
1966
|
ref: J,
|
|
1947
|
-
"onForm:ready":
|
|
1967
|
+
"onForm:ready": w[0] || (w[0] = () => i.value = !0),
|
|
1948
1968
|
onValidationSuccess: R,
|
|
1949
|
-
|
|
1969
|
+
modelValue: $.value,
|
|
1970
|
+
"onUpdate:modelValue": w[1] || (w[1] = (G) => $.value = G),
|
|
1950
1971
|
disabled: p.value || z.value,
|
|
1951
|
-
suppliers: t(
|
|
1972
|
+
suppliers: t(I).suppliers,
|
|
1952
1973
|
skus: t(c).skus,
|
|
1953
1974
|
key: B.value,
|
|
1954
|
-
"last-closing-date":
|
|
1955
|
-
}, null, 8, ["
|
|
1975
|
+
"last-closing-date": F.lastClosingDate
|
|
1976
|
+
}, null, 8, ["modelValue", "disabled", "suppliers", "skus", "last-closing-date"]))
|
|
1956
1977
|
]),
|
|
1957
1978
|
"side-sheet-footer": A(() => [
|
|
1958
1979
|
l("div", Ka, [
|
|
1959
|
-
f(
|
|
1980
|
+
f(H, {
|
|
1960
1981
|
loading: p.value,
|
|
1961
1982
|
disabled: z.value,
|
|
1962
1983
|
label: t(n)("common.save"),
|
|
1963
|
-
onClick:
|
|
1984
|
+
onClick: X
|
|
1964
1985
|
}, null, 8, ["loading", "disabled", "label"]),
|
|
1965
|
-
f(
|
|
1986
|
+
f(H, {
|
|
1966
1987
|
disabled: z.value,
|
|
1967
1988
|
variant: "tertiary",
|
|
1968
1989
|
label: t(n)("common.close"),
|
|
1969
|
-
onClick:
|
|
1990
|
+
onClick: w[2] || (w[2] = (G) => y("update:show", !1))
|
|
1970
1991
|
}, null, 8, ["disabled", "label"])
|
|
1971
1992
|
])
|
|
1972
1993
|
]),
|
|
1973
1994
|
_: 1
|
|
1974
1995
|
}, 8, ["modelValue"]),
|
|
1975
|
-
f(
|
|
1976
|
-
modelValue:
|
|
1977
|
-
"onUpdate:modelValue":
|
|
1996
|
+
f(ce, {
|
|
1997
|
+
modelValue: u.value,
|
|
1998
|
+
"onUpdate:modelValue": w[5] || (w[5] = (G) => u.value = G),
|
|
1978
1999
|
overlay: !0
|
|
1979
2000
|
}, {
|
|
1980
2001
|
"dialog-header": A(() => [
|
|
@@ -1982,12 +2003,12 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
1982
2003
|
]),
|
|
1983
2004
|
"dialog-footer": A(() => [
|
|
1984
2005
|
l("div", to, [
|
|
1985
|
-
f(
|
|
2006
|
+
f(H, {
|
|
1986
2007
|
label: t(n)("common.cancel"),
|
|
1987
2008
|
variant: "tertiary",
|
|
1988
|
-
onClick:
|
|
2009
|
+
onClick: w[4] || (w[4] = (G) => u.value = !1)
|
|
1989
2010
|
}, null, 8, ["label"]),
|
|
1990
|
-
f(
|
|
2011
|
+
f(H, {
|
|
1991
2012
|
label: t(n)("inventory.transfer.template.zeroQuantity.removeAll"),
|
|
1992
2013
|
variant: "primary",
|
|
1993
2014
|
"prepend-icon": "delete",
|
|
@@ -2000,10 +2021,10 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
2000
2021
|
l("div", Wa, E(t(n)("inventory.transfer.template.zeroQuantity.message", { count: h.value.length })), 1),
|
|
2001
2022
|
l("div", Ga, [
|
|
2002
2023
|
l("ul", Ja, [
|
|
2003
|
-
(
|
|
2004
|
-
key:
|
|
2024
|
+
(x(!0), T(re, null, xe(h.value, (G) => (x(), T("li", {
|
|
2025
|
+
key: G.sku._id,
|
|
2005
2026
|
class: "fm-typo-en-body-md-400"
|
|
2006
|
-
}, E(
|
|
2027
|
+
}, E(G.sku.name) + " (" + E(G.sku.code) + ") ", 1))), 128))
|
|
2007
2028
|
])
|
|
2008
2029
|
]),
|
|
2009
2030
|
l("div", eo, E(t(n)("inventory.transfer.template.zeroQuantity.prompt")), 1)
|
|
@@ -2016,15 +2037,15 @@ const Sa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
|
|
|
2016
2037
|
}
|
|
2017
2038
|
});
|
|
2018
2039
|
function ao(m) {
|
|
2019
|
-
const [b, r,
|
|
2020
|
-
if (
|
|
2040
|
+
const [b, r, d, ...y] = Fs(m), o = d.map((c) => c.toLowerCase().trim().replace(/ /g, "_")), C = ["item_name", "transfer_quantity(uom)", "uom", "scanned_code"].filter((c) => !o.includes(c));
|
|
2041
|
+
if (C.length)
|
|
2021
2042
|
throw new Error(
|
|
2022
|
-
`Missing headers (${
|
|
2043
|
+
`Missing headers (${C.join()}). Excel file does not come from the template.`
|
|
2023
2044
|
);
|
|
2024
2045
|
return y.map((c, e) => {
|
|
2025
2046
|
const n = {};
|
|
2026
|
-
for (const p in
|
|
2027
|
-
const s =
|
|
2047
|
+
for (const p in o) {
|
|
2048
|
+
const s = o[p];
|
|
2028
2049
|
Object.assign(n, { [s]: c[p] });
|
|
2029
2050
|
}
|
|
2030
2051
|
return {
|
|
@@ -2037,40 +2058,40 @@ function oo(m) {
|
|
|
2037
2058
|
const b = m.SheetNames;
|
|
2038
2059
|
try {
|
|
2039
2060
|
return b.reduce(
|
|
2040
|
-
(
|
|
2041
|
-
const
|
|
2042
|
-
for (const { index: n, data: p } of
|
|
2043
|
-
p.scanned_code === "" &&
|
|
2044
|
-
const s =
|
|
2061
|
+
(d, y) => {
|
|
2062
|
+
const o = new Array(), k = m.Sheets[y], C = Je(), I = ao(k), c = [];
|
|
2063
|
+
for (const { index: n, data: p } of I) {
|
|
2064
|
+
p.scanned_code === "" && o.push(`Row ${n + 1}: Scanned code is empty`), p.item_name === "" && o.push(`Row ${n + 1}: Item name is empty`), p.uom === "" && o.push(`Row ${n + 1}: UOM is empty`), p["transfer_quantity(uom)"] === "" && o.push(`Row ${n + 1}: Transfer quantity is empty`);
|
|
2065
|
+
const s = C.skus.find((h) => h.code === p.scanned_code);
|
|
2045
2066
|
if (!s) {
|
|
2046
|
-
|
|
2067
|
+
o.push(`Row ${n + 1}: SKU not found`);
|
|
2047
2068
|
continue;
|
|
2048
2069
|
}
|
|
2049
2070
|
const i = s.unit.abbrev === p.uom;
|
|
2050
|
-
let
|
|
2071
|
+
let u = null;
|
|
2051
2072
|
if (!i) {
|
|
2052
2073
|
const h = s.unit.measurements.find((S) => S.abbrev === p.uom);
|
|
2053
2074
|
if (!h) {
|
|
2054
|
-
|
|
2075
|
+
o.push(`Row ${n + 1}: Measurement not found`);
|
|
2055
2076
|
continue;
|
|
2056
2077
|
}
|
|
2057
|
-
|
|
2078
|
+
u = h;
|
|
2058
2079
|
}
|
|
2059
2080
|
c.push({
|
|
2060
2081
|
sku: s,
|
|
2061
2082
|
code: p.scanned_code,
|
|
2062
2083
|
name: p.item_name,
|
|
2063
2084
|
quantity: lt.fromNumber(Number(p["transfer_quantity(uom)"])),
|
|
2064
|
-
measurement:
|
|
2085
|
+
measurement: u
|
|
2065
2086
|
});
|
|
2066
2087
|
}
|
|
2067
2088
|
const e = {
|
|
2068
2089
|
type: "create",
|
|
2069
2090
|
poItems: c,
|
|
2070
2091
|
excelSheetName: y,
|
|
2071
|
-
errors:
|
|
2092
|
+
errors: o
|
|
2072
2093
|
};
|
|
2073
|
-
return
|
|
2094
|
+
return d.importCreateResult.push(e), d;
|
|
2074
2095
|
},
|
|
2075
2096
|
{
|
|
2076
2097
|
invalidExcel: !1,
|
|
@@ -2090,7 +2111,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2090
2111
|
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
|
|
2091
2112
|
}, uo = { key: 0 }, co = {
|
|
2092
2113
|
class: /* @__PURE__ */ Z(["fm-typo-en-body-lg-600"])
|
|
2093
|
-
}, mo = { class: "flex-1" }, po = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" }, fo = { class: "flex-auto line-clamp-2 text-ellipsis break-all" }, vo = { class: "text-fm-color-typo-primary" }, yo = { class: "ml-auto" }, bo = { key: 0 }, go = /* @__PURE__ */
|
|
2114
|
+
}, mo = { class: "flex-1" }, po = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" }, fo = { class: "flex-auto line-clamp-2 text-ellipsis break-all" }, vo = { class: "text-fm-color-typo-primary" }, yo = { class: "ml-auto" }, bo = { key: 0 }, go = /* @__PURE__ */ de({
|
|
2094
2115
|
__name: "XilnexResult",
|
|
2095
2116
|
props: {
|
|
2096
2117
|
type: {},
|
|
@@ -2099,45 +2120,45 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2099
2120
|
errors: {}
|
|
2100
2121
|
},
|
|
2101
2122
|
setup(m) {
|
|
2102
|
-
const b = m, { t: r } =
|
|
2103
|
-
b.errors.length && (
|
|
2123
|
+
const b = m, { t: r } = he(), d = N(!1), y = () => {
|
|
2124
|
+
b.errors.length && (d.value = !d.value);
|
|
2104
2125
|
};
|
|
2105
|
-
return (
|
|
2126
|
+
return (o, k) => {
|
|
2106
2127
|
var c;
|
|
2107
|
-
const
|
|
2108
|
-
return
|
|
2128
|
+
const C = V("FmIcon"), I = V("FmTooltip");
|
|
2129
|
+
return x(), T("div", no, [
|
|
2109
2130
|
l("div", {
|
|
2110
2131
|
onClick: y,
|
|
2111
2132
|
class: Z({
|
|
2112
|
-
"cursor-pointer":
|
|
2133
|
+
"cursor-pointer": o.errors.length
|
|
2113
2134
|
})
|
|
2114
2135
|
}, [
|
|
2115
2136
|
l("div", lo, [
|
|
2116
2137
|
l("div", ro, [
|
|
2117
2138
|
l("div", {
|
|
2118
2139
|
class: Z({
|
|
2119
|
-
"text-fm-color-system-error-300":
|
|
2140
|
+
"text-fm-color-system-error-300": o.errors.length
|
|
2120
2141
|
})
|
|
2121
2142
|
}, [
|
|
2122
|
-
Pe(E(
|
|
2123
|
-
|
|
2143
|
+
Pe(E(o.name) + " ", 1),
|
|
2144
|
+
o.type === "create" ? (x(), T("span", io, "(" + E(t(r)("inventory.closing.template.import.new")) + ")", 1)) : K("", !0)
|
|
2124
2145
|
], 2),
|
|
2125
|
-
|
|
2126
|
-
f(
|
|
2146
|
+
o.errors.length ? (x(), T("div", uo, [
|
|
2147
|
+
f(C, {
|
|
2127
2148
|
name: "error",
|
|
2128
2149
|
size: "sm",
|
|
2129
2150
|
color: "system-error-300"
|
|
2130
2151
|
})
|
|
2131
|
-
])) :
|
|
2152
|
+
])) : K("", !0)
|
|
2132
2153
|
]),
|
|
2133
2154
|
k[0] || (k[0] = l("hr", { class: "my-2" }, null, -1)),
|
|
2134
2155
|
l("div", co, [
|
|
2135
|
-
(c =
|
|
2156
|
+
(c = o.items) != null && c.length ? (x(!0), T(re, { key: 0 }, xe(o.items, (e, n) => (x(), T("div", {
|
|
2136
2157
|
key: n,
|
|
2137
2158
|
class: "flex gap-4 mt-2 items-center"
|
|
2138
2159
|
}, [
|
|
2139
2160
|
l("div", mo, [
|
|
2140
|
-
f(
|
|
2161
|
+
f(I, {
|
|
2141
2162
|
content: e.code,
|
|
2142
2163
|
placement: "top",
|
|
2143
2164
|
"z-index": 51
|
|
@@ -2147,7 +2168,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2147
2168
|
]),
|
|
2148
2169
|
_: 2
|
|
2149
2170
|
}, 1032, ["content"]),
|
|
2150
|
-
f(
|
|
2171
|
+
f(I, {
|
|
2151
2172
|
content: e.name,
|
|
2152
2173
|
placement: "top",
|
|
2153
2174
|
"z-index": 51
|
|
@@ -2164,50 +2185,50 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2164
2185
|
})), 1),
|
|
2165
2186
|
Pe(" " + E(e.measurement ? e.measurement.abbrev : e.sku.unit.abbrev), 1)
|
|
2166
2187
|
])
|
|
2167
|
-
]))), 128)) :
|
|
2188
|
+
]))), 128)) : K("", !0)
|
|
2168
2189
|
])
|
|
2169
2190
|
]),
|
|
2170
2191
|
l("div", yo, [
|
|
2171
|
-
|
|
2192
|
+
o.errors.length ? (x(), se(C, {
|
|
2172
2193
|
key: 0,
|
|
2173
|
-
name:
|
|
2194
|
+
name: d.value ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
2174
2195
|
size: "md"
|
|
2175
|
-
}, null, 8, ["name"])) :
|
|
2196
|
+
}, null, 8, ["name"])) : K("", !0)
|
|
2176
2197
|
])
|
|
2177
2198
|
], 2),
|
|
2178
|
-
|
|
2199
|
+
d.value ? (x(), T("div", {
|
|
2179
2200
|
key: 0,
|
|
2180
2201
|
class: Z(["flex flex-col gap-4 pl-8 fm-typo-en-body-sm-400", {
|
|
2181
|
-
"text-fm-color-typo-secondary": !
|
|
2182
|
-
"text-fm-color-system-error-300":
|
|
2202
|
+
"text-fm-color-typo-secondary": !o.errors.length,
|
|
2203
|
+
"text-fm-color-system-error-300": o.errors.length
|
|
2183
2204
|
}])
|
|
2184
2205
|
}, [
|
|
2185
|
-
|
|
2206
|
+
o.errors.length ? (x(), T("div", bo, [
|
|
2186
2207
|
l("ol", null, [
|
|
2187
|
-
(
|
|
2208
|
+
(x(!0), T(re, null, xe(o.errors, (e, n) => (x(), T("li", { key: n }, E(e), 1))), 128))
|
|
2188
2209
|
])
|
|
2189
|
-
])) :
|
|
2190
|
-
], 2)) :
|
|
2210
|
+
])) : K("", !0)
|
|
2211
|
+
], 2)) : K("", !0)
|
|
2191
2212
|
]);
|
|
2192
2213
|
};
|
|
2193
2214
|
}
|
|
2194
2215
|
}), _o = { class: "flex flex-col gap-24" }, ho = {
|
|
2195
2216
|
key: 0,
|
|
2196
2217
|
class: "flex items-center gap-8"
|
|
2197
|
-
}, ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xo = { class: "flex flex-col gap-8" }, Co = { class: "line-clamp-2 text-ellipsis break-all" },
|
|
2218
|
+
}, ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xo = { class: "flex flex-col gap-8" }, Co = { class: "line-clamp-2 text-ellipsis break-all" }, So = {
|
|
2198
2219
|
key: 2,
|
|
2199
2220
|
class: "shrink-0"
|
|
2200
|
-
},
|
|
2221
|
+
}, wo = {
|
|
2201
2222
|
key: 0,
|
|
2202
2223
|
class: "flex flex-col"
|
|
2203
2224
|
}, Fo = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, Io = {
|
|
2204
2225
|
key: 0,
|
|
2205
2226
|
class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
|
|
2206
|
-
}, $o = { class: "fm-typo-en-body-lg-600" },
|
|
2227
|
+
}, $o = { class: "fm-typo-en-body-lg-600" }, wt = "Transfer note", Do = /* @__PURE__ */ de({
|
|
2207
2228
|
__name: "XilnexImportForm",
|
|
2208
2229
|
setup(m, { expose: b }) {
|
|
2209
|
-
const r =
|
|
2210
|
-
|
|
2230
|
+
const r = N(null), d = Re(), y = N(!1), o = N(!1), k = Ds(), C = N(!1), I = Be();
|
|
2231
|
+
N([]);
|
|
2211
2232
|
const c = q({
|
|
2212
2233
|
get() {
|
|
2213
2234
|
var v;
|
|
@@ -2231,8 +2252,8 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2231
2252
|
}
|
|
2232
2253
|
});
|
|
2233
2254
|
We(async () => {
|
|
2234
|
-
const v = await
|
|
2235
|
-
console.log(v),
|
|
2255
|
+
const v = await I.getNetSuiteLocations();
|
|
2256
|
+
console.log(v), C.value = !0;
|
|
2236
2257
|
});
|
|
2237
2258
|
const e = q({
|
|
2238
2259
|
get() {
|
|
@@ -2240,8 +2261,8 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2240
2261
|
},
|
|
2241
2262
|
set(v) {
|
|
2242
2263
|
if (v) {
|
|
2243
|
-
const g = k.effectiveAt ? new Date(k.effectiveAt) : /* @__PURE__ */ new Date(), [
|
|
2244
|
-
g.setFullYear(parseInt(
|
|
2264
|
+
const g = k.effectiveAt ? new Date(k.effectiveAt) : /* @__PURE__ */ new Date(), [$, B, z] = v.split("-");
|
|
2265
|
+
g.setFullYear(parseInt($)), g.setMonth(parseInt(B) - 1), g.setDate(parseInt(z)), k.effectiveAt = g.toISOString();
|
|
2245
2266
|
}
|
|
2246
2267
|
}
|
|
2247
2268
|
}), n = q({
|
|
@@ -2250,28 +2271,28 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2250
2271
|
},
|
|
2251
2272
|
set(v) {
|
|
2252
2273
|
if (v) {
|
|
2253
|
-
const g = k.effectiveAt ? new Date(k.effectiveAt) : /* @__PURE__ */ new Date(), [
|
|
2254
|
-
g.setMinutes(parseInt(
|
|
2274
|
+
const g = k.effectiveAt ? new Date(k.effectiveAt) : /* @__PURE__ */ new Date(), [$, B] = v.split(":");
|
|
2275
|
+
g.setMinutes(parseInt($)), g.setSeconds(parseInt(B)), k.effectiveAt = g.toISOString();
|
|
2255
2276
|
}
|
|
2256
2277
|
}
|
|
2257
|
-
}), p =
|
|
2278
|
+
}), p = N(new Array()), s = N([]), i = q(
|
|
2258
2279
|
() => !!p.value.length || s.value.some((v) => v.errors.length)
|
|
2259
|
-
),
|
|
2280
|
+
), u = N();
|
|
2260
2281
|
b({
|
|
2261
2282
|
validateInputs: () => {
|
|
2262
2283
|
var v, g;
|
|
2263
|
-
(g = (v =
|
|
2284
|
+
(g = (v = u.value) == null ? void 0 : v.validateInputs) == null || g.call(v);
|
|
2264
2285
|
},
|
|
2265
2286
|
resetInputsValidation: () => {
|
|
2266
2287
|
var v, g;
|
|
2267
|
-
(g = (v =
|
|
2288
|
+
(g = (v = u.value) == null ? void 0 : v.resetInputsValidation) == null || g.call(v);
|
|
2268
2289
|
},
|
|
2269
2290
|
resetInputs: () => {
|
|
2270
2291
|
var v, g;
|
|
2271
|
-
(g = (v =
|
|
2292
|
+
(g = (v = u.value) == null ? void 0 : v.resetInputs) == null || g.call(v);
|
|
2272
2293
|
}
|
|
2273
2294
|
});
|
|
2274
|
-
const { t: h } =
|
|
2295
|
+
const { t: h } = he();
|
|
2275
2296
|
async function S(v) {
|
|
2276
2297
|
p.value = [], s.value = [];
|
|
2277
2298
|
try {
|
|
@@ -2280,42 +2301,42 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2280
2301
|
Is(v),
|
|
2281
2302
|
// fake buffer
|
|
2282
2303
|
new Promise((B) => setTimeout(B, 1e3))
|
|
2283
|
-
]),
|
|
2284
|
-
if (
|
|
2304
|
+
]), $ = oo(g);
|
|
2305
|
+
if ($.invalidExcel) {
|
|
2285
2306
|
p.value.push(
|
|
2286
|
-
|
|
2307
|
+
$.invalidExcelMessage ?? h("inventory.ingredient.import.fileError.invalidExcel")
|
|
2287
2308
|
);
|
|
2288
2309
|
return;
|
|
2289
2310
|
}
|
|
2290
|
-
if (s.value =
|
|
2311
|
+
if (s.value = $.importCreateResult, !s.value.length) {
|
|
2291
2312
|
p.value.push(h("inventory.ingredient.import.fileError.noData"));
|
|
2292
2313
|
return;
|
|
2293
2314
|
}
|
|
2294
2315
|
k.items = s.value.map((B) => B.poItems).flat();
|
|
2295
2316
|
} catch (g) {
|
|
2296
|
-
|
|
2317
|
+
d.open({
|
|
2297
2318
|
title: h("inventory.ingredient.import.fileError.unableToRead"),
|
|
2298
2319
|
message: g == null ? void 0 : g.message,
|
|
2299
2320
|
type: "error"
|
|
2300
2321
|
}), console.error("Error in reading file", g);
|
|
2301
2322
|
} finally {
|
|
2302
|
-
p.value.length &&
|
|
2323
|
+
p.value.length && d.open({
|
|
2303
2324
|
title: h("inventory.ingredient.import.fileError.invalidExcel"),
|
|
2304
2325
|
type: "error"
|
|
2305
2326
|
}), y.value = !1;
|
|
2306
2327
|
}
|
|
2307
2328
|
}
|
|
2308
|
-
return
|
|
2329
|
+
return _e(r, (v) => {
|
|
2309
2330
|
v && S(v);
|
|
2310
2331
|
}), (v, g) => {
|
|
2311
|
-
const
|
|
2312
|
-
return
|
|
2332
|
+
const $ = V("FmSelect"), B = V("FmDatePicker"), z = V("FmTimePicker"), W = V("FmCircularProgress"), J = V("FmLabel"), U = V("FmIcon"), P = V("FmButton"), R = V("FmForm");
|
|
2333
|
+
return x(), se(R, {
|
|
2313
2334
|
ref_key: "formRef",
|
|
2314
|
-
ref:
|
|
2335
|
+
ref: u
|
|
2315
2336
|
}, {
|
|
2316
2337
|
default: A(() => [
|
|
2317
2338
|
l("div", _o, [
|
|
2318
|
-
f(
|
|
2339
|
+
f($, {
|
|
2319
2340
|
modelValue: c.value,
|
|
2320
2341
|
"onUpdate:modelValue": g[0] || (g[0] = (D) => c.value = D),
|
|
2321
2342
|
label: "Transfer from",
|
|
@@ -2330,21 +2351,21 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2330
2351
|
{ label: "2", value: "6" }
|
|
2331
2352
|
],
|
|
2332
2353
|
"helper-text": "Helper",
|
|
2333
|
-
rules: [t(
|
|
2354
|
+
rules: [t(Ne)()]
|
|
2334
2355
|
}, null, 8, ["modelValue", "rules"]),
|
|
2335
2356
|
f(B, {
|
|
2336
2357
|
modelValue: e.value,
|
|
2337
2358
|
"onUpdate:modelValue": g[1] || (g[1] = (D) => e.value = D),
|
|
2338
2359
|
label: "Transfer date",
|
|
2339
|
-
rules: [t(
|
|
2360
|
+
rules: [t(Ne)()]
|
|
2340
2361
|
}, null, 8, ["modelValue", "rules"]),
|
|
2341
2362
|
f(z, {
|
|
2342
2363
|
modelValue: n.value,
|
|
2343
2364
|
"onUpdate:modelValue": g[2] || (g[2] = (D) => n.value = D),
|
|
2344
2365
|
label: "Transfer time",
|
|
2345
|
-
rules: [t(
|
|
2366
|
+
rules: [t(Ne)()]
|
|
2346
2367
|
}, null, 8, ["modelValue", "rules"]),
|
|
2347
|
-
|
|
2368
|
+
o.value ? (x(), T("div", ho, [
|
|
2348
2369
|
l("div", null, [
|
|
2349
2370
|
f(W, {
|
|
2350
2371
|
size: "md",
|
|
@@ -2352,7 +2373,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2352
2373
|
})
|
|
2353
2374
|
]),
|
|
2354
2375
|
l("div", ko, E(t(h)("inventory.formField.loading")), 1)
|
|
2355
|
-
])) : (
|
|
2376
|
+
])) : (x(), T(re, { key: 1 }, [
|
|
2356
2377
|
f($s, {
|
|
2357
2378
|
"max-file-size": 5,
|
|
2358
2379
|
class: Z({
|
|
@@ -2360,7 +2381,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2360
2381
|
"h-[200px]": !r.value
|
|
2361
2382
|
}),
|
|
2362
2383
|
accept: ".xlsx,.xls",
|
|
2363
|
-
label:
|
|
2384
|
+
label: wt,
|
|
2364
2385
|
onFileUpload: g[3] || (g[3] = (D) => r.value = D),
|
|
2365
2386
|
"button-label": t(h)("inventory.ingredient.import.selectFile")
|
|
2366
2387
|
}, qt({ _: 2 }, [
|
|
@@ -2369,7 +2390,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2369
2390
|
fn: A(({ openFileDialog: D }) => [
|
|
2370
2391
|
f(J, null, {
|
|
2371
2392
|
default: A(() => [
|
|
2372
|
-
Pe(E(
|
|
2393
|
+
Pe(E(wt))
|
|
2373
2394
|
]),
|
|
2374
2395
|
_: 1
|
|
2375
2396
|
}),
|
|
@@ -2384,11 +2405,11 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2384
2405
|
}
|
|
2385
2406
|
])
|
|
2386
2407
|
}, [
|
|
2387
|
-
y.value ? (
|
|
2408
|
+
y.value ? (x(), se(W, {
|
|
2388
2409
|
key: 0,
|
|
2389
2410
|
size: "md",
|
|
2390
2411
|
color: "neutral-gray-200"
|
|
2391
|
-
})) : (
|
|
2412
|
+
})) : (x(), se(U, {
|
|
2392
2413
|
key: 1,
|
|
2393
2414
|
name: i.value ? "error" : "attach_file",
|
|
2394
2415
|
outline: "",
|
|
@@ -2405,7 +2426,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2405
2426
|
}, [
|
|
2406
2427
|
l("div", Co, E(r.value.name), 1)
|
|
2407
2428
|
], 2),
|
|
2408
|
-
y.value ?
|
|
2429
|
+
y.value ? K("", !0) : (x(), T("div", So, [
|
|
2409
2430
|
f(P, {
|
|
2410
2431
|
label: t(h)("inventory.ingredient.import.replaceFile"),
|
|
2411
2432
|
variant: i.value ? "destructive" : "secondary",
|
|
@@ -2414,34 +2435,34 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2414
2435
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
2415
2436
|
]))
|
|
2416
2437
|
], 2),
|
|
2417
|
-
p.value.length ? (
|
|
2418
|
-
(
|
|
2419
|
-
key:
|
|
2438
|
+
p.value.length ? (x(), T("div", wo, [
|
|
2439
|
+
(x(!0), T(re, null, xe(p.value, (M, L) => (x(), T("div", {
|
|
2440
|
+
key: L,
|
|
2420
2441
|
class: "flex gap-8 items-center"
|
|
2421
2442
|
}, [
|
|
2422
|
-
f(
|
|
2443
|
+
f(U, {
|
|
2423
2444
|
name: "error",
|
|
2424
2445
|
size: "sm",
|
|
2425
2446
|
color: "system-error-300"
|
|
2426
2447
|
}),
|
|
2427
2448
|
l("div", Fo, E(M), 1)
|
|
2428
2449
|
]))), 128))
|
|
2429
|
-
])) :
|
|
2450
|
+
])) : K("", !0)
|
|
2430
2451
|
])
|
|
2431
2452
|
]),
|
|
2432
2453
|
key: "0"
|
|
2433
2454
|
} : void 0
|
|
2434
2455
|
]), 1032, ["class", "button-label"]),
|
|
2435
|
-
r.value ? (
|
|
2456
|
+
r.value ? (x(), T("div", Io, [
|
|
2436
2457
|
l("div", $o, E(t(h)("inventory.ingredient.import.summary")), 1),
|
|
2437
|
-
(
|
|
2458
|
+
(x(!0), T(re, null, xe(s.value, (D, M) => (x(), se(go, {
|
|
2438
2459
|
key: M,
|
|
2439
2460
|
name: `Transfer Note ${M + 1}`,
|
|
2440
2461
|
items: D.poItems,
|
|
2441
2462
|
errors: D.errors,
|
|
2442
2463
|
type: "create"
|
|
2443
2464
|
}, null, 8, ["name", "items", "errors"]))), 128))
|
|
2444
|
-
])) :
|
|
2465
|
+
])) : K("", !0)
|
|
2445
2466
|
], 64))
|
|
2446
2467
|
])
|
|
2447
2468
|
]),
|
|
@@ -2449,14 +2470,14 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2449
2470
|
}, 512);
|
|
2450
2471
|
};
|
|
2451
2472
|
}
|
|
2452
|
-
}), To = { class: "w-[480px]" }, Vo = /* @__PURE__ */
|
|
2473
|
+
}), To = { class: "w-[480px]" }, Vo = /* @__PURE__ */ de({
|
|
2453
2474
|
__name: "XilnexImportDialog",
|
|
2454
2475
|
props: {
|
|
2455
2476
|
show: { type: Boolean }
|
|
2456
2477
|
},
|
|
2457
2478
|
emits: ["update:show", "submitted"],
|
|
2458
2479
|
setup(m, { expose: b, emit: r }) {
|
|
2459
|
-
const
|
|
2480
|
+
const d = r, o = Vt(m, "show"), k = Re(), C = dt(), I = N(!1), c = N(), e = N();
|
|
2460
2481
|
b({
|
|
2461
2482
|
validateInputs: () => {
|
|
2462
2483
|
var s, i;
|
|
@@ -2476,8 +2497,8 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2476
2497
|
(i = (s = c.value) == null ? void 0 : s.validateInputs) == null || i.call(s);
|
|
2477
2498
|
}
|
|
2478
2499
|
async function p() {
|
|
2479
|
-
var i,
|
|
2480
|
-
if (!((
|
|
2500
|
+
var i, u, h, S, v;
|
|
2501
|
+
if (!((u = (i = e.value) == null ? void 0 : i.supplier) != null && u.name)) {
|
|
2481
2502
|
k.open({
|
|
2482
2503
|
title: "Upload failed",
|
|
2483
2504
|
message: "Location is required",
|
|
@@ -2510,24 +2531,24 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2510
2531
|
});
|
|
2511
2532
|
return;
|
|
2512
2533
|
}
|
|
2513
|
-
|
|
2534
|
+
I.value = !0;
|
|
2514
2535
|
try {
|
|
2515
|
-
await
|
|
2536
|
+
await C.importFromXilnex(e.value), d("update:show", !1);
|
|
2516
2537
|
} catch (g) {
|
|
2517
|
-
await new Promise((
|
|
2538
|
+
await new Promise(($) => setTimeout($, 1e3)), k.open({
|
|
2518
2539
|
title: "Upload failed",
|
|
2519
2540
|
message: g == null ? void 0 : g.message,
|
|
2520
2541
|
type: "error"
|
|
2521
2542
|
});
|
|
2522
2543
|
} finally {
|
|
2523
|
-
|
|
2544
|
+
I.value = !1;
|
|
2524
2545
|
}
|
|
2525
2546
|
}
|
|
2526
2547
|
return (s, i) => {
|
|
2527
|
-
const
|
|
2528
|
-
return
|
|
2529
|
-
modelValue: t(
|
|
2530
|
-
"onUpdate:modelValue": i[2] || (i[2] = (v) =>
|
|
2548
|
+
const u = V("FmSpacer"), h = V("FmButton"), S = V("FmDialog");
|
|
2549
|
+
return x(), se(S, {
|
|
2550
|
+
modelValue: t(o),
|
|
2551
|
+
"onUpdate:modelValue": i[2] || (i[2] = (v) => Se(o) ? o.value = v : null),
|
|
2531
2552
|
overlay: !0,
|
|
2532
2553
|
"close-button": !1
|
|
2533
2554
|
}, {
|
|
@@ -2535,18 +2556,18 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2535
2556
|
l("div", null, "Xilnex transfer order", -1)
|
|
2536
2557
|
])),
|
|
2537
2558
|
"dialog-footer": A(() => [
|
|
2538
|
-
f(
|
|
2559
|
+
f(u, { class: "sm:hidden xs:hidden" }),
|
|
2539
2560
|
f(h, {
|
|
2540
|
-
disabled:
|
|
2561
|
+
disabled: I.value,
|
|
2541
2562
|
class: "sm:w-full xs:w-full",
|
|
2542
2563
|
label: "Cancel",
|
|
2543
2564
|
size: "md",
|
|
2544
2565
|
variant: "tertiary",
|
|
2545
|
-
onClick: i[1] || (i[1] = (v) =>
|
|
2566
|
+
onClick: i[1] || (i[1] = (v) => d("update:show", !1))
|
|
2546
2567
|
}, null, 8, ["disabled"]),
|
|
2547
2568
|
f(h, {
|
|
2548
|
-
disabled:
|
|
2549
|
-
loading:
|
|
2569
|
+
disabled: I.value,
|
|
2570
|
+
loading: I.value,
|
|
2550
2571
|
class: "sm:w-full xs:w-full",
|
|
2551
2572
|
label: "Upload",
|
|
2552
2573
|
size: "md",
|
|
@@ -2572,35 +2593,35 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2572
2593
|
}), Po = { class: "flex flex-col py-8" }, Ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Eo = {
|
|
2573
2594
|
key: 0,
|
|
2574
2595
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
2575
|
-
}, Mo = { class: "pt-8" }, Ft = "ReceiveRequestViewSearchCriteria", pn = /* @__PURE__ */
|
|
2596
|
+
}, Mo = { class: "pt-8" }, Ft = "ReceiveRequestViewSearchCriteria", pn = /* @__PURE__ */ de({
|
|
2576
2597
|
__name: "ReceiveRequestView",
|
|
2577
2598
|
setup(m) {
|
|
2578
|
-
const { t: b } =
|
|
2599
|
+
const { t: b } = he(), r = Re();
|
|
2579
2600
|
Xe.object({
|
|
2580
2601
|
name: Xe.string().optional().nullable(),
|
|
2581
2602
|
startDate: Xe.string().optional().nullable(),
|
|
2582
2603
|
endDate: Xe.string().optional().nullable()
|
|
2583
2604
|
});
|
|
2584
|
-
const
|
|
2605
|
+
const d = q(
|
|
2585
2606
|
() => !p._currentLocation || e.loading.value
|
|
2586
|
-
), y = rs(),
|
|
2587
|
-
function
|
|
2588
|
-
const
|
|
2607
|
+
), y = rs(), o = et(), k = Be();
|
|
2608
|
+
function C() {
|
|
2609
|
+
const U = {
|
|
2589
2610
|
name: "",
|
|
2590
2611
|
...kt()
|
|
2591
2612
|
}, P = y.getItem(Ft);
|
|
2592
2613
|
if (!P)
|
|
2593
|
-
return
|
|
2614
|
+
return U;
|
|
2594
2615
|
try {
|
|
2595
2616
|
return JSON.parse(P);
|
|
2596
2617
|
} catch {
|
|
2597
|
-
return
|
|
2618
|
+
return U;
|
|
2598
2619
|
}
|
|
2599
2620
|
}
|
|
2600
|
-
function
|
|
2621
|
+
function I() {
|
|
2601
2622
|
y.setItem(Ft, JSON.stringify(c.value));
|
|
2602
2623
|
}
|
|
2603
|
-
const c =
|
|
2624
|
+
const c = N(C()), e = Wt(
|
|
2604
2625
|
at.RECEIVE_REQUEST,
|
|
2605
2626
|
c.value
|
|
2606
2627
|
), { columnDefs: n } = Gt(
|
|
@@ -2609,23 +2630,23 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2609
2630
|
e.shipments
|
|
2610
2631
|
), p = Ge();
|
|
2611
2632
|
async function s() {
|
|
2612
|
-
const
|
|
2633
|
+
const U = `inventory-record_${xt(c.value.startDate).format("DD-MM-YYYY_HH-mm")}-${xt(c.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, P = e.purchaseOrders.value.flatMap(
|
|
2613
2634
|
(D) => D.items.map((M) => {
|
|
2614
|
-
var
|
|
2615
|
-
const
|
|
2635
|
+
var H;
|
|
2636
|
+
const L = new Date(ns(D._id) ?? ""), X = D.effectiveAt ? new Date(D.effectiveAt) : void 0, ae = we(
|
|
2616
2637
|
es(M.sku, D.deliveryOrder || [])
|
|
2617
|
-
), F =
|
|
2638
|
+
), F = we(M.quantity), w = ((H = M == null ? void 0 : M.measurement) == null ? void 0 : H.abbrev) || M.sku.unit.abbrev;
|
|
2618
2639
|
return {
|
|
2619
2640
|
"SKU code": M.code,
|
|
2620
2641
|
"SKU name": M.name,
|
|
2621
2642
|
"PO #": D.seqNumber,
|
|
2622
|
-
"Effective at":
|
|
2623
|
-
Date:
|
|
2643
|
+
"Effective at": X,
|
|
2644
|
+
Date: L,
|
|
2624
2645
|
Status: D.status,
|
|
2625
2646
|
Reference: D.ref ?? "",
|
|
2626
|
-
"Received quantity":
|
|
2647
|
+
"Received quantity": ae,
|
|
2627
2648
|
"Ordered quantity": F,
|
|
2628
|
-
Unit:
|
|
2649
|
+
Unit: w,
|
|
2629
2650
|
"Total cost": M.totalCost ? Ze(M.totalCost) : null
|
|
2630
2651
|
};
|
|
2631
2652
|
})
|
|
@@ -2640,7 +2661,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2640
2661
|
"Ordered quantity",
|
|
2641
2662
|
"Unit"
|
|
2642
2663
|
];
|
|
2643
|
-
|
|
2664
|
+
o.enableBackdatePo && R.insert("Effective at", 4), o.enableTotalCost && R.push("Total cost"), await ls(
|
|
2644
2665
|
[
|
|
2645
2666
|
{
|
|
2646
2667
|
name: "purchases",
|
|
@@ -2648,25 +2669,25 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2648
2669
|
columns: R
|
|
2649
2670
|
}
|
|
2650
2671
|
],
|
|
2651
|
-
|
|
2672
|
+
U
|
|
2652
2673
|
), r.open({
|
|
2653
2674
|
title: b("inventory.transfer.receiveRequest.export.success"),
|
|
2654
|
-
message: b("inventory.transfer.receiveRequest.export.message", [
|
|
2675
|
+
message: b("inventory.transfer.receiveRequest.export.message", [U]),
|
|
2655
2676
|
type: "success"
|
|
2656
2677
|
});
|
|
2657
2678
|
}
|
|
2658
|
-
const i =
|
|
2659
|
-
|
|
2660
|
-
!
|
|
2679
|
+
const i = N(kt()), u = N("");
|
|
2680
|
+
_e([() => i.value], ([U]) => {
|
|
2681
|
+
!U.startDate || !U.endDate || (c.value.startDate = U.startDate, c.value.endDate = U.endDate, e.updateDateRange(
|
|
2661
2682
|
c.value.startDate,
|
|
2662
2683
|
c.value.endDate
|
|
2663
|
-
),
|
|
2664
|
-
}),
|
|
2665
|
-
|
|
2684
|
+
), I());
|
|
2685
|
+
}), _e([() => u.value], () => {
|
|
2686
|
+
I();
|
|
2666
2687
|
});
|
|
2667
|
-
function h(
|
|
2668
|
-
if (
|
|
2669
|
-
if (
|
|
2688
|
+
function h(U) {
|
|
2689
|
+
if (U === "create") {
|
|
2690
|
+
if (d.value) {
|
|
2670
2691
|
r.open({
|
|
2671
2692
|
title: "Loading data...",
|
|
2672
2693
|
message: "Please wait.",
|
|
@@ -2676,21 +2697,21 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2676
2697
|
}
|
|
2677
2698
|
return e.promptCreateTransferDialog();
|
|
2678
2699
|
}
|
|
2679
|
-
if (
|
|
2700
|
+
if (U === "upload" && o.enableXilnexTransferNote)
|
|
2680
2701
|
return e.promptUploadTransferDialog();
|
|
2681
|
-
if (
|
|
2702
|
+
if (U === "refresh")
|
|
2682
2703
|
return e.fetchData();
|
|
2683
|
-
if (
|
|
2704
|
+
if (U === "export")
|
|
2684
2705
|
return s();
|
|
2685
2706
|
}
|
|
2686
|
-
const { breakpoints: S } = rt(), v = q(() => S.value.xs || S.value.sm), g = q(() => v.value ? 10 : 20),
|
|
2707
|
+
const { breakpoints: S } = rt(), v = q(() => S.value.xs || S.value.sm), g = q(() => v.value ? 10 : 20), $ = is(), B = q(() => [
|
|
2687
2708
|
{
|
|
2688
2709
|
label: b("inventory.transfer.receiveRequest.actions.create"),
|
|
2689
2710
|
value: "create",
|
|
2690
2711
|
isPrimary: !0,
|
|
2691
2712
|
prependIcon: "add"
|
|
2692
2713
|
},
|
|
2693
|
-
...
|
|
2714
|
+
...o.enableXilnexTransferNote ? [
|
|
2694
2715
|
{
|
|
2695
2716
|
label: b("inventory.common.upload"),
|
|
2696
2717
|
value: "upload"
|
|
@@ -2705,7 +2726,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2705
2726
|
value: "export"
|
|
2706
2727
|
}
|
|
2707
2728
|
]), z = q(() => {
|
|
2708
|
-
const
|
|
2729
|
+
const U = [
|
|
2709
2730
|
{
|
|
2710
2731
|
type: "string",
|
|
2711
2732
|
key: "status",
|
|
@@ -2743,27 +2764,27 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2743
2764
|
}).filter((R) => R != null)
|
|
2744
2765
|
}
|
|
2745
2766
|
];
|
|
2746
|
-
return [...
|
|
2747
|
-
}), W =
|
|
2767
|
+
return [...U, ...k.isEnabled ? P : []];
|
|
2768
|
+
}), W = N(null), J = q(() => {
|
|
2748
2769
|
if (!W.value)
|
|
2749
2770
|
return e.purchaseOrders.value;
|
|
2750
|
-
const
|
|
2771
|
+
const U = Ts.build(W.value);
|
|
2751
2772
|
return e.purchaseOrders.value.filter((P) => {
|
|
2752
|
-
var R, D, M,
|
|
2773
|
+
var R, D, M, L;
|
|
2753
2774
|
return Vs(
|
|
2754
2775
|
{
|
|
2755
2776
|
netsuiteTransactionNumber: (D = (R = P.netSuite) == null ? void 0 : R.additionalInfo) == null ? void 0 : D.transactionnumber,
|
|
2756
2777
|
netsuiteOrderNo: (M = P.netSuite) == null ? void 0 : M.refNo,
|
|
2757
|
-
netsuiteOrderId: (
|
|
2778
|
+
netsuiteOrderId: (L = P.netSuite) == null ? void 0 : L.id,
|
|
2758
2779
|
status: P.status
|
|
2759
2780
|
},
|
|
2760
|
-
|
|
2781
|
+
U
|
|
2761
2782
|
);
|
|
2762
2783
|
});
|
|
2763
2784
|
});
|
|
2764
|
-
return (
|
|
2785
|
+
return (U, P) => {
|
|
2765
2786
|
const R = V("FmTable");
|
|
2766
|
-
return
|
|
2787
|
+
return x(), se(us, {
|
|
2767
2788
|
title: t(b)("inventory.transfer.receiveRequest.title2"),
|
|
2768
2789
|
actions: B.value,
|
|
2769
2790
|
"onClick:action": h
|
|
@@ -2783,58 +2804,58 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2783
2804
|
f(Zt, {
|
|
2784
2805
|
"date-range-query": "",
|
|
2785
2806
|
"date-range": i.value,
|
|
2786
|
-
"onUpdate:dateRange": P[0] || (P[0] = (
|
|
2807
|
+
"onUpdate:dateRange": P[0] || (P[0] = (L) => i.value = L),
|
|
2787
2808
|
searchable: "",
|
|
2788
2809
|
"change-location": "",
|
|
2789
|
-
search:
|
|
2790
|
-
"onUpdate:search": P[1] || (P[1] = (
|
|
2810
|
+
search: u.value,
|
|
2811
|
+
"onUpdate:search": P[1] || (P[1] = (L) => u.value = L),
|
|
2791
2812
|
filterable: "",
|
|
2792
2813
|
"filter-attributes": z.value,
|
|
2793
2814
|
filter: W.value,
|
|
2794
|
-
"onUpdate:filter": P[2] || (P[2] = (
|
|
2815
|
+
"onUpdate:filter": P[2] || (P[2] = (L) => W.value = L)
|
|
2795
2816
|
}, null, 8, ["date-range", "search", "filter-attributes", "filter"]),
|
|
2796
|
-
(
|
|
2797
|
-
style: $t(t(
|
|
2817
|
+
(x(), se(R, {
|
|
2818
|
+
style: $t(t($).tableHeight),
|
|
2798
2819
|
"column-defs": t(n),
|
|
2799
2820
|
"row-data": J.value,
|
|
2800
|
-
"search-value":
|
|
2801
|
-
loading:
|
|
2802
|
-
onRowClick: P[3] || (P[3] = (
|
|
2821
|
+
"search-value": u.value,
|
|
2822
|
+
loading: d.value,
|
|
2823
|
+
onRowClick: P[3] || (P[3] = (L) => t(e).promptShowTransferDetails(L.original)),
|
|
2803
2824
|
key: (D = t(p)._currentLocation) == null ? void 0 : D.dbName,
|
|
2804
2825
|
"page-size": g.value
|
|
2805
2826
|
}, {
|
|
2806
|
-
"list-row": A((
|
|
2827
|
+
"list-row": A((L) => [
|
|
2807
2828
|
f(Pt, {
|
|
2808
|
-
row:
|
|
2829
|
+
row: L,
|
|
2809
2830
|
onRowClick: t(e).promptShowTransferDetails
|
|
2810
2831
|
}, {
|
|
2811
|
-
default: A((
|
|
2812
|
-
var
|
|
2832
|
+
default: A((X) => {
|
|
2833
|
+
var ae, F, w, H, fe, ce, G, Fe, Ie, ze, Le, tt, He, Ce, Oe, a, _, Y, le, ye;
|
|
2813
2834
|
return [
|
|
2814
2835
|
l("div", Po, [
|
|
2815
2836
|
l("div", Ro, [
|
|
2816
|
-
f(t(
|
|
2817
|
-
render: (
|
|
2818
|
-
props: (
|
|
2837
|
+
f(t(ve), {
|
|
2838
|
+
render: (w = (F = (ae = X._id) == null ? void 0 : ae.column) == null ? void 0 : F.columnDef) == null ? void 0 : w.cell,
|
|
2839
|
+
props: (fe = (H = X._id) == null ? void 0 : H.getContext) == null ? void 0 : fe.call(H)
|
|
2819
2840
|
}, null, 8, ["render", "props"])
|
|
2820
2841
|
]),
|
|
2821
2842
|
l("div", Oo, [
|
|
2822
|
-
f(t(
|
|
2823
|
-
render: (Fe = (
|
|
2824
|
-
props: (ze = (Ie =
|
|
2843
|
+
f(t(ve), {
|
|
2844
|
+
render: (Fe = (G = (ce = X.supplier_name) == null ? void 0 : ce.column) == null ? void 0 : G.columnDef) == null ? void 0 : Fe.cell,
|
|
2845
|
+
props: (ze = (Ie = X.supplier_name) == null ? void 0 : Ie.getContext) == null ? void 0 : ze.call(Ie)
|
|
2825
2846
|
}, null, 8, ["render", "props"])
|
|
2826
2847
|
]),
|
|
2827
|
-
l("div", Ao, E(
|
|
2828
|
-
|
|
2829
|
-
f(t(
|
|
2830
|
-
render: (He = (tt = (Le =
|
|
2831
|
-
props: (Oe = (Ce =
|
|
2848
|
+
l("div", Ao, E(L.original.items.map(($e) => `${$e.name}`).join(", ")), 1),
|
|
2849
|
+
L.original.ref ? (x(), T("div", Eo, [
|
|
2850
|
+
f(t(ve), {
|
|
2851
|
+
render: (He = (tt = (Le = X.ref) == null ? void 0 : Le.column) == null ? void 0 : tt.columnDef) == null ? void 0 : He.cell,
|
|
2852
|
+
props: (Oe = (Ce = X.ref) == null ? void 0 : Ce.getContext) == null ? void 0 : Oe.call(Ce)
|
|
2832
2853
|
}, null, 8, ["render", "props"])
|
|
2833
|
-
])) :
|
|
2854
|
+
])) : K("", !0),
|
|
2834
2855
|
l("div", Mo, [
|
|
2835
|
-
f(t(
|
|
2836
|
-
render: (
|
|
2837
|
-
props: (
|
|
2856
|
+
f(t(ve), {
|
|
2857
|
+
render: (Y = (_ = (a = X.status) == null ? void 0 : a.column) == null ? void 0 : _.columnDef) == null ? void 0 : Y.cell,
|
|
2858
|
+
props: (ye = (le = X.status) == null ? void 0 : le.getContext) == null ? void 0 : ye.call(le)
|
|
2838
2859
|
}, null, 8, ["render", "props"])
|
|
2839
2860
|
])
|
|
2840
2861
|
])
|
|
@@ -2846,7 +2867,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2846
2867
|
_: 1
|
|
2847
2868
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2848
2869
|
], 2),
|
|
2849
|
-
(
|
|
2870
|
+
(x(), se(Nt, { to: "body" }, [
|
|
2850
2871
|
f(so, nt(t(e).transferDialogProps.value, {
|
|
2851
2872
|
onSubmitted: t(e).fetchData
|
|
2852
2873
|
}), null, 16, ["onSubmitted"]),
|
|
@@ -2859,7 +2880,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
|
|
|
2859
2880
|
}, {
|
|
2860
2881
|
onSubmitted: t(e).fetchData
|
|
2861
2882
|
}), null, 16, ["scope", "onSubmitted"]),
|
|
2862
|
-
f(Vo,
|
|
2883
|
+
f(Vo, Ut(Bt(t(e).xilnexImportDialogProps.value)), null, 16)
|
|
2863
2884
|
]))
|
|
2864
2885
|
];
|
|
2865
2886
|
}),
|