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