@feedmepos/mf-inventory-portal 1.2.7-dev.8 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DIqdK9d8.js → App-BtLCesbn.js} +1 -1
- package/dist/{ApprovalView-BKK_eDzO.js → ApprovalView-Ba4XBhGf.js} +68 -69
- package/dist/{BindingsDialog-BRzOVR30.js → BindingsDialog-BbBUniCu.js} +2 -2
- package/dist/{BindingsPicker-BtCdvAgU.js → BindingsPicker-C3q3ROku.js} +1 -1
- package/dist/{BindingsTable-DnS3ypzP.js → BindingsTable-BTxWMif_.js} +1 -1
- package/dist/{ClosingDraftView-BZLUoCOk.js → ClosingDraftView-DGITBnaY.js} +203 -203
- package/dist/ClosingTemplateView-eRvwxXBq.js +1908 -0
- package/dist/{DeliveryOrderPrintPreview-ClbyQK9l.js → DeliveryOrderPrintPreview-CUaHpblV.js} +8 -8
- package/dist/{FmAdminBadge-DcDyRj6K.js → FmAdminBadge-BdwGZY-f.js} +6 -6
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-lDkElrkF.js +227 -0
- package/dist/{FmMultiselectDialog-CYPN-2of.js → FmMultiselectDialog-BETfHs3j.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C4QKxv_V.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BNdbeRQp.js} +23 -23
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bollyyl1.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-VYMMcwLl.js} +1 -1
- package/dist/{IngredientGroupView-baNWf_60.js → IngredientGroupView-C4d9b3Td.js} +12 -12
- package/dist/IngredientsView-BvqWuIVT.js +1876 -0
- package/dist/{IntegrationView-CiwxB7rj.js → IntegrationView-CWFzRDWO.js} +1552 -1430
- package/dist/{InventoryBindingForm-BCY8vtGx.js → InventoryBindingForm-Cx0Prlq8.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-hjbfvhVh.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-cpR3Sf2Y.js} +41 -41
- package/dist/{InventoryBindingSummary-CCPxd5ir.js → InventoryBindingSummary-l8XvpxVU.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CmqDgde9.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BjRvIX-v.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DnpRhNG0.js → PremiumBadge.vue_vue_type_script_setup_true_lang-gjuZveKy.js} +11 -11
- package/dist/{PublishView-CDrYaJX9.js → PublishView-D2iUnDan.js} +14 -14
- package/dist/{PurchaseOrderPrintPreview-QeqPa532.js → PurchaseOrderPrintPreview-DdLvM-wt.js} +11 -11
- package/dist/{ReceiveRequestView-C8NJ7ILf.js → ReceiveRequestView-DpF5ZzvH.js} +145 -148
- package/dist/{RecipeView-Bmvl_poR.js → RecipeView-Dvtm8o1Y.js} +49 -49
- package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +59 -0
- package/dist/StockView-CRDu_GQ_.js +2086 -0
- package/dist/{SupplierView-Dq3vMn5q.js → SupplierView-7GtIJ3Fz.js} +1015 -1133
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DbmLtbZt.js +2494 -0
- package/dist/{TransferTemplateView-NTw0N3zX.js → TransferTemplateView-Cmvg-yvW.js} +130 -131
- package/dist/{UnitView-BFeT0jpH.js → UnitView-DjVm1iVX.js} +59 -59
- package/dist/WarehouseView-CBso3SXT.js +1034 -0
- package/dist/api/inventory.d.ts +0 -8
- package/dist/api/netsuite.d.ts +0 -3
- package/dist/api/purchase-order-template.d.ts +0 -1
- package/dist/api/purchase-order.d.ts +0 -2
- package/dist/api/warehouse.d.ts +1 -3
- package/dist/{app-D5vamHiS.js → app-Z-ylwRmy.js} +17113 -17876
- package/dist/app.d.ts +9 -96
- package/dist/app.js +3 -3
- package/dist/components/FmEnhancedSelect.vue.d.ts +30 -0
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +2 -9
- package/dist/{decimal-BVxO-7VE.js → decimal-D1pJ2776.js} +1 -1
- package/dist/{format-unit-display-CvUKKMA2.js → format-unit-display-9BMm-8A4.js} +404 -372
- package/dist/{index-_TXzIRmu.js → index-BOl10vcm.js} +1 -1
- package/dist/{index-BmPwzWR6.js → index-rEIM0AVC.js} +1 -1
- package/dist/{stock-4-rgOZcm.js → stock-B8ewk80v.js} +1 -1
- package/dist/stores/feature.d.ts +0 -10
- package/dist/stores/integration/netsuite.d.ts +0 -19
- package/dist/stores/inventory.d.ts +0 -1
- package/dist/stores/location.d.ts +1 -57
- package/dist/stores/supplier.d.ts +0 -96
- package/dist/stores/warehouse.d.ts +0 -4
- package/dist/{supplier-BOW9xXhe.js → supplier-DLSXYY1o.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-DbJhveFq.js → use-ingredient-select-dialog-CTjwdY3T.js} +5 -5
- package/dist/{use-inventory-binding-dialog-BNY9P_Pg.js → use-inventory-binding-dialog-zXJB7MQY.js} +8 -8
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +0 -24
- package/dist/views/ingredients/components/ingredient-form/IngredientFormProps.d.ts +0 -6
- package/dist/views/integration/components/netsuite/business/BusinessNetSuiteSideSheet.vue.d.ts +0 -2
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +0 -1
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +0 -60
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +0 -10
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +0 -94
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1 -72
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +0 -8
- package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +0 -3
- package/dist/views/supplier/composables/use-supplier-table.d.ts +0 -4
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +0 -8
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +0 -16
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +0 -48
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +0 -48
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +0 -8
- package/package.json +2 -2
- package/dist/ClosingTemplateView-BwDaPcHe.js +0 -1862
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Da5zZ3ZF.js +0 -230
- package/dist/IngredientsView-B00A9orQ.js +0 -2306
- package/dist/StockView-H8EcBWrt.js +0 -2104
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-D-H0oT-V.js +0 -158
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-r7U0Wgsm.js +0 -3058
- package/dist/WarehouseView-50a9WiLB.js +0 -1066
- package/dist/api/shipment.d.ts +0 -11
- package/dist/closing-template-C8n1siov.js +0 -53
- package/dist/components/netsuite/SubsidiaryTreeDialog.vue.d.ts +0 -2
- package/dist/purchase-order-template-CekjfB92.js +0 -41
- package/dist/views/receive-request/components/delivery-order-form/CreateForm.vue.d.ts +0 -16
- package/dist/views/receive-request/components/delivery-order-form/CreateFormProps.d.ts +0 -4
- package/dist/views/receive-request/components/delivery-order-form/EditForm.vue.d.ts +0 -16
- package/dist/views/receive-request/components/delivery-order-form/EditFormProps.d.ts +0 -4
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { defineComponent as ae, onMounted as Te, computed as L, ref as Y, watch as Ce, inject as ot, resolveComponent as V, openBlock as $, createElementBlock as N, createElementVNode as e, createVNode as m, withCtx as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as ae, onMounted as Te, computed as L, ref as Y, watch as Ce, inject as ot, resolveComponent as V, openBlock as $, createElementBlock as N, createElementVNode as e, createVNode as m, withCtx as U, renderSlot as xe, withDirectives as Pe, normalizeClass as re, vModelText as Be, reactive as st, h as j, toDisplayString as I, unref as t, createCommentVNode as oe, Fragment as pe, normalizeStyle as _e, renderList as je, createBlock as le, mergeProps as Qe, createTextVNode as ne, mergeModels as qe, useModel as lt, isRef as Ye, Teleport as nt, normalizeProps as at, guardReactiveProps as rt } from "vue";
|
|
2
|
+
import { L as We, aK as he, t as Ne, I as it, aL as ut, aM as dt, j as se, aN as mt, b as Ge, a as Ke, T as Le, c as ge, n as ke, Z as be, V as ye, A as we, M as pt, J as ee, u as Ze, ao as ct, a1 as ft, G as Je, e as ue, aO as ve, aj as yt, v as vt, ab as bt, C as gt, i as Ee, _ as ht, E as xt } from "./app-Z-ylwRmy.js";
|
|
3
3
|
import { useI18n as me } from "@feedmepos/mf-common";
|
|
4
|
-
import { P as X,
|
|
5
|
-
import { components as de, useSnackbar as
|
|
6
|
-
import { defineStore as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { c as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
|
|
12
|
-
const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { class: "flex-1" }, Nt = { class: "flex items-center" }, Lt = { class: "flex-1" }, Et = { class: "flex-1" }, zt = /* @__PURE__ */ ae({
|
|
4
|
+
import { P as X, a as _t, f as kt, t as wt, b as ze, u as Tt } from "./format-unit-display-9BMm-8A4.js";
|
|
5
|
+
import { components as de, useSnackbar as Ct, useProxiedModel as Xe, useBreakpoints as Ft } from "@feedmepos/ui-library";
|
|
6
|
+
import { defineStore as St, storeToRefs as He } from "pinia";
|
|
7
|
+
import { _ as It, b as Mt, F as $t, a as Ot } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BNdbeRQp.js";
|
|
8
|
+
import { c as Dt, u as Vt, _ as At } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-lDkElrkF.js";
|
|
9
|
+
import { u as Rt } from "./supplier-DLSXYY1o.js";
|
|
10
|
+
import { u as Ut } from "./use-ingredient-select-dialog-CTjwdY3T.js";
|
|
11
|
+
const Pt = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { class: "flex-1" }, Nt = { class: "flex items-center" }, Lt = { class: "flex-1" }, Et = { class: "flex-1" }, zt = /* @__PURE__ */ ae({
|
|
13
12
|
__name: "FmMinMaxInput",
|
|
14
13
|
props: {
|
|
15
14
|
rules: {},
|
|
@@ -80,7 +79,7 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
|
|
|
80
79
|
w.max = null;
|
|
81
80
|
v.min = w.min, v.max = w.max;
|
|
82
81
|
});
|
|
83
|
-
const F = Symbol.for("fm:form-state"), c = ot(F, null), o = L(() => h.disabled ?? (c == null ? void 0 : c.getDisabled()) ?? !1), f = Y(), b = Y(), k = Y(!1), T = Y(!1), R = L(() => k.value || T.value),
|
|
82
|
+
const F = Symbol.for("fm:form-state"), c = ot(F, null), o = L(() => h.disabled ?? (c == null ? void 0 : c.getDisabled()) ?? !1), f = Y(), b = Y(), k = Y(!1), T = Y(!1), R = L(() => k.value || T.value), P = L(() => [...[
|
|
84
83
|
function() {
|
|
85
84
|
return typeof a(u.value) == "string" || typeof a(x.value) == "string" ? "Must be a number" : !0;
|
|
86
85
|
},
|
|
@@ -90,9 +89,9 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
|
|
|
90
89
|
], ...h.rules ?? []]);
|
|
91
90
|
return (d, y) => {
|
|
92
91
|
const w = V("FmLabel"), i = V("FmField"), g = V("FmFormGroup");
|
|
93
|
-
return $(), N("div",
|
|
94
|
-
e("div",
|
|
95
|
-
e("div",
|
|
92
|
+
return $(), N("div", Pt, [
|
|
93
|
+
e("div", Bt, [
|
|
94
|
+
e("div", qt, [
|
|
96
95
|
m(w, {
|
|
97
96
|
label: d.label,
|
|
98
97
|
disabled: d.disabled,
|
|
@@ -101,12 +100,12 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
|
|
|
101
100
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
102
101
|
]),
|
|
103
102
|
m(i, { focused: R.value }, {
|
|
104
|
-
default:
|
|
103
|
+
default: U(() => [
|
|
105
104
|
e("div", Nt, [
|
|
106
105
|
xe(d.$slots, "prepend"),
|
|
107
106
|
y[6] || (y[6] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
|
|
108
107
|
e("div", Lt, [
|
|
109
|
-
|
|
108
|
+
Pe(e("input", {
|
|
110
109
|
type: "text",
|
|
111
110
|
ref_key: "minInputRef",
|
|
112
111
|
ref: f,
|
|
@@ -119,13 +118,13 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
|
|
|
119
118
|
"text-fm-color-typo-disabled": o.value
|
|
120
119
|
})
|
|
121
120
|
}, null, 34), [
|
|
122
|
-
[
|
|
121
|
+
[Be, u.value]
|
|
123
122
|
])
|
|
124
123
|
]),
|
|
125
124
|
y[7] || (y[7] = e("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
|
|
126
125
|
y[8] || (y[8] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
|
|
127
126
|
e("div", Et, [
|
|
128
|
-
|
|
127
|
+
Pe(e("input", {
|
|
129
128
|
type: "text",
|
|
130
129
|
ref_key: "maxInputRef",
|
|
131
130
|
ref: b,
|
|
@@ -138,7 +137,7 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
|
|
|
138
137
|
"text-fm-color-typo-disabled": o.value
|
|
139
138
|
})
|
|
140
139
|
}, null, 34), [
|
|
141
|
-
[
|
|
140
|
+
[Be, x.value]
|
|
142
141
|
])
|
|
143
142
|
]),
|
|
144
143
|
xe(d.$slots, "append")
|
|
@@ -151,7 +150,7 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
|
|
|
151
150
|
class: "flex-1",
|
|
152
151
|
"model-value": d.modelValue,
|
|
153
152
|
info: d.labelInfo,
|
|
154
|
-
rules:
|
|
153
|
+
rules: P.value,
|
|
155
154
|
"helper-text": d.helperText,
|
|
156
155
|
"helper-state": d.helperState
|
|
157
156
|
}, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
|
|
@@ -176,8 +175,8 @@ function Qt(p) {
|
|
|
176
175
|
return !s && !u ? `Min & max must be a multiple of ${v}` : s ? u ? !0 : `Max must be a multiple of ${v}` : `Min must be a multiple of ${v}`;
|
|
177
176
|
};
|
|
178
177
|
}
|
|
179
|
-
const et =
|
|
180
|
-
const p =
|
|
178
|
+
const et = St("netsuite-custom-field-helper", () => {
|
|
179
|
+
const p = Ge();
|
|
181
180
|
function h(v, a, r, s, u) {
|
|
182
181
|
var F;
|
|
183
182
|
if (!r) {
|
|
@@ -202,12 +201,12 @@ const et = Ft("netsuite-custom-field-helper", () => {
|
|
|
202
201
|
});
|
|
203
202
|
var Q = /* @__PURE__ */ ((p) => (p.Code = "Code", p.Name = "Name", p.DefaultAmount = "DefaultAmount", p.Limit = "Limit", p.Step = "Step", p.Cost = "Cost", p.Delete = "Delete", p))(Q || {});
|
|
204
203
|
function Yt(p, h = {}) {
|
|
205
|
-
const { t: v } = me(), a =
|
|
204
|
+
const { t: v } = me(), a = Ke(), r = ge(), s = st({}), u = et();
|
|
206
205
|
Te(() => {
|
|
207
206
|
for (const c of p.items) {
|
|
208
207
|
if (!c.totalCost)
|
|
209
208
|
continue;
|
|
210
|
-
const { cost: o } =
|
|
209
|
+
const { cost: o } = Dt(
|
|
211
210
|
c.sku,
|
|
212
211
|
c.quantity,
|
|
213
212
|
c.measurement,
|
|
@@ -288,11 +287,11 @@ function Yt(p, h = {}) {
|
|
|
288
287
|
minSize: 200,
|
|
289
288
|
cell(c) {
|
|
290
289
|
var R;
|
|
291
|
-
const o = c.row.original, f = a.skuById[o.sku._id], b = a.unitById[(R = f.unit) == null ? void 0 : R._id], k = b.measurements.find((
|
|
290
|
+
const o = c.row.original, f = a.skuById[o.sku._id], b = a.unitById[(R = f.unit) == null ? void 0 : R._id], k = b.measurements.find((P) => {
|
|
292
291
|
var d;
|
|
293
|
-
return ((d = o.measurement) == null ? void 0 : d.id) ===
|
|
292
|
+
return ((d = o.measurement) == null ? void 0 : d.id) === P.id;
|
|
294
293
|
}), T = o.sku.unit._id !== f.unit._id || !b || o.measurement && !k;
|
|
295
|
-
return j(
|
|
294
|
+
return j(It, {
|
|
296
295
|
style: {
|
|
297
296
|
flex: "1 1 0%"
|
|
298
297
|
},
|
|
@@ -304,11 +303,11 @@ function Yt(p, h = {}) {
|
|
|
304
303
|
disabled: p.disabled,
|
|
305
304
|
key: o.sku._id,
|
|
306
305
|
unit: b,
|
|
307
|
-
"onUpdate:modelValue": (
|
|
306
|
+
"onUpdate:modelValue": (P) => {
|
|
308
307
|
u.validateUnitInput(
|
|
309
308
|
o,
|
|
310
309
|
f,
|
|
311
|
-
|
|
310
|
+
P,
|
|
312
311
|
(d) => {
|
|
313
312
|
p.updateItem({
|
|
314
313
|
...o,
|
|
@@ -320,9 +319,9 @@ function Yt(p, h = {}) {
|
|
|
320
319
|
);
|
|
321
320
|
},
|
|
322
321
|
rules: [
|
|
323
|
-
|
|
322
|
+
Mt(o.quantityStep),
|
|
324
323
|
...+se(o.quantity) ? [
|
|
325
|
-
|
|
324
|
+
$t(
|
|
326
325
|
+se(
|
|
327
326
|
o.minimumQuantity ?? {
|
|
328
327
|
amount: 1,
|
|
@@ -332,7 +331,7 @@ function Yt(p, h = {}) {
|
|
|
332
331
|
)
|
|
333
332
|
)
|
|
334
333
|
] : [],
|
|
335
|
-
|
|
334
|
+
Ot(
|
|
336
335
|
o.maximumQuantity ? +se(o.maximumQuantity) : 1 / 0
|
|
337
336
|
),
|
|
338
337
|
function(d) {
|
|
@@ -493,7 +492,7 @@ function Yt(p, h = {}) {
|
|
|
493
492
|
})
|
|
494
493
|
};
|
|
495
494
|
}
|
|
496
|
-
const Wt = { class: "flex flex-col gap-8 py-16" },
|
|
495
|
+
const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-center" }, Kt = { class: "flex-1 flex gap-1 items-center" }, Zt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Jt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Xt = { class: "flex gap-8 w-full" }, eo = { class: "flex-1 flex flex-col gap-4" }, to = { class: "flex-1 flex flex-col gap-4" }, oo = {
|
|
497
496
|
key: 0,
|
|
498
497
|
class: "flex gap-8 w-full"
|
|
499
498
|
}, so = { class: "flex-1 flex flex-col gap-4" }, lo = { class: "flex-1 flex flex-col gap-4" }, no = { class: "flex gap-8 w-full" }, ao = { class: "flex-1 flex flex-col gap-4" }, ro = /* @__PURE__ */ ae({
|
|
@@ -508,11 +507,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
508
507
|
return a;
|
|
509
508
|
}
|
|
510
509
|
return (a, r) => {
|
|
511
|
-
var u, x, F, c, o, f, b, k, T, R,
|
|
510
|
+
var u, x, F, c, o, f, b, k, T, R, P, d, y, w, i, g, O, M, _, W, te, E, B, Z, l, n, C, q, z, G;
|
|
512
511
|
const s = V("FmLabel");
|
|
513
512
|
return $(), N("div", Wt, [
|
|
514
|
-
e("div",
|
|
515
|
-
e("div",
|
|
513
|
+
e("div", Gt, [
|
|
514
|
+
e("div", Kt, [
|
|
516
515
|
e("span", Zt, " (" + I(a.row.original.sku.code) + ") ", 1),
|
|
517
516
|
e("span", Jt, I(a.row.original.sku.name), 1)
|
|
518
517
|
]),
|
|
@@ -539,7 +538,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
539
538
|
label: t(h)(`inventory.transfer.form.items.table.${t(Q).Name}`)
|
|
540
539
|
}, null, 8, ["label"]),
|
|
541
540
|
m(t(ee), {
|
|
542
|
-
render: (y = (d = (
|
|
541
|
+
render: (y = (d = (P = a.cellByColId[t(Q).Name]) == null ? void 0 : P.column) == null ? void 0 : d.columnDef) == null ? void 0 : y.cell,
|
|
543
542
|
props: (i = (w = a.cellByColId[t(Q).Name]) == null ? void 0 : w.getContext) == null ? void 0 : i.call(w)
|
|
544
543
|
}, null, 8, ["render", "props"]),
|
|
545
544
|
r[1] || (r[1] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -561,7 +560,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
561
560
|
label: t(h)(`inventory.transfer.form.items.table.${t(Q).Step}`)
|
|
562
561
|
}, null, 8, ["label"]),
|
|
563
562
|
m(t(ee), {
|
|
564
|
-
render: (
|
|
563
|
+
render: (B = (E = (te = a.cellByColId[t(Q).Step]) == null ? void 0 : te.column) == null ? void 0 : E.columnDef) == null ? void 0 : B.cell,
|
|
565
564
|
props: (l = (Z = a.cellByColId[t(Q).Step]) == null ? void 0 : Z.getContext) == null ? void 0 : l.call(Z)
|
|
566
565
|
}, null, 8, ["render", "props"]),
|
|
567
566
|
r[3] || (r[3] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -573,8 +572,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
573
572
|
label: t(h)(`inventory.transfer.form.items.table.${t(Q).Limit}`)
|
|
574
573
|
}, null, 8, ["label"]),
|
|
575
574
|
m(t(ee), {
|
|
576
|
-
render: (
|
|
577
|
-
props: (
|
|
575
|
+
render: (q = (C = (n = a.cellByColId[t(Q).Limit]) == null ? void 0 : n.column) == null ? void 0 : C.columnDef) == null ? void 0 : q.cell,
|
|
576
|
+
props: (G = (z = a.cellByColId[t(Q).Limit]) == null ? void 0 : z.getContext) == null ? void 0 : G.call(z)
|
|
578
577
|
}, null, 8, ["render", "props"]),
|
|
579
578
|
r[4] || (r[4] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
580
579
|
])
|
|
@@ -638,7 +637,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
638
637
|
},
|
|
639
638
|
emits: ["update:disabled"],
|
|
640
639
|
setup(p, { expose: h, emit: v }) {
|
|
641
|
-
const a = p, r = v, s = We(), { t: u } = me(), x = Y({}), F = Ze(), c =
|
|
640
|
+
const a = p, r = v, s = We(), { t: u } = me(), x = Y({}), F = Ze(), c = Ke(), o = Rt(), f = ge(), b = Ge(), k = et();
|
|
642
641
|
Ce(
|
|
643
642
|
() => s.purchaseOrder.items.length,
|
|
644
643
|
() => {
|
|
@@ -647,7 +646,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
647
646
|
), F.watchLocation(async () => {
|
|
648
647
|
location && (s.purchaseOrder.supplier || (s.purchaseOrder.supplier = o.suppliers.find((l) => l) ?? s.purchaseOrder.supplier));
|
|
649
648
|
});
|
|
650
|
-
const T =
|
|
649
|
+
const T = Vt(
|
|
651
650
|
() => s.purchaseOrder,
|
|
652
651
|
(l) => {
|
|
653
652
|
s.purchaseOrder = {
|
|
@@ -661,11 +660,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
661
660
|
return typeof ((n = (l = s.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : n.internal) == "string" ? X.TRANSFER : X.PURCHASE;
|
|
662
661
|
},
|
|
663
662
|
set(l) {
|
|
664
|
-
var C,
|
|
665
|
-
const n = typeof ((
|
|
663
|
+
var C, q;
|
|
664
|
+
const n = typeof ((q = (C = s.purchaseOrder) == null ? void 0 : C.supplier) == null ? void 0 : q.internal) == "string" ? X.TRANSFER : X.PURCHASE;
|
|
666
665
|
l !== n && (s.purchaseOrder.supplier = l === X.PURCHASE ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
|
|
667
666
|
}
|
|
668
|
-
}),
|
|
667
|
+
}), P = L(() => T.transferLocationOptions.value), d = L({
|
|
669
668
|
get() {
|
|
670
669
|
var l;
|
|
671
670
|
return (l = s.purchaseOrder.supplier) == null ? void 0 : l._id;
|
|
@@ -698,8 +697,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
698
697
|
function O() {
|
|
699
698
|
var l, n;
|
|
700
699
|
return (l = s.locations) != null && l.find((C) => {
|
|
701
|
-
var
|
|
702
|
-
return ((
|
|
700
|
+
var q, z;
|
|
701
|
+
return ((q = C.doc) == null ? void 0 : q._id) === ((z = s.purchaseOrder.supplier) == null ? void 0 : z._id);
|
|
703
702
|
}) ? `Location ${(n = s.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
|
|
704
703
|
}
|
|
705
704
|
const M = L({
|
|
@@ -761,7 +760,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
761
760
|
}
|
|
762
761
|
},
|
|
763
762
|
b.transferTemplateColumnDefs({
|
|
764
|
-
onUpdate: (l, n, C,
|
|
763
|
+
onUpdate: (l, n, C, q) => {
|
|
765
764
|
if (l < 0 || l >= s.purchaseOrder.items.length) return;
|
|
766
765
|
const z = s.purchaseOrder.items[l];
|
|
767
766
|
z && W.value.updateItem({
|
|
@@ -769,11 +768,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
769
768
|
sku: n,
|
|
770
769
|
// Sku might be outdated, so we need to update it
|
|
771
770
|
code: C,
|
|
772
|
-
measurement:
|
|
771
|
+
measurement: q
|
|
773
772
|
});
|
|
774
773
|
}
|
|
775
774
|
})
|
|
776
|
-
), E = L(() => te.columnDefs.value), { promptSelectIngredients:
|
|
775
|
+
), E = L(() => te.columnDefs.value), { promptSelectIngredients: B } = Ut();
|
|
777
776
|
async function Z() {
|
|
778
777
|
const n = c.skus.map((D) => ({
|
|
779
778
|
label: D.name,
|
|
@@ -781,13 +780,13 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
781
780
|
value: D
|
|
782
781
|
})).filter((D) => {
|
|
783
782
|
var A;
|
|
784
|
-
return (A = s.purchaseOrder.items) == null ? void 0 : A.find((
|
|
785
|
-
}).map((D) => D.value), C = s.purchaseOrder.items ?? [],
|
|
783
|
+
return (A = s.purchaseOrder.items) == null ? void 0 : A.find((K) => K.sku._id === D.value._id);
|
|
784
|
+
}).map((D) => D.value), C = s.purchaseOrder.items ?? [], q = await B(
|
|
786
785
|
n.map((D) => D._id),
|
|
787
786
|
(D) => {
|
|
788
|
-
const A = c.skuById[D],
|
|
789
|
-
if (
|
|
790
|
-
return
|
|
787
|
+
const A = c.skuById[D], K = C.find((H) => H.sku._id === A._id);
|
|
788
|
+
if (K)
|
|
789
|
+
return K;
|
|
791
790
|
const J = { amount: 1, precision: be(A.unit) };
|
|
792
791
|
let S = {
|
|
793
792
|
id: f.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
|
|
@@ -815,28 +814,28 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
815
814
|
), S;
|
|
816
815
|
}
|
|
817
816
|
);
|
|
818
|
-
if (!
|
|
819
|
-
const z =
|
|
817
|
+
if (!q) return;
|
|
818
|
+
const z = q.map((D) => D.sku._id), G = [];
|
|
820
819
|
for (const D of z) {
|
|
821
|
-
const A = C.filter((
|
|
820
|
+
const A = C.filter((K) => K.sku._id === D);
|
|
822
821
|
if (A.length > 0)
|
|
823
|
-
|
|
822
|
+
G.push(...A);
|
|
824
823
|
else {
|
|
825
|
-
const
|
|
826
|
-
|
|
824
|
+
const K = q.find((J) => J.sku._id === D);
|
|
825
|
+
K && G.push(K);
|
|
827
826
|
}
|
|
828
827
|
}
|
|
829
|
-
|
|
828
|
+
G.sort((D, A) => D.sku.code.localeCompare(A.sku.code)), s.purchaseOrder.items = G;
|
|
830
829
|
}
|
|
831
830
|
return (l, n) => {
|
|
832
|
-
const C = V("FmTextField"),
|
|
833
|
-
return $(), le(
|
|
831
|
+
const C = V("FmTextField"), q = V("FmSelect"), z = V("FmTextarea"), G = V("FmButton"), D = V("FmTable"), A = V("FmFormGroup"), K = V("FmForm");
|
|
832
|
+
return $(), le(K, {
|
|
834
833
|
ref_key: "formRef",
|
|
835
834
|
ref: _,
|
|
836
835
|
class: "flex flex-col gap-32",
|
|
837
836
|
disabled: l.disabled
|
|
838
837
|
}, {
|
|
839
|
-
default:
|
|
838
|
+
default: U(() => {
|
|
840
839
|
var J;
|
|
841
840
|
return [
|
|
842
841
|
e("div", co, [
|
|
@@ -848,7 +847,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
848
847
|
"onUpdate:modelValue": n[0] || (n[0] = (S) => t(s).name = S),
|
|
849
848
|
rules: [t(ke)()]
|
|
850
849
|
}, null, 8, ["label", "modelValue", "rules"]),
|
|
851
|
-
m(
|
|
850
|
+
m(q, {
|
|
852
851
|
label: t(u)("inventory.transfer.form.type.title"),
|
|
853
852
|
"model-value": R.value,
|
|
854
853
|
"onUpdate:modelValue": n[1] || (n[1] = (S) => R.value = S),
|
|
@@ -866,9 +865,9 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
866
865
|
sublabel: t(T).locationOptionsTypeTransfer.value.length ? void 0 : t(u)("inventory.transfer.form.noLocationAvailable")
|
|
867
866
|
}
|
|
868
867
|
],
|
|
869
|
-
rules: [t(we)(1)(
|
|
868
|
+
rules: [t(we)(1)(P.value)]
|
|
870
869
|
}, {
|
|
871
|
-
default:
|
|
870
|
+
default: U(() => [
|
|
872
871
|
e("span", {
|
|
873
872
|
class: re([
|
|
874
873
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
@@ -878,22 +877,22 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
878
877
|
]),
|
|
879
878
|
_: 1
|
|
880
879
|
}, 8, ["label", "model-value", "items", "rules"]),
|
|
881
|
-
m(
|
|
880
|
+
m(q, {
|
|
882
881
|
label: R.value === t(X).PURCHASE ? t(u)("inventory.transfer.form.purchaseFrom") : t(u)("inventory.transfer.form.transferFrom"),
|
|
883
882
|
modelValue: d.value,
|
|
884
883
|
"onUpdate:modelValue": n[2] || (n[2] = (S) => d.value = S),
|
|
885
|
-
items:
|
|
884
|
+
items: P.value
|
|
886
885
|
}, {
|
|
887
|
-
"menu-wrapper":
|
|
886
|
+
"menu-wrapper": U((S) => {
|
|
888
887
|
var H;
|
|
889
888
|
return [
|
|
890
|
-
m(
|
|
891
|
-
items:
|
|
889
|
+
m(At, Qe(S, {
|
|
890
|
+
items: P.value,
|
|
892
891
|
"model-value": (H = l.modelValue.purchaseOrder.supplier) == null ? void 0 : H._id
|
|
893
892
|
}), null, 16, ["items", "model-value"])
|
|
894
893
|
];
|
|
895
894
|
}),
|
|
896
|
-
default:
|
|
895
|
+
default: U(() => {
|
|
897
896
|
var S;
|
|
898
897
|
return [
|
|
899
898
|
e("span", {
|
|
@@ -901,7 +900,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
901
900
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
902
901
|
l.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
903
902
|
])
|
|
904
|
-
}, I((S =
|
|
903
|
+
}, I((S = P.value.find((H) => H.value === d.value)) == null ? void 0 : S.label), 3)
|
|
905
904
|
];
|
|
906
905
|
}),
|
|
907
906
|
_: 1
|
|
@@ -925,7 +924,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
925
924
|
e("div", yo, [
|
|
926
925
|
e("div", vo, [
|
|
927
926
|
n[8] || (n[8] = e("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
|
|
928
|
-
m(
|
|
927
|
+
m(G, {
|
|
929
928
|
disabled: l.disabled,
|
|
930
929
|
label: "Select location",
|
|
931
930
|
"prepend-icon": "add",
|
|
@@ -954,7 +953,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
954
953
|
e("div", go, [
|
|
955
954
|
e("div", ho, [
|
|
956
955
|
e("div", xo, I(t(u)("inventory.transfer.form.items.title")), 1),
|
|
957
|
-
t(b).isEnabled ? ($(), le(
|
|
956
|
+
t(b).isEnabled ? ($(), le(G, {
|
|
958
957
|
key: 0,
|
|
959
958
|
label: "Check NetSuite",
|
|
960
959
|
"prepend-icon": "troubleshoot",
|
|
@@ -962,7 +961,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
962
961
|
onClick: y,
|
|
963
962
|
size: "md"
|
|
964
963
|
})) : oe("", !0),
|
|
965
|
-
m(
|
|
964
|
+
m(G, {
|
|
966
965
|
disabled: l.disabled,
|
|
967
966
|
label: t(u)("inventory.transfer.form.items.addItem"),
|
|
968
967
|
"prepend-icon": "add",
|
|
@@ -998,7 +997,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
998
997
|
"hide-footer": "",
|
|
999
998
|
"page-size": t(s).purchaseOrder.items.length
|
|
1000
999
|
}, {
|
|
1001
|
-
"table-row":
|
|
1000
|
+
"table-row": U((S) => [
|
|
1002
1001
|
m(po, {
|
|
1003
1002
|
row: S,
|
|
1004
1003
|
errorMessage: x.value[S.index],
|
|
@@ -1006,12 +1005,12 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1006
1005
|
disabled: l.disabled
|
|
1007
1006
|
}, null, 8, ["row", "errorMessage", "disabled"])
|
|
1008
1007
|
]),
|
|
1009
|
-
"list-row":
|
|
1008
|
+
"list-row": U((S) => [
|
|
1010
1009
|
($(), le(Je, {
|
|
1011
1010
|
row: S,
|
|
1012
1011
|
key: t(s).purchaseOrder.items.map((H) => H.sku._id).join(".")
|
|
1013
1012
|
}, {
|
|
1014
|
-
default:
|
|
1013
|
+
default: U((H) => [
|
|
1015
1014
|
m(ro, {
|
|
1016
1015
|
row: S,
|
|
1017
1016
|
"cell-by-col-id": H,
|
|
@@ -1062,10 +1061,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1062
1061
|
"onUpdate:modelValue": x[2] || (x[2] = (o) => r.value = o),
|
|
1063
1062
|
overlay: !0
|
|
1064
1063
|
}, {
|
|
1065
|
-
"dialog-header":
|
|
1064
|
+
"dialog-header": U(() => [
|
|
1066
1065
|
e("div", null, I(v.confirmTitle || "Confirm"), 1)
|
|
1067
1066
|
]),
|
|
1068
|
-
"dialog-footer":
|
|
1067
|
+
"dialog-footer": U(() => [
|
|
1069
1068
|
e("div", Co, [
|
|
1070
1069
|
m(F, {
|
|
1071
1070
|
label: "Cancel",
|
|
@@ -1080,7 +1079,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1080
1079
|
})
|
|
1081
1080
|
])
|
|
1082
1081
|
]),
|
|
1083
|
-
default:
|
|
1082
|
+
default: U(() => [
|
|
1084
1083
|
xe(u.$slots, "dialog-content", {}, () => [
|
|
1085
1084
|
ne(I(v.confirmMessage || "Are you sure you want to proceed?"), 1)
|
|
1086
1085
|
])
|
|
@@ -1092,7 +1091,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1092
1091
|
}
|
|
1093
1092
|
}), So = { class: "flex items-center" }, Io = { class: "fm-typo-en-title-md-800" }, Mo = { class: "flex gap-4" }, $o = /* @__PURE__ */ ae({
|
|
1094
1093
|
__name: "TransferTemplateDialog",
|
|
1095
|
-
props: /* @__PURE__ */
|
|
1094
|
+
props: /* @__PURE__ */ qe({
|
|
1096
1095
|
mode: {},
|
|
1097
1096
|
modelValue: {},
|
|
1098
1097
|
show: { type: Boolean }
|
|
@@ -1100,10 +1099,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1100
1099
|
disabled: { type: Boolean },
|
|
1101
1100
|
disabledModifiers: {}
|
|
1102
1101
|
}),
|
|
1103
|
-
emits: /* @__PURE__ */
|
|
1102
|
+
emits: /* @__PURE__ */ qe(["update:show", "submitted"], ["update:disabled"]),
|
|
1104
1103
|
setup(p, { expose: h, emit: v }) {
|
|
1105
1104
|
var w;
|
|
1106
|
-
const a = p, r = v, s =
|
|
1105
|
+
const a = p, r = v, s = _t(), u = Ct(), { t: x } = me(), F = Xe(a, "show");
|
|
1107
1106
|
function c() {
|
|
1108
1107
|
return {
|
|
1109
1108
|
_id: "",
|
|
@@ -1191,7 +1190,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1191
1190
|
}
|
|
1192
1191
|
}
|
|
1193
1192
|
}
|
|
1194
|
-
async function
|
|
1193
|
+
async function P() {
|
|
1195
1194
|
var g, O;
|
|
1196
1195
|
const i = o.value;
|
|
1197
1196
|
if (i) {
|
|
@@ -1220,7 +1219,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1220
1219
|
case ue.CREATE:
|
|
1221
1220
|
return R();
|
|
1222
1221
|
case ue.UPDATE:
|
|
1223
|
-
return
|
|
1222
|
+
return P();
|
|
1224
1223
|
}
|
|
1225
1224
|
}
|
|
1226
1225
|
function y() {
|
|
@@ -1236,12 +1235,12 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1236
1235
|
"close-button": "",
|
|
1237
1236
|
"max-width": 1600
|
|
1238
1237
|
}, {
|
|
1239
|
-
"side-sheet-header":
|
|
1238
|
+
"side-sheet-header": U(() => [
|
|
1240
1239
|
e("div", So, [
|
|
1241
1240
|
e("div", Io, I(k.value), 1)
|
|
1242
1241
|
])
|
|
1243
1242
|
]),
|
|
1244
|
-
default:
|
|
1243
|
+
default: U(() => [
|
|
1245
1244
|
($(), le(To, {
|
|
1246
1245
|
class: "w-full",
|
|
1247
1246
|
ref_key: "formRef",
|
|
@@ -1254,7 +1253,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1254
1253
|
key: f.value
|
|
1255
1254
|
}, null, 8, ["model-value", "disabled"]))
|
|
1256
1255
|
]),
|
|
1257
|
-
"side-sheet-footer":
|
|
1256
|
+
"side-sheet-footer": U(() => [
|
|
1258
1257
|
e("div", Mo, [
|
|
1259
1258
|
m(Fo, {
|
|
1260
1259
|
loading: b.value,
|
|
@@ -1262,7 +1261,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1262
1261
|
"confirm-title": `Save ${a.mode === t(ue).CREATE ? "Template" : "Changes"}`,
|
|
1263
1262
|
onConfirm: y
|
|
1264
1263
|
}, {
|
|
1265
|
-
"dialog-content":
|
|
1264
|
+
"dialog-content": U(() => g[4] || (g[4] = [
|
|
1266
1265
|
e("div", { class: "fm-typo-en-body-md-400 bg-fm-color-primary-oats p-8 rounded" }, [
|
|
1267
1266
|
ne(" Warning: This action "),
|
|
1268
1267
|
e("span", { class: "text-fm-color-system-error-300" }, "will not"),
|
|
@@ -1283,7 +1282,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1283
1282
|
}, 8, ["modelValue"]);
|
|
1284
1283
|
};
|
|
1285
1284
|
}
|
|
1286
|
-
}), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Do = { class: "flex justify-between" }, Vo = { class: "fm-typo-en-body-lg-600" }, Ao = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ro = { class: "flex flex-col gap-8" },
|
|
1285
|
+
}), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Do = { class: "flex justify-between" }, Vo = { class: "fm-typo-en-body-lg-600" }, Ao = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ro = { class: "flex flex-col gap-8" }, Uo = { class: "flex flex-col gap-4" }, Po = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bo = { class: "flex gap-1" }, qo = { class: "fm-typo-en-body-lg-600" }, No = {
|
|
1287
1286
|
key: 0,
|
|
1288
1287
|
class: "flex flex-col gap-4"
|
|
1289
1288
|
}, Lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Eo = { class: "flex gap-1" }, zo = { class: "fm-typo-en-body-lg-600" }, Ho = {
|
|
@@ -1292,7 +1291,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1292
1291
|
}, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qo = { class: "fm-typo-en-body-lg-600" }, Yo = {
|
|
1293
1292
|
key: 2,
|
|
1294
1293
|
class: "flex flex-col gap-4"
|
|
1295
|
-
}, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1294
|
+
}, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Go = { class: "fm-typo-en-body-lg-600" }, Ko = {
|
|
1296
1295
|
key: 3,
|
|
1297
1296
|
class: "flex flex-col gap-4"
|
|
1298
1297
|
}, Zo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Jo = { class: "fm-typo-en-body-lg-600" }, Xo = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, es = { class: "flex flex-col gap-8" }, ts = { class: "fm-typo-en-body-lg-600" }, os = { class: "flex w-full gap-4" }, ss = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, ls = { class: "fm-typo-en-body-lg-600 shrink-0" }, ns = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, as = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, rs = {
|
|
@@ -1323,7 +1322,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1323
1322
|
), o = Y(!0), f = Xe(v, "show");
|
|
1324
1323
|
return (b, k) => {
|
|
1325
1324
|
var g;
|
|
1326
|
-
const T = V("FmMenuDivider"), R = V("FmCard"),
|
|
1325
|
+
const T = V("FmMenuDivider"), R = V("FmCard"), P = V("FmIcon"), d = V("FmTextField"), y = V("FmTable"), w = V("FmButton"), i = V("FmSideSheet");
|
|
1327
1326
|
return $(), le(i, {
|
|
1328
1327
|
header: t(s)("inventory.transfer.template.details.view", { template: (g = b.template) == null ? void 0 : g.name }),
|
|
1329
1328
|
modelValue: t(f),
|
|
@@ -1332,7 +1331,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1332
1331
|
"close-button": "",
|
|
1333
1332
|
"max-width": 1200
|
|
1334
1333
|
}, {
|
|
1335
|
-
default:
|
|
1334
|
+
default: U(() => {
|
|
1336
1335
|
var O, M;
|
|
1337
1336
|
return [
|
|
1338
1337
|
e("div", Oo, [
|
|
@@ -1341,8 +1340,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1341
1340
|
variant: "outlined",
|
|
1342
1341
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1343
1342
|
}, {
|
|
1344
|
-
default:
|
|
1345
|
-
var _, W, te, E,
|
|
1343
|
+
default: U(() => {
|
|
1344
|
+
var _, W, te, E, B, Z, l, n, C;
|
|
1346
1345
|
return [
|
|
1347
1346
|
e("div", Do, [
|
|
1348
1347
|
e("div", Vo, I(t(s)("inventory.transfer.template.details.templateSummary")), 1),
|
|
@@ -1352,11 +1351,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1352
1351
|
]),
|
|
1353
1352
|
m(T),
|
|
1354
1353
|
e("div", Ro, [
|
|
1355
|
-
e("div",
|
|
1356
|
-
e("div",
|
|
1357
|
-
e("div",
|
|
1354
|
+
e("div", Uo, [
|
|
1355
|
+
e("div", Po, [
|
|
1356
|
+
e("div", Bo, I(t(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1358
1357
|
]),
|
|
1359
|
-
e("div",
|
|
1358
|
+
e("div", qo, I(t(yt)(((_ = b.template) == null ? void 0 : _._id) ?? "")), 1)
|
|
1360
1359
|
]),
|
|
1361
1360
|
(W = b.template) != null && W.updatedAt ? ($(), N("div", No, [
|
|
1362
1361
|
e("div", Lo, [
|
|
@@ -1369,15 +1368,15 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1369
1368
|
], 64)) : oe("", !0)
|
|
1370
1369
|
])
|
|
1371
1370
|
])) : oe("", !0),
|
|
1372
|
-
(
|
|
1371
|
+
(B = (E = u.value) == null ? void 0 : E.supplier) != null && B.name ? ($(), N("div", Ho, [
|
|
1373
1372
|
e("div", jo, I(t(s)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1374
1373
|
e("div", Qo, I((l = (Z = u.value) == null ? void 0 : Z.supplier) == null ? void 0 : l.name), 1)
|
|
1375
1374
|
])) : oe("", !0),
|
|
1376
1375
|
(n = u.value) != null && n.ref ? ($(), N("div", Yo, [
|
|
1377
1376
|
e("div", Wo, I(t(s)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1378
|
-
e("div",
|
|
1377
|
+
e("div", Go, I(u.value.ref), 1)
|
|
1379
1378
|
])) : oe("", !0),
|
|
1380
|
-
(C = u.value) != null && C.remark ? ($(), N("div",
|
|
1379
|
+
(C = u.value) != null && C.remark ? ($(), N("div", Ko, [
|
|
1381
1380
|
e("div", Zo, I(t(s)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1382
1381
|
e("div", Jo, I(u.value.remark), 1)
|
|
1383
1382
|
])) : oe("", !0)
|
|
@@ -1397,14 +1396,14 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1397
1396
|
e("div", os, [
|
|
1398
1397
|
e("div", ss, I(_.name), 1),
|
|
1399
1398
|
k[3] || (k[3] = e("div", { class: "flex-1 min-w-32" }, null, -1)),
|
|
1400
|
-
e("div", ls, I(t(
|
|
1399
|
+
e("div", ls, I(t(kt)(_.quantity, _.sku.unit, _.measurement)), 1)
|
|
1401
1400
|
]),
|
|
1402
1401
|
e("div", ns, [
|
|
1403
1402
|
e("div", as, I(_.code), 1),
|
|
1404
1403
|
_.totalCost && t(r).enableTotalCost ? ($(), N("div", rs, " (" + I(t(bt)(_.totalCost)) + ") ", 1)) : oe("", !0)
|
|
1405
1404
|
]),
|
|
1406
|
-
t(
|
|
1407
|
-
m(
|
|
1405
|
+
t(wt)(_) ? ($(), N("div", is, [
|
|
1406
|
+
m(P, {
|
|
1408
1407
|
name: "error",
|
|
1409
1408
|
color: "system-error-300",
|
|
1410
1409
|
size: "sm"
|
|
@@ -1440,7 +1439,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1440
1439
|
])
|
|
1441
1440
|
];
|
|
1442
1441
|
}),
|
|
1443
|
-
"side-sheet-footer":
|
|
1442
|
+
"side-sheet-footer": U(() => [
|
|
1444
1443
|
e("div", ms, [
|
|
1445
1444
|
m(w, {
|
|
1446
1445
|
label: t(s)("common.edit"),
|
|
@@ -1453,14 +1452,14 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1453
1452
|
}, 8, ["header", "modelValue", "dismiss-away"]);
|
|
1454
1453
|
};
|
|
1455
1454
|
}
|
|
1456
|
-
}), cs = { class: "flex-1 flex flex-col gap-8" }, fs = { class: "flex flex-col" }, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, bs = { class: "fm-typo-en-body-lg-400" }, gs = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, hs = { class: "fm-typo-en-body-lg-400 line-clamp-2" },
|
|
1455
|
+
}), cs = { class: "flex-1 flex flex-col gap-8" }, fs = { class: "flex flex-col" }, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, bs = { class: "fm-typo-en-body-lg-400" }, gs = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, hs = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, $s = /* @__PURE__ */ ae({
|
|
1457
1456
|
__name: "TransferTemplateView",
|
|
1458
1457
|
setup(p) {
|
|
1459
|
-
const { t: h } = me(), { createTemplate: v, viewTemplate: a, importTemplates: r, exportTemplates: s } = ze(), { templateDialogProps: u, templateDetailsProps: x } = He(ze()), F =
|
|
1458
|
+
const { t: h } = me(), { createTemplate: v, viewTemplate: a, importTemplates: r, exportTemplates: s } = ze(), { templateDialogProps: u, templateDetailsProps: x } = He(ze()), F = Tt(), { loading: c, templates: o } = He(F), f = Y(!1), b = gt(), k = Ze(), { breakpoints: T } = Ft();
|
|
1460
1459
|
Te(F.fetchTemplates);
|
|
1461
1460
|
const R = L(
|
|
1462
1461
|
() => f.value || c.value || !k._currentLocation
|
|
1463
|
-
),
|
|
1462
|
+
), P = L(() => o.value), d = Y(""), y = L(() => T.value.xs || T.value.sm), w = L(() => y.value ? 10 : 20);
|
|
1464
1463
|
function i(M) {
|
|
1465
1464
|
switch (M) {
|
|
1466
1465
|
case Ee.Add:
|
|
@@ -1507,7 +1506,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1507
1506
|
actions: O.value,
|
|
1508
1507
|
"onClick:action": i
|
|
1509
1508
|
}, {
|
|
1510
|
-
default:
|
|
1509
|
+
default: U(() => {
|
|
1511
1510
|
var te;
|
|
1512
1511
|
return [
|
|
1513
1512
|
e("div", {
|
|
@@ -1527,54 +1526,54 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1527
1526
|
($(), le(W, {
|
|
1528
1527
|
style: _e(t(b).tableHeight),
|
|
1529
1528
|
"column-defs": t(F).columnDefs,
|
|
1530
|
-
"row-data":
|
|
1529
|
+
"row-data": P.value,
|
|
1531
1530
|
"search-value": d.value,
|
|
1532
1531
|
loading: R.value,
|
|
1533
1532
|
key: (te = t(k)._currentLocation) == null ? void 0 : te.dbName,
|
|
1534
1533
|
onRowClick: _[1] || (_[1] = (E) => t(a)(E.original)),
|
|
1535
1534
|
"page-size": w.value
|
|
1536
1535
|
}, {
|
|
1537
|
-
"list-row":
|
|
1536
|
+
"list-row": U((E) => [
|
|
1538
1537
|
m(Je, {
|
|
1539
1538
|
row: E,
|
|
1540
|
-
onRowClick: (
|
|
1539
|
+
onRowClick: (B) => t(a)(B)
|
|
1541
1540
|
}, {
|
|
1542
|
-
default:
|
|
1543
|
-
var Z, l, n, C,
|
|
1541
|
+
default: U((B) => {
|
|
1542
|
+
var Z, l, n, C, q, z, G, D, A, K, J, S, H, ie, Fe, Se, Ie, Me, $e, Oe, ce, De, Ve, Ae, Re, fe, Ue;
|
|
1544
1543
|
return [
|
|
1545
1544
|
e("div", cs, [
|
|
1546
1545
|
e("div", fs, [
|
|
1547
1546
|
e("div", ys, [
|
|
1548
1547
|
m(t(ee), {
|
|
1549
|
-
render: (n = (l = (Z =
|
|
1550
|
-
props: (
|
|
1548
|
+
render: (n = (l = (Z = B._id) == null ? void 0 : Z.column) == null ? void 0 : l.columnDef) == null ? void 0 : n.cell,
|
|
1549
|
+
props: (q = (C = B._id) == null ? void 0 : C.getContext) == null ? void 0 : q.call(C)
|
|
1551
1550
|
}, null, 8, ["render", "props"])
|
|
1552
1551
|
]),
|
|
1553
1552
|
e("div", vs, [
|
|
1554
1553
|
m(t(ee), {
|
|
1555
|
-
render: (D = (
|
|
1556
|
-
props: (
|
|
1554
|
+
render: (D = (G = (z = B.name) == null ? void 0 : z.column) == null ? void 0 : G.columnDef) == null ? void 0 : D.cell,
|
|
1555
|
+
props: (K = (A = B.name) == null ? void 0 : A.getContext) == null ? void 0 : K.call(A)
|
|
1557
1556
|
}, null, 8, ["render", "props"])
|
|
1558
1557
|
]),
|
|
1559
1558
|
e("div", bs, [
|
|
1560
1559
|
m(t(ee), {
|
|
1561
|
-
render: (H = (S = (J =
|
|
1562
|
-
props: (Fe = (ie =
|
|
1560
|
+
render: (H = (S = (J = B.supplier) == null ? void 0 : J.column) == null ? void 0 : S.columnDef) == null ? void 0 : H.cell,
|
|
1561
|
+
props: (Fe = (ie = B.supplier) == null ? void 0 : ie.getContext) == null ? void 0 : Fe.call(ie)
|
|
1563
1562
|
}, null, 8, ["render", "props"])
|
|
1564
1563
|
]),
|
|
1565
1564
|
e("div", null, I((Se = E.original.locations) != null && Se.length ? `Enabled for ${(Ie = E.original.locations) == null ? void 0 : Ie.length} outlets` : "Enabled for all outlets"), 1),
|
|
1566
1565
|
e("div", gs, I(E.original.purchaseOrder.items.length ? E.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
|
|
1567
1566
|
e("div", hs, [
|
|
1568
1567
|
m(t(ee), {
|
|
1569
|
-
render: (Oe = ($e = (Me =
|
|
1570
|
-
props: (De = (ce =
|
|
1568
|
+
render: (Oe = ($e = (Me = B.ref) == null ? void 0 : Me.column) == null ? void 0 : $e.columnDef) == null ? void 0 : Oe.cell,
|
|
1569
|
+
props: (De = (ce = B.ref) == null ? void 0 : ce.getContext) == null ? void 0 : De.call(ce)
|
|
1571
1570
|
}, null, 8, ["render", "props"])
|
|
1572
1571
|
])
|
|
1573
1572
|
]),
|
|
1574
1573
|
e("div", null, [
|
|
1575
1574
|
m(t(ee), {
|
|
1576
|
-
render: (Re = (Ae = (Ve =
|
|
1577
|
-
props: (
|
|
1575
|
+
render: (Re = (Ae = (Ve = B.type) == null ? void 0 : Ve.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : Re.cell,
|
|
1576
|
+
props: (Ue = (fe = B.type) == null ? void 0 : fe.getContext) == null ? void 0 : Ue.call(fe)
|
|
1578
1577
|
}, null, 8, ["render", "props"])
|
|
1579
1578
|
])
|
|
1580
1579
|
])
|
|
@@ -1601,5 +1600,5 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1601
1600
|
}
|
|
1602
1601
|
});
|
|
1603
1602
|
export {
|
|
1604
|
-
|
|
1603
|
+
$s as default
|
|
1605
1604
|
};
|