@feedmepos/mf-inventory-portal 0.0.23-dev.9 → 0.0.24-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-D3sNH2MR.js +276 -0
- package/dist/{ApprovalView-e85YmdZN.js → ApprovalView-DHnRx0hJ.js} +17 -20
- package/dist/{BindingsDialog-giBUD0IH.js → BindingsDialog-oTeg2Dai.js} +6 -6
- package/dist/{BindingsPicker-CC4MmPbF.js → BindingsPicker-CWdjmMJ3.js} +8 -9
- package/dist/{BindingsTable-WphZdzrA.js → BindingsTable-bKLR1OKX.js} +18 -22
- package/dist/ClosingDraftView-CIQVz7lY.js +1225 -0
- package/dist/{ClosingTemplateView-1lzoDyet.js → ClosingTemplateView-D5pLzQwU.js} +259 -274
- package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-ClLDcchC.js +142 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cv-vvzr5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B_c6Vn6P.js} +23 -24
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DIFQcrc0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DhpHOaRH.js} +50 -51
- package/dist/{IngredientGroupView-UegBM_JK.js → IngredientGroupView-4C437mso.js} +63 -70
- package/dist/IngredientsView-DoiGgjre.js +1706 -0
- package/dist/{IntegrationView-FYNNzKia.js → IntegrationView-8ZKE7MAM.js} +123 -126
- package/dist/{InventoryBindingForm-DsHv_IHG.js → InventoryBindingForm-CcnfliYQ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BURSXafS.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B_J-6C9x.js} +116 -108
- package/dist/{InventoryBindingSummary-BLb4MRPZ.js → InventoryBindingSummary-CRdHCzNE.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BG78-DHs.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B2-TypU0.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CqID5_7v.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BuQde75S.js} +20 -21
- package/dist/PublishView-t5gjGmK_.js +192 -0
- package/dist/{PurchaseOrderPrintPreview-BBMU3teq.js → PurchaseOrderPrintPreview-6i53Y-v1.js} +13 -14
- package/dist/ReceiveRequestView-uOeSh0Mr.js +1866 -0
- package/dist/RecipeView-BTWywckD.js +609 -0
- package/dist/StockView-DN2xk8ei.js +1817 -0
- package/dist/{SupplierView-B2aObtwK.js → SupplierView-l0XUg3J4.js} +185 -196
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CWMn6fFf.js +1327 -0
- package/dist/TransferTemplateView-wDKXpCWZ.js +1263 -0
- package/dist/UnitView-CUI-k-tS.js +648 -0
- package/dist/{WarehouseView-G8pej6Y2.js → WarehouseView-WsI_eG5r.js} +190 -197
- package/dist/api/adjustment-template.d.ts +25 -0
- package/dist/api/bill.d.ts +240 -84
- package/dist/api/inventory.d.ts +19 -6
- package/dist/api/netsuite.d.ts +3 -3
- package/dist/app-DntcWR3_.js +85558 -0
- package/dist/app.d.ts +85 -0
- package/dist/app.js +2 -2
- package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
- package/dist/components/FmLockableField.vue.d.ts +37 -0
- package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
- package/dist/composable/defineDeepModel.d.ts +1 -1
- package/dist/{decimal-DC07xoJW.js → decimal-DTCTnMwO.js} +1 -1
- package/dist/format-unit-display-Hy48Iw5j.js +1215 -0
- package/dist/index-Bv9RYyTZ.js +29202 -0
- package/dist/{StockView-C5btudss.js → index-D4yJP9I2.js} +2220 -3863
- package/dist/layout/SingleColumnLayout.vue.d.ts +1 -0
- package/dist/router/name.d.ts +2 -0
- package/dist/stock-BsdmfT-b.js +125 -0
- package/dist/stores/feature.d.ts +41 -1
- package/dist/stores/integration/netsuite.d.ts +3 -2
- package/dist/stores/inventory.d.ts +20 -8
- package/dist/stores/location.d.ts +29 -1
- package/dist/stores/supplier.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/supplier-CXhkgC4M.js +77 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-B0G2XYSw.js → use-inventory-binding-dialog-DPMJmBCr.js} +10 -11
- package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
- package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
- package/dist/views/adjustment-template/import/export.d.ts +60 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +1377 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
- package/dist/views/adjustment-template/wastage-template/props.d.ts +36 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1351 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +198 -12
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +7 -4
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1559 -467
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
- package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +72 -12
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +73 -13
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
- package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
- package/dist/views/publish/PublishView.vue.d.ts +2 -0
- package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +12 -0
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +13 -0
- package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +12 -0
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +13 -0
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +86 -17
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +126 -24
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +126 -24
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +4 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +72 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +72 -12
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +2 -1
- package/dist/vue-i18n-ByVzHsI7.js +2365 -0
- package/package.json +5 -4
- package/dist/App-ByLgARNp.js +0 -259
- package/dist/ClosingDraftView-CQM1Sx45.js +0 -755
- package/dist/FmDroppableField-8RzKjEdL.js +0 -154
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BvkN-71q.js +0 -436
- package/dist/FmMultiselectDialog-DScMA6iG.js +0 -415
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-t4pim_k9.js +0 -51
- package/dist/IngredientsView-BfW-jZLM.js +0 -1666
- package/dist/ReceiveRequestView-vbANEzne.js +0 -4165
- package/dist/RecipeView-DW4DY0C0.js +0 -598
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-B2LOvVef.js +0 -1229
- package/dist/TransferTemplateView-BKumN_p6.js +0 -1262
- package/dist/UnitView-CHLucv9s.js +0 -648
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-BXjk74IB.js +0 -33538
- package/dist/date2-CWAt9bRf.js +0 -117
- package/dist/dayjs.min-D3jPOnu6.js +0 -282
- package/dist/defineDeepModel-CiD4GtOw.js +0 -13
- package/dist/feature-6tcLMotY.js +0 -92
- package/dist/form-mode.enum-BKiNVH6A.js +0 -4
- package/dist/format-time-from-id-CYU5Z9Mt.js +0 -15
- package/dist/format-unit-display-CY-0bznr.js +0 -1217
- package/dist/fuzzy-BMkhNYLR.js +0 -41
- package/dist/index-BXwQa14X.js +0 -45
- package/dist/index-CRLd5xyg.js +0 -22283
- package/dist/index-DqwAtOgI.js +0 -12087
- package/dist/netsuite-fYUUk_ss.js +0 -225
- package/dist/row-action.enum-7rGLGZ5v.js +0 -55
- package/dist/rules-BmRGm3yv.js +0 -203
- package/dist/stock-CEX0DP2B.js +0 -111
- package/dist/supplier-CdJmZr7w.js +0 -77
- package/dist/use-template-enabled-locations-2-xbPJWHCs.js +0 -86
- package/dist/xlsx-CTOKp7SQ.js +0 -24004
- package/dist/xlsx.util-D5NFSfDg.js +0 -78
|
@@ -0,0 +1,1866 @@
|
|
|
1
|
+
import { reactive as at, onMounted as Be, h as L, computed as q, defineComponent as pe, openBlock as S, createElementBlock as M, Fragment as ke, renderList as Ue, createElementVNode as o, toDisplayString as U, unref as e, resolveComponent as P, createVNode as d, withCtx as D, createCommentVNode as G, ref as N, createBlock as J, watch as ge, normalizeClass as ae, normalizeStyle as ot, createTextVNode as Ee, nextTick as ct, mergeProps as Oe, isRef as Se, Teleport as mt } from "vue";
|
|
2
|
+
import { b as Ne, $ as pt, m as Ge, j as ye, P as ft, a1 as ze, L as vt, ao as yt, A as Re, M as bt, n as lt, c as Ae, a8 as Le, G as ie, ap as _t, a as He, aq as gt, ar as kt, as as ht, H as Ct, u as je, at as xt, a0 as St, V as wt, au as Ft, E as nt, J as Dt, e as De, av as Ve, a2 as Je, z as $t, _ as Tt, B as Pt, O as We } from "./app-DntcWR3_.js";
|
|
3
|
+
import { u as rt, a as It, b as Vt, _ as Rt, g as At } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CWMn6fFf.js";
|
|
4
|
+
import { _ as it, u as qt, i as Mt, e as Ut } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BuQde75S.js";
|
|
5
|
+
import { u as Et } from "./useTabStorage-BkIVScW_.js";
|
|
6
|
+
import { useBreakpoints as Ye, components as ve, FmButtonVariant as Ot, useSnackbar as qe, useDialog as Bt, useProxiedModel as Nt } from "@feedmepos/ui-library";
|
|
7
|
+
import { P as j, u as ut } from "./format-unit-display-Hy48Iw5j.js";
|
|
8
|
+
import { _ as zt, F as Lt, a as Xe, b as Ht } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DhpHOaRH.js";
|
|
9
|
+
import { c as re, u as jt, _ as Yt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B_c6Vn6P.js";
|
|
10
|
+
import { useI18n as he } from "@feedmepos/mf-common";
|
|
11
|
+
import { u as Ke } from "./supplier-CXhkgC4M.js";
|
|
12
|
+
import { _ as Kt } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
13
|
+
import { u as Qt } from "./vue-i18n-ByVzHsI7.js";
|
|
14
|
+
import "./array-hChJVZLE.js";
|
|
15
|
+
var Y = /* @__PURE__ */ ((m) => (m.Code = "Code", m.Name = "Name", m.Amount = "Amount", m.Cost = "Cost", m.TotalCost = "TotalCost", m.Delete = "Delete", m))(Y || {});
|
|
16
|
+
const et = () => {
|
|
17
|
+
const { t: m } = he();
|
|
18
|
+
return L(
|
|
19
|
+
it,
|
|
20
|
+
{
|
|
21
|
+
zIndex: 50,
|
|
22
|
+
class: "whitespace-nowrap"
|
|
23
|
+
},
|
|
24
|
+
m("inventory.transfer.form.items.table.Cost", [lt()])
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
function Zt(m) {
|
|
28
|
+
const { t: y } = he(), n = at({}), { breakpoints: i } = Ye(), b = Ae(), t = Ne();
|
|
29
|
+
Be(() => {
|
|
30
|
+
for (const u of m.items) {
|
|
31
|
+
if (!u.totalCost)
|
|
32
|
+
continue;
|
|
33
|
+
const a = re(u.sku, u.quantity, u.measurement, {
|
|
34
|
+
supplier: m.supplier
|
|
35
|
+
}), l = u.totalCost ?? pt.reset();
|
|
36
|
+
a ? n[u.sku._id] = a.amount !== l.amount || a.precision !== l.precision : n[u.sku._id] = !0;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
function f(u) {
|
|
40
|
+
var l, v, k, h, g, x, F;
|
|
41
|
+
return !!(((v = (l = u.defaultCost) == null ? void 0 : l.costPerUnit) == null ? void 0 : v.amount) ?? ((F = (x = (g = (h = (k = m.supplier) == null ? void 0 : k.supplyItems) == null ? void 0 : h.find((V) => V.skuId === u._id)) == null ? void 0 : g.defaultCost) == null ? void 0 : x.costPerUnit) == null ? void 0 : F.amount));
|
|
42
|
+
}
|
|
43
|
+
const _ = [
|
|
44
|
+
{
|
|
45
|
+
id: "Code",
|
|
46
|
+
header: () => y("inventory.transfer.form.items.table.Code"),
|
|
47
|
+
accessorKey: "code",
|
|
48
|
+
size: 96,
|
|
49
|
+
cell(u) {
|
|
50
|
+
const a = u.row.original;
|
|
51
|
+
return t.isEnabled ? L(
|
|
52
|
+
ve.FmTooltip,
|
|
53
|
+
{
|
|
54
|
+
content: a.code,
|
|
55
|
+
placement: "top",
|
|
56
|
+
variant: "plain",
|
|
57
|
+
zIndex: 50
|
|
58
|
+
},
|
|
59
|
+
L(
|
|
60
|
+
"span",
|
|
61
|
+
{
|
|
62
|
+
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
63
|
+
},
|
|
64
|
+
a.code
|
|
65
|
+
)
|
|
66
|
+
) : L(ve.FmTextField, {
|
|
67
|
+
modelValue: a.code,
|
|
68
|
+
"onUpdate:modelValue": (l) => {
|
|
69
|
+
m.updateItem({
|
|
70
|
+
...a,
|
|
71
|
+
code: l
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
key: a.sku._id,
|
|
75
|
+
rules: [Ge()],
|
|
76
|
+
labelMark: "required"
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
enableSorting: !1
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "Name",
|
|
83
|
+
header: () => y("inventory.transfer.form.items.table.Name"),
|
|
84
|
+
minSize: 300,
|
|
85
|
+
cell(u) {
|
|
86
|
+
const a = u.row.original;
|
|
87
|
+
return t.isEnabled ? L(
|
|
88
|
+
ve.FmTooltip,
|
|
89
|
+
{
|
|
90
|
+
content: a.name,
|
|
91
|
+
placement: "top",
|
|
92
|
+
variant: "plain",
|
|
93
|
+
zIndex: 50
|
|
94
|
+
},
|
|
95
|
+
L(
|
|
96
|
+
"span",
|
|
97
|
+
{
|
|
98
|
+
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
99
|
+
},
|
|
100
|
+
a.name
|
|
101
|
+
)
|
|
102
|
+
) : L(ve.FmTextField, {
|
|
103
|
+
modelValue: a.name,
|
|
104
|
+
"onUpdate:modelValue": (l) => {
|
|
105
|
+
m.updateItem({
|
|
106
|
+
...a,
|
|
107
|
+
name: l
|
|
108
|
+
});
|
|
109
|
+
},
|
|
110
|
+
key: a.sku._id,
|
|
111
|
+
rules: [Ge()],
|
|
112
|
+
labelMark: "required"
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
enableSorting: !1
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "Amount",
|
|
119
|
+
header: () => y("inventory.transfer.form.items.table.Amount"),
|
|
120
|
+
minSize: 200,
|
|
121
|
+
cell(u) {
|
|
122
|
+
var v, k, h;
|
|
123
|
+
const a = u.row.original, l = (h = (k = (v = m.template) == null ? void 0 : v.purchaseOrder) == null ? void 0 : k.items) == null ? void 0 : h.find(
|
|
124
|
+
(g) => g.sku._id === a.sku._id
|
|
125
|
+
);
|
|
126
|
+
return L(zt, {
|
|
127
|
+
style: {
|
|
128
|
+
flex: "1 1 0%"
|
|
129
|
+
},
|
|
130
|
+
modelValue: {
|
|
131
|
+
amount: a.quantity ?? { amount: 1, precision: 0 },
|
|
132
|
+
measurement: a.measurement ?? null
|
|
133
|
+
},
|
|
134
|
+
key: a.sku._id,
|
|
135
|
+
unit: a.sku.unit,
|
|
136
|
+
"onUpdate:modelValue": (g) => {
|
|
137
|
+
const x = {
|
|
138
|
+
...a,
|
|
139
|
+
quantity: g.amount,
|
|
140
|
+
measurement: g.measurement
|
|
141
|
+
};
|
|
142
|
+
b.enableTotalCost && (x.totalCost = re(a.sku, a.quantity, a.measurement, {
|
|
143
|
+
supplier: m.supplier,
|
|
144
|
+
// NOTE: set undefined here if `manualTotalCost[row.sku._id] = false`, so that the function
|
|
145
|
+
// will return the auto calculated default cost instead of the manual total cost
|
|
146
|
+
manualTotalCost: n[a.sku._id] ? x.totalCost : void 0
|
|
147
|
+
})), m.updateItem(x);
|
|
148
|
+
},
|
|
149
|
+
stepper: l == null ? void 0 : l.quantityStep,
|
|
150
|
+
disableUnit: !!l,
|
|
151
|
+
disabled: m.disabled,
|
|
152
|
+
rules: [
|
|
153
|
+
Lt(
|
|
154
|
+
+ye(
|
|
155
|
+
(l == null ? void 0 : l.minimumQuantity) ?? {
|
|
156
|
+
amount: 1,
|
|
157
|
+
precision: ft(a.sku.unit, a.measurement)
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
),
|
|
161
|
+
l != null && l.maximumQuantity ? Xe(
|
|
162
|
+
+ye(l == null ? void 0 : l.maximumQuantity)
|
|
163
|
+
) : Xe(1 / 0),
|
|
164
|
+
...l != null && l.quantityStep ? [Ht(l.quantityStep)] : []
|
|
165
|
+
],
|
|
166
|
+
applyDefaultRules: !0
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
enableSorting: !1
|
|
170
|
+
},
|
|
171
|
+
b.mustUseDefaultCost ? {
|
|
172
|
+
id: "TotalCost",
|
|
173
|
+
header: et,
|
|
174
|
+
size: 180,
|
|
175
|
+
accessorFn: (u) => {
|
|
176
|
+
const a = re(u.sku, u.quantity, u.measurement, {
|
|
177
|
+
supplier: m.supplier
|
|
178
|
+
});
|
|
179
|
+
return ye(a);
|
|
180
|
+
}
|
|
181
|
+
} : {
|
|
182
|
+
id: "Cost",
|
|
183
|
+
header: et,
|
|
184
|
+
size: 180,
|
|
185
|
+
cell(u) {
|
|
186
|
+
const a = u.row.original, l = f(a.sku), v = i.value.xs || i.value.sm;
|
|
187
|
+
return !n[a.sku._id] && l ? L(
|
|
188
|
+
"div",
|
|
189
|
+
{
|
|
190
|
+
class: [
|
|
191
|
+
"flex gap-4 fm-typo-en-body-md-400 items-center",
|
|
192
|
+
m.disabled ? "text-fm-color-typo-disabled" : ""
|
|
193
|
+
],
|
|
194
|
+
key: a.sku._id
|
|
195
|
+
},
|
|
196
|
+
[
|
|
197
|
+
L(ve.FmButton, {
|
|
198
|
+
prependIcon: "edit",
|
|
199
|
+
variant: Ot.Tertiary,
|
|
200
|
+
disabled: m.disabled,
|
|
201
|
+
onClick() {
|
|
202
|
+
m.updateItem({
|
|
203
|
+
...a,
|
|
204
|
+
totalCost: re(a.sku, a.quantity, a.measurement, {
|
|
205
|
+
supplier: m.supplier
|
|
206
|
+
})
|
|
207
|
+
}), n[a.sku._id] = !0;
|
|
208
|
+
}
|
|
209
|
+
}),
|
|
210
|
+
L(
|
|
211
|
+
"div",
|
|
212
|
+
{
|
|
213
|
+
class: "flex flex-col"
|
|
214
|
+
},
|
|
215
|
+
[
|
|
216
|
+
L(
|
|
217
|
+
"span",
|
|
218
|
+
v ? ze(
|
|
219
|
+
re(a.sku, a.quantity, a.measurement, {
|
|
220
|
+
supplier: m.supplier
|
|
221
|
+
})
|
|
222
|
+
) : ye(
|
|
223
|
+
re(a.sku, a.quantity, a.measurement, {
|
|
224
|
+
supplier: m.supplier
|
|
225
|
+
})
|
|
226
|
+
)
|
|
227
|
+
),
|
|
228
|
+
L(
|
|
229
|
+
"span",
|
|
230
|
+
{
|
|
231
|
+
class: [
|
|
232
|
+
"fm-typo-en-body-sm-400",
|
|
233
|
+
m.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-neutral-gray-400"
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
y("inventory.transfer.form.items.autoCalculated")
|
|
237
|
+
)
|
|
238
|
+
]
|
|
239
|
+
)
|
|
240
|
+
]
|
|
241
|
+
) : L(
|
|
242
|
+
ve.FmTextField,
|
|
243
|
+
{
|
|
244
|
+
modelValue: ye(a.totalCost ?? { amount: 0, precision: 0 }),
|
|
245
|
+
key: a.sku._id,
|
|
246
|
+
"onUpdate:modelValue": (k) => {
|
|
247
|
+
m.updateItem({
|
|
248
|
+
...a,
|
|
249
|
+
totalCost: {
|
|
250
|
+
...vt(+k),
|
|
251
|
+
currency: yt()
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
},
|
|
255
|
+
rules: [Re(0), bt(2)]
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
prepend() {
|
|
259
|
+
return v ? L(
|
|
260
|
+
"div",
|
|
261
|
+
{
|
|
262
|
+
class: [
|
|
263
|
+
"text-fm-typo-en-body-lg-400",
|
|
264
|
+
m.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
lt()
|
|
268
|
+
) : null;
|
|
269
|
+
},
|
|
270
|
+
append() {
|
|
271
|
+
return l ? L(ve.FmButton, {
|
|
272
|
+
prependIcon: "close",
|
|
273
|
+
variant: "tertiary",
|
|
274
|
+
disabled: m.disabled,
|
|
275
|
+
onClick() {
|
|
276
|
+
m.updateItem({
|
|
277
|
+
...a,
|
|
278
|
+
// NOTE: different from PO template, if a default cost is reenabled,
|
|
279
|
+
// the total cost will automatically assigned
|
|
280
|
+
totalCost: re(a.sku, a.quantity, a.measurement, {
|
|
281
|
+
supplier: m.supplier
|
|
282
|
+
})
|
|
283
|
+
}), n[a.sku._id] = !1;
|
|
284
|
+
}
|
|
285
|
+
}) : null;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
);
|
|
289
|
+
},
|
|
290
|
+
enableSorting: !1
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
id: "Delete",
|
|
294
|
+
header: "",
|
|
295
|
+
cell(u) {
|
|
296
|
+
const a = u.row.original;
|
|
297
|
+
return L(ve.FmButton, {
|
|
298
|
+
key: a.sku._id,
|
|
299
|
+
class: "delete-button",
|
|
300
|
+
type: "button",
|
|
301
|
+
icon: "delete",
|
|
302
|
+
variant: "tertiary",
|
|
303
|
+
size: "md",
|
|
304
|
+
disabled: m.disabled,
|
|
305
|
+
onClick: () => {
|
|
306
|
+
m.deleteItem(a);
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
},
|
|
310
|
+
enableSorting: !1,
|
|
311
|
+
size: 40,
|
|
312
|
+
meta: {
|
|
313
|
+
cellClass: "",
|
|
314
|
+
headerClass: ""
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
];
|
|
318
|
+
return {
|
|
319
|
+
columnDefs: q(() => b.enableTotalCost && (b.mustUseDefaultCost || m.transferType === j.PURCHASE) ? _ : _.filter(
|
|
320
|
+
(u) => u.id !== "Cost"
|
|
321
|
+
/* Cost */
|
|
322
|
+
))
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
const Gt = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center" }, Jt = { class: "fm-typo-en-body-lg-600 xs:fm-typo-en-body-md-600 mr-auto xs:w-full" }, Wt = { class: "w-[450px] xs:w-full flex" }, Xt = { class: "fm-typo-en-body-md-400 whitespace-nowrap" }, es = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, dt = /* @__PURE__ */ pe({
|
|
326
|
+
__name: "SupplierPriceHistory",
|
|
327
|
+
props: {
|
|
328
|
+
prices: {}
|
|
329
|
+
},
|
|
330
|
+
setup(m) {
|
|
331
|
+
const y = Ke();
|
|
332
|
+
function n(i) {
|
|
333
|
+
return y.suppliers.find((b) => b._id === i);
|
|
334
|
+
}
|
|
335
|
+
return (i, b) => (S(), M("div", Gt, [
|
|
336
|
+
(S(!0), M(ke, null, Ue(Object.keys(i.prices), (t) => {
|
|
337
|
+
var f;
|
|
338
|
+
return S(), M("div", {
|
|
339
|
+
key: t,
|
|
340
|
+
class: "flex items-center gap-12 xs:gap-4 xs:flex-wrap w-full"
|
|
341
|
+
}, [
|
|
342
|
+
o("div", Jt, U((f = n(t)) == null ? void 0 : f.name), 1),
|
|
343
|
+
o("div", Wt, [
|
|
344
|
+
(S(!0), M(ke, null, Ue(i.prices[t].slice(0, 3), (_) => {
|
|
345
|
+
var w;
|
|
346
|
+
return S(), M("div", {
|
|
347
|
+
key: _.date,
|
|
348
|
+
class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
|
|
349
|
+
}, [
|
|
350
|
+
o("div", Xt, [
|
|
351
|
+
o("span", null, U(_.totalCost ? e(ze)(_.totalCost) : "No data"), 1),
|
|
352
|
+
b[0] || (b[0] = o("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
|
|
353
|
+
o("span", null, U(e(ye)(_.totalUnit, !1)), 1),
|
|
354
|
+
o("span", null, U(((w = _.measurement) == null ? void 0 : w.abbrev) ?? _.unit.abbrev), 1)
|
|
355
|
+
]),
|
|
356
|
+
o("div", es, [
|
|
357
|
+
o("span", null, "(#" + U(_.seqNumber) + ")", 1),
|
|
358
|
+
b[1] || (b[1] = o("span", null, U(" "), -1)),
|
|
359
|
+
o("span", null, U(e(Le)(new Date(_.date))), 1)
|
|
360
|
+
])
|
|
361
|
+
]);
|
|
362
|
+
}), 128))
|
|
363
|
+
])
|
|
364
|
+
]);
|
|
365
|
+
}), 128))
|
|
366
|
+
]));
|
|
367
|
+
}
|
|
368
|
+
}), ts = { class: "flex flex-col gap-8 py-16" }, ss = { class: "flex items-center" }, as = { class: "flex-1 flex gap-1 items-center" }, os = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ls = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ns = { class: "flex gap-8 w-full" }, rs = { class: "flex-1 flex flex-col gap-4" }, is = { class: "flex-1 flex flex-col gap-4" }, us = { class: "flex gap-8 w-full" }, ds = { class: "flex-1 flex flex-col gap-4" }, cs = {
|
|
369
|
+
key: 0,
|
|
370
|
+
class: "flex-1 flex flex-col gap-4"
|
|
371
|
+
}, ms = /* @__PURE__ */ pe({
|
|
372
|
+
__name: "TransferItem",
|
|
373
|
+
props: {
|
|
374
|
+
cellByColId: {},
|
|
375
|
+
comparePriceBySku: {},
|
|
376
|
+
showComparePrice: { type: Boolean },
|
|
377
|
+
row: {}
|
|
378
|
+
},
|
|
379
|
+
setup(m) {
|
|
380
|
+
const { t: y } = he();
|
|
381
|
+
return (n, i) => {
|
|
382
|
+
var f, _, w, u, a, l, v, k, h, g, x, F, V, z, ue, T, $, O, R, I, B, K, Q, p, c, H, oe;
|
|
383
|
+
const b = P("FmLabel"), t = P("FmSpacer");
|
|
384
|
+
return S(), M("div", ts, [
|
|
385
|
+
o("div", ss, [
|
|
386
|
+
o("div", as, [
|
|
387
|
+
o("span", os, " (" + U(n.row.original.sku.code) + ") ", 1),
|
|
388
|
+
o("span", ls, U(n.row.original.sku.name), 1)
|
|
389
|
+
]),
|
|
390
|
+
o("div", null, [
|
|
391
|
+
d(e(ie), {
|
|
392
|
+
render: (w = (_ = (f = n.cellByColId.Delete) == null ? void 0 : f.column) == null ? void 0 : _.columnDef) == null ? void 0 : w.cell,
|
|
393
|
+
props: (a = (u = n.cellByColId.Delete) == null ? void 0 : u.getContext) == null ? void 0 : a.call(u)
|
|
394
|
+
}, null, 8, ["render", "props"])
|
|
395
|
+
])
|
|
396
|
+
]),
|
|
397
|
+
o("div", ns, [
|
|
398
|
+
o("div", rs, [
|
|
399
|
+
d(b, {
|
|
400
|
+
label: e(y)(`inventory.transfer.form.items.table.${e(Y).Code}`)
|
|
401
|
+
}, null, 8, ["label"]),
|
|
402
|
+
d(e(ie), {
|
|
403
|
+
render: (k = (v = (l = n.cellByColId[e(Y).Code]) == null ? void 0 : l.column) == null ? void 0 : v.columnDef) == null ? void 0 : k.cell,
|
|
404
|
+
props: (g = (h = n.cellByColId[e(Y).Code]) == null ? void 0 : h.getContext) == null ? void 0 : g.call(h)
|
|
405
|
+
}, null, 8, ["render", "props"]),
|
|
406
|
+
i[0] || (i[0] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
407
|
+
]),
|
|
408
|
+
o("div", is, [
|
|
409
|
+
d(b, {
|
|
410
|
+
label: e(y)(`inventory.transfer.form.items.table.${e(Y).Name}`)
|
|
411
|
+
}, null, 8, ["label"]),
|
|
412
|
+
d(e(ie), {
|
|
413
|
+
render: (V = (F = (x = n.cellByColId[e(Y).Name]) == null ? void 0 : x.column) == null ? void 0 : F.columnDef) == null ? void 0 : V.cell,
|
|
414
|
+
props: (ue = (z = n.cellByColId[e(Y).Name]) == null ? void 0 : z.getContext) == null ? void 0 : ue.call(z)
|
|
415
|
+
}, null, 8, ["render", "props"]),
|
|
416
|
+
i[1] || (i[1] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
417
|
+
])
|
|
418
|
+
]),
|
|
419
|
+
o("div", us, [
|
|
420
|
+
o("div", ds, [
|
|
421
|
+
d(b, {
|
|
422
|
+
label: e(y)(`inventory.transfer.form.items.table.${e(Y).Amount}`)
|
|
423
|
+
}, null, 8, ["label"]),
|
|
424
|
+
d(e(ie), {
|
|
425
|
+
render: (O = ($ = (T = n.cellByColId[e(Y).Amount]) == null ? void 0 : T.column) == null ? void 0 : $.columnDef) == null ? void 0 : O.cell,
|
|
426
|
+
props: (I = (R = n.cellByColId[e(Y).Amount]) == null ? void 0 : R.getContext) == null ? void 0 : I.call(R)
|
|
427
|
+
}, null, 8, ["render", "props"]),
|
|
428
|
+
i[2] || (i[2] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
429
|
+
]),
|
|
430
|
+
n.cellByColId[e(Y).Cost] ? (S(), M("div", cs, [
|
|
431
|
+
d(it, { "z-index": 50 }, {
|
|
432
|
+
default: D(() => [
|
|
433
|
+
d(b, {
|
|
434
|
+
label: e(y)(`inventory.transfer.form.items.table.${e(Y).Cost}2`)
|
|
435
|
+
}, null, 8, ["label"])
|
|
436
|
+
]),
|
|
437
|
+
_: 1
|
|
438
|
+
}),
|
|
439
|
+
d(e(ie), {
|
|
440
|
+
render: (Q = (K = (B = n.cellByColId[e(Y).Cost]) == null ? void 0 : B.column) == null ? void 0 : K.columnDef) == null ? void 0 : Q.cell,
|
|
441
|
+
props: (c = (p = n.cellByColId[e(Y).Cost]) == null ? void 0 : p.getContext) == null ? void 0 : c.call(p)
|
|
442
|
+
}, null, 8, ["render", "props"]),
|
|
443
|
+
i[3] || (i[3] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
444
|
+
])) : G("", !0)
|
|
445
|
+
]),
|
|
446
|
+
n.showComparePrice && Object.keys(n.comparePriceBySku[(H = n.row.original.sku) == null ? void 0 : H._id] ?? {}).length > 0 ? (S(), M(ke, { key: 0 }, [
|
|
447
|
+
d(t, { class: "h-8" }),
|
|
448
|
+
d(dt, {
|
|
449
|
+
prices: n.comparePriceBySku[(oe = n.row.original.sku) == null ? void 0 : oe._id]
|
|
450
|
+
}, null, 8, ["prices"])
|
|
451
|
+
], 64)) : G("", !0)
|
|
452
|
+
]);
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
function ps(m) {
|
|
457
|
+
const y = q({
|
|
458
|
+
get() {
|
|
459
|
+
const t = m.getEffectiveAt();
|
|
460
|
+
return t ? new Date(t) : null;
|
|
461
|
+
},
|
|
462
|
+
set(t) {
|
|
463
|
+
m.setEffectiveAt((t == null ? void 0 : t.toISOString()) ?? null);
|
|
464
|
+
}
|
|
465
|
+
}), n = q({
|
|
466
|
+
get() {
|
|
467
|
+
return !!y.value;
|
|
468
|
+
},
|
|
469
|
+
set(t) {
|
|
470
|
+
t ? y.value = /* @__PURE__ */ new Date() : y.value = null;
|
|
471
|
+
}
|
|
472
|
+
}), i = q({
|
|
473
|
+
get() {
|
|
474
|
+
return y.value === null ? "" : Le(y.value);
|
|
475
|
+
},
|
|
476
|
+
set(t) {
|
|
477
|
+
t ? y.value = /* @__PURE__ */ new Date(`${t} ${b.value}`) : y.value = null;
|
|
478
|
+
}
|
|
479
|
+
}), b = q({
|
|
480
|
+
get() {
|
|
481
|
+
return y.value === null ? "" : _t(y.value);
|
|
482
|
+
},
|
|
483
|
+
set(t) {
|
|
484
|
+
t ? y.value = /* @__PURE__ */ new Date(`${i.value} ${t}`) : y.value = null;
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
return {
|
|
488
|
+
backdatePo: y,
|
|
489
|
+
backdateSwitch: n,
|
|
490
|
+
backdateModel: i,
|
|
491
|
+
backdateTimeModel: b
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
const fs = {
|
|
495
|
+
width: "24",
|
|
496
|
+
height: "24",
|
|
497
|
+
viewBox: "0 0 24 24",
|
|
498
|
+
fill: "none",
|
|
499
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
500
|
+
}, vs = ["fill"], ys = ["fill"], bs = ["stroke"], _s = ["stroke"], gs = /* @__PURE__ */ pe({
|
|
501
|
+
__name: "SparkIcon",
|
|
502
|
+
props: {
|
|
503
|
+
size: {
|
|
504
|
+
type: Number,
|
|
505
|
+
default: 24
|
|
506
|
+
},
|
|
507
|
+
color: {
|
|
508
|
+
type: String,
|
|
509
|
+
default: "#c7c7cc"
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
setup(m) {
|
|
513
|
+
return (y, n) => (S(), M("svg", fs, [
|
|
514
|
+
o("path", {
|
|
515
|
+
d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
|
|
516
|
+
fill: m.color
|
|
517
|
+
}, null, 8, vs),
|
|
518
|
+
o("path", {
|
|
519
|
+
d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
|
|
520
|
+
fill: m.color
|
|
521
|
+
}, null, 8, ys),
|
|
522
|
+
o("path", {
|
|
523
|
+
d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
|
|
524
|
+
stroke: m.color,
|
|
525
|
+
"stroke-width": "1.5",
|
|
526
|
+
"stroke-linecap": "round",
|
|
527
|
+
"stroke-linejoin": "round"
|
|
528
|
+
}, null, 8, bs),
|
|
529
|
+
o("path", {
|
|
530
|
+
d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
|
|
531
|
+
stroke: m.color,
|
|
532
|
+
"stroke-width": "1.5",
|
|
533
|
+
"stroke-linecap": "round",
|
|
534
|
+
"stroke-linejoin": "round"
|
|
535
|
+
}, null, 8, _s)
|
|
536
|
+
]));
|
|
537
|
+
}
|
|
538
|
+
}), ks = { class: "flex gap-8 items-center" }, hs = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, Cs = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, xs = { class: "flex items-center w-full" }, Ss = { class: "flex-1" }, ws = { class: "fm-typo-en-title-sm-800" }, Fs = { class: "flex items-start gap-8" }, Ds = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, $s = { class: "flex gap-1" }, tt = /* @__PURE__ */ pe({
|
|
539
|
+
__name: "ForecastStock",
|
|
540
|
+
props: {
|
|
541
|
+
disabled: { type: Boolean }
|
|
542
|
+
},
|
|
543
|
+
emits: ["update:poItems"],
|
|
544
|
+
setup(m, { emit: y }) {
|
|
545
|
+
const n = y, i = N(!1), b = N(7), t = qt(), f = qe(), _ = He(), { t: w } = he();
|
|
546
|
+
async function u() {
|
|
547
|
+
if (b.value < 1)
|
|
548
|
+
return;
|
|
549
|
+
i.value = !1, await t.readPurchaseOrder(b.value);
|
|
550
|
+
const a = [];
|
|
551
|
+
if (t.purchaseOrderForecast.skus.length <= 0) {
|
|
552
|
+
f.open({
|
|
553
|
+
message: w("inventory.transfer.form.items.forecastStock.notAvailable"),
|
|
554
|
+
type: "info"
|
|
555
|
+
});
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
const l = t.purchaseOrderForecast.skus.reduce((v, k) => {
|
|
559
|
+
const h = _.skus.find((F) => F._id === k.id);
|
|
560
|
+
if (v.find((F) => F.sku._id === k.id) || !h)
|
|
561
|
+
return v;
|
|
562
|
+
const x = {
|
|
563
|
+
sku: h,
|
|
564
|
+
code: h.code,
|
|
565
|
+
name: h.name,
|
|
566
|
+
quantity: {
|
|
567
|
+
amount: k.amount,
|
|
568
|
+
precision: 0
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
return v.push(x), v;
|
|
572
|
+
}, a);
|
|
573
|
+
n("update:poItems", l);
|
|
574
|
+
}
|
|
575
|
+
return (a, l) => {
|
|
576
|
+
const v = P("FmButton"), k = P("FmIcon"), h = P("FmStepperField"), g = P("FmPopover");
|
|
577
|
+
return S(), J(g, {
|
|
578
|
+
disabled: a.disabled,
|
|
579
|
+
class: "flex",
|
|
580
|
+
"show-popover": i.value,
|
|
581
|
+
onPopoverChanged: l[3] || (l[3] = (x) => i.value = x)
|
|
582
|
+
}, {
|
|
583
|
+
"popover-button": D(() => [
|
|
584
|
+
d(v, {
|
|
585
|
+
label: "unused",
|
|
586
|
+
variant: "secondary",
|
|
587
|
+
"text-color": a.disabled ? "disabled" : "primary",
|
|
588
|
+
"bg-color": "transparent",
|
|
589
|
+
"border-color": a.disabled ? "disabled" : "primary",
|
|
590
|
+
disabled: a.disabled
|
|
591
|
+
}, {
|
|
592
|
+
default: D(() => [
|
|
593
|
+
o("div", ks, [
|
|
594
|
+
d(gs, {
|
|
595
|
+
size: 24,
|
|
596
|
+
color: a.disabled ? "#c7c7cc" : "#ff7823"
|
|
597
|
+
}, null, 8, ["color"]),
|
|
598
|
+
o("div", hs, U(e(w)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
599
|
+
])
|
|
600
|
+
]),
|
|
601
|
+
_: 1
|
|
602
|
+
}, 8, ["text-color", "border-color", "disabled"])
|
|
603
|
+
]),
|
|
604
|
+
default: D(() => [
|
|
605
|
+
o("div", Cs, [
|
|
606
|
+
o("div", xs, [
|
|
607
|
+
o("div", Ss, [
|
|
608
|
+
d(Kt, { "z-index": 99 }, {
|
|
609
|
+
default: D(() => [
|
|
610
|
+
o("p", ws, U(e(w)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
611
|
+
]),
|
|
612
|
+
_: 1
|
|
613
|
+
})
|
|
614
|
+
]),
|
|
615
|
+
d(v, {
|
|
616
|
+
icon: "close",
|
|
617
|
+
size: "md",
|
|
618
|
+
variant: "tertiary",
|
|
619
|
+
onClick: l[0] || (l[0] = (x) => i.value = !1)
|
|
620
|
+
})
|
|
621
|
+
]),
|
|
622
|
+
d(h, {
|
|
623
|
+
modelValue: b.value,
|
|
624
|
+
"onUpdate:modelValue": l[1] || (l[1] = (x) => b.value = x),
|
|
625
|
+
label: e(w)("inventory.transfer.form.items.forecastStock.days"),
|
|
626
|
+
rules: [e(Re)(1)]
|
|
627
|
+
}, {
|
|
628
|
+
"helper-text": D(() => [
|
|
629
|
+
o("div", Fs, [
|
|
630
|
+
d(k, {
|
|
631
|
+
name: "warning",
|
|
632
|
+
size: "sm",
|
|
633
|
+
class: "text-fm-color-system-warning-300"
|
|
634
|
+
}),
|
|
635
|
+
o("div", Ds, U(e(w)("inventory.transfer.form.items.forecastStock.replace")), 1)
|
|
636
|
+
])
|
|
637
|
+
]),
|
|
638
|
+
_: 1
|
|
639
|
+
}, 8, ["modelValue", "label", "rules"]),
|
|
640
|
+
o("div", $s, [
|
|
641
|
+
l[4] || (l[4] = o("div", { class: "grow" }, null, -1)),
|
|
642
|
+
d(v, {
|
|
643
|
+
label: e(w)("common.cancel"),
|
|
644
|
+
variant: "tertiary",
|
|
645
|
+
onClick: l[2] || (l[2] = (x) => i.value = !1)
|
|
646
|
+
}, null, 8, ["label"]),
|
|
647
|
+
d(v, {
|
|
648
|
+
label: e(w)("inventory.transfer.form.items.forecastStock.generate"),
|
|
649
|
+
onClick: u
|
|
650
|
+
}, null, 8, ["label"])
|
|
651
|
+
])
|
|
652
|
+
])
|
|
653
|
+
]),
|
|
654
|
+
_: 1
|
|
655
|
+
}, 8, ["disabled", "show-popover"]);
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
function Ts() {
|
|
660
|
+
const m = qe(), y = rt(), n = N(!1);
|
|
661
|
+
ge(n, (f) => {
|
|
662
|
+
f && (b.value = !0, i().finally(() => {
|
|
663
|
+
b.value = !1;
|
|
664
|
+
}));
|
|
665
|
+
});
|
|
666
|
+
async function i() {
|
|
667
|
+
try {
|
|
668
|
+
const { startDate: f, endDate: _ } = gt(6), a = (await y.getPurchaseOrders({ start: f, end: _ })).filter(
|
|
669
|
+
(l) => {
|
|
670
|
+
var v, k;
|
|
671
|
+
return l.status === kt.enum.COMPLETE && ((v = l.supplier) == null ? void 0 : v.internal) !== "warehouse" && ((k = l.supplier) == null ? void 0 : k.internal) !== "restaurant";
|
|
672
|
+
}
|
|
673
|
+
).reduce((l, v) => {
|
|
674
|
+
const k = new Date(ht(v._id)), h = v.supplier._id;
|
|
675
|
+
for (const g of v.items) {
|
|
676
|
+
if (!g.totalCost) continue;
|
|
677
|
+
const x = l[g.sku._id] ?? {}, F = x[h] ?? [];
|
|
678
|
+
F.push({
|
|
679
|
+
date: k.toISOString(),
|
|
680
|
+
totalUnit: g.quantity,
|
|
681
|
+
totalCost: g.totalCost,
|
|
682
|
+
unit: g.sku.unit,
|
|
683
|
+
measurement: g.measurement,
|
|
684
|
+
seqNumber: v.seqNumber
|
|
685
|
+
}), x[h] = F, l[g.sku._id] = x;
|
|
686
|
+
}
|
|
687
|
+
return l;
|
|
688
|
+
}, {});
|
|
689
|
+
t.value = a;
|
|
690
|
+
} catch {
|
|
691
|
+
m.open({
|
|
692
|
+
title: "Something went wrong",
|
|
693
|
+
message: "Cannot retrieve supplier purchase history. Please try again."
|
|
694
|
+
}), n.value = !1;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
const b = N(!1), t = N({});
|
|
698
|
+
return {
|
|
699
|
+
comparePricesToggle: n,
|
|
700
|
+
comparePriceFetching: b,
|
|
701
|
+
comparePriceBySku: t
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }, Vs = ["colspan"], Rs = /* @__PURE__ */ pe({
|
|
705
|
+
__name: "TransferItemTable",
|
|
706
|
+
props: {
|
|
707
|
+
row: {},
|
|
708
|
+
comparePriceBySku: {},
|
|
709
|
+
showComparePrice: { type: Boolean }
|
|
710
|
+
},
|
|
711
|
+
setup(m) {
|
|
712
|
+
function y(n) {
|
|
713
|
+
return n.column.columnDef.meta;
|
|
714
|
+
}
|
|
715
|
+
return (n, i) => {
|
|
716
|
+
var b, t;
|
|
717
|
+
return S(), M(ke, null, [
|
|
718
|
+
o("tr", {
|
|
719
|
+
class: ae(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm", {
|
|
720
|
+
"bg-fm-color-neutral-gray-100": n.row.getIsSelected()
|
|
721
|
+
}])
|
|
722
|
+
}, [
|
|
723
|
+
(S(!0), M(ke, null, Ue(n.row.getVisibleCells(), (f) => {
|
|
724
|
+
var _, w, u, a;
|
|
725
|
+
return S(), M("td", {
|
|
726
|
+
key: f.id,
|
|
727
|
+
class: ae([
|
|
728
|
+
"h-[52px] px-16 text-fm-color-typo-primary",
|
|
729
|
+
((_ = y(f)) == null ? void 0 : _.cellClass) ?? "px-16"
|
|
730
|
+
]),
|
|
731
|
+
style: ot({
|
|
732
|
+
width: (w = y(f)) == null ? void 0 : w.width,
|
|
733
|
+
maxWidth: (u = y(f)) == null ? void 0 : u.maxWidth,
|
|
734
|
+
textAlign: ((a = y(f)) == null ? void 0 : a.textAlign) ?? "left"
|
|
735
|
+
})
|
|
736
|
+
}, [
|
|
737
|
+
o("span", Ps, [
|
|
738
|
+
d(e(ie), {
|
|
739
|
+
render: f.column.columnDef.cell,
|
|
740
|
+
props: f.getContext()
|
|
741
|
+
}, null, 8, ["render", "props"])
|
|
742
|
+
])
|
|
743
|
+
], 6);
|
|
744
|
+
}), 128))
|
|
745
|
+
], 2),
|
|
746
|
+
n.showComparePrice && Object.keys(n.comparePriceBySku[(b = n.row.original.sku) == null ? void 0 : b._id] ?? {}).length > 0 ? (S(), M("tr", Is, [
|
|
747
|
+
o("td", {
|
|
748
|
+
colspan: n.row.getVisibleCells().length
|
|
749
|
+
}, [
|
|
750
|
+
d(dt, {
|
|
751
|
+
prices: n.comparePriceBySku[(t = n.row.original.sku) == null ? void 0 : t._id]
|
|
752
|
+
}, null, 8, ["prices"])
|
|
753
|
+
], 8, Vs)
|
|
754
|
+
])) : G("", !0)
|
|
755
|
+
], 64);
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
}), As = {
|
|
759
|
+
key: 0,
|
|
760
|
+
class: "flex flex-col gap-8"
|
|
761
|
+
}, qs = { class: "flex flex-col gap-4" }, Ms = { class: "flex items-center gap-4" }, Us = {
|
|
762
|
+
key: 0,
|
|
763
|
+
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
764
|
+
}, Es = /* @__PURE__ */ pe({
|
|
765
|
+
__name: "NetSuiteField",
|
|
766
|
+
props: {
|
|
767
|
+
required: { type: Boolean },
|
|
768
|
+
disabled: { type: Boolean },
|
|
769
|
+
supplier: {},
|
|
770
|
+
setting: {},
|
|
771
|
+
items: {},
|
|
772
|
+
onChange: { type: Function }
|
|
773
|
+
},
|
|
774
|
+
emits: ["netsuite:ready"],
|
|
775
|
+
setup(m, { emit: y }) {
|
|
776
|
+
const n = Ne(), i = m, b = y, { t } = Qt(), f = N(!1), _ = N();
|
|
777
|
+
Be(() => {
|
|
778
|
+
var l, v, k, h;
|
|
779
|
+
let a = {
|
|
780
|
+
id: "",
|
|
781
|
+
subsidiary: { id: "", name: "" },
|
|
782
|
+
errors: []
|
|
783
|
+
};
|
|
784
|
+
if (!n.isEnabled || !i.required) {
|
|
785
|
+
b("netsuite:ready", a);
|
|
786
|
+
return;
|
|
787
|
+
}
|
|
788
|
+
try {
|
|
789
|
+
const g = n.currentLocationSubsidiary();
|
|
790
|
+
i.setting ? a = {
|
|
791
|
+
...i.setting,
|
|
792
|
+
subsidiary: {
|
|
793
|
+
id: g.id || "",
|
|
794
|
+
name: g.name
|
|
795
|
+
}
|
|
796
|
+
} : a = {
|
|
797
|
+
...a,
|
|
798
|
+
subsidiary: {
|
|
799
|
+
id: g.id || "",
|
|
800
|
+
name: g.name
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
const x = n.getAvailableItems(g.id), F = i.items.filter((V) => {
|
|
804
|
+
if (V.measurement != null) {
|
|
805
|
+
const z = n.getAvailableMeasurements(
|
|
806
|
+
V.sku._id,
|
|
807
|
+
g.id
|
|
808
|
+
);
|
|
809
|
+
return x.includes(V.sku._id) && z.includes(V.measurement.id);
|
|
810
|
+
}
|
|
811
|
+
return x.includes(V.sku._id);
|
|
812
|
+
}).map((V) => V.sku._id);
|
|
813
|
+
i.onChange(
|
|
814
|
+
i.items.filter((V) => F.includes(V.sku._id)),
|
|
815
|
+
a
|
|
816
|
+
);
|
|
817
|
+
} finally {
|
|
818
|
+
i.supplier.internal ? _.value = n.getNetSuiteLocation(
|
|
819
|
+
`${i.supplier.internal}_${i.supplier._id}`
|
|
820
|
+
) : _.value = n.getNetSuiteVendor(i.supplier._id);
|
|
821
|
+
const g = i.supplier.internal ? n.getLocationSubsidiary((l = _.value) == null ? void 0 : l.netSuiteId).id : (v = _.value) == null ? void 0 : v.subsidiaryId, x = i.supplier.internal ? (k = n.currentLocationSubsidiary()) == null ? void 0 : k.id : (h = n.currentVendorSubsidiary(i.supplier._id)) == null ? void 0 : h.id;
|
|
822
|
+
!n.isEnabled || g && n.isEnabled && g == x ? b("netsuite:ready", a) : f.value = !0;
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
const w = q(
|
|
826
|
+
() => i.supplier.internal ? n.currentLocationSubsidiary() : n.currentVendorSubsidiary(i.supplier._id)
|
|
827
|
+
), u = q(() => {
|
|
828
|
+
var a, l;
|
|
829
|
+
return _.value == null ? `Cannot find the NetSuite location for "${i.supplier.name}"` : `The subsidiary of the request
|
|
830
|
+
location is ${(l = n.getLocationSubsidiary((a = _.value) == null ? void 0 : a.netSuiteId)) == null ? void 0 : l.fullName}`;
|
|
831
|
+
});
|
|
832
|
+
return (a, l) => {
|
|
833
|
+
const v = P("FmLabel"), k = P("FmIcon"), h = P("FmField"), g = P("FmTooltip");
|
|
834
|
+
return e(n).isEnabled && i.required ? (S(), M("div", As, [
|
|
835
|
+
d(v, {
|
|
836
|
+
label: `NetSuite ${e(t)("inventory.transfer.form.netsuite.subsidiary")}`
|
|
837
|
+
}, null, 8, ["label"]),
|
|
838
|
+
o("div", qs, [
|
|
839
|
+
d(g, {
|
|
840
|
+
"z-index": 51,
|
|
841
|
+
placement: "left",
|
|
842
|
+
disabled: a.disabled
|
|
843
|
+
}, {
|
|
844
|
+
content: D(() => l[0] || (l[0] = [
|
|
845
|
+
Ee("This field is locked and based on the location of the request.")
|
|
846
|
+
])),
|
|
847
|
+
default: D(() => [
|
|
848
|
+
d(h, null, {
|
|
849
|
+
default: D(() => {
|
|
850
|
+
var x;
|
|
851
|
+
return [
|
|
852
|
+
o("div", Ms, [
|
|
853
|
+
d(k, {
|
|
854
|
+
name: "lock_outline",
|
|
855
|
+
size: "sm",
|
|
856
|
+
color: a.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
857
|
+
}, null, 8, ["color"]),
|
|
858
|
+
o("div", {
|
|
859
|
+
class: ae([a.disabled ? "text-fm-color-typo-disabled" : ""])
|
|
860
|
+
}, U((x = w.value) == null ? void 0 : x.fullName), 3)
|
|
861
|
+
])
|
|
862
|
+
];
|
|
863
|
+
}),
|
|
864
|
+
_: 1
|
|
865
|
+
})
|
|
866
|
+
]),
|
|
867
|
+
_: 1
|
|
868
|
+
}, 8, ["disabled"]),
|
|
869
|
+
f.value ? (S(), M("div", Us, U(u.value), 1)) : G("", !0)
|
|
870
|
+
])
|
|
871
|
+
])) : G("", !0);
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
}), Os = { class: "flex flex-col gap-4" }, Bs = { class: "flex items-center gap-8 overflow-x-auto pb-12" }, Ns = { class: "flex flex-col gap-16" }, zs = { class: "flex flex-col gap-24" }, Ls = { class: "flex flex-col gap-8" }, Hs = { class: "flex flex-col gap-4" }, js = { class: "flex items-center gap-4" }, Ys = { class: "flex flex-col gap-8" }, Ks = { class: "flex flex-col gap-4" }, Qs = { class: "flex items-center gap-4" }, Zs = { class: "line-clamp-1 fm-typo-en-body-lg-400" }, Gs = { class: "line-clamp-1 fm-typo-en-body-lg-400" }, Js = {
|
|
875
|
+
key: 3,
|
|
876
|
+
class: "p-16 border border-fm-color-neutral-gray-300 fm-corner-radius-md flex flex-col"
|
|
877
|
+
}, Ws = {
|
|
878
|
+
key: 0,
|
|
879
|
+
class: "flex-1 flex gap-8 h-48 xs:flex-col xs:pt-16 sm:flex-col sm:pt-16"
|
|
880
|
+
}, Xs = { class: "flex-1" }, ea = { class: "flex-1" }, ta = {
|
|
881
|
+
key: 1,
|
|
882
|
+
class: "flex items-center gap-4"
|
|
883
|
+
}, sa = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" }, aa = { class: "flex flex-col gap-16" }, oa = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, la = { class: "flex gap-8" }, na = { key: 0 }, ra = /* @__PURE__ */ pe({
|
|
884
|
+
__name: "TransferForm2",
|
|
885
|
+
props: {
|
|
886
|
+
modelValue: {},
|
|
887
|
+
request: {},
|
|
888
|
+
disabled: { type: Boolean },
|
|
889
|
+
suppliers: {},
|
|
890
|
+
skus: {},
|
|
891
|
+
lastClosingDate: {}
|
|
892
|
+
},
|
|
893
|
+
emits: ["validation-success", "form:ready"],
|
|
894
|
+
setup(m, { expose: y, emit: n }) {
|
|
895
|
+
const i = m, b = n, t = Ct(), { t: f } = he(), _ = je(), w = He(), u = Ne(), a = Ke(), l = Ae(), v = ut(), { breakpoints: k } = Ye(), h = q(() => k.value.xs || k.value.sm), g = at({
|
|
896
|
+
value: !1
|
|
897
|
+
}), x = N(!1), F = q(
|
|
898
|
+
() => {
|
|
899
|
+
var s;
|
|
900
|
+
return ((s = i.modelValue) == null ? void 0 : s.templateDoc) ?? v.templates.find((r) => r._id === t.template);
|
|
901
|
+
}
|
|
902
|
+
), V = q(() => t.status === "DRAFT" || !t._rev);
|
|
903
|
+
ge(F, (s) => {
|
|
904
|
+
s && V.value && (t.supplier = (s == null ? void 0 : s.purchaseOrder.supplier) ?? t.supplier);
|
|
905
|
+
}), Be(() => {
|
|
906
|
+
var s;
|
|
907
|
+
try {
|
|
908
|
+
if (!t.template) return;
|
|
909
|
+
if (!t.items.length) {
|
|
910
|
+
let r = [];
|
|
911
|
+
(s = F.value) != null && s.purchaseOrder.items && (r = F.value.purchaseOrder.items.filter((E) => {
|
|
912
|
+
var Z;
|
|
913
|
+
return ((Z = E.quantity) == null ? void 0 : Z.amount) != 0;
|
|
914
|
+
})), t.items = r;
|
|
915
|
+
}
|
|
916
|
+
} finally {
|
|
917
|
+
x.value = !0;
|
|
918
|
+
}
|
|
919
|
+
}), ge([x, g], ([s, r], [E, Z]) => {
|
|
920
|
+
r.value && Z.value && b("form:ready");
|
|
921
|
+
});
|
|
922
|
+
const z = q(
|
|
923
|
+
() => _.currentLocation.type === xt.restaurant
|
|
924
|
+
);
|
|
925
|
+
_.watchLocation(async () => {
|
|
926
|
+
location && (t.supplier || (t.supplier = a.suppliers.find((s) => s) ?? t.supplier));
|
|
927
|
+
});
|
|
928
|
+
const ue = Bt(), T = jt(
|
|
929
|
+
() => t,
|
|
930
|
+
(s) => {
|
|
931
|
+
Object.assign(t, s);
|
|
932
|
+
},
|
|
933
|
+
!0,
|
|
934
|
+
!0
|
|
935
|
+
), $ = q({
|
|
936
|
+
get() {
|
|
937
|
+
var s;
|
|
938
|
+
return typeof ((s = t == null ? void 0 : t.supplier) == null ? void 0 : s.internal) == "string" ? j.TRANSFER : j.PURCHASE;
|
|
939
|
+
},
|
|
940
|
+
set(s) {
|
|
941
|
+
var E;
|
|
942
|
+
const r = typeof ((E = t == null ? void 0 : t.supplier) == null ? void 0 : E.internal) == "string" ? j.TRANSFER : j.PURCHASE;
|
|
943
|
+
s !== r && (t.supplier = s === j.PURCHASE ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
|
|
944
|
+
}
|
|
945
|
+
});
|
|
946
|
+
ge(
|
|
947
|
+
() => {
|
|
948
|
+
var s;
|
|
949
|
+
return (s = i.modelValue) == null ? void 0 : s.template;
|
|
950
|
+
},
|
|
951
|
+
(s) => {
|
|
952
|
+
l.mustUsePoTemplate && !s && ct(() => {
|
|
953
|
+
var r, E;
|
|
954
|
+
t.supplier = ((E = (r = T.locationOptionsTypeTransfer.value) == null ? void 0 : r.filter(
|
|
955
|
+
(Z) => Z.internal === "restaurant"
|
|
956
|
+
)) == null ? void 0 : E[0]) ?? t.supplier;
|
|
957
|
+
});
|
|
958
|
+
},
|
|
959
|
+
{ immediate: !0 }
|
|
960
|
+
);
|
|
961
|
+
const O = q(() => {
|
|
962
|
+
let s = T.transferLocationOptions.value;
|
|
963
|
+
return l.mustUsePoTemplate && !t.template && (s = s.filter((r) => {
|
|
964
|
+
var E;
|
|
965
|
+
return (E = r.sublabel) == null ? void 0 : E.startsWith("restaurant");
|
|
966
|
+
})), s;
|
|
967
|
+
}), R = q({
|
|
968
|
+
get() {
|
|
969
|
+
return t.supplier._id;
|
|
970
|
+
},
|
|
971
|
+
set(s) {
|
|
972
|
+
T.transferLocationModel.value = s;
|
|
973
|
+
}
|
|
974
|
+
}), I = q({
|
|
975
|
+
get() {
|
|
976
|
+
return t.remark ?? void 0;
|
|
977
|
+
},
|
|
978
|
+
set(s) {
|
|
979
|
+
t.remark = s;
|
|
980
|
+
}
|
|
981
|
+
}), { backdatePo: B, backdateSwitch: K, backdateModel: Q, backdateTimeModel: p } = ps({
|
|
982
|
+
getEffectiveAt() {
|
|
983
|
+
return t.effectiveAt;
|
|
984
|
+
},
|
|
985
|
+
setEffectiveAt(s) {
|
|
986
|
+
t.effectiveAt = s;
|
|
987
|
+
}
|
|
988
|
+
}), { comparePricesToggle: c, comparePriceFetching: H, comparePriceBySku: oe } = Ts(), W = N();
|
|
989
|
+
y({
|
|
990
|
+
validateInputs: () => {
|
|
991
|
+
var s, r;
|
|
992
|
+
(r = (s = W.value) == null ? void 0 : s.validateInputs) == null || r.call(s);
|
|
993
|
+
},
|
|
994
|
+
resetInputsValidation: () => {
|
|
995
|
+
var s, r;
|
|
996
|
+
(r = (s = W.value) == null ? void 0 : s.resetInputsValidation) == null || r.call(s);
|
|
997
|
+
},
|
|
998
|
+
resetInputs: () => {
|
|
999
|
+
var s, r;
|
|
1000
|
+
(r = (s = W.value) == null ? void 0 : s.resetInputs) == null || r.call(s);
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
const $e = Zt({
|
|
1004
|
+
updateItem: (s) => {
|
|
1005
|
+
t.items = t.items.map((r) => r.sku._id !== s.sku._id ? r : s);
|
|
1006
|
+
},
|
|
1007
|
+
deleteItem: (s) => {
|
|
1008
|
+
t.items = t.items.filter((r) => r.sku._id !== s.sku._id);
|
|
1009
|
+
},
|
|
1010
|
+
get supplier() {
|
|
1011
|
+
return t.supplier;
|
|
1012
|
+
},
|
|
1013
|
+
get items() {
|
|
1014
|
+
return t.items;
|
|
1015
|
+
},
|
|
1016
|
+
get transferType() {
|
|
1017
|
+
return $.value;
|
|
1018
|
+
},
|
|
1019
|
+
get template() {
|
|
1020
|
+
return F.value;
|
|
1021
|
+
},
|
|
1022
|
+
get disabled() {
|
|
1023
|
+
return i.disabled;
|
|
1024
|
+
}
|
|
1025
|
+
}), Ce = q(() => {
|
|
1026
|
+
let s = $e.columnDefs.value;
|
|
1027
|
+
return u.isEnabled && $.value === j.TRANSFER && (s = s.filter((r) => r.id !== Y.TotalCost)), s;
|
|
1028
|
+
});
|
|
1029
|
+
function Te() {
|
|
1030
|
+
var se, fe, xe, Ie, we;
|
|
1031
|
+
const s = new Set((xe = (fe = (se = F.value) == null ? void 0 : se.purchaseOrder) == null ? void 0 : fe.items) == null ? void 0 : xe.map((A) => A.sku._id)), r = u.isEnabled ? u.getAvailableItems((we = (Ie = t.netSuite) == null ? void 0 : Ie.subsidiary) == null ? void 0 : we.id) : [], E = s.size ? w.skus.filter((A) => s.has(A._id)) : w.skus, Z = u.isEnabled ? E.filter((A) => {
|
|
1032
|
+
var le, ee, ce, ne;
|
|
1033
|
+
const X = (ee = (le = F.value) == null ? void 0 : le.purchaseOrder) == null ? void 0 : ee.items.find(
|
|
1034
|
+
(me) => me.sku._id === A._id
|
|
1035
|
+
);
|
|
1036
|
+
if (X != null && X.measurement != null) {
|
|
1037
|
+
const me = u.getAvailableMeasurements(
|
|
1038
|
+
X.sku._id,
|
|
1039
|
+
(ne = (ce = t.netSuite) == null ? void 0 : ce.subsidiary) == null ? void 0 : ne.id
|
|
1040
|
+
);
|
|
1041
|
+
return r.includes(X.sku._id) && me.includes(X.measurement.id);
|
|
1042
|
+
}
|
|
1043
|
+
return r.includes(A._id);
|
|
1044
|
+
}).map((A) => A._id) : E.map((A) => A._id), de = E.map(
|
|
1045
|
+
(A) => ({
|
|
1046
|
+
label: A.name,
|
|
1047
|
+
sublabel: A.code,
|
|
1048
|
+
value: A,
|
|
1049
|
+
disabled: !Z.includes(A._id)
|
|
1050
|
+
})
|
|
1051
|
+
), be = de.filter((A) => {
|
|
1052
|
+
var X;
|
|
1053
|
+
return (X = t.items) == null ? void 0 : X.find((le) => le.sku._id === A.value._id);
|
|
1054
|
+
}).map((A) => A.value);
|
|
1055
|
+
ue.open({
|
|
1056
|
+
title: f("inventory.transfer.form.items.selectItem"),
|
|
1057
|
+
closeButton: !0,
|
|
1058
|
+
contentComponent: Dt,
|
|
1059
|
+
contentComponentProps: {
|
|
1060
|
+
modelValue: be,
|
|
1061
|
+
items: de,
|
|
1062
|
+
virtualScroll: !0
|
|
1063
|
+
},
|
|
1064
|
+
primaryActions: {
|
|
1065
|
+
text: f("common.confirm"),
|
|
1066
|
+
close: !0
|
|
1067
|
+
},
|
|
1068
|
+
secondaryActions: {
|
|
1069
|
+
text: f("common.close"),
|
|
1070
|
+
close: !0,
|
|
1071
|
+
variant: "tertiary"
|
|
1072
|
+
}
|
|
1073
|
+
}).onPrimary((A) => {
|
|
1074
|
+
const X = t.items ?? [], le = A.map((ee) => {
|
|
1075
|
+
var me, Fe;
|
|
1076
|
+
const ce = X.find((_e) => _e.sku._id === ee._id);
|
|
1077
|
+
if (ce)
|
|
1078
|
+
return ce;
|
|
1079
|
+
const ne = ((Fe = (me = F.value) == null ? void 0 : me.purchaseOrder.items) == null ? void 0 : Fe.find(
|
|
1080
|
+
(_e) => _e.sku._id === ee._id
|
|
1081
|
+
)) ?? {
|
|
1082
|
+
sku: ee,
|
|
1083
|
+
code: ee.code,
|
|
1084
|
+
name: ee.name,
|
|
1085
|
+
quantity: {
|
|
1086
|
+
amount: 1,
|
|
1087
|
+
precision: 0
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
return $.value == j.PURCHASE && (ne.totalCost = re(
|
|
1091
|
+
ne.sku,
|
|
1092
|
+
ne.quantity,
|
|
1093
|
+
ne.measurement,
|
|
1094
|
+
{
|
|
1095
|
+
supplier: t.supplier
|
|
1096
|
+
}
|
|
1097
|
+
)), ne;
|
|
1098
|
+
});
|
|
1099
|
+
le.sort((ee, ce) => ee.sku.code.localeCompare(ce.sku.code)), t.items = le;
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
function Me(s) {
|
|
1103
|
+
return s;
|
|
1104
|
+
}
|
|
1105
|
+
const Pe = q(() => {
|
|
1106
|
+
const s = [];
|
|
1107
|
+
return (!l.mustUsePoTemplate || l.mustUsePoTemplate && t.template) && s.push({
|
|
1108
|
+
label: f("inventory.transfer.form.type.purchase"),
|
|
1109
|
+
value: j.PURCHASE
|
|
1110
|
+
}), s.push({
|
|
1111
|
+
label: f("inventory.transfer.form.type.transfer"),
|
|
1112
|
+
value: j.TRANSFER
|
|
1113
|
+
}), s;
|
|
1114
|
+
});
|
|
1115
|
+
return (s, r) => {
|
|
1116
|
+
var me, Fe;
|
|
1117
|
+
const E = P("FmChip"), Z = P("FmLabel"), de = P("FmIcon"), be = P("FmField"), se = P("FmTooltip"), fe = P("FmSelect"), xe = P("FmTextField"), Ie = P("FmTextarea"), we = P("FmSwitch"), A = P("FmDatePicker"), X = P("FmTimePicker"), le = P("FmFormGroup"), ee = P("FmButton"), ce = P("FmTable"), ne = P("FmForm");
|
|
1118
|
+
return S(), M("div", Os, [
|
|
1119
|
+
o("div", Bs, [
|
|
1120
|
+
(me = i.modelValue) != null && me.template ? (S(), J(E, {
|
|
1121
|
+
key: 0,
|
|
1122
|
+
variant: s.disabled ? "warning" : void 0,
|
|
1123
|
+
label: `${e(f)("inventory.transfer.template.title")}: ${((Fe = F.value) == null ? void 0 : Fe.name) ?? e(f)("inventory.transfer.form.loading")}`,
|
|
1124
|
+
icon: "summarize",
|
|
1125
|
+
compact: ""
|
|
1126
|
+
}, null, 8, ["variant", "label"])) : G("", !0),
|
|
1127
|
+
d(E, {
|
|
1128
|
+
label: e(_).currentLocation.name,
|
|
1129
|
+
icon: "storefront",
|
|
1130
|
+
compact: ""
|
|
1131
|
+
}, null, 8, ["label"]),
|
|
1132
|
+
s.lastClosingDate ? (S(), J(E, {
|
|
1133
|
+
key: 1,
|
|
1134
|
+
label: `${e(f)("inventory.transfer.form.lastClosing")}: ${e(Le)(s.lastClosingDate)} ${e(St)(s.lastClosingDate)}`,
|
|
1135
|
+
icon: "calendar_month",
|
|
1136
|
+
compact: ""
|
|
1137
|
+
}, null, 8, ["label"])) : G("", !0)
|
|
1138
|
+
]),
|
|
1139
|
+
d(ne, {
|
|
1140
|
+
ref_key: "formRef",
|
|
1141
|
+
ref: W,
|
|
1142
|
+
class: "flex flex-col gap-32",
|
|
1143
|
+
disabled: s.disabled,
|
|
1144
|
+
onValidationFailed: console.log,
|
|
1145
|
+
onValidationSuccess: r[13] || (r[13] = (_e) => b("validation-success"))
|
|
1146
|
+
}, {
|
|
1147
|
+
default: D(() => {
|
|
1148
|
+
var _e, Qe;
|
|
1149
|
+
return [
|
|
1150
|
+
o("div", Ns, [
|
|
1151
|
+
o("div", zs, [
|
|
1152
|
+
(_e = i.modelValue) != null && _e.template ? (S(), M(ke, { key: 0 }, [
|
|
1153
|
+
o("div", Ls, [
|
|
1154
|
+
d(Z, {
|
|
1155
|
+
label: e(f)("inventory.transfer.form.type.title")
|
|
1156
|
+
}, null, 8, ["label"]),
|
|
1157
|
+
o("div", Hs, [
|
|
1158
|
+
d(se, {
|
|
1159
|
+
"z-index": 51,
|
|
1160
|
+
placement: "left",
|
|
1161
|
+
disabled: s.disabled
|
|
1162
|
+
}, {
|
|
1163
|
+
content: D(() => r[14] || (r[14] = [
|
|
1164
|
+
Ee("This field is locked from template.")
|
|
1165
|
+
])),
|
|
1166
|
+
default: D(() => [
|
|
1167
|
+
d(be, null, {
|
|
1168
|
+
default: D(() => [
|
|
1169
|
+
o("div", js, [
|
|
1170
|
+
d(de, {
|
|
1171
|
+
name: "lock_outline",
|
|
1172
|
+
size: "sm",
|
|
1173
|
+
color: s.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
1174
|
+
}, null, 8, ["color"]),
|
|
1175
|
+
o("div", {
|
|
1176
|
+
class: ae({ "text-fm-color-typo-disabled": s.disabled })
|
|
1177
|
+
}, U(e(f)(`inventory.transfer.form.type.${$.value.toLocaleLowerCase("en-us")}`)), 3)
|
|
1178
|
+
])
|
|
1179
|
+
]),
|
|
1180
|
+
_: 1
|
|
1181
|
+
})
|
|
1182
|
+
]),
|
|
1183
|
+
_: 1
|
|
1184
|
+
}, 8, ["disabled"]),
|
|
1185
|
+
o("div", {
|
|
1186
|
+
class: ae([
|
|
1187
|
+
"fm-typo-en-body-sm-400",
|
|
1188
|
+
s.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"
|
|
1189
|
+
])
|
|
1190
|
+
}, null, 2)
|
|
1191
|
+
])
|
|
1192
|
+
]),
|
|
1193
|
+
o("div", Ys, [
|
|
1194
|
+
d(Z, {
|
|
1195
|
+
label: $.value === e(j).PURCHASE ? e(f)("inventory.transfer.form.purchaseFrom") : e(f)("inventory.transfer.form.transferFrom")
|
|
1196
|
+
}, null, 8, ["label"]),
|
|
1197
|
+
o("div", Ks, [
|
|
1198
|
+
d(se, {
|
|
1199
|
+
"z-index": 51,
|
|
1200
|
+
placement: "left",
|
|
1201
|
+
disabled: s.disabled
|
|
1202
|
+
}, {
|
|
1203
|
+
content: D(() => r[15] || (r[15] = [
|
|
1204
|
+
Ee("This field is locked from template.")
|
|
1205
|
+
])),
|
|
1206
|
+
default: D(() => [
|
|
1207
|
+
d(be, null, {
|
|
1208
|
+
default: D(() => {
|
|
1209
|
+
var C;
|
|
1210
|
+
return [
|
|
1211
|
+
o("div", Qs, [
|
|
1212
|
+
d(de, {
|
|
1213
|
+
name: "lock_outline",
|
|
1214
|
+
size: "sm",
|
|
1215
|
+
color: s.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
1216
|
+
}, null, 8, ["color"]),
|
|
1217
|
+
o("div", {
|
|
1218
|
+
class: ae({ "text-fm-color-typo-disabled": s.disabled })
|
|
1219
|
+
}, U((C = O.value.find((te) => te.value === R.value)) == null ? void 0 : C.label), 3)
|
|
1220
|
+
])
|
|
1221
|
+
];
|
|
1222
|
+
}),
|
|
1223
|
+
_: 1
|
|
1224
|
+
})
|
|
1225
|
+
]),
|
|
1226
|
+
_: 1
|
|
1227
|
+
}, 8, ["disabled"])
|
|
1228
|
+
])
|
|
1229
|
+
])
|
|
1230
|
+
], 64)) : (S(), M(ke, { key: 1 }, [
|
|
1231
|
+
d(fe, {
|
|
1232
|
+
label: e(f)("inventory.transfer.form.type.title"),
|
|
1233
|
+
"label-mark": "required",
|
|
1234
|
+
modelValue: $.value,
|
|
1235
|
+
"onUpdate:modelValue": r[0] || (r[0] = (C) => $.value = C),
|
|
1236
|
+
items: Pe.value,
|
|
1237
|
+
rules: [e(Re)(1)(O.value)]
|
|
1238
|
+
}, {
|
|
1239
|
+
default: D(() => [
|
|
1240
|
+
o("span", Zs, U(e(wt)($.value)), 1)
|
|
1241
|
+
]),
|
|
1242
|
+
_: 1
|
|
1243
|
+
}, 8, ["label", "modelValue", "items", "rules"]),
|
|
1244
|
+
d(fe, {
|
|
1245
|
+
label: $.value === e(j).PURCHASE ? e(f)("inventory.transfer.form.purchaseFrom") : e(f)("inventory.transfer.form.transferFrom"),
|
|
1246
|
+
"label-mark": "required",
|
|
1247
|
+
modelValue: R.value,
|
|
1248
|
+
"onUpdate:modelValue": r[1] || (r[1] = (C) => R.value = C),
|
|
1249
|
+
items: O.value
|
|
1250
|
+
}, {
|
|
1251
|
+
"menu-wrapper": D((C) => {
|
|
1252
|
+
var te, Ze;
|
|
1253
|
+
return [
|
|
1254
|
+
d(Yt, Oe(C, {
|
|
1255
|
+
items: O.value,
|
|
1256
|
+
"model-value": (Ze = (te = s.modelValue) == null ? void 0 : te.supplier) == null ? void 0 : Ze._id
|
|
1257
|
+
}), null, 16, ["items", "model-value"])
|
|
1258
|
+
];
|
|
1259
|
+
}),
|
|
1260
|
+
default: D(() => {
|
|
1261
|
+
var C;
|
|
1262
|
+
return [
|
|
1263
|
+
o("span", Gs, U((C = O.value.find((te) => te.value === R.value)) == null ? void 0 : C.label), 1)
|
|
1264
|
+
];
|
|
1265
|
+
}),
|
|
1266
|
+
_: 1
|
|
1267
|
+
}, 8, ["label", "modelValue", "items"])
|
|
1268
|
+
], 64)),
|
|
1269
|
+
d(xe, {
|
|
1270
|
+
label: e(f)("inventory.transfer.form.reference"),
|
|
1271
|
+
"label-mark": "optional",
|
|
1272
|
+
modelValue: e(t).ref,
|
|
1273
|
+
"onUpdate:modelValue": r[2] || (r[2] = (C) => e(t).ref = C)
|
|
1274
|
+
}, null, 8, ["label", "modelValue"]),
|
|
1275
|
+
d(Ie, {
|
|
1276
|
+
label: e(f)("inventory.transfer.form.remark"),
|
|
1277
|
+
"label-mark": "optional",
|
|
1278
|
+
"max-length": 240,
|
|
1279
|
+
modelValue: I.value,
|
|
1280
|
+
"onUpdate:modelValue": r[3] || (r[3] = (C) => I.value = C),
|
|
1281
|
+
class: ae([s.disabled ? "text-fm-color-typo-disabled " : ""])
|
|
1282
|
+
}, null, 8, ["label", "modelValue", "class"]),
|
|
1283
|
+
x.value ? (S(), J(Es, {
|
|
1284
|
+
key: 2,
|
|
1285
|
+
required: e(t).template != null,
|
|
1286
|
+
disabled: s.disabled,
|
|
1287
|
+
supplier: e(t).supplier,
|
|
1288
|
+
setting: e(t).netSuite,
|
|
1289
|
+
items: e(t).items,
|
|
1290
|
+
onChange: (C, te) => {
|
|
1291
|
+
e(t).items = C, e(t).netSuite = te;
|
|
1292
|
+
},
|
|
1293
|
+
"onNetsuite:ready": r[4] || (r[4] = (C) => {
|
|
1294
|
+
g.value = !0;
|
|
1295
|
+
})
|
|
1296
|
+
}, null, 8, ["required", "disabled", "supplier", "setting", "items", "onChange"])) : G("", !0),
|
|
1297
|
+
e(l).enableBackdatePo ? (S(), M("div", Js, [
|
|
1298
|
+
o("div", {
|
|
1299
|
+
class: ae([
|
|
1300
|
+
"flex",
|
|
1301
|
+
{
|
|
1302
|
+
"flex-col": h.value
|
|
1303
|
+
}
|
|
1304
|
+
])
|
|
1305
|
+
}, [
|
|
1306
|
+
d(we, {
|
|
1307
|
+
modelValue: e(K),
|
|
1308
|
+
"onUpdate:modelValue": r[5] || (r[5] = (C) => Se(K) ? K.value = C : null),
|
|
1309
|
+
label: e(f)("inventory.transfer.form.backdate.title"),
|
|
1310
|
+
sublabel: e(f)("inventory.transfer.form.backdate.subtitle"),
|
|
1311
|
+
"label-placement": "right",
|
|
1312
|
+
disabled: z.value && !s.lastClosingDate || s.disabled
|
|
1313
|
+
}, null, 8, ["modelValue", "label", "sublabel", "disabled"]),
|
|
1314
|
+
o("div", {
|
|
1315
|
+
class: ae({ hidden: h.value, "w-16": !h.value })
|
|
1316
|
+
}, null, 2),
|
|
1317
|
+
e(K) ? (S(), M("div", Ws, [
|
|
1318
|
+
o("div", Xs, [
|
|
1319
|
+
d(A, {
|
|
1320
|
+
modelValue: e(Q),
|
|
1321
|
+
"onUpdate:modelValue": r[6] || (r[6] = (C) => Se(Q) ? Q.value = C : null)
|
|
1322
|
+
}, null, 8, ["modelValue"])
|
|
1323
|
+
]),
|
|
1324
|
+
o("div", ea, [
|
|
1325
|
+
d(X, {
|
|
1326
|
+
modelValue: e(p),
|
|
1327
|
+
"onUpdate:modelValue": r[7] || (r[7] = (C) => Se(p) ? p.value = C : null)
|
|
1328
|
+
}, null, 8, ["modelValue"])
|
|
1329
|
+
])
|
|
1330
|
+
])) : G("", !0)
|
|
1331
|
+
], 2),
|
|
1332
|
+
e(B) ? (S(), J(le, {
|
|
1333
|
+
key: 0,
|
|
1334
|
+
modelValue: e(B),
|
|
1335
|
+
"onUpdate:modelValue": r[8] || (r[8] = (C) => Se(B) ? B.value = C : null),
|
|
1336
|
+
rules: [e(Ft)(new Date(s.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1337
|
+
}, null, 8, ["modelValue", "rules"])) : G("", !0),
|
|
1338
|
+
z.value && !s.lastClosingDate ? (S(), M("div", ta, [
|
|
1339
|
+
d(de, {
|
|
1340
|
+
name: "error",
|
|
1341
|
+
size: "sm",
|
|
1342
|
+
class: "text-fm-color-typo-warning"
|
|
1343
|
+
}),
|
|
1344
|
+
o("span", sa, U(e(f)("inventory.transfer.form.backdate.error")), 1)
|
|
1345
|
+
])) : G("", !0)
|
|
1346
|
+
])) : G("", !0)
|
|
1347
|
+
])
|
|
1348
|
+
]),
|
|
1349
|
+
o("div", aa, [
|
|
1350
|
+
d(le, {
|
|
1351
|
+
"model-value": e(t).items,
|
|
1352
|
+
rules: [e(Re)(1)]
|
|
1353
|
+
}, null, 8, ["model-value", "rules"]),
|
|
1354
|
+
o("div", {
|
|
1355
|
+
class: ae([
|
|
1356
|
+
"flex gap-16",
|
|
1357
|
+
{
|
|
1358
|
+
"flex-col items-start": h.value,
|
|
1359
|
+
"items-center": !h.value
|
|
1360
|
+
}
|
|
1361
|
+
])
|
|
1362
|
+
}, [
|
|
1363
|
+
o("div", oa, U(e(f)("inventory.transfer.form.items.title")), 1),
|
|
1364
|
+
o("div", la, [
|
|
1365
|
+
d(ee, {
|
|
1366
|
+
disabled: s.disabled,
|
|
1367
|
+
label: e(f)("inventory.transfer.form.items.addItem"),
|
|
1368
|
+
"prepend-icon": "add",
|
|
1369
|
+
variant: "secondary",
|
|
1370
|
+
"text-color": "primary",
|
|
1371
|
+
"bg-color": "transparent",
|
|
1372
|
+
"border-color": "primary",
|
|
1373
|
+
onClick: r[9] || (r[9] = (C) => Te()),
|
|
1374
|
+
size: "md"
|
|
1375
|
+
}, null, 8, ["disabled", "label"]),
|
|
1376
|
+
e(t).template ? (S(), J(se, {
|
|
1377
|
+
key: 0,
|
|
1378
|
+
"z-index": 50
|
|
1379
|
+
}, {
|
|
1380
|
+
content: D(() => [
|
|
1381
|
+
o("div", null, U(e(f)("inventory.transfer.form.items.forecastStock.notAvailable")), 1)
|
|
1382
|
+
]),
|
|
1383
|
+
default: D(() => [
|
|
1384
|
+
d(tt, {
|
|
1385
|
+
"onUpdate:poItems": r[10] || (r[10] = (C) => e(t).items = C),
|
|
1386
|
+
disabled: ""
|
|
1387
|
+
})
|
|
1388
|
+
]),
|
|
1389
|
+
_: 1
|
|
1390
|
+
})) : (S(), J(tt, {
|
|
1391
|
+
key: 1,
|
|
1392
|
+
"onUpdate:poItems": r[11] || (r[11] = (C) => e(t).items = C),
|
|
1393
|
+
disabled: s.disabled || !!e(t).template
|
|
1394
|
+
}, null, 8, ["disabled"]))
|
|
1395
|
+
])
|
|
1396
|
+
], 2),
|
|
1397
|
+
$.value === e(j).PURCHASE && V.value && e(l).enableTotalCost && ((Qe = s.modelValue) != null && Qe.items.length) ? (S(), M("div", na, [
|
|
1398
|
+
d(we, {
|
|
1399
|
+
label: e(H) ? e(f)("inventory.transfer.form.items.fetchingData") : e(f)("inventory.transfer.form.items.comparePriceHistory"),
|
|
1400
|
+
"prepend-icon": "compare_arrows",
|
|
1401
|
+
"label-placement": "right",
|
|
1402
|
+
"model-value": e(c),
|
|
1403
|
+
"onUpdate:modelValue": r[12] || (r[12] = (C) => Se(c) ? c.value = C : null),
|
|
1404
|
+
disabled: e(H) || s.disabled
|
|
1405
|
+
}, null, 8, ["label", "model-value", "disabled"])
|
|
1406
|
+
])) : G("", !0),
|
|
1407
|
+
(S(), J(ce, {
|
|
1408
|
+
"column-defs": Ce.value,
|
|
1409
|
+
"row-data": e(t).items,
|
|
1410
|
+
key: e(t).items.map((C) => C.sku._id).join("."),
|
|
1411
|
+
"hide-footer": "",
|
|
1412
|
+
"page-size": e(t).items.length
|
|
1413
|
+
}, {
|
|
1414
|
+
"table-row": D((C) => [
|
|
1415
|
+
d(Rs, {
|
|
1416
|
+
"compare-price-by-sku": e(oe),
|
|
1417
|
+
"show-compare-price": $.value === e(j).PURCHASE && e(c),
|
|
1418
|
+
row: C
|
|
1419
|
+
}, null, 8, ["compare-price-by-sku", "show-compare-price", "row"])
|
|
1420
|
+
]),
|
|
1421
|
+
"list-row": D((C) => [
|
|
1422
|
+
(S(), J(nt, {
|
|
1423
|
+
row: C,
|
|
1424
|
+
key: e(t).items.map((te) => te.sku._id).join(".")
|
|
1425
|
+
}, {
|
|
1426
|
+
default: D((te) => [
|
|
1427
|
+
d(ms, {
|
|
1428
|
+
"compare-price-by-sku": e(oe),
|
|
1429
|
+
"show-compare-price": $.value === e(j).PURCHASE && e(c),
|
|
1430
|
+
row: C,
|
|
1431
|
+
"cell-by-col-id": te
|
|
1432
|
+
}, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "cell-by-col-id"])
|
|
1433
|
+
]),
|
|
1434
|
+
_: 2
|
|
1435
|
+
}, 1032, ["row"]))
|
|
1436
|
+
]),
|
|
1437
|
+
_: 1
|
|
1438
|
+
}, 8, ["column-defs", "row-data", "page-size"]))
|
|
1439
|
+
])
|
|
1440
|
+
];
|
|
1441
|
+
}),
|
|
1442
|
+
_: 1
|
|
1443
|
+
}, 8, ["disabled", "onValidationFailed"])
|
|
1444
|
+
]);
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
}), ia = { class: "flex items-center" }, ua = { class: "fm-typo-en-title-md-800" }, da = { class: "flex gap-4" }, ca = /* @__PURE__ */ pe({
|
|
1448
|
+
__name: "TransferDialog",
|
|
1449
|
+
props: {
|
|
1450
|
+
mode: {},
|
|
1451
|
+
modelValue: {},
|
|
1452
|
+
templateId: {},
|
|
1453
|
+
show: { type: Boolean },
|
|
1454
|
+
lastClosingDate: {}
|
|
1455
|
+
},
|
|
1456
|
+
emits: ["update:show", "submitted"],
|
|
1457
|
+
setup(m, { expose: y, emit: n }) {
|
|
1458
|
+
var Q;
|
|
1459
|
+
const i = m, b = n, t = rt(), f = ut(), _ = qe(), w = Ke(), u = He(), a = je(), l = Ae(), { t: v } = he(), k = N(!1), h = N(!1), g = N(!1);
|
|
1460
|
+
async function x(p) {
|
|
1461
|
+
if (p) {
|
|
1462
|
+
h.value = !1;
|
|
1463
|
+
try {
|
|
1464
|
+
await w.readSuppliers(), h.value = !0;
|
|
1465
|
+
} catch {
|
|
1466
|
+
_.open({
|
|
1467
|
+
title: v("inventory.transfer.form.unableToFetchListOfSuppliers.title"),
|
|
1468
|
+
message: v("inventory.transfer.form.unableToFetchListOfSuppliers.message"),
|
|
1469
|
+
type: "error"
|
|
1470
|
+
});
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
a.watchLocation(x);
|
|
1475
|
+
function F() {
|
|
1476
|
+
return {
|
|
1477
|
+
remark: void 0,
|
|
1478
|
+
ref: void 0,
|
|
1479
|
+
stockSnapshotId: void 0,
|
|
1480
|
+
effectiveAt: void 0,
|
|
1481
|
+
items: [],
|
|
1482
|
+
supplier: {
|
|
1483
|
+
_rev: void 0,
|
|
1484
|
+
email: void 0,
|
|
1485
|
+
internal: void 0,
|
|
1486
|
+
contactName: void 0,
|
|
1487
|
+
phoneNumber: void 0,
|
|
1488
|
+
registrationNumber: void 0,
|
|
1489
|
+
supplyItems: void 0,
|
|
1490
|
+
_id: "",
|
|
1491
|
+
name: "",
|
|
1492
|
+
address: {
|
|
1493
|
+
line2: void 0,
|
|
1494
|
+
line1: "",
|
|
1495
|
+
state: "",
|
|
1496
|
+
city: "",
|
|
1497
|
+
postcode: "",
|
|
1498
|
+
country: ""
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
status: "DRAFT",
|
|
1502
|
+
_id: "",
|
|
1503
|
+
seqNumber: 0,
|
|
1504
|
+
deliveryOrder: [],
|
|
1505
|
+
template: i.templateId,
|
|
1506
|
+
templateDoc: f.templates.find((c) => c._id === i.templateId)
|
|
1507
|
+
};
|
|
1508
|
+
}
|
|
1509
|
+
const V = Nt(i, "show"), z = N(i.modelValue ?? F()), ue = N(((Q = i.modelValue) == null ? void 0 : Q._id) ?? `${Math.random()}`);
|
|
1510
|
+
ge(
|
|
1511
|
+
() => i.show,
|
|
1512
|
+
(p) => {
|
|
1513
|
+
var c;
|
|
1514
|
+
p && (g.value = !1, z.value = i.modelValue ?? F(), ue.value = ((c = i.modelValue) == null ? void 0 : c._id) ?? `${Math.random()}`);
|
|
1515
|
+
}
|
|
1516
|
+
);
|
|
1517
|
+
const T = q(() => !h.value || !g.value), $ = q(() => {
|
|
1518
|
+
switch (i.mode) {
|
|
1519
|
+
case De.READ:
|
|
1520
|
+
return "View transfer";
|
|
1521
|
+
case De.CREATE:
|
|
1522
|
+
return v("inventory.transfer.receiveRequest.create.title");
|
|
1523
|
+
case De.UPDATE:
|
|
1524
|
+
return v("inventory.transfer.receiveRequest.update.title");
|
|
1525
|
+
}
|
|
1526
|
+
return "";
|
|
1527
|
+
}), O = N();
|
|
1528
|
+
y({
|
|
1529
|
+
validateInputs: () => {
|
|
1530
|
+
var p, c;
|
|
1531
|
+
(c = (p = O.value) == null ? void 0 : p.validateInputs) == null || c.call(p);
|
|
1532
|
+
},
|
|
1533
|
+
resetInputsValidation: () => {
|
|
1534
|
+
var p, c;
|
|
1535
|
+
(c = (p = O.value) == null ? void 0 : p.resetInputsValidation) == null || c.call(p);
|
|
1536
|
+
},
|
|
1537
|
+
resetInputs: () => {
|
|
1538
|
+
var p, c;
|
|
1539
|
+
(c = (p = O.value) == null ? void 0 : p.resetInputs) == null || c.call(p);
|
|
1540
|
+
}
|
|
1541
|
+
});
|
|
1542
|
+
async function R() {
|
|
1543
|
+
const p = z.value;
|
|
1544
|
+
k.value = !0, (p.supplier.internal === "warehouse" || p.supplier.internal === "restaurant") && (p.items = p.items.map(({ totalCost: c, ...H }) => H)), l.mustUseDefaultCost && (p.items = p.items.map((c) => ({
|
|
1545
|
+
...c,
|
|
1546
|
+
totalCost: re(c.sku, c.quantity, c.measurement)
|
|
1547
|
+
})));
|
|
1548
|
+
try {
|
|
1549
|
+
await t.createPurchaseOrder(p), await new Promise((c) => setTimeout(c, 1e3)), _.open({
|
|
1550
|
+
title: v("inventory.transfer.receiveRequest.create.success"),
|
|
1551
|
+
message: v("inventory.transfer.receiveRequest.create.successMessage"),
|
|
1552
|
+
type: "success"
|
|
1553
|
+
}), b("update:show", !1), b("submitted");
|
|
1554
|
+
} catch (c) {
|
|
1555
|
+
_.open({
|
|
1556
|
+
title: v("inventory.transfer.receiveRequest.create.error.title"),
|
|
1557
|
+
message: v("inventory.transfer.receiveRequest.create.error.message"),
|
|
1558
|
+
type: "error"
|
|
1559
|
+
}), console.error("Error in creating purchase order", c);
|
|
1560
|
+
} finally {
|
|
1561
|
+
k.value = !1;
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
async function I() {
|
|
1565
|
+
const p = z.value;
|
|
1566
|
+
k.value = !0, (p.supplier.internal === "warehouse" || p.supplier.internal === "restaurant") && (p.items = p.items.map(({ totalCost: c, ...H }) => H)), l.mustUseDefaultCost && (p.items = p.items.map((c) => ({
|
|
1567
|
+
...c,
|
|
1568
|
+
totalCost: re(c.sku, c.quantity, c.measurement)
|
|
1569
|
+
})));
|
|
1570
|
+
try {
|
|
1571
|
+
await t.updatePurchaseOrder(p), await new Promise((c) => setTimeout(c, 1e3)), _.open({
|
|
1572
|
+
title: v("inventory.transfer.receiveRequest.update.success"),
|
|
1573
|
+
message: v("inventory.transfer.receiveRequest.update.successMessage"),
|
|
1574
|
+
type: "success"
|
|
1575
|
+
}), b("update:show", !1), b("submitted");
|
|
1576
|
+
} catch (c) {
|
|
1577
|
+
_.open({
|
|
1578
|
+
title: v("inventory.transfer.receiveRequest.update.error.title"),
|
|
1579
|
+
message: v("inventory.transfer.receiveRequest.update.error.message"),
|
|
1580
|
+
type: "error"
|
|
1581
|
+
}), console.error("Error in updating purchase order", c);
|
|
1582
|
+
} finally {
|
|
1583
|
+
k.value = !1;
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
function B() {
|
|
1587
|
+
switch (i.mode) {
|
|
1588
|
+
case De.CREATE:
|
|
1589
|
+
return R();
|
|
1590
|
+
case De.UPDATE:
|
|
1591
|
+
return I();
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
function K() {
|
|
1595
|
+
var p, c;
|
|
1596
|
+
(c = (p = O.value) == null ? void 0 : p.validateInputs) == null || c.call(p);
|
|
1597
|
+
}
|
|
1598
|
+
return (p, c) => {
|
|
1599
|
+
const H = P("FmButton"), oe = P("FmSideSheet");
|
|
1600
|
+
return S(), J(oe, {
|
|
1601
|
+
modelValue: e(V),
|
|
1602
|
+
"onUpdate:modelValue": c[3] || (c[3] = (W) => Se(V) ? V.value = W : null),
|
|
1603
|
+
"dismiss-away": "",
|
|
1604
|
+
"close-button": "",
|
|
1605
|
+
"max-width": 900
|
|
1606
|
+
}, {
|
|
1607
|
+
"side-sheet-header": D(() => [
|
|
1608
|
+
o("div", ia, [
|
|
1609
|
+
o("div", ua, U($.value), 1)
|
|
1610
|
+
])
|
|
1611
|
+
]),
|
|
1612
|
+
default: D(() => [
|
|
1613
|
+
(S(), J(ra, {
|
|
1614
|
+
class: "w-full",
|
|
1615
|
+
ref_key: "formRef",
|
|
1616
|
+
ref: O,
|
|
1617
|
+
"onForm:ready": c[0] || (c[0] = () => g.value = !0),
|
|
1618
|
+
onValidationSuccess: B,
|
|
1619
|
+
modelValue: z.value,
|
|
1620
|
+
"onUpdate:modelValue": c[1] || (c[1] = (W) => z.value = W),
|
|
1621
|
+
disabled: k.value || T.value,
|
|
1622
|
+
suppliers: e(w).suppliers,
|
|
1623
|
+
skus: e(u).skus,
|
|
1624
|
+
key: ue.value,
|
|
1625
|
+
"last-closing-date": p.lastClosingDate
|
|
1626
|
+
}, null, 8, ["modelValue", "disabled", "suppliers", "skus", "last-closing-date"]))
|
|
1627
|
+
]),
|
|
1628
|
+
"side-sheet-footer": D(() => [
|
|
1629
|
+
o("div", da, [
|
|
1630
|
+
d(H, {
|
|
1631
|
+
loading: k.value,
|
|
1632
|
+
disabled: T.value,
|
|
1633
|
+
label: e(v)("common.save"),
|
|
1634
|
+
onClick: K
|
|
1635
|
+
}, null, 8, ["loading", "disabled", "label"]),
|
|
1636
|
+
d(H, {
|
|
1637
|
+
disabled: T.value,
|
|
1638
|
+
variant: "tertiary",
|
|
1639
|
+
label: e(v)("common.close"),
|
|
1640
|
+
onClick: c[2] || (c[2] = (W) => b("update:show", !1))
|
|
1641
|
+
}, null, 8, ["disabled", "label"])
|
|
1642
|
+
])
|
|
1643
|
+
]),
|
|
1644
|
+
_: 1
|
|
1645
|
+
}, 8, ["modelValue"]);
|
|
1646
|
+
};
|
|
1647
|
+
}
|
|
1648
|
+
}), ma = { class: "flex flex-col py-8" }, pa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fa = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, va = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, ya = {
|
|
1649
|
+
key: 0,
|
|
1650
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
1651
|
+
}, ba = { class: "pt-8" }, st = "ReceiveRequestViewSearchCriteria", Va = /* @__PURE__ */ pe({
|
|
1652
|
+
__name: "ReceiveRequestView",
|
|
1653
|
+
setup(m) {
|
|
1654
|
+
const { t: y } = he(), n = qe();
|
|
1655
|
+
Ve.object({
|
|
1656
|
+
name: Ve.string().optional().nullable(),
|
|
1657
|
+
startDate: Ve.string().optional().nullable(),
|
|
1658
|
+
endDate: Ve.string().optional().nullable()
|
|
1659
|
+
});
|
|
1660
|
+
const i = q(
|
|
1661
|
+
() => !l._currentLocation || u.loading.value
|
|
1662
|
+
), b = Et(), t = Ae();
|
|
1663
|
+
function f() {
|
|
1664
|
+
const T = {
|
|
1665
|
+
name: "",
|
|
1666
|
+
...Je()
|
|
1667
|
+
}, $ = b.getItem(st);
|
|
1668
|
+
if (!$)
|
|
1669
|
+
return T;
|
|
1670
|
+
try {
|
|
1671
|
+
return JSON.parse($);
|
|
1672
|
+
} catch {
|
|
1673
|
+
return T;
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
function _() {
|
|
1677
|
+
b.setItem(st, JSON.stringify(w.value));
|
|
1678
|
+
}
|
|
1679
|
+
const w = N(f()), u = It("receive/request", w.value), { columnDefs: a } = Vt("receive/request", u), l = je();
|
|
1680
|
+
async function v() {
|
|
1681
|
+
const T = `inventory-record_${We(w.value.startDate).format("DD-MM-YYYY_HH-mm")}-${We(w.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, $ = u.purchaseOrders.value.flatMap(
|
|
1682
|
+
(R) => R.items.map((I) => {
|
|
1683
|
+
const B = new Date(Mt(R._id) ?? ""), K = R.effectiveAt ? new Date(R.effectiveAt) : void 0, Q = ye(
|
|
1684
|
+
At(I.sku, R.deliveryOrder || [])
|
|
1685
|
+
), p = ye(I.quantity);
|
|
1686
|
+
return {
|
|
1687
|
+
"SKU code": I.code,
|
|
1688
|
+
"SKU name": I.name,
|
|
1689
|
+
"PO #": R.seqNumber,
|
|
1690
|
+
"Effective at": K,
|
|
1691
|
+
Date: B,
|
|
1692
|
+
Status: R.status,
|
|
1693
|
+
Reference: R.ref ?? "",
|
|
1694
|
+
"Received quantity": Q,
|
|
1695
|
+
"Ordered quantity": p,
|
|
1696
|
+
Unit: I.sku.unit.abbrev,
|
|
1697
|
+
"Total cost": I.totalCost ? ze(I.totalCost) : null
|
|
1698
|
+
};
|
|
1699
|
+
})
|
|
1700
|
+
), O = [
|
|
1701
|
+
"SKU code",
|
|
1702
|
+
"SKU name",
|
|
1703
|
+
"PO #",
|
|
1704
|
+
"Date",
|
|
1705
|
+
"Status",
|
|
1706
|
+
"Reference",
|
|
1707
|
+
"Received quantity",
|
|
1708
|
+
"Ordered quantity",
|
|
1709
|
+
"Unit"
|
|
1710
|
+
];
|
|
1711
|
+
t.enableBackdatePo && O.insert("Effective at", 4), t.enableTotalCost && O.push("Total cost"), await Ut(
|
|
1712
|
+
[
|
|
1713
|
+
{
|
|
1714
|
+
name: "purchases",
|
|
1715
|
+
data: $,
|
|
1716
|
+
columns: O
|
|
1717
|
+
}
|
|
1718
|
+
],
|
|
1719
|
+
T
|
|
1720
|
+
), n.open({
|
|
1721
|
+
title: y("inventory.transfer.receiveRequest.export.success"),
|
|
1722
|
+
message: y("inventory.transfer.receiveRequest.export.message", [T]),
|
|
1723
|
+
type: "success"
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
const k = N(Je()), h = N("");
|
|
1727
|
+
ge([() => k.value], ([T]) => {
|
|
1728
|
+
!T.startDate || !T.endDate || (w.value.startDate = T.startDate, w.value.endDate = T.endDate, u.updateDateRange(
|
|
1729
|
+
w.value.startDate,
|
|
1730
|
+
w.value.endDate
|
|
1731
|
+
), _());
|
|
1732
|
+
}), ge([() => h.value], () => {
|
|
1733
|
+
_();
|
|
1734
|
+
});
|
|
1735
|
+
function g(T) {
|
|
1736
|
+
if (T === "create") {
|
|
1737
|
+
if (i.value) {
|
|
1738
|
+
n.open({
|
|
1739
|
+
title: "Loading data...",
|
|
1740
|
+
message: "Please wait.",
|
|
1741
|
+
type: "info"
|
|
1742
|
+
});
|
|
1743
|
+
return;
|
|
1744
|
+
}
|
|
1745
|
+
return u.promptCreateTransferDialog();
|
|
1746
|
+
}
|
|
1747
|
+
if (T === "refresh")
|
|
1748
|
+
return u.fetchData();
|
|
1749
|
+
if (T === "export")
|
|
1750
|
+
return v();
|
|
1751
|
+
}
|
|
1752
|
+
const { breakpoints: x } = Ye(), F = q(() => x.value.xs || x.value.sm), V = q(() => F.value ? 10 : 20), z = $t(), ue = q(() => [
|
|
1753
|
+
{
|
|
1754
|
+
label: y("inventory.transfer.receiveRequest.actions.create"),
|
|
1755
|
+
value: "create",
|
|
1756
|
+
isPrimary: !0,
|
|
1757
|
+
prependIcon: "add"
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
label: y("common.refresh"),
|
|
1761
|
+
value: "refresh"
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
label: y("common.export"),
|
|
1765
|
+
value: "export"
|
|
1766
|
+
}
|
|
1767
|
+
]);
|
|
1768
|
+
return (T, $) => {
|
|
1769
|
+
const O = P("FmTable");
|
|
1770
|
+
return S(), J(Tt, {
|
|
1771
|
+
title: e(y)("inventory.transfer.receiveRequest.title2"),
|
|
1772
|
+
actions: ue.value,
|
|
1773
|
+
"onClick:action": g
|
|
1774
|
+
}, {
|
|
1775
|
+
default: D(() => {
|
|
1776
|
+
var R;
|
|
1777
|
+
return [
|
|
1778
|
+
o("div", {
|
|
1779
|
+
class: ae([
|
|
1780
|
+
"flex flex-col gap-8 max-h-full",
|
|
1781
|
+
{
|
|
1782
|
+
"p-0": F.value,
|
|
1783
|
+
"px-24 ": !F.value
|
|
1784
|
+
}
|
|
1785
|
+
])
|
|
1786
|
+
}, [
|
|
1787
|
+
d(Pt, {
|
|
1788
|
+
"date-range-query": "",
|
|
1789
|
+
"date-range": k.value,
|
|
1790
|
+
"onUpdate:dateRange": $[0] || ($[0] = (I) => k.value = I),
|
|
1791
|
+
searchable: "",
|
|
1792
|
+
"change-location": "",
|
|
1793
|
+
search: h.value,
|
|
1794
|
+
"onUpdate:search": $[1] || ($[1] = (I) => h.value = I)
|
|
1795
|
+
}, null, 8, ["date-range", "search"]),
|
|
1796
|
+
(S(), J(O, {
|
|
1797
|
+
style: ot(e(z).tableHeight),
|
|
1798
|
+
"column-defs": e(a),
|
|
1799
|
+
"row-data": e(u).purchaseOrders.value,
|
|
1800
|
+
"search-value": h.value,
|
|
1801
|
+
loading: i.value,
|
|
1802
|
+
onRowClick: $[2] || ($[2] = (I) => e(u).promptShowTransferDetails(I.original)),
|
|
1803
|
+
key: (R = e(l)._currentLocation) == null ? void 0 : R.dbName,
|
|
1804
|
+
"page-size": V.value
|
|
1805
|
+
}, {
|
|
1806
|
+
"list-row": D((I) => [
|
|
1807
|
+
d(nt, {
|
|
1808
|
+
row: I,
|
|
1809
|
+
onRowClick: e(u).promptShowTransferDetails
|
|
1810
|
+
}, {
|
|
1811
|
+
default: D((B) => {
|
|
1812
|
+
var K, Q, p, c, H, oe, W, $e, Ce, Te, Me, Pe, s, r, E, Z, de, be, se, fe;
|
|
1813
|
+
return [
|
|
1814
|
+
o("div", ma, [
|
|
1815
|
+
o("div", pa, [
|
|
1816
|
+
d(e(ie), {
|
|
1817
|
+
render: (p = (Q = (K = B._id) == null ? void 0 : K.column) == null ? void 0 : Q.columnDef) == null ? void 0 : p.cell,
|
|
1818
|
+
props: (H = (c = B._id) == null ? void 0 : c.getContext) == null ? void 0 : H.call(c)
|
|
1819
|
+
}, null, 8, ["render", "props"])
|
|
1820
|
+
]),
|
|
1821
|
+
o("div", fa, [
|
|
1822
|
+
d(e(ie), {
|
|
1823
|
+
render: ($e = (W = (oe = B.supplier_name) == null ? void 0 : oe.column) == null ? void 0 : W.columnDef) == null ? void 0 : $e.cell,
|
|
1824
|
+
props: (Te = (Ce = B.supplier_name) == null ? void 0 : Ce.getContext) == null ? void 0 : Te.call(Ce)
|
|
1825
|
+
}, null, 8, ["render", "props"])
|
|
1826
|
+
]),
|
|
1827
|
+
o("div", va, U(I.original.items.map((xe) => `${xe.name}`).join(", ")), 1),
|
|
1828
|
+
I.original.ref ? (S(), M("div", ya, [
|
|
1829
|
+
d(e(ie), {
|
|
1830
|
+
render: (s = (Pe = (Me = B.ref) == null ? void 0 : Me.column) == null ? void 0 : Pe.columnDef) == null ? void 0 : s.cell,
|
|
1831
|
+
props: (E = (r = B.ref) == null ? void 0 : r.getContext) == null ? void 0 : E.call(r)
|
|
1832
|
+
}, null, 8, ["render", "props"])
|
|
1833
|
+
])) : G("", !0),
|
|
1834
|
+
o("div", ba, [
|
|
1835
|
+
d(e(ie), {
|
|
1836
|
+
render: (be = (de = (Z = B.status) == null ? void 0 : Z.column) == null ? void 0 : de.columnDef) == null ? void 0 : be.cell,
|
|
1837
|
+
props: (fe = (se = B.status) == null ? void 0 : se.getContext) == null ? void 0 : fe.call(se)
|
|
1838
|
+
}, null, 8, ["render", "props"])
|
|
1839
|
+
])
|
|
1840
|
+
])
|
|
1841
|
+
];
|
|
1842
|
+
}),
|
|
1843
|
+
_: 2
|
|
1844
|
+
}, 1032, ["row", "onRowClick"])
|
|
1845
|
+
]),
|
|
1846
|
+
_: 1
|
|
1847
|
+
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
1848
|
+
], 2),
|
|
1849
|
+
(S(), J(mt, { to: "body" }, [
|
|
1850
|
+
d(ca, Oe(e(u).transferDialogProps.value, {
|
|
1851
|
+
onSubmitted: e(u).fetchData
|
|
1852
|
+
}), null, 16, ["onSubmitted"]),
|
|
1853
|
+
d(Rt, Oe(e(u).transferDetailsProps.value, {
|
|
1854
|
+
onSubmitted: e(u).fetchData
|
|
1855
|
+
}), null, 16, ["onSubmitted"])
|
|
1856
|
+
]))
|
|
1857
|
+
];
|
|
1858
|
+
}),
|
|
1859
|
+
_: 1
|
|
1860
|
+
}, 8, ["title", "actions"]);
|
|
1861
|
+
};
|
|
1862
|
+
}
|
|
1863
|
+
});
|
|
1864
|
+
export {
|
|
1865
|
+
Va as default
|
|
1866
|
+
};
|