@feedmepos/mf-inventory-portal 1.2.63-dev.1 → 1.2.64
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-BHssUobV.js → App-apJIvz1w.js} +78 -82
- package/dist/{ApprovalView-DRGCQeGY.js → ApprovalView-CnT6gEI8.js} +5 -5
- package/dist/{BindingsDialog-CWl3LpdO.js → BindingsDialog-DLEGDbV2.js} +5 -5
- package/dist/{BindingsPicker-BcASw3JJ.js → BindingsPicker-1Xt1vCu9.js} +3 -3
- package/dist/{BindingsTable-BiKiLiVY.js → BindingsTable-_0cOM0Kx.js} +5 -5
- package/dist/{ClosingDraftView-mh5Kw46x.js → ClosingDraftView-DsVPsN87.js} +216 -217
- package/dist/{ClosingHistoryView-C-ZrFei9.js → ClosingHistoryView-YrEVWvGu.js} +36 -36
- package/dist/{ClosingTemplateView-DBNRH0Tt.js → ClosingTemplateView-DB3F1wul.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-Dv3JZ3yr.js → DeliveryOrderPrintPreview-CglCMgHc.js} +7 -7
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CfL1adhx.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-MMPTJodu.js} +16 -16
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Db0JeXbc.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CCID5O2Y.js} +2 -2
- package/dist/{FmMultiselectDialog-D9g07F_c.js → FmMultiselectDialog-B8xFmCsH.js} +1 -1
- package/dist/{FmMultiselectDialog-DuYKQng9.js → FmMultiselectDialog-lQM1qEEW.js} +16 -16
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CeXRT7Lf.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BLDz8wwK.js} +22 -23
- package/dist/{ImportView-DoMyJ1NE.js → ImportView-DeC-MPFn.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CqJQcOBK.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BGDZlmsr.js} +1 -1
- package/dist/{IngredientGroupView-D_Cl4kJy.js → IngredientGroupView-CuFwQ8Bo.js} +5 -5
- package/dist/{IngredientsView-CG6wUGzt.js → IngredientsView-CfloqEqn.js} +24 -25
- package/dist/{IntegrationView-BIWPp1JH.js → IntegrationView-CFU0yG6C.js} +17 -18
- package/dist/{InventoryBindingForm-BrL6-2He.js → InventoryBindingForm-i7eNurS2.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-M3uVquEq.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-zOo9YVJe.js} +16 -17
- package/dist/{InventoryBindingSummary-mnlQU1Mp.js → InventoryBindingSummary-BbHLCdjj.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ByPOKZRm.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-NEPqmkHR.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DHwXNoTs.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BDVHkTSE.js} +2 -2
- package/dist/{PublishView-B4iVMq25.js → PublishView-CbwCLtph.js} +8 -8
- package/dist/{PurchaseOrderPrintPreview-ws-SKrEC.js → PurchaseOrderPrintPreview-DLhgjhHB.js} +11 -11
- package/dist/{ReceiveRequestView-deSiORNX.js → ReceiveRequestView-CE2aQR-o.js} +435 -433
- package/dist/RecipeView-B-gmrXHR.js +646 -0
- package/dist/{StockView-6j_t2Kf1.js → StockView-BNe2_5bA.js} +105 -106
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CgAMsW8n.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-D0BDdq4d.js} +1 -1
- package/dist/{SupplierView-D5tSOECx.js → SupplierView-wSzWjZLY.js} +19 -20
- package/dist/{SurchargeView-CP81Q4dW.js → SurchargeView-G8OyE60y.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-Bmuw4PTO.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CROQL761.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D1FuB-kv.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CwV2luel.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Canrz2ri.js → TransferDetails.vue_vue_type_script_setup_true_lang-D1AGDeEP.js} +124 -124
- package/dist/{TransferTemplateView-CRI_Lexa.js → TransferTemplateView-CVfi8jsk.js} +21 -22
- package/dist/{UnitView-BZmfd-aw.js → UnitView-Dn3nuQHm.js} +10 -11
- package/dist/{WarehouseView-BcmSyjA0.js → WarehouseView-GSxQ_Ev2.js} +5 -5
- package/dist/{WastageTemplateView-CNsdu0ga.js → WastageTemplateView-BG-y48uc.js} +14 -14
- package/dist/api/inventory.d.ts +36 -126
- package/dist/api/netsuite.d.ts +1 -8
- package/dist/{app-ayv5Jw7D.js → app-CYbiMVcX.js} +7036 -8041
- package/dist/app.d.ts +0 -228
- package/dist/app.js +1 -1
- package/dist/{closing-template-D9UR8sMo.js → closing-template-Dq16W8vW.js} +1 -1
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -37
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +0 -14
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -16
- package/dist/{date2-GNP-79dA.js → date2-De3BHKh5.js} +1 -1
- package/dist/{dayjs.min-Bg_wgP2J.js → dayjs.min-DxdfVXA-.js} +16 -16
- package/dist/{defineDeepModel-Co03tZfS.js → defineDeepModel-2n_afItE.js} +1 -1
- package/dist/{duplicate-template-BiPU4Z2Y.js → duplicate-template-DM7YIgor.js} +1 -1
- package/dist/{feature-BGeFfaiX.js → feature-_nNpSZuh.js} +89 -94
- package/dist/{format-time-from-id-ByV0VX1x.js → format-time-from-id-D5HSMsS-.js} +1 -1
- package/dist/{format-unit-display-r1Hb4DfH.js → format-unit-display-CQUFDxVm.js} +15 -16
- package/dist/{import-export.helper-PB9pPO3m.js → import-export.helper-BoxczUsX.js} +15 -16
- package/dist/{index-ClbYCYSU.js → index-B6nDUCCe.js} +3 -3
- package/dist/{index-DMqOVOHw.js → index-CdfF5GGW.js} +1 -1
- package/dist/{index-DWWlEK_r.js → index-Cp_mpu5S.js} +1412 -1471
- package/dist/{lodash-BbWPSHMM.js → lodash-2R7Rgorb.js} +1 -1
- package/dist/{netsuite-VGghPz8h.js → netsuite-Bss4fURp.js} +92 -92
- package/dist/{purchase-order-template-BMNxJR59.js → purchase-order-template-CBSvv0b2.js} +1 -1
- package/dist/router/name.d.ts +0 -1
- package/dist/rules-T-fs8_4_.js +327 -0
- package/dist/stock-CFWu5bRA.js +75 -0
- package/dist/{stock-b7nNc6ko.js → stock-DMX_hH5c.js} +1 -1
- package/dist/stores/feature.d.ts +0 -2
- package/dist/stores/integration/netsuite.d.ts +1 -8
- package/dist/stores/inventory.d.ts +30 -119
- package/dist/{supplier-Dm-bxVXL.js → supplier-Cf5HW15s.js} +2 -2
- package/dist/{surcharge-ZM-_XIvY.js → surcharge-CyReT8lG.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BYxTRqif.js → use-ingredient-select-dialog-BCyydlHR.js} +2 -2
- package/dist/{use-inventory-binding-dialog-Dg9Mp0Vk.js → use-inventory-binding-dialog-WGQs-_2i.js} +2 -2
- package/dist/{use-template-enabled-locations-2-BmgcViqJ.js → use-template-enabled-locations-2-B0nlqUjb.js} +2 -2
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -64
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +24 -192
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -8
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +12 -96
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +12 -96
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +18 -18
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +0 -14
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -32
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -28
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -8
- package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +2 -16
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -33
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -16
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +4 -32
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -8
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +6 -41
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +36 -246
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +42 -287
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +0 -16
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +0 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -16
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +2 -16
- package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +2 -16
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +2 -16
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -8
- package/dist/views/transfer-template/composables/use-netsuite-custom-field.d.ts +3 -24
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +12 -96
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +12 -96
- package/dist/{vue-i18n-BwxQzDKn.js → vue-i18n-DwS_fjo9.js} +510 -510
- package/dist/{xlsx-dJMIfias.js → xlsx-9MOvXxhT.js} +1 -1
- package/dist/{xlsx.util-dclbjq8C.js → xlsx.util-D1DdGA1N.js} +1 -1
- package/package.json +1 -1
- package/dist/RecipeView-EEK7PiKl.js +0 -1558
- package/dist/UnitCostHistoryView-CT-4QDK8.js +0 -651
- package/dist/api/unit-cost-history.d.ts +0 -28
- package/dist/number-DPuTdA-J.js +0 -232
- package/dist/rules-CyF-4tvp.js +0 -98
- package/dist/stock-D1SElOsp.js +0 -75
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -169
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingAlternative.vue.d.ts +0 -43
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingRule.vue.d.ts +0 -25
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +0 -125
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventorySkuBindingV2Field.vue.d.ts +0 -129
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-alternative-table.d.ts +0 -30
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -4
- package/dist/views/unit-cost-history/UnitCostHistoryView.vue.d.ts +0 -2
- package/dist/views/unit-cost-history/components/UnitCostDetailsSideSheet.vue.d.ts +0 -19
- package/dist/views/unit-cost-history/components/UnitCostRecalculationDialog.vue.d.ts +0 -11
- package/dist/views/unit-cost-history/composables/use-unit-cost-history.d.ts +0 -65
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import { computed as q, h as Y, defineComponent as ne, openBlock as b, createElementBlock as T, Fragment as re, renderList as fe, createElementVNode as t, toDisplayString as $, unref as e, resolveComponent as O, createVNode as m, withCtx as
|
|
2
|
-
import { t as de, s as ce, f as yt,
|
|
3
|
-
import { i as dt, _ as Bt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { u as zt, a as Lt, P as Le, b as jt, _ as Ht, g as Qt } from "./TransferDetails.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { a as _e,
|
|
6
|
-
import { _ as gt, u as
|
|
7
|
-
import { d as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { useBreakpoints as Ke, components as pe, FmButtonVariant as
|
|
1
|
+
import { computed as q, h as Y, defineComponent as ne, openBlock as b, createElementBlock as T, Fragment as re, renderList as fe, createElementVNode as t, toDisplayString as $, unref as e, resolveComponent as O, createVNode as m, withCtx as M, createCommentVNode as K, ref as U, createBlock as oe, watch as he, normalizeClass as W, normalizeStyle as vt, onMounted as He, createTextVNode as ke, reactive as Vt, mergeProps as je, isRef as ge, createSlots as Pt, Teleport as Rt, normalizeProps as Ot, guardReactiveProps as At } from "vue";
|
|
2
|
+
import { t as de, s as ce, f as yt, M as Mt, B as Et, u as Qe, a as Ye, O as qt, P as Ut, v as Nt, w as bt, m as Ae } from "./app-CYbiMVcX.js";
|
|
3
|
+
import { i as dt, _ as Bt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CCID5O2Y.js";
|
|
4
|
+
import { u as zt, a as Lt, P as Le, b as jt, _ as Ht, g as Qt } from "./TransferDetails.vue_vue_type_script_setup_true_lang-D1AGDeEP.js";
|
|
5
|
+
import { R as De, a as _e, e as Ce, d as Yt, A as Ee, M as Kt, h as ct, B as Xt } from "./rules-T-fs8_4_.js";
|
|
6
|
+
import { _ as gt, u as Zt, i as Wt, e as Jt } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BDVHkTSE.js";
|
|
7
|
+
import { d as mt } from "./dayjs.min-DxdfVXA-.js";
|
|
8
|
+
import { u as Gt } from "./useTabStorage-BkIVScW_.js";
|
|
9
|
+
import { u as eo, _ as to } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
10
|
+
import { useBreakpoints as Ke, components as pe, FmButtonVariant as oo, useSnackbar as we, useDialog as so, useProxiedModel as _t } from "@feedmepos/ui-library";
|
|
11
11
|
import { F as Ie } from "./form-mode.enum-BKiNVH6A.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { u as qe } from "./netsuite-VGghPz8h.js";
|
|
12
|
+
import { _ as ao, a as ro, b as lo, F as no } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BLDz8wwK.js";
|
|
13
|
+
import { F as Me, u as Xe, P as io } from "./feature-_nNpSZuh.js";
|
|
14
|
+
import { u as qe } from "./netsuite-Bss4fURp.js";
|
|
16
15
|
import { useI18n as ye } from "@feedmepos/mf-common";
|
|
17
|
-
import { u as uo } from "./surcharge-
|
|
18
|
-
import { a as co } from "./FmMultiselectDialog-
|
|
16
|
+
import { u as uo } from "./surcharge-CyReT8lG.js";
|
|
17
|
+
import { a as co } from "./FmMultiselectDialog-lQM1qEEW.js";
|
|
19
18
|
import { F as me, _ as ht } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
|
|
20
|
-
import { u as xt } from "./supplier-
|
|
21
|
-
import { d as Ze, e as mo, g as po, b as fo } from "./date2-
|
|
22
|
-
import { u as vo, _ as yo } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-
|
|
19
|
+
import { u as xt } from "./supplier-Cf5HW15s.js";
|
|
20
|
+
import { d as Ze, e as mo, g as po, b as fo } from "./date2-De3BHKh5.js";
|
|
21
|
+
import { u as vo, _ as yo } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-MMPTJodu.js";
|
|
23
22
|
import { _ as bo } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
24
|
-
import { a as kt } from "./format-unit-display-
|
|
25
|
-
import { u as We } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-
|
|
26
|
-
import { u as go } from "./vue-i18n-
|
|
27
|
-
import { s as _o, r as ho } from "./xlsx.util-
|
|
23
|
+
import { a as kt } from "./format-unit-display-CQUFDxVm.js";
|
|
24
|
+
import { u as We } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-CROQL761.js";
|
|
25
|
+
import { u as go } from "./vue-i18n-DwS_fjo9.js";
|
|
26
|
+
import { s as _o, r as ho } from "./xlsx.util-D1DdGA1N.js";
|
|
28
27
|
import { F as xo } from "./FmDroppableField-J0xUsOTV.js";
|
|
29
|
-
import { d as ko } from "./defineDeepModel-
|
|
30
|
-
import { P as Co, J as
|
|
28
|
+
import { d as ko } from "./defineDeepModel-2n_afItE.js";
|
|
29
|
+
import { P as Co, J as wo } from "./app-DiX-EfV6.js";
|
|
31
30
|
var te = /* @__PURE__ */ ((y) => (y.Code = "Code", y.Name = "Name", y.TemplateName = "TemplateName", y.Amount = "Amount", y.Cost = "Cost", y.TotalCost = "TotalCost", y.Delete = "Delete", y))(te || {});
|
|
32
|
-
const
|
|
31
|
+
const So = () => Y(
|
|
33
32
|
gt,
|
|
34
33
|
{
|
|
35
34
|
zIndex: 50,
|
|
@@ -40,16 +39,19 @@ const wo = () => Y(
|
|
|
40
39
|
function Fo(y) {
|
|
41
40
|
const { t: x } = ye(), { breakpoints: d } = Ke(), u = Xe(), g = qe();
|
|
42
41
|
function n(i) {
|
|
43
|
-
const o = y.formController.getAllPurchaseOrderItems().find((
|
|
42
|
+
const o = y.formController.getAllPurchaseOrderItems().find((a) => a.item.sku._id === i);
|
|
44
43
|
return (o == null ? void 0 : o.isCustomCost) ?? !1;
|
|
45
44
|
}
|
|
46
45
|
function h(i) {
|
|
47
|
-
var s,
|
|
48
|
-
|
|
46
|
+
var s, _, F, c, f, I, A;
|
|
47
|
+
const o = (f = (c = (F = (_ = (s = y.supplier) == null ? void 0 : s.supplyItems) == null ? void 0 : _.find(
|
|
48
|
+
(X) => X.skuId === i._id
|
|
49
|
+
)) == null ? void 0 : F.defaultCost) == null ? void 0 : c.costPerUnit) == null ? void 0 : f.amount;
|
|
50
|
+
return (((A = (I = i.defaultCost) == null ? void 0 : I.costPerUnit) == null ? void 0 : A.amount) ?? o) != null;
|
|
49
51
|
}
|
|
50
|
-
function
|
|
52
|
+
function S(i) {
|
|
51
53
|
if (!n(i.sku._id) && h(i.sku)) {
|
|
52
|
-
const { cost: o, supplierOverrideCost:
|
|
54
|
+
const { cost: o, supplierOverrideCost: a } = Me.calculateDefaultCost({
|
|
53
55
|
item: i.sku,
|
|
54
56
|
amount: i.quantity,
|
|
55
57
|
measurement: i.measurement,
|
|
@@ -58,7 +60,7 @@ function Fo(y) {
|
|
|
58
60
|
},
|
|
59
61
|
defaultCurrency: ce()
|
|
60
62
|
});
|
|
61
|
-
return { cost: o, supplierOverrideCost:
|
|
63
|
+
return { cost: o, supplierOverrideCost: a };
|
|
62
64
|
} else
|
|
63
65
|
return {
|
|
64
66
|
cost: i.totalCost ?? { amount: 0, precision: 0, currency: ce() }
|
|
@@ -89,10 +91,10 @@ function Fo(y) {
|
|
|
89
91
|
)
|
|
90
92
|
) : Y(pe.FmTextField, {
|
|
91
93
|
modelValue: o.code,
|
|
92
|
-
"onUpdate:modelValue": (
|
|
94
|
+
"onUpdate:modelValue": (a) => {
|
|
93
95
|
y.updateItem({
|
|
94
96
|
...o,
|
|
95
|
-
code:
|
|
97
|
+
code: a
|
|
96
98
|
});
|
|
97
99
|
},
|
|
98
100
|
key: o.sku._id,
|
|
@@ -125,10 +127,10 @@ function Fo(y) {
|
|
|
125
127
|
)
|
|
126
128
|
) : Y(pe.FmTextField, {
|
|
127
129
|
modelValue: o.name,
|
|
128
|
-
"onUpdate:modelValue": (
|
|
130
|
+
"onUpdate:modelValue": (a) => {
|
|
129
131
|
y.updateItem({
|
|
130
132
|
...o,
|
|
131
|
-
name:
|
|
133
|
+
name: a
|
|
132
134
|
});
|
|
133
135
|
},
|
|
134
136
|
key: o.sku._id,
|
|
@@ -144,7 +146,7 @@ function Fo(y) {
|
|
|
144
146
|
minSize: 300,
|
|
145
147
|
enableSorting: !1,
|
|
146
148
|
cell(i) {
|
|
147
|
-
const o = i.row.original,
|
|
149
|
+
const o = i.row.original, a = o.code, r = o.name;
|
|
148
150
|
return Y(
|
|
149
151
|
pe.FmTooltip,
|
|
150
152
|
{ zIndex: 50 },
|
|
@@ -161,7 +163,7 @@ function Fo(y) {
|
|
|
161
163
|
{
|
|
162
164
|
class: "line-clamp-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
163
165
|
},
|
|
164
|
-
|
|
166
|
+
a
|
|
165
167
|
)
|
|
166
168
|
]);
|
|
167
169
|
},
|
|
@@ -177,9 +179,9 @@ function Fo(y) {
|
|
|
177
179
|
header: () => x("inventory.transfer.form.items.table.Amount"),
|
|
178
180
|
minSize: 200,
|
|
179
181
|
cell(i) {
|
|
180
|
-
var _, F, c, f,
|
|
181
|
-
const o = i.row.original,
|
|
182
|
-
(
|
|
182
|
+
var _, F, c, f, I;
|
|
183
|
+
const o = i.row.original, a = (_ = y.forecastAmounts) == null ? void 0 : _.find((A) => A.skuId === o.sku._id), r = a ? a.helperState === "error" ? `Predicted: ${a.amount} (out of range)` : `Predicted: ${a.amount}` : void 0, s = (f = (c = (F = y.template) == null ? void 0 : F.purchaseOrder) == null ? void 0 : c.items) == null ? void 0 : f.find(
|
|
184
|
+
(A) => A.sku._id === o.sku._id
|
|
183
185
|
);
|
|
184
186
|
return Y(ao, {
|
|
185
187
|
style: {
|
|
@@ -192,29 +194,29 @@ function Fo(y) {
|
|
|
192
194
|
key: o.sku._id,
|
|
193
195
|
unit: o.sku.unit,
|
|
194
196
|
helperText: r,
|
|
195
|
-
helperState:
|
|
196
|
-
"onUpdate:modelValue": (
|
|
197
|
-
if (!
|
|
198
|
-
const
|
|
197
|
+
helperState: a == null ? void 0 : a.helperState,
|
|
198
|
+
"onUpdate:modelValue": (A) => {
|
|
199
|
+
if (!A) return;
|
|
200
|
+
const X = {
|
|
199
201
|
...o,
|
|
200
|
-
quantity:
|
|
201
|
-
measurement:
|
|
202
|
+
quantity: A.amount,
|
|
203
|
+
measurement: A.measurement
|
|
202
204
|
};
|
|
203
|
-
y.updateItem(
|
|
205
|
+
y.updateItem(X);
|
|
204
206
|
},
|
|
205
|
-
stepper:
|
|
206
|
-
disableUnit: !!
|
|
207
|
+
stepper: s == null ? void 0 : s.quantityStep,
|
|
208
|
+
disableUnit: !!s,
|
|
207
209
|
disabled: y.disabled,
|
|
208
210
|
rules: [
|
|
209
211
|
ro(
|
|
210
212
|
+_e(
|
|
211
|
-
((
|
|
213
|
+
((I = o.quantity) == null ? void 0 : I.amount) === 0 ? { amount: 0, precision: 0 } : (s == null ? void 0 : s.minimumQuantity) ?? { amount: 0, precision: 0 }
|
|
212
214
|
)
|
|
213
215
|
),
|
|
214
216
|
lo(
|
|
215
|
-
|
|
217
|
+
s != null && s.maximumQuantity ? +_e(s == null ? void 0 : s.maximumQuantity) : 1 / 0
|
|
216
218
|
),
|
|
217
|
-
...
|
|
219
|
+
...s != null && s.quantityStep ? [no(s.quantityStep)] : []
|
|
218
220
|
],
|
|
219
221
|
applyDefaultRules: !0
|
|
220
222
|
});
|
|
@@ -223,12 +225,12 @@ function Fo(y) {
|
|
|
223
225
|
},
|
|
224
226
|
{
|
|
225
227
|
id: "Cost",
|
|
226
|
-
header:
|
|
228
|
+
header: So,
|
|
227
229
|
size: 180,
|
|
228
230
|
cell(i) {
|
|
229
|
-
const o = i.row.original,
|
|
230
|
-
if (!n(o.sku._id) &&
|
|
231
|
-
const { cost:
|
|
231
|
+
const o = i.row.original, a = h(o.sku), r = d.value.xs || d.value.sm;
|
|
232
|
+
if (!n(o.sku._id) && a) {
|
|
233
|
+
const { cost: s, supplierOverrideCost: _ } = y.formController.getItemCost(
|
|
232
234
|
o,
|
|
233
235
|
ce()
|
|
234
236
|
);
|
|
@@ -244,13 +246,13 @@ function Fo(y) {
|
|
|
244
246
|
[
|
|
245
247
|
u.enablePurchaseOrderCostEdit ? Y(pe.FmButton, {
|
|
246
248
|
prependIcon: "edit",
|
|
247
|
-
variant:
|
|
249
|
+
variant: oo.Tertiary,
|
|
248
250
|
disabled: y.disabled,
|
|
249
251
|
onClick() {
|
|
250
252
|
y.updateItem(
|
|
251
253
|
{
|
|
252
254
|
...o,
|
|
253
|
-
totalCost:
|
|
255
|
+
totalCost: s
|
|
254
256
|
},
|
|
255
257
|
!0
|
|
256
258
|
);
|
|
@@ -264,7 +266,7 @@ function Fo(y) {
|
|
|
264
266
|
[
|
|
265
267
|
Y(
|
|
266
268
|
"span",
|
|
267
|
-
r ? Ce(
|
|
269
|
+
r ? Ce(s) : _e(s)
|
|
268
270
|
),
|
|
269
271
|
Y(
|
|
270
272
|
"span",
|
|
@@ -306,19 +308,19 @@ function Fo(y) {
|
|
|
306
308
|
disabled: y.disabled || !u.enablePurchaseOrderCostEdit,
|
|
307
309
|
modelValue: _e(o.totalCost ?? { amount: 0, precision: 0 }),
|
|
308
310
|
key: o.sku._id,
|
|
309
|
-
"onUpdate:modelValue": (
|
|
311
|
+
"onUpdate:modelValue": (s) => {
|
|
310
312
|
u.enablePurchaseOrderCostEdit && y.updateItem(
|
|
311
313
|
{
|
|
312
314
|
...o,
|
|
313
315
|
totalCost: {
|
|
314
|
-
...Yt(+
|
|
316
|
+
...Yt(+s),
|
|
315
317
|
currency: ce()
|
|
316
318
|
}
|
|
317
319
|
},
|
|
318
320
|
!0
|
|
319
321
|
);
|
|
320
322
|
},
|
|
321
|
-
rules: [Ee(0),
|
|
323
|
+
rules: [Ee(0), Kt(2)]
|
|
322
324
|
},
|
|
323
325
|
{
|
|
324
326
|
prepend() {
|
|
@@ -334,12 +336,12 @@ function Fo(y) {
|
|
|
334
336
|
) : null;
|
|
335
337
|
},
|
|
336
338
|
append() {
|
|
337
|
-
return !
|
|
339
|
+
return !a || !u.enablePurchaseOrderCostEdit ? null : Y(pe.FmButton, {
|
|
338
340
|
prependIcon: "close",
|
|
339
341
|
variant: "tertiary",
|
|
340
342
|
disabled: y.disabled,
|
|
341
343
|
onClick() {
|
|
342
|
-
const { cost:
|
|
344
|
+
const { cost: s } = Me.calculateDefaultCost({
|
|
343
345
|
item: o.sku,
|
|
344
346
|
amount: o.quantity,
|
|
345
347
|
measurement: o.measurement,
|
|
@@ -353,7 +355,7 @@ function Fo(y) {
|
|
|
353
355
|
...o,
|
|
354
356
|
// NOTE: different from PO template, if a default cost is reenabled,
|
|
355
357
|
// the total cost will automatically assigned
|
|
356
|
-
totalCost:
|
|
358
|
+
totalCost: s
|
|
357
359
|
},
|
|
358
360
|
!1
|
|
359
361
|
);
|
|
@@ -392,18 +394,18 @@ function Fo(y) {
|
|
|
392
394
|
headerClass: ""
|
|
393
395
|
}
|
|
394
396
|
}
|
|
395
|
-
],
|
|
397
|
+
], w = q(() => u.enableTotalCost && y.transferType === de.enum.purchase ? V : V.filter(
|
|
396
398
|
(i) => i.id !== "Cost"
|
|
397
399
|
/* Cost */
|
|
398
400
|
)), v = q(() => ({
|
|
399
|
-
...y.items.reduce((o,
|
|
400
|
-
const { cost: r } =
|
|
401
|
+
...y.items.reduce((o, a) => {
|
|
402
|
+
const { cost: r } = S(a);
|
|
401
403
|
return Me.add([o, r]);
|
|
402
404
|
}, Me.reset()),
|
|
403
|
-
currency: y.items[0] ?
|
|
405
|
+
currency: y.items[0] ? S(y.items[0]).cost.currency : ce()
|
|
404
406
|
}));
|
|
405
407
|
return {
|
|
406
|
-
columnDefs:
|
|
408
|
+
columnDefs: w,
|
|
407
409
|
totalCost: v
|
|
408
410
|
};
|
|
409
411
|
}
|
|
@@ -426,22 +428,22 @@ const $o = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
426
428
|
}, [
|
|
427
429
|
t("div", Io, $((h = d(n)) == null ? void 0 : h.name), 1),
|
|
428
430
|
t("div", Do, [
|
|
429
|
-
(b(!0), T(re, null, fe(u.prices[n].slice(0, 3), (
|
|
431
|
+
(b(!0), T(re, null, fe(u.prices[n].slice(0, 3), (S) => {
|
|
430
432
|
var V;
|
|
431
433
|
return b(), T("div", {
|
|
432
|
-
key:
|
|
434
|
+
key: S.date,
|
|
433
435
|
class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
|
|
434
436
|
}, [
|
|
435
437
|
t("div", To, [
|
|
436
|
-
t("span", null, $(
|
|
438
|
+
t("span", null, $(S.totalCost ? e(Ce)(S.totalCost) : "No data"), 1),
|
|
437
439
|
g[0] || (g[0] = t("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
|
|
438
|
-
t("span", null, $(e(_e)(
|
|
439
|
-
t("span", null, $(((V =
|
|
440
|
+
t("span", null, $(e(_e)(S.totalUnit, !1)), 1),
|
|
441
|
+
t("span", null, $(((V = S.measurement) == null ? void 0 : V.abbrev) ?? S.unit.abbrev), 1)
|
|
440
442
|
]),
|
|
441
443
|
t("div", Vo, [
|
|
442
|
-
t("span", null, "(#" + $(
|
|
444
|
+
t("span", null, "(#" + $(S.seqNumber) + ")", 1),
|
|
443
445
|
g[1] || (g[1] = t("span", null, $(" "), -1)),
|
|
444
|
-
t("span", null, $(e(Ze)(new Date(
|
|
446
|
+
t("span", null, $(e(Ze)(new Date(S.date))), 1)
|
|
445
447
|
])
|
|
446
448
|
]);
|
|
447
449
|
}), 128))
|
|
@@ -464,7 +466,7 @@ const $o = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
464
466
|
setup(y) {
|
|
465
467
|
const { t: x } = ye();
|
|
466
468
|
return (d, u) => {
|
|
467
|
-
var h,
|
|
469
|
+
var h, S, V, w, v, i, o, a, r, s, _, F, c, f, I, A, X, z, Z, N, B, P, D, E, L, J, se;
|
|
468
470
|
const g = O("FmLabel"), n = O("FmSpacer");
|
|
469
471
|
return b(), T("div", Po, [
|
|
470
472
|
t("div", Ro, [
|
|
@@ -474,8 +476,8 @@ const $o = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
474
476
|
]),
|
|
475
477
|
t("div", null, [
|
|
476
478
|
m(e(me), {
|
|
477
|
-
render: (V = (
|
|
478
|
-
props: (v = (
|
|
479
|
+
render: (V = (S = (h = d.cellByColId.Delete) == null ? void 0 : h.column) == null ? void 0 : S.columnDef) == null ? void 0 : V.cell,
|
|
480
|
+
props: (v = (w = d.cellByColId.Delete) == null ? void 0 : w.getContext) == null ? void 0 : v.call(w)
|
|
479
481
|
}, null, 8, ["render", "props"])
|
|
480
482
|
])
|
|
481
483
|
]),
|
|
@@ -485,8 +487,8 @@ const $o = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
485
487
|
label: e(x)(`inventory.transfer.form.items.table.${e(te).Code}`)
|
|
486
488
|
}, null, 8, ["label"]),
|
|
487
489
|
m(e(me), {
|
|
488
|
-
render: (
|
|
489
|
-
props: (
|
|
490
|
+
render: (a = (o = (i = d.cellByColId[e(te).Code]) == null ? void 0 : i.column) == null ? void 0 : o.columnDef) == null ? void 0 : a.cell,
|
|
491
|
+
props: (s = (r = d.cellByColId[e(te).Code]) == null ? void 0 : r.getContext) == null ? void 0 : s.call(r)
|
|
490
492
|
}, null, 8, ["render", "props"]),
|
|
491
493
|
u[0] || (u[0] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
492
494
|
]),
|
|
@@ -496,7 +498,7 @@ const $o = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
496
498
|
}, null, 8, ["label"]),
|
|
497
499
|
m(e(me), {
|
|
498
500
|
render: (c = (F = (_ = d.cellByColId[e(te).Name]) == null ? void 0 : _.column) == null ? void 0 : F.columnDef) == null ? void 0 : c.cell,
|
|
499
|
-
props: (
|
|
501
|
+
props: (I = (f = d.cellByColId[e(te).Name]) == null ? void 0 : f.getContext) == null ? void 0 : I.call(f)
|
|
500
502
|
}, null, 8, ["render", "props"]),
|
|
501
503
|
u[1] || (u[1] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
502
504
|
])
|
|
@@ -507,14 +509,14 @@ const $o = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
507
509
|
label: e(x)(`inventory.transfer.form.items.table.${e(te).Amount}`)
|
|
508
510
|
}, null, 8, ["label"]),
|
|
509
511
|
m(e(me), {
|
|
510
|
-
render: (z = (
|
|
511
|
-
props: (N = (
|
|
512
|
+
render: (z = (X = (A = d.cellByColId[e(te).Amount]) == null ? void 0 : A.column) == null ? void 0 : X.columnDef) == null ? void 0 : z.cell,
|
|
513
|
+
props: (N = (Z = d.cellByColId[e(te).Amount]) == null ? void 0 : Z.getContext) == null ? void 0 : N.call(Z)
|
|
512
514
|
}, null, 8, ["render", "props"]),
|
|
513
515
|
u[2] || (u[2] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
514
516
|
]),
|
|
515
517
|
d.cellByColId[e(te).Cost] ? (b(), T("div", zo, [
|
|
516
518
|
m(gt, { "z-index": 50 }, {
|
|
517
|
-
default:
|
|
519
|
+
default: M(() => [
|
|
518
520
|
m(g, {
|
|
519
521
|
label: e(x)(`inventory.transfer.form.items.table.${e(te).Cost}2`)
|
|
520
522
|
}, null, 8, ["label"])
|
|
@@ -522,7 +524,7 @@ const $o = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
522
524
|
_: 1
|
|
523
525
|
}),
|
|
524
526
|
m(e(me), {
|
|
525
|
-
render: (
|
|
527
|
+
render: (D = (P = (B = d.cellByColId[e(te).Cost]) == null ? void 0 : B.column) == null ? void 0 : P.columnDef) == null ? void 0 : D.cell,
|
|
526
528
|
props: (L = (E = d.cellByColId[e(te).Cost]) == null ? void 0 : E.getContext) == null ? void 0 : L.call(E)
|
|
527
529
|
}, null, 8, ["render", "props"]),
|
|
528
530
|
u[3] || (u[3] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -630,49 +632,49 @@ const Ho = {
|
|
|
630
632
|
},
|
|
631
633
|
emits: ["update:poItems", "update:forecastAmounts", "update:predictionId"],
|
|
632
634
|
setup(y, { emit: x }) {
|
|
633
|
-
const d = y, u = x, g = U(!1), n = U(7), h =
|
|
634
|
-
function
|
|
635
|
-
return r != null &&
|
|
635
|
+
const d = y, u = x, g = U(!1), n = U(7), h = Zt(), S = we(), { t: V } = ye();
|
|
636
|
+
function w(a, r, s) {
|
|
637
|
+
return r != null && a < r && (a = r), s != null && a > s && (a = s), a;
|
|
636
638
|
}
|
|
637
|
-
function v(
|
|
638
|
-
if (!((
|
|
639
|
-
return
|
|
639
|
+
function v(a) {
|
|
640
|
+
if (!((a == null ? void 0 : a.amount) == null || (a == null ? void 0 : a.precision) == null))
|
|
641
|
+
return a.amount / Math.pow(10, a.precision);
|
|
640
642
|
}
|
|
641
643
|
function i({
|
|
642
|
-
sku:
|
|
644
|
+
sku: a,
|
|
643
645
|
code: r,
|
|
644
|
-
name:
|
|
646
|
+
name: s,
|
|
645
647
|
baseAmount: _,
|
|
646
648
|
measurement: F,
|
|
647
649
|
min: c,
|
|
648
650
|
max: f
|
|
649
651
|
}) {
|
|
650
652
|
if (F) {
|
|
651
|
-
const
|
|
652
|
-
let
|
|
653
|
-
return
|
|
654
|
-
sku:
|
|
653
|
+
const I = F.conversion.amount;
|
|
654
|
+
let A = Math.ceil(_ / I);
|
|
655
|
+
return A = w(A, c, f), {
|
|
656
|
+
sku: a,
|
|
655
657
|
code: r,
|
|
656
|
-
name:
|
|
657
|
-
quantity: { amount:
|
|
658
|
+
name: s,
|
|
659
|
+
quantity: { amount: A, precision: 0 },
|
|
658
660
|
measurement: F
|
|
659
661
|
};
|
|
660
662
|
} else {
|
|
661
|
-
const
|
|
663
|
+
const I = Math.ceil(w(_, c, f));
|
|
662
664
|
return {
|
|
663
|
-
sku:
|
|
665
|
+
sku: a,
|
|
664
666
|
code: r,
|
|
665
|
-
name:
|
|
666
|
-
quantity: { amount:
|
|
667
|
+
name: s,
|
|
668
|
+
quantity: { amount: I, precision: 0 },
|
|
667
669
|
measurement: null
|
|
668
670
|
};
|
|
669
671
|
}
|
|
670
672
|
}
|
|
671
673
|
async function o() {
|
|
672
|
-
const
|
|
673
|
-
if (typeof
|
|
674
|
-
|
|
675
|
-
message:
|
|
674
|
+
const a = ct(0)(n.value);
|
|
675
|
+
if (typeof a == "string") {
|
|
676
|
+
S.open({
|
|
677
|
+
message: a,
|
|
676
678
|
type: "error"
|
|
677
679
|
});
|
|
678
680
|
return;
|
|
@@ -680,65 +682,65 @@ const Ho = {
|
|
|
680
682
|
g.value = !1, await h.readPurchaseOrder(n.value, d.templateId);
|
|
681
683
|
const r = h.purchaseOrderForecast.skus;
|
|
682
684
|
if (r.length === 0) {
|
|
683
|
-
|
|
685
|
+
S.open({
|
|
684
686
|
message: V("inventory.transfer.form.items.forecastStock.notAvailable"),
|
|
685
687
|
type: "info"
|
|
686
688
|
}), u("update:predictionId", h.purchaseOrderForecast.prediction_id);
|
|
687
689
|
return;
|
|
688
690
|
}
|
|
689
|
-
const
|
|
690
|
-
var
|
|
691
|
-
const f = (
|
|
692
|
-
if (!
|
|
691
|
+
const s = d.templateItems.reduce((F, c) => {
|
|
692
|
+
var X;
|
|
693
|
+
const f = (X = d.poItems) == null ? void 0 : X.find((z) => z.sku._id === c.sku._id), I = r.find((z) => z.id === c.sku._id);
|
|
694
|
+
if (!I)
|
|
693
695
|
return f && F.push(f), F;
|
|
694
|
-
if (!d.templateId &&
|
|
695
|
-
const
|
|
696
|
+
if (!d.templateId && I.amount <= 0) return F;
|
|
697
|
+
const A = I.amount ?? v(f == null ? void 0 : f.quantity) ?? 0;
|
|
696
698
|
return F.push(
|
|
697
699
|
i({
|
|
698
700
|
sku: c.sku,
|
|
699
701
|
code: c.code,
|
|
700
702
|
name: c.name,
|
|
701
|
-
baseAmount:
|
|
703
|
+
baseAmount: A,
|
|
702
704
|
measurement: c.measurement || null,
|
|
703
705
|
min: v(c.minimumQuantity),
|
|
704
706
|
max: v(c.maximumQuantity)
|
|
705
707
|
})
|
|
706
708
|
), F;
|
|
707
709
|
}, []), _ = r.map((F) => {
|
|
708
|
-
const c = d.templateItems.find((
|
|
709
|
-
let f = F.amount,
|
|
710
|
+
const c = d.templateItems.find((Z) => Z.sku._id === F.id);
|
|
711
|
+
let f = F.amount, I = 0;
|
|
710
712
|
if (c != null && c.measurement) {
|
|
711
|
-
const
|
|
712
|
-
f = Math.ceil(F.amount /
|
|
713
|
+
const Z = v(c.measurement.conversion) ?? 1;
|
|
714
|
+
f = Math.ceil(F.amount / Z);
|
|
713
715
|
} else
|
|
714
716
|
f = Math.ceil(F.amount);
|
|
715
|
-
const
|
|
716
|
-
return { skuId: F.id, amount: f, precision:
|
|
717
|
+
const A = v(c == null ? void 0 : c.minimumQuantity) ?? 0, X = v(c == null ? void 0 : c.maximumQuantity) ?? 1 / 0, z = f < A || f > X ? "error" : "success";
|
|
718
|
+
return { skuId: F.id, amount: f, precision: I, helperState: z };
|
|
717
719
|
});
|
|
718
|
-
u("update:poItems",
|
|
720
|
+
u("update:poItems", s), u("update:forecastAmounts", _), u("update:predictionId", h.purchaseOrderForecast.prediction_id);
|
|
719
721
|
}
|
|
720
|
-
return (
|
|
721
|
-
const
|
|
722
|
+
return (a, r) => {
|
|
723
|
+
const s = O("FmButton"), _ = O("FmIcon"), F = O("FmStepperField"), c = O("FmPopover");
|
|
722
724
|
return b(), oe(c, {
|
|
723
|
-
disabled:
|
|
725
|
+
disabled: a.disabled,
|
|
724
726
|
class: "flex",
|
|
725
727
|
"show-popover": g.value,
|
|
726
728
|
onPopoverChanged: r[3] || (r[3] = (f) => g.value = f)
|
|
727
729
|
}, {
|
|
728
|
-
"popover-button":
|
|
729
|
-
m(
|
|
730
|
+
"popover-button": M(() => [
|
|
731
|
+
m(s, {
|
|
730
732
|
label: "unused",
|
|
731
733
|
variant: "secondary",
|
|
732
|
-
"text-color":
|
|
734
|
+
"text-color": a.disabled ? "disabled" : "primary",
|
|
733
735
|
"bg-color": "transparent",
|
|
734
|
-
"border-color":
|
|
735
|
-
disabled:
|
|
736
|
+
"border-color": a.disabled ? "disabled" : "primary",
|
|
737
|
+
disabled: a.disabled
|
|
736
738
|
}, {
|
|
737
|
-
default:
|
|
739
|
+
default: M(() => [
|
|
738
740
|
t("div", Wo, [
|
|
739
741
|
m(Zo, {
|
|
740
742
|
size: 24,
|
|
741
|
-
color:
|
|
743
|
+
color: a.disabled ? "#c7c7cc" : "#ff7823"
|
|
742
744
|
}, null, 8, ["color"]),
|
|
743
745
|
t("div", Jo, $(e(V)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
744
746
|
])
|
|
@@ -746,18 +748,18 @@ const Ho = {
|
|
|
746
748
|
_: 1
|
|
747
749
|
}, 8, ["text-color", "border-color", "disabled"])
|
|
748
750
|
]),
|
|
749
|
-
default:
|
|
751
|
+
default: M(() => [
|
|
750
752
|
t("div", Go, [
|
|
751
753
|
t("div", es, [
|
|
752
754
|
t("div", ts, [
|
|
753
755
|
m(bo, { "z-index": 99 }, {
|
|
754
|
-
default:
|
|
756
|
+
default: M(() => [
|
|
755
757
|
t("p", os, $(e(V)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
756
758
|
]),
|
|
757
759
|
_: 1
|
|
758
760
|
})
|
|
759
761
|
]),
|
|
760
|
-
m(
|
|
762
|
+
m(s, {
|
|
761
763
|
icon: "close",
|
|
762
764
|
size: "md",
|
|
763
765
|
variant: "tertiary",
|
|
@@ -768,9 +770,9 @@ const Ho = {
|
|
|
768
770
|
modelValue: n.value,
|
|
769
771
|
"onUpdate:modelValue": r[1] || (r[1] = (f) => n.value = f),
|
|
770
772
|
label: e(V)("inventory.transfer.form.items.forecastStock.days"),
|
|
771
|
-
rules: [e(
|
|
773
|
+
rules: [e(ct)(0)]
|
|
772
774
|
}, {
|
|
773
|
-
"helper-text":
|
|
775
|
+
"helper-text": M(() => [
|
|
774
776
|
t("div", ss, [
|
|
775
777
|
m(_, {
|
|
776
778
|
name: "warning",
|
|
@@ -784,12 +786,12 @@ const Ho = {
|
|
|
784
786
|
}, 8, ["modelValue", "label", "rules"]),
|
|
785
787
|
t("div", rs, [
|
|
786
788
|
r[4] || (r[4] = t("div", { class: "grow" }, null, -1)),
|
|
787
|
-
m(
|
|
789
|
+
m(s, {
|
|
788
790
|
label: e(V)("common.cancel"),
|
|
789
791
|
variant: "tertiary",
|
|
790
792
|
onClick: r[2] || (r[2] = (f) => g.value = !1)
|
|
791
793
|
}, null, 8, ["label"]),
|
|
792
|
-
m(
|
|
794
|
+
m(s, {
|
|
793
795
|
label: e(V)("inventory.transfer.form.items.forecastStock.generate"),
|
|
794
796
|
onClick: o
|
|
795
797
|
}, null, 8, ["label"])
|
|
@@ -802,7 +804,7 @@ const Ho = {
|
|
|
802
804
|
}
|
|
803
805
|
});
|
|
804
806
|
function ns() {
|
|
805
|
-
const y =
|
|
807
|
+
const y = we(), x = We(), d = U(!1);
|
|
806
808
|
he(d, (h) => {
|
|
807
809
|
h && (g.value = !0, u().finally(() => {
|
|
808
810
|
g.value = !1;
|
|
@@ -810,24 +812,24 @@ function ns() {
|
|
|
810
812
|
});
|
|
811
813
|
async function u() {
|
|
812
814
|
try {
|
|
813
|
-
const { startDate: h, endDate:
|
|
815
|
+
const { startDate: h, endDate: S } = po(6), v = (await x.getPurchaseOrders({ start: h, end: S })).filter(
|
|
814
816
|
(i) => {
|
|
815
|
-
var o,
|
|
816
|
-
return i.status === Mt.enum.COMPLETE && ((o = i.supplier) == null ? void 0 : o.internal) !== "warehouse" && ((
|
|
817
|
+
var o, a;
|
|
818
|
+
return i.status === Mt.enum.COMPLETE && ((o = i.supplier) == null ? void 0 : o.internal) !== "warehouse" && ((a = i.supplier) == null ? void 0 : a.internal) !== "restaurant";
|
|
817
819
|
}
|
|
818
820
|
).reduce((i, o) => {
|
|
819
|
-
const
|
|
820
|
-
for (const
|
|
821
|
-
if (!
|
|
822
|
-
const _ = i[
|
|
821
|
+
const a = new Date(Et(o._id)), r = o.supplier._id;
|
|
822
|
+
for (const s of o.items) {
|
|
823
|
+
if (!s.totalCost) continue;
|
|
824
|
+
const _ = i[s.sku._id] ?? {}, F = _[r] ?? [];
|
|
823
825
|
F.push({
|
|
824
|
-
date:
|
|
825
|
-
totalUnit:
|
|
826
|
-
totalCost:
|
|
827
|
-
unit:
|
|
828
|
-
measurement:
|
|
826
|
+
date: a.toISOString(),
|
|
827
|
+
totalUnit: s.quantity,
|
|
828
|
+
totalCost: s.totalCost,
|
|
829
|
+
unit: s.sku.unit,
|
|
830
|
+
measurement: s.measurement,
|
|
829
831
|
seqNumber: o.seqNumber
|
|
830
|
-
}), _[r] = F, i[
|
|
832
|
+
}), _[r] = F, i[s.sku._id] = _;
|
|
831
833
|
}
|
|
832
834
|
return i;
|
|
833
835
|
}, {});
|
|
@@ -869,13 +871,13 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
869
871
|
}])
|
|
870
872
|
}, [
|
|
871
873
|
(b(!0), T(re, null, fe(d.row.getVisibleCells(), (h) => {
|
|
872
|
-
var
|
|
874
|
+
var S, V, w, v;
|
|
873
875
|
return b(), T("td", {
|
|
874
876
|
key: h.id,
|
|
875
|
-
class: W(["h-[56px] text-fm-color-typo-primary", ((
|
|
877
|
+
class: W(["h-[56px] text-fm-color-typo-primary", ((S = x(h)) == null ? void 0 : S.cellClass) ?? "px-16"]),
|
|
876
878
|
style: vt({
|
|
877
879
|
width: (V = x(h)) == null ? void 0 : V.width,
|
|
878
|
-
maxWidth: (
|
|
880
|
+
maxWidth: (w = x(h)) == null ? void 0 : w.maxWidth,
|
|
879
881
|
textAlign: ((v = x(h)) == null ? void 0 : v.textAlign) ?? "left"
|
|
880
882
|
})
|
|
881
883
|
}, [
|
|
@@ -919,14 +921,14 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
919
921
|
},
|
|
920
922
|
emits: ["netsuite:ready"],
|
|
921
923
|
setup(y, { emit: x }) {
|
|
922
|
-
const d = qe(), u = y, g = x, { t: n } = go(), h = U(!1),
|
|
924
|
+
const d = qe(), u = y, g = x, { t: n } = go(), h = U(!1), S = U();
|
|
923
925
|
function V() {
|
|
924
|
-
var
|
|
926
|
+
var a, r, s, _;
|
|
925
927
|
if (!u.supplier) return;
|
|
926
|
-
u.supplier.internal ?
|
|
928
|
+
u.supplier.internal ? S.value = d.getNetSuiteLocation(
|
|
927
929
|
`${u.supplier.internal}_${u.supplier._id}`
|
|
928
|
-
) :
|
|
929
|
-
const i = u.supplier.internal ? d.getLocationSubsidiary((
|
|
930
|
+
) : S.value = d.getNetSuiteVendor(u.supplier._id);
|
|
931
|
+
const i = u.supplier.internal ? d.getLocationSubsidiary((a = S.value) == null ? void 0 : a.netSuiteId).id : (r = S.value) == null ? void 0 : r.subsidiaryId, o = u.supplier.internal ? (s = d.currentLocationSubsidiary()) == null ? void 0 : s.id : (_ = d.currentVendorSubsidiary(u.supplier._id)) == null ? void 0 : _.id;
|
|
930
932
|
h.value = !(!d.isEnabled || i && d.isEnabled && i == o);
|
|
931
933
|
}
|
|
932
934
|
he(
|
|
@@ -961,18 +963,18 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
961
963
|
name: o.name
|
|
962
964
|
}
|
|
963
965
|
};
|
|
964
|
-
const
|
|
965
|
-
if (
|
|
966
|
+
const a = d.getAvailableItems(o.id), r = u.items.filter((s) => {
|
|
967
|
+
if (s.measurement != null) {
|
|
966
968
|
const _ = d.getAvailableMeasurements(
|
|
967
|
-
|
|
969
|
+
s.sku._id,
|
|
968
970
|
o.id
|
|
969
971
|
);
|
|
970
|
-
return
|
|
972
|
+
return a.includes(s.sku._id) && _.includes(s.measurement.id);
|
|
971
973
|
}
|
|
972
|
-
return
|
|
973
|
-
}).map((
|
|
974
|
+
return a.includes(s.sku._id);
|
|
975
|
+
}).map((s) => s.sku._id);
|
|
974
976
|
u.onChange(
|
|
975
|
-
u.items.filter((
|
|
977
|
+
u.items.filter((s) => r.includes(s.sku._id)),
|
|
976
978
|
i
|
|
977
979
|
);
|
|
978
980
|
} finally {
|
|
@@ -980,17 +982,17 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
980
982
|
}
|
|
981
983
|
}
|
|
982
984
|
});
|
|
983
|
-
const
|
|
985
|
+
const w = q(
|
|
984
986
|
() => u.supplier.internal ? d.currentLocationSubsidiary() : d.currentVendorSubsidiary(u.supplier._id)
|
|
985
987
|
), v = q(() => {
|
|
986
988
|
var i, o;
|
|
987
|
-
return
|
|
988
|
-
location is ${(o = d.getLocationSubsidiary((i =
|
|
989
|
+
return S.value == null ? `Cannot find the NetSuite location for "${u.supplier.name}"` : `The subsidiary of the request
|
|
990
|
+
location is ${(o = d.getLocationSubsidiary((i = S.value) == null ? void 0 : i.netSuiteId)) == null ? void 0 : o.fullName}`;
|
|
989
991
|
});
|
|
990
992
|
return (i, o) => {
|
|
991
|
-
const
|
|
993
|
+
const a = O("FmLabel"), r = O("FmIcon"), s = O("FmField"), _ = O("FmTooltip");
|
|
992
994
|
return e(d).isEnabled && u.required ? (b(), T("div", ms, [
|
|
993
|
-
m(
|
|
995
|
+
m(a, {
|
|
994
996
|
label: `NetSuite ${e(n)("inventory.transfer.form.netsuite.subsidiary")}`
|
|
995
997
|
}, null, 8, ["label"]),
|
|
996
998
|
t("div", ps, [
|
|
@@ -999,12 +1001,12 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
999
1001
|
placement: "left",
|
|
1000
1002
|
disabled: i.disabled
|
|
1001
1003
|
}, {
|
|
1002
|
-
content:
|
|
1004
|
+
content: M(() => o[0] || (o[0] = [
|
|
1003
1005
|
ke("This field is locked and based on the location of the request.")
|
|
1004
1006
|
])),
|
|
1005
|
-
default:
|
|
1006
|
-
m(
|
|
1007
|
-
default:
|
|
1007
|
+
default: M(() => [
|
|
1008
|
+
m(s, null, {
|
|
1009
|
+
default: M(() => {
|
|
1008
1010
|
var F;
|
|
1009
1011
|
return [
|
|
1010
1012
|
t("div", fs, [
|
|
@@ -1015,7 +1017,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1015
1017
|
}, null, 8, ["color"]),
|
|
1016
1018
|
t("div", {
|
|
1017
1019
|
class: W([i.disabled ? "text-fm-color-typo-disabled" : ""])
|
|
1018
|
-
}, $((F =
|
|
1020
|
+
}, $((F = w.value) == null ? void 0 : F.fullName), 3)
|
|
1019
1021
|
])
|
|
1020
1022
|
];
|
|
1021
1023
|
}),
|
|
@@ -1029,7 +1031,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1029
1031
|
])) : K("", !0);
|
|
1030
1032
|
};
|
|
1031
1033
|
}
|
|
1032
|
-
}), bs = { class: "flex flex-col gap-4" }, gs = { class: "flex items-center gap-8 overflow-x-auto pb-12" }, _s = { class: "flex flex-col gap-16" }, hs = { class: "flex flex-col gap-24" }, xs = { class: "flex flex-col gap-8" }, ks = { class: "flex flex-col gap-4" }, Cs = { class: "flex items-center gap-4" },
|
|
1034
|
+
}), bs = { class: "flex flex-col gap-4" }, gs = { class: "flex items-center gap-8 overflow-x-auto pb-12" }, _s = { class: "flex flex-col gap-16" }, hs = { class: "flex flex-col gap-24" }, xs = { class: "flex flex-col gap-8" }, ks = { class: "flex flex-col gap-4" }, Cs = { class: "flex items-center gap-4" }, ws = { class: "flex flex-col gap-8" }, Ss = { class: "flex flex-col gap-4" }, Fs = { class: "flex items-center gap-4" }, $s = {
|
|
1033
1035
|
key: 3,
|
|
1034
1036
|
class: "p-16 border border-fm-color-neutral-gray-300 fm-corner-radius-md flex flex-col"
|
|
1035
1037
|
}, Is = {
|
|
@@ -1056,11 +1058,11 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1056
1058
|
},
|
|
1057
1059
|
emits: ["validation-success", "form:ready"],
|
|
1058
1060
|
setup(y, { expose: x, emit: d }) {
|
|
1059
|
-
const u = y, g = d, { t: n } = ye(), h = Qe(),
|
|
1060
|
-
|
|
1061
|
-
const { controller: r, state:
|
|
1061
|
+
const u = y, g = d, { t: n } = ye(), h = Qe(), S = Ye(), V = uo(), w = Xe(), v = kt(), { breakpoints: i } = Ke(), o = q(() => i.value.xs || i.value.sm), a = zt();
|
|
1062
|
+
a.init(u.modelValue);
|
|
1063
|
+
const { controller: r, state: s } = a, _ = Vt({
|
|
1062
1064
|
value: !1
|
|
1063
|
-
}), F = U(!1), c = U(0), f = U([]),
|
|
1065
|
+
}), F = U(!1), c = U(0), f = U([]), I = U(void 0), A = q(
|
|
1064
1066
|
() => {
|
|
1065
1067
|
var l;
|
|
1066
1068
|
return ((l = u.modelValue) == null ? void 0 : l.templateDoc) ?? v.templates.find((p) => {
|
|
@@ -1068,10 +1070,10 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1068
1070
|
return p._id === ((j = u.modelValue) == null ? void 0 : j.template);
|
|
1069
1071
|
});
|
|
1070
1072
|
}
|
|
1071
|
-
),
|
|
1073
|
+
), X = q(() => s.value.status === "DRAFT" || !s.value.rev), z = q(
|
|
1072
1074
|
() => {
|
|
1073
1075
|
var l;
|
|
1074
|
-
return ((l =
|
|
1076
|
+
return ((l = s.value.items) == null ? void 0 : l.map((p) => p.item)) || [];
|
|
1075
1077
|
}
|
|
1076
1078
|
);
|
|
1077
1079
|
He(async () => {
|
|
@@ -1079,54 +1081,54 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1079
1081
|
}), he([F, _], ([l, p], [j, H]) => {
|
|
1080
1082
|
p.value && H.value && g("form:ready");
|
|
1081
1083
|
});
|
|
1082
|
-
const
|
|
1084
|
+
const Z = q(
|
|
1083
1085
|
() => h.currentLocation.type === qt.restaurant
|
|
1084
|
-
), N =
|
|
1085
|
-
() =>
|
|
1086
|
+
), N = so(), B = vo(
|
|
1087
|
+
() => s.value,
|
|
1086
1088
|
(l) => {
|
|
1087
1089
|
r.value.selectSupplier(l.supplier._id);
|
|
1088
1090
|
},
|
|
1089
1091
|
!0,
|
|
1090
|
-
!
|
|
1092
|
+
!w.businessSupplierOnly
|
|
1091
1093
|
), P = q({
|
|
1092
1094
|
get() {
|
|
1093
1095
|
var l;
|
|
1094
|
-
return typeof ((l =
|
|
1096
|
+
return typeof ((l = s.value.supplier) == null ? void 0 : l.internal) == "string" ? de.enum.transfer : de.enum.purchase;
|
|
1095
1097
|
},
|
|
1096
1098
|
set(l) {
|
|
1097
1099
|
r.value.selectType(l);
|
|
1098
1100
|
}
|
|
1099
|
-
}),
|
|
1101
|
+
}), D = q(() => {
|
|
1100
1102
|
let l = B.transferLocationOptions.value;
|
|
1101
|
-
return
|
|
1103
|
+
return w.mustUsePoTemplate && !s.value.template && (l = l.filter((p) => {
|
|
1102
1104
|
var j;
|
|
1103
1105
|
return (j = p.sublabel) == null ? void 0 : j.startsWith("restaurant");
|
|
1104
1106
|
})), l;
|
|
1105
1107
|
}), E = q({
|
|
1106
1108
|
get() {
|
|
1107
1109
|
var l;
|
|
1108
|
-
return (l =
|
|
1110
|
+
return (l = s.value.supplier) == null ? void 0 : l._id;
|
|
1109
1111
|
},
|
|
1110
1112
|
set(l) {
|
|
1111
1113
|
B.transferLocationModel.value = l;
|
|
1112
1114
|
}
|
|
1113
1115
|
}), L = q({
|
|
1114
1116
|
get() {
|
|
1115
|
-
return
|
|
1117
|
+
return s.value.remark ?? "";
|
|
1116
1118
|
},
|
|
1117
1119
|
set(l) {
|
|
1118
1120
|
r.value.addRemark(l ?? "");
|
|
1119
1121
|
}
|
|
1120
1122
|
}), J = q({
|
|
1121
1123
|
get() {
|
|
1122
|
-
return
|
|
1124
|
+
return s.value.ref ?? "";
|
|
1123
1125
|
},
|
|
1124
1126
|
set(l) {
|
|
1125
1127
|
r.value.addReference(l ?? "");
|
|
1126
1128
|
}
|
|
1127
1129
|
}), { backdatePo: se, backdateSwitch: k, backdateModel: C, backdateTimeModel: Q } = jo({
|
|
1128
1130
|
getEffectiveAt() {
|
|
1129
|
-
return
|
|
1131
|
+
return s.value.effectiveAt;
|
|
1130
1132
|
},
|
|
1131
1133
|
setEffectiveAt(l) {
|
|
1132
1134
|
r.value.setEffectiveAt(l);
|
|
@@ -1147,8 +1149,8 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1147
1149
|
},
|
|
1148
1150
|
getFormData: () => {
|
|
1149
1151
|
r.value.prepareForSubmit();
|
|
1150
|
-
const p = !!(
|
|
1151
|
-
return
|
|
1152
|
+
const p = !!(s.value.id && s.value.rev) ? r.value.toUpdateData() : r.value.toCreateData();
|
|
1153
|
+
return I.value ? { ...p, predictionId: I.value } : p;
|
|
1152
1154
|
}
|
|
1153
1155
|
});
|
|
1154
1156
|
const ve = q(() => ({
|
|
@@ -1167,7 +1169,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1167
1169
|
updateItem: (l, p) => ve.value.updateItem(l, p),
|
|
1168
1170
|
deleteItem: (l) => ve.value.deleteItem(l),
|
|
1169
1171
|
get supplier() {
|
|
1170
|
-
return
|
|
1172
|
+
return s.value.supplier;
|
|
1171
1173
|
},
|
|
1172
1174
|
get items() {
|
|
1173
1175
|
return z.value;
|
|
@@ -1176,7 +1178,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1176
1178
|
return P.value;
|
|
1177
1179
|
},
|
|
1178
1180
|
get template() {
|
|
1179
|
-
return
|
|
1181
|
+
return A.value;
|
|
1180
1182
|
},
|
|
1181
1183
|
get disabled() {
|
|
1182
1184
|
return u.disabled;
|
|
@@ -1222,7 +1224,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1222
1224
|
}
|
|
1223
1225
|
const xe = q(() => {
|
|
1224
1226
|
var l;
|
|
1225
|
-
return
|
|
1227
|
+
return A.value ? ((l = A.value) == null ? void 0 : l.purchaseOrder.items) || [] : S.skus.map((p) => ({
|
|
1226
1228
|
quantity: {
|
|
1227
1229
|
amount: 0,
|
|
1228
1230
|
precision: 0
|
|
@@ -1236,9 +1238,9 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1236
1238
|
},
|
|
1237
1239
|
measurement: p.trackingMeasurement ? p.unit.measurements.find((j) => j.id === p.trackingMeasurement) : null
|
|
1238
1240
|
}));
|
|
1239
|
-
}),
|
|
1241
|
+
}), Se = q(() => {
|
|
1240
1242
|
const l = [];
|
|
1241
|
-
return (!
|
|
1243
|
+
return (!w.mustUsePoTemplate || w.mustUsePoTemplate && s.value.template) && l.push({
|
|
1242
1244
|
label: n("inventory.transfer.form.type.purchase"),
|
|
1243
1245
|
value: de.enum.purchase
|
|
1244
1246
|
}), l.push({
|
|
@@ -1248,7 +1250,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1248
1250
|
}), Fe = q(
|
|
1249
1251
|
() => {
|
|
1250
1252
|
var l;
|
|
1251
|
-
return ((l =
|
|
1253
|
+
return ((l = s.value.items) == null ? void 0 : l.every((p) => p.item.quantity.amount <= 0)) ?? !0;
|
|
1252
1254
|
}
|
|
1253
1255
|
);
|
|
1254
1256
|
function Re(l) {
|
|
@@ -1257,7 +1259,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1257
1259
|
if (l.$and && Array.isArray(l.$and))
|
|
1258
1260
|
for (const j of l.$and) {
|
|
1259
1261
|
if (j.supplierId && j.supplierId.$eq) {
|
|
1260
|
-
const H =
|
|
1262
|
+
const H = D.value.find((ae) => ae.value === j.supplierId.$eq);
|
|
1261
1263
|
H && p.push(`Supplier: ${H.label}`);
|
|
1262
1264
|
}
|
|
1263
1265
|
if (j.totalCost) {
|
|
@@ -1273,13 +1275,13 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1273
1275
|
}
|
|
1274
1276
|
return (l, p) => {
|
|
1275
1277
|
var et, tt;
|
|
1276
|
-
const j = O("FmChip"), H = O("FmLabel"), ae = O("FmIcon"), ue = O("FmField"), Oe = O("FmTooltip"), Je = O("FmSelect"),
|
|
1278
|
+
const j = O("FmChip"), H = O("FmLabel"), ae = O("FmIcon"), ue = O("FmField"), Oe = O("FmTooltip"), Je = O("FmSelect"), wt = O("FmTextField"), St = O("FmTextarea"), Ge = O("FmSwitch"), Ft = O("FmDatePicker"), $t = O("FmTimePicker"), Ne = O("FmFormGroup"), It = O("FmButton"), Dt = O("FmTable"), Tt = O("FmForm");
|
|
1277
1279
|
return b(), T("div", bs, [
|
|
1278
1280
|
t("div", gs, [
|
|
1279
1281
|
(et = u.modelValue) != null && et.template ? (b(), oe(j, {
|
|
1280
1282
|
key: 0,
|
|
1281
1283
|
variant: l.disabled ? "warning" : void 0,
|
|
1282
|
-
label: `${e(n)("inventory.transfer.template.title")}: ${((tt =
|
|
1284
|
+
label: `${e(n)("inventory.transfer.template.title")}: ${((tt = A.value) == null ? void 0 : tt.name) ?? e(n)("inventory.transfer.form.loading")}`,
|
|
1283
1285
|
icon: "summarize",
|
|
1284
1286
|
compact: ""
|
|
1285
1287
|
}, null, 8, ["variant", "label"])) : K("", !0),
|
|
@@ -1303,7 +1305,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1303
1305
|
onValidationFailed: console.log,
|
|
1304
1306
|
onValidationSuccess: p[15] || (p[15] = (Be) => g("validation-success"))
|
|
1305
1307
|
}, {
|
|
1306
|
-
default:
|
|
1308
|
+
default: M(() => {
|
|
1307
1309
|
var Be, ot, st, at, rt, lt, nt;
|
|
1308
1310
|
return [
|
|
1309
1311
|
t("div", _s, [
|
|
@@ -1319,12 +1321,12 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1319
1321
|
placement: "left",
|
|
1320
1322
|
disabled: l.disabled
|
|
1321
1323
|
}, {
|
|
1322
|
-
content:
|
|
1324
|
+
content: M(() => p[16] || (p[16] = [
|
|
1323
1325
|
ke("This field is locked from template.")
|
|
1324
1326
|
])),
|
|
1325
|
-
default:
|
|
1327
|
+
default: M(() => [
|
|
1326
1328
|
m(ue, null, {
|
|
1327
|
-
default:
|
|
1329
|
+
default: M(() => [
|
|
1328
1330
|
t("div", Cs, [
|
|
1329
1331
|
m(ae, {
|
|
1330
1332
|
name: "lock_outline",
|
|
@@ -1349,22 +1351,22 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1349
1351
|
}, null, 2)
|
|
1350
1352
|
])
|
|
1351
1353
|
]),
|
|
1352
|
-
t("div",
|
|
1354
|
+
t("div", ws, [
|
|
1353
1355
|
m(H, {
|
|
1354
1356
|
label: P.value === e(de).enum.purchase ? e(n)("inventory.transfer.form.purchaseFrom") : e(n)("inventory.transfer.form.transferFrom")
|
|
1355
1357
|
}, null, 8, ["label"]),
|
|
1356
|
-
t("div",
|
|
1358
|
+
t("div", Ss, [
|
|
1357
1359
|
m(Oe, {
|
|
1358
1360
|
"z-index": 51,
|
|
1359
1361
|
placement: "left",
|
|
1360
1362
|
disabled: l.disabled
|
|
1361
1363
|
}, {
|
|
1362
|
-
content:
|
|
1364
|
+
content: M(() => p[17] || (p[17] = [
|
|
1363
1365
|
ke("This field is locked from template.")
|
|
1364
1366
|
])),
|
|
1365
|
-
default:
|
|
1367
|
+
default: M(() => [
|
|
1366
1368
|
m(ue, null, {
|
|
1367
|
-
default:
|
|
1369
|
+
default: M(() => {
|
|
1368
1370
|
var R;
|
|
1369
1371
|
return [
|
|
1370
1372
|
t("div", Fs, [
|
|
@@ -1375,7 +1377,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1375
1377
|
}, null, 8, ["color"]),
|
|
1376
1378
|
t("div", {
|
|
1377
1379
|
class: W({ "text-fm-color-typo-disabled": l.disabled })
|
|
1378
|
-
}, $((R =
|
|
1380
|
+
}, $((R = D.value.find((G) => G.value === E.value)) == null ? void 0 : R.label), 3)
|
|
1379
1381
|
])
|
|
1380
1382
|
];
|
|
1381
1383
|
}),
|
|
@@ -1392,10 +1394,10 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1392
1394
|
"label-mark": "required",
|
|
1393
1395
|
modelValue: P.value,
|
|
1394
1396
|
"onUpdate:modelValue": p[0] || (p[0] = (R) => P.value = R),
|
|
1395
|
-
items:
|
|
1396
|
-
rules: [e(Ee)(1)(
|
|
1397
|
+
items: Se.value,
|
|
1398
|
+
rules: [e(Ee)(1)(Se.value)]
|
|
1397
1399
|
}, {
|
|
1398
|
-
default:
|
|
1400
|
+
default: M(() => [
|
|
1399
1401
|
t("span", {
|
|
1400
1402
|
class: W([
|
|
1401
1403
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
@@ -1410,19 +1412,19 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1410
1412
|
"label-mark": "required",
|
|
1411
1413
|
modelValue: E.value,
|
|
1412
1414
|
"onUpdate:modelValue": p[1] || (p[1] = (R) => E.value = R),
|
|
1413
|
-
items:
|
|
1414
|
-
rules: [e(Ee)(1)(
|
|
1415
|
+
items: D.value,
|
|
1416
|
+
rules: [e(Ee)(1)(D.value)]
|
|
1415
1417
|
}, {
|
|
1416
|
-
"menu-wrapper":
|
|
1418
|
+
"menu-wrapper": M((R) => {
|
|
1417
1419
|
var G, $e;
|
|
1418
1420
|
return [
|
|
1419
1421
|
m(yo, je(R, {
|
|
1420
|
-
items:
|
|
1422
|
+
items: D.value,
|
|
1421
1423
|
"model-value": ($e = (G = l.modelValue) == null ? void 0 : G.supplier) == null ? void 0 : $e._id
|
|
1422
1424
|
}), null, 16, ["items", "model-value"])
|
|
1423
1425
|
];
|
|
1424
1426
|
}),
|
|
1425
|
-
default:
|
|
1427
|
+
default: M(() => {
|
|
1426
1428
|
var R;
|
|
1427
1429
|
return [
|
|
1428
1430
|
t("span", {
|
|
@@ -1430,19 +1432,19 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1430
1432
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
1431
1433
|
l.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
1432
1434
|
])
|
|
1433
|
-
}, $((R =
|
|
1435
|
+
}, $((R = D.value.find((G) => G.value === E.value)) == null ? void 0 : R.label), 3)
|
|
1434
1436
|
];
|
|
1435
1437
|
}),
|
|
1436
1438
|
_: 1
|
|
1437
1439
|
}, 8, ["label", "modelValue", "items", "rules"])
|
|
1438
1440
|
], 64)),
|
|
1439
|
-
m(
|
|
1441
|
+
m(wt, {
|
|
1440
1442
|
label: e(n)("inventory.transfer.form.reference"),
|
|
1441
1443
|
"label-mark": "optional",
|
|
1442
1444
|
modelValue: J.value,
|
|
1443
1445
|
"onUpdate:modelValue": p[2] || (p[2] = (R) => J.value = R)
|
|
1444
1446
|
}, null, 8, ["label", "modelValue"]),
|
|
1445
|
-
m(
|
|
1447
|
+
m(St, {
|
|
1446
1448
|
label: e(n)("inventory.transfer.form.remark"),
|
|
1447
1449
|
"label-mark": "optional",
|
|
1448
1450
|
"max-length": 240,
|
|
@@ -1452,11 +1454,11 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1452
1454
|
}, null, 8, ["label", "modelValue", "class"]),
|
|
1453
1455
|
F.value ? (b(), oe(ys, {
|
|
1454
1456
|
key: 2,
|
|
1455
|
-
required: e(
|
|
1456
|
-
subsidiaryOptional: e(
|
|
1457
|
+
required: e(s).template != null || e(s).netSuite != null,
|
|
1458
|
+
subsidiaryOptional: e(s).template == null,
|
|
1457
1459
|
disabled: l.disabled,
|
|
1458
|
-
supplier: e(
|
|
1459
|
-
setting: e(
|
|
1460
|
+
supplier: e(s).supplier,
|
|
1461
|
+
setting: e(s).netSuite,
|
|
1460
1462
|
items: z.value,
|
|
1461
1463
|
onChange: (R, G) => {
|
|
1462
1464
|
e(r).setNetSuiteSetting(G);
|
|
@@ -1465,7 +1467,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1465
1467
|
_.value = !0;
|
|
1466
1468
|
})
|
|
1467
1469
|
}, null, 8, ["required", "subsidiaryOptional", "disabled", "supplier", "setting", "items", "onChange"])) : K("", !0),
|
|
1468
|
-
e(
|
|
1470
|
+
e(w).enableBackdatePo ? (b(), T("div", $s, [
|
|
1469
1471
|
t("div", {
|
|
1470
1472
|
class: W([
|
|
1471
1473
|
"flex",
|
|
@@ -1480,7 +1482,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1480
1482
|
label: e(n)("inventory.transfer.form.backdate.title"),
|
|
1481
1483
|
sublabel: e(n)("inventory.transfer.form.backdate.subtitle"),
|
|
1482
1484
|
"label-placement": "right",
|
|
1483
|
-
disabled:
|
|
1485
|
+
disabled: Z.value && !l.lastClosingDate || l.disabled
|
|
1484
1486
|
}, null, 8, ["modelValue", "label", "sublabel", "disabled"]),
|
|
1485
1487
|
t("div", {
|
|
1486
1488
|
class: W({ hidden: o.value, "w-16": !o.value })
|
|
@@ -1504,9 +1506,9 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1504
1506
|
key: 0,
|
|
1505
1507
|
modelValue: e(se),
|
|
1506
1508
|
"onUpdate:modelValue": p[8] || (p[8] = (R) => ge(se) ? se.value = R : null),
|
|
1507
|
-
rules: [e(
|
|
1509
|
+
rules: [e(Xt)(new Date(l.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1508
1510
|
}, null, 8, ["modelValue", "rules"])) : K("", !0),
|
|
1509
|
-
|
|
1511
|
+
Z.value && !l.lastClosingDate ? (b(), T("div", Vs, [
|
|
1510
1512
|
m(ae, {
|
|
1511
1513
|
name: "error",
|
|
1512
1514
|
size: "sm",
|
|
@@ -1545,7 +1547,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1545
1547
|
size: "md"
|
|
1546
1548
|
}, null, 8, ["disabled", "label"]),
|
|
1547
1549
|
m(ls, {
|
|
1548
|
-
"template-id": e(
|
|
1550
|
+
"template-id": e(s).template || void 0,
|
|
1549
1551
|
"template-items": xe.value,
|
|
1550
1552
|
"po-items": z.value,
|
|
1551
1553
|
"onUpdate:forecastAmounts": p[10] || (p[10] = (R) => {
|
|
@@ -1555,12 +1557,12 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1555
1557
|
e(r).updateItems(R), c.value++;
|
|
1556
1558
|
}),
|
|
1557
1559
|
"onUpdate:predictionId": p[12] || (p[12] = (R) => {
|
|
1558
|
-
|
|
1560
|
+
I.value = R;
|
|
1559
1561
|
})
|
|
1560
1562
|
}, null, 8, ["template-id", "template-items", "po-items"])
|
|
1561
1563
|
])
|
|
1562
1564
|
], 2),
|
|
1563
|
-
P.value === e(de).enum.purchase &&
|
|
1565
|
+
P.value === e(de).enum.purchase && X.value && e(w).enableTotalCost && z.value.length ? (b(), T("div", Ms, [
|
|
1564
1566
|
m(Ge, {
|
|
1565
1567
|
label: e(ie) ? e(n)("inventory.transfer.form.items.fetchingData") : e(n)("inventory.transfer.form.items.comparePriceHistory"),
|
|
1566
1568
|
"prepend-icon": "compare_arrows",
|
|
@@ -1586,7 +1588,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1586
1588
|
"hide-footer": "",
|
|
1587
1589
|
"page-size": z.value.length
|
|
1588
1590
|
}, {
|
|
1589
|
-
"table-row":
|
|
1591
|
+
"table-row": M((R) => {
|
|
1590
1592
|
var G, $e, it, ut;
|
|
1591
1593
|
return [
|
|
1592
1594
|
m(cs, {
|
|
@@ -1601,12 +1603,12 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1601
1603
|
}, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "template-item", "disabled"])
|
|
1602
1604
|
];
|
|
1603
1605
|
}),
|
|
1604
|
-
"list-row":
|
|
1606
|
+
"list-row": M((R) => [
|
|
1605
1607
|
(b(), oe(ht, {
|
|
1606
1608
|
row: R,
|
|
1607
1609
|
key: z.value.map((G) => G.sku._id).join(".")
|
|
1608
1610
|
}, {
|
|
1609
|
-
default:
|
|
1611
|
+
default: M((G) => [
|
|
1610
1612
|
m(Lo, {
|
|
1611
1613
|
"compare-price-by-sku": e(ee),
|
|
1612
1614
|
"show-compare-price": P.value === e(de).enum.purchase && e(le),
|
|
@@ -1620,7 +1622,7 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1620
1622
|
_: 1
|
|
1621
1623
|
}, 8, ["column-defs", "column-visibility", "row-data", "page-size"]))
|
|
1622
1624
|
]),
|
|
1623
|
-
e(
|
|
1625
|
+
e(w).enableTotalCost ? (b(), T("div", Es, [
|
|
1624
1626
|
t("div", qs, [
|
|
1625
1627
|
t("div", Us, $(e(n)("inventory.transfer.form.surcharges.totalCost")), 1),
|
|
1626
1628
|
t("div", Ns, $(e(ce)()) + " " + $(e(Ce)({
|
|
@@ -1675,17 +1677,17 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1675
1677
|
emits: ["update:show", "submitted"],
|
|
1676
1678
|
setup(y, { expose: x, emit: d }) {
|
|
1677
1679
|
var se;
|
|
1678
|
-
const u = y, g = d, n = We(), h = kt(),
|
|
1680
|
+
const u = y, g = d, n = We(), h = kt(), S = we(), V = xt(), w = Ye(), v = Qe(), { t: i } = ye(), o = U(!1), a = U(!1), r = U(!1), s = U(!1), _ = q(() => {
|
|
1679
1681
|
var k;
|
|
1680
|
-
return ((k =
|
|
1682
|
+
return ((k = I.value.items) == null ? void 0 : k.filter((C) => C.quantity.amount === 0)) ?? [];
|
|
1681
1683
|
});
|
|
1682
1684
|
async function F(k) {
|
|
1683
1685
|
if (k) {
|
|
1684
|
-
|
|
1686
|
+
a.value = !1;
|
|
1685
1687
|
try {
|
|
1686
|
-
await V.readSuppliers(),
|
|
1688
|
+
await V.readSuppliers(), a.value = !0;
|
|
1687
1689
|
} catch {
|
|
1688
|
-
|
|
1690
|
+
S.open({
|
|
1689
1691
|
title: i("inventory.transfer.form.unableToFetchListOfSuppliers.title"),
|
|
1690
1692
|
message: i("inventory.transfer.form.unableToFetchListOfSuppliers.message"),
|
|
1691
1693
|
type: "error"
|
|
@@ -1728,15 +1730,15 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1728
1730
|
templateDoc: h.templates.find((C) => C._id === u.templateId)
|
|
1729
1731
|
};
|
|
1730
1732
|
}
|
|
1731
|
-
const f = _t(u, "show"),
|
|
1733
|
+
const f = _t(u, "show"), I = U(u.modelValue ?? c()), A = U(((se = u.modelValue) == null ? void 0 : se._id) ?? `${Math.random()}`);
|
|
1732
1734
|
he(
|
|
1733
1735
|
() => u.show,
|
|
1734
1736
|
(k) => {
|
|
1735
1737
|
var C;
|
|
1736
|
-
k && (r.value = !1,
|
|
1738
|
+
k && (r.value = !1, I.value = u.modelValue ?? c(), A.value = ((C = u.modelValue) == null ? void 0 : C._id) ?? `${Math.random()}`);
|
|
1737
1739
|
}
|
|
1738
1740
|
);
|
|
1739
|
-
const
|
|
1741
|
+
const X = q(() => !a.value || !r.value), z = q(() => {
|
|
1740
1742
|
switch (u.mode) {
|
|
1741
1743
|
case Ie.READ:
|
|
1742
1744
|
return "View transfer";
|
|
@@ -1746,25 +1748,25 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1746
1748
|
return i("inventory.transfer.receiveRequest.update.title");
|
|
1747
1749
|
}
|
|
1748
1750
|
return "";
|
|
1749
|
-
}),
|
|
1751
|
+
}), Z = U();
|
|
1750
1752
|
x({
|
|
1751
1753
|
validateInputs: () => {
|
|
1752
1754
|
var k, C;
|
|
1753
|
-
(C = (k =
|
|
1755
|
+
(C = (k = Z.value) == null ? void 0 : k.validateInputs) == null || C.call(k);
|
|
1754
1756
|
},
|
|
1755
1757
|
resetInputsValidation: () => {
|
|
1756
1758
|
var k, C;
|
|
1757
|
-
(C = (k =
|
|
1759
|
+
(C = (k = Z.value) == null ? void 0 : k.resetInputsValidation) == null || C.call(k);
|
|
1758
1760
|
},
|
|
1759
1761
|
resetInputs: () => {
|
|
1760
1762
|
var k, C;
|
|
1761
|
-
(C = (k =
|
|
1763
|
+
(C = (k = Z.value) == null ? void 0 : k.resetInputs) == null || C.call(k);
|
|
1762
1764
|
}
|
|
1763
1765
|
});
|
|
1764
1766
|
async function N() {
|
|
1765
|
-
const k =
|
|
1767
|
+
const k = I.value;
|
|
1766
1768
|
if (o.value = !0, k.items = k.items.filter((C) => C.quantity.amount > 0), !k.items.length) {
|
|
1767
|
-
|
|
1769
|
+
S.open({
|
|
1768
1770
|
title: "Cannot create order",
|
|
1769
1771
|
message: "There are no items with non-zero amount in your request.",
|
|
1770
1772
|
type: "error"
|
|
@@ -1773,13 +1775,13 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1773
1775
|
}
|
|
1774
1776
|
(k.supplier.internal === "warehouse" || k.supplier.internal === "restaurant") && (k.items = k.items.map(({ totalCost: C, ...Q }) => Q));
|
|
1775
1777
|
try {
|
|
1776
|
-
await n.createPurchaseOrder(k), await new Promise((C) => setTimeout(C, 1e3)),
|
|
1778
|
+
await n.createPurchaseOrder(k), await new Promise((C) => setTimeout(C, 1e3)), S.open({
|
|
1777
1779
|
title: i("inventory.transfer.receiveRequest.create.success"),
|
|
1778
1780
|
message: i("inventory.transfer.receiveRequest.create.successMessage"),
|
|
1779
1781
|
type: "success"
|
|
1780
1782
|
}), g("update:show", !1), g("submitted");
|
|
1781
1783
|
} catch (C) {
|
|
1782
|
-
|
|
1784
|
+
S.open({
|
|
1783
1785
|
title: i("inventory.transfer.receiveRequest.create.error.title"),
|
|
1784
1786
|
message: i("inventory.transfer.receiveRequest.create.error.message"),
|
|
1785
1787
|
type: "error"
|
|
@@ -1789,9 +1791,9 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1789
1791
|
}
|
|
1790
1792
|
}
|
|
1791
1793
|
async function B() {
|
|
1792
|
-
const k =
|
|
1794
|
+
const k = I.value;
|
|
1793
1795
|
if (o.value = !0, k.items = k.items.filter((C) => C.quantity.amount > 0), !k.items.length) {
|
|
1794
|
-
|
|
1796
|
+
S.open({
|
|
1795
1797
|
title: "Cannot create order",
|
|
1796
1798
|
message: "There are no items with non-zero amount in your request.",
|
|
1797
1799
|
type: "error"
|
|
@@ -1800,13 +1802,13 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1800
1802
|
}
|
|
1801
1803
|
(k.supplier.internal === "warehouse" || k.supplier.internal === "restaurant") && (k.items = k.items.map(({ totalCost: C, ...Q }) => Q));
|
|
1802
1804
|
try {
|
|
1803
|
-
await n.updatePurchaseOrder(k), await new Promise((C) => setTimeout(C, 1e3)),
|
|
1805
|
+
await n.updatePurchaseOrder(k), await new Promise((C) => setTimeout(C, 1e3)), S.open({
|
|
1804
1806
|
title: i("inventory.transfer.receiveRequest.update.success"),
|
|
1805
1807
|
message: i("inventory.transfer.receiveRequest.update.successMessage"),
|
|
1806
1808
|
type: "success"
|
|
1807
1809
|
}), g("update:show", !1), g("submitted");
|
|
1808
1810
|
} catch (C) {
|
|
1809
|
-
|
|
1811
|
+
S.open({
|
|
1810
1812
|
title: i("inventory.transfer.receiveRequest.update.error.title"),
|
|
1811
1813
|
message: i("inventory.transfer.receiveRequest.update.error.message"),
|
|
1812
1814
|
type: "error"
|
|
@@ -1823,36 +1825,36 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1823
1825
|
return B();
|
|
1824
1826
|
}
|
|
1825
1827
|
}
|
|
1826
|
-
function
|
|
1828
|
+
function D() {
|
|
1827
1829
|
var k;
|
|
1828
|
-
|
|
1830
|
+
I.value.items = ((k = I.value.items) == null ? void 0 : k.filter((C) => C.quantity.amount > 0)) ?? [], s.value = !1, L();
|
|
1829
1831
|
}
|
|
1830
1832
|
function E() {
|
|
1831
|
-
|
|
1832
|
-
...
|
|
1833
|
-
...
|
|
1833
|
+
Z.value.getFormData && (I.value = {
|
|
1834
|
+
...I.value,
|
|
1835
|
+
...Z.value.getFormData()
|
|
1834
1836
|
});
|
|
1835
1837
|
}
|
|
1836
1838
|
function L() {
|
|
1837
1839
|
var Q, le;
|
|
1838
1840
|
const k = io.validatePurchaseOrderItems({
|
|
1839
|
-
skusById:
|
|
1840
|
-
items:
|
|
1841
|
+
skusById: w.skuById ?? {},
|
|
1842
|
+
items: I.value.items ?? []
|
|
1841
1843
|
}), C = Object.values(k).flat();
|
|
1842
1844
|
if (C.length > 0) {
|
|
1843
1845
|
const ie = C[0];
|
|
1844
|
-
|
|
1846
|
+
S.open({
|
|
1845
1847
|
title: `[Row ${ie.index + 1}] "${ie.poItem.sku.name}"`,
|
|
1846
1848
|
message: `${ie.message}`,
|
|
1847
1849
|
type: "error"
|
|
1848
1850
|
});
|
|
1849
1851
|
return;
|
|
1850
1852
|
}
|
|
1851
|
-
(le = (Q =
|
|
1853
|
+
(le = (Q = Z.value) == null ? void 0 : Q.validateInputs) == null || le.call(Q);
|
|
1852
1854
|
}
|
|
1853
1855
|
function J() {
|
|
1854
1856
|
if (E(), _.value.length > 0) {
|
|
1855
|
-
|
|
1857
|
+
s.value = !0;
|
|
1856
1858
|
return;
|
|
1857
1859
|
}
|
|
1858
1860
|
L();
|
|
@@ -1867,37 +1869,37 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1867
1869
|
"close-button": "",
|
|
1868
1870
|
"max-width": 900
|
|
1869
1871
|
}, {
|
|
1870
|
-
"side-sheet-header":
|
|
1872
|
+
"side-sheet-header": M(() => [
|
|
1871
1873
|
t("div", Ws, [
|
|
1872
1874
|
t("div", Js, $(z.value), 1)
|
|
1873
1875
|
])
|
|
1874
1876
|
]),
|
|
1875
|
-
default:
|
|
1877
|
+
default: M(() => [
|
|
1876
1878
|
(b(), oe(Zs, {
|
|
1877
1879
|
class: "w-full",
|
|
1878
1880
|
ref_key: "formRef",
|
|
1879
|
-
ref:
|
|
1881
|
+
ref: Z,
|
|
1880
1882
|
"onForm:ready": C[0] || (C[0] = () => r.value = !0),
|
|
1881
1883
|
onValidationSuccess: P,
|
|
1882
|
-
modelValue:
|
|
1883
|
-
"onUpdate:modelValue": C[1] || (C[1] = (ee) =>
|
|
1884
|
-
disabled: o.value ||
|
|
1884
|
+
modelValue: I.value,
|
|
1885
|
+
"onUpdate:modelValue": C[1] || (C[1] = (ee) => I.value = ee),
|
|
1886
|
+
disabled: o.value || X.value,
|
|
1885
1887
|
suppliers: e(V).suppliers,
|
|
1886
|
-
skus: e(
|
|
1887
|
-
key:
|
|
1888
|
+
skus: e(w).skus,
|
|
1889
|
+
key: A.value,
|
|
1888
1890
|
"last-closing-date": k.lastClosingDate
|
|
1889
1891
|
}, null, 8, ["modelValue", "disabled", "suppliers", "skus", "last-closing-date"]))
|
|
1890
1892
|
]),
|
|
1891
|
-
"side-sheet-footer":
|
|
1893
|
+
"side-sheet-footer": M(() => [
|
|
1892
1894
|
t("div", Gs, [
|
|
1893
1895
|
m(Q, {
|
|
1894
1896
|
loading: o.value,
|
|
1895
|
-
disabled:
|
|
1897
|
+
disabled: X.value,
|
|
1896
1898
|
label: e(i)("common.save"),
|
|
1897
1899
|
onClick: J
|
|
1898
1900
|
}, null, 8, ["loading", "disabled", "label"]),
|
|
1899
1901
|
m(Q, {
|
|
1900
|
-
disabled:
|
|
1902
|
+
disabled: X.value,
|
|
1901
1903
|
variant: "tertiary",
|
|
1902
1904
|
label: e(i)("common.close"),
|
|
1903
1905
|
onClick: C[2] || (C[2] = (ee) => g("update:show", !1))
|
|
@@ -1907,29 +1909,29 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1907
1909
|
_: 1
|
|
1908
1910
|
}, 8, ["modelValue"]),
|
|
1909
1911
|
m(ie, {
|
|
1910
|
-
modelValue:
|
|
1911
|
-
"onUpdate:modelValue": C[5] || (C[5] = (ee) =>
|
|
1912
|
+
modelValue: s.value,
|
|
1913
|
+
"onUpdate:modelValue": C[5] || (C[5] = (ee) => s.value = ee),
|
|
1912
1914
|
overlay: !0
|
|
1913
1915
|
}, {
|
|
1914
|
-
"dialog-header":
|
|
1916
|
+
"dialog-header": M(() => [
|
|
1915
1917
|
t("div", ea, $(e(i)("inventory.transfer.template.zeroQuantity.title")), 1)
|
|
1916
1918
|
]),
|
|
1917
|
-
"dialog-footer":
|
|
1919
|
+
"dialog-footer": M(() => [
|
|
1918
1920
|
t("div", la, [
|
|
1919
1921
|
m(Q, {
|
|
1920
1922
|
label: e(i)("common.cancel"),
|
|
1921
1923
|
variant: "tertiary",
|
|
1922
|
-
onClick: C[4] || (C[4] = (ee) =>
|
|
1924
|
+
onClick: C[4] || (C[4] = (ee) => s.value = !1)
|
|
1923
1925
|
}, null, 8, ["label"]),
|
|
1924
1926
|
m(Q, {
|
|
1925
1927
|
label: e(i)("inventory.transfer.template.zeroQuantity.removeAll"),
|
|
1926
1928
|
variant: "primary",
|
|
1927
1929
|
"prepend-icon": "delete",
|
|
1928
|
-
onClick:
|
|
1930
|
+
onClick: D
|
|
1929
1931
|
}, null, 8, ["label"])
|
|
1930
1932
|
])
|
|
1931
1933
|
]),
|
|
1932
|
-
default:
|
|
1934
|
+
default: M(() => [
|
|
1933
1935
|
t("div", ta, [
|
|
1934
1936
|
t("div", oa, $(e(i)("inventory.transfer.template.zeroQuantity.message", { count: _.value.length })), 1),
|
|
1935
1937
|
t("div", sa, [
|
|
@@ -1950,16 +1952,16 @@ const is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, us = { key: 0 }
|
|
|
1950
1952
|
}
|
|
1951
1953
|
});
|
|
1952
1954
|
function ia(y) {
|
|
1953
|
-
const [x, d, u, ...g] = _o(y), n = u.map((
|
|
1954
|
-
if (
|
|
1955
|
+
const [x, d, u, ...g] = _o(y), n = u.map((w) => w.toLowerCase().trim().replace(/ /g, "_")), S = ["item_name", "transfer_quantity(uom)", "uom", "scanned_code"].filter((w) => !n.includes(w));
|
|
1956
|
+
if (S.length)
|
|
1955
1957
|
throw new Error(
|
|
1956
|
-
`Missing headers (${
|
|
1958
|
+
`Missing headers (${S.join()}). Excel file does not come from the template.`
|
|
1957
1959
|
);
|
|
1958
|
-
return g.map((
|
|
1960
|
+
return g.map((w, v) => {
|
|
1959
1961
|
const i = {};
|
|
1960
1962
|
for (const o in n) {
|
|
1961
|
-
const
|
|
1962
|
-
Object.assign(i, { [
|
|
1963
|
+
const a = n[o];
|
|
1964
|
+
Object.assign(i, { [a]: w[o] });
|
|
1963
1965
|
}
|
|
1964
1966
|
return {
|
|
1965
1967
|
index: v,
|
|
@@ -1972,35 +1974,35 @@ function ua(y) {
|
|
|
1972
1974
|
try {
|
|
1973
1975
|
return x.reduce(
|
|
1974
1976
|
(u, g) => {
|
|
1975
|
-
const n = new Array(), h = y.Sheets[g],
|
|
1977
|
+
const n = new Array(), h = y.Sheets[g], S = Ye(), V = ia(h), w = [];
|
|
1976
1978
|
for (const { index: i, data: o } of V) {
|
|
1977
1979
|
o.scanned_code === "" && n.push(`Row ${i + 1}: Scanned code is empty`), o.item_name === "" && n.push(`Row ${i + 1}: Item name is empty`), o.uom === "" && n.push(`Row ${i + 1}: UOM is empty`), o["transfer_quantity(uom)"] === "" && n.push(`Row ${i + 1}: Transfer quantity is empty`);
|
|
1978
|
-
const
|
|
1979
|
-
if (!
|
|
1980
|
+
const a = S.skus.find((_) => _.code === o.scanned_code);
|
|
1981
|
+
if (!a) {
|
|
1980
1982
|
n.push(`Row ${i + 1}: SKU not found`);
|
|
1981
1983
|
continue;
|
|
1982
1984
|
}
|
|
1983
|
-
const r =
|
|
1984
|
-
let
|
|
1985
|
+
const r = a.unit.abbrev === o.uom;
|
|
1986
|
+
let s = null;
|
|
1985
1987
|
if (!r) {
|
|
1986
|
-
const _ =
|
|
1988
|
+
const _ = a.unit.measurements.find((F) => F.abbrev === o.uom);
|
|
1987
1989
|
if (!_) {
|
|
1988
1990
|
n.push(`Row ${i + 1}: Measurement not found`);
|
|
1989
1991
|
continue;
|
|
1990
1992
|
}
|
|
1991
|
-
|
|
1993
|
+
s = _;
|
|
1992
1994
|
}
|
|
1993
|
-
|
|
1994
|
-
sku:
|
|
1995
|
+
w.push({
|
|
1996
|
+
sku: a,
|
|
1995
1997
|
code: o.scanned_code,
|
|
1996
1998
|
name: o.item_name,
|
|
1997
1999
|
quantity: bt.fromNumber(Number(o["transfer_quantity(uom)"])),
|
|
1998
|
-
measurement:
|
|
2000
|
+
measurement: s
|
|
1999
2001
|
});
|
|
2000
2002
|
}
|
|
2001
2003
|
const v = {
|
|
2002
2004
|
type: "create",
|
|
2003
|
-
poItems:
|
|
2005
|
+
poItems: w,
|
|
2004
2006
|
excelSheetName: g,
|
|
2005
2007
|
errors: n
|
|
2006
2008
|
};
|
|
@@ -2037,8 +2039,8 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2037
2039
|
x.errors.length && (u.value = !u.value);
|
|
2038
2040
|
};
|
|
2039
2041
|
return (n, h) => {
|
|
2040
|
-
var
|
|
2041
|
-
const
|
|
2042
|
+
var w;
|
|
2043
|
+
const S = O("FmIcon"), V = O("FmTooltip");
|
|
2042
2044
|
return b(), T("div", da, [
|
|
2043
2045
|
t("div", {
|
|
2044
2046
|
onClick: g,
|
|
@@ -2057,7 +2059,7 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2057
2059
|
n.type === "create" ? (b(), T("span", pa, "(" + $(e(d)("inventory.closing.template.import.new")) + ")", 1)) : K("", !0)
|
|
2058
2060
|
], 2),
|
|
2059
2061
|
n.errors.length ? (b(), T("div", fa, [
|
|
2060
|
-
m(
|
|
2062
|
+
m(S, {
|
|
2061
2063
|
name: "error",
|
|
2062
2064
|
size: "sm",
|
|
2063
2065
|
color: "system-error-300"
|
|
@@ -2066,7 +2068,7 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2066
2068
|
]),
|
|
2067
2069
|
h[0] || (h[0] = t("hr", { class: "my-2" }, null, -1)),
|
|
2068
2070
|
t("div", va, [
|
|
2069
|
-
(
|
|
2071
|
+
(w = n.items) != null && w.length ? (b(!0), T(re, { key: 0 }, fe(n.items, (v, i) => (b(), T("div", {
|
|
2070
2072
|
key: i,
|
|
2071
2073
|
class: "flex gap-4 mt-2 items-center"
|
|
2072
2074
|
}, [
|
|
@@ -2076,7 +2078,7 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2076
2078
|
placement: "top",
|
|
2077
2079
|
"z-index": 51
|
|
2078
2080
|
}, {
|
|
2079
|
-
default:
|
|
2081
|
+
default: M(() => [
|
|
2080
2082
|
t("span", ba, $(v.code), 1)
|
|
2081
2083
|
]),
|
|
2082
2084
|
_: 2
|
|
@@ -2086,7 +2088,7 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2086
2088
|
placement: "top",
|
|
2087
2089
|
"z-index": 51
|
|
2088
2090
|
}, {
|
|
2089
|
-
default:
|
|
2091
|
+
default: M(() => [
|
|
2090
2092
|
t("span", ga, $(v.name), 1)
|
|
2091
2093
|
]),
|
|
2092
2094
|
_: 2
|
|
@@ -2102,7 +2104,7 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2102
2104
|
])
|
|
2103
2105
|
]),
|
|
2104
2106
|
t("div", ha, [
|
|
2105
|
-
n.errors.length ? (b(), oe(
|
|
2107
|
+
n.errors.length ? (b(), oe(S, {
|
|
2106
2108
|
key: 0,
|
|
2107
2109
|
name: u.value ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
2108
2110
|
size: "md"
|
|
@@ -2125,10 +2127,10 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2125
2127
|
]);
|
|
2126
2128
|
};
|
|
2127
2129
|
}
|
|
2128
|
-
}), Ca = { class: "flex flex-col gap-24" },
|
|
2130
|
+
}), Ca = { class: "flex flex-col gap-24" }, wa = {
|
|
2129
2131
|
key: 0,
|
|
2130
2132
|
class: "flex items-center gap-8"
|
|
2131
|
-
},
|
|
2133
|
+
}, Sa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fa = { class: "flex flex-col gap-8" }, $a = { class: "line-clamp-2 text-ellipsis break-all" }, Ia = {
|
|
2132
2134
|
key: 2,
|
|
2133
2135
|
class: "shrink-0"
|
|
2134
2136
|
}, Da = {
|
|
@@ -2140,9 +2142,9 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2140
2142
|
}, Pa = { class: "fm-typo-en-body-lg-600" }, pt = "Transfer note", Ra = /* @__PURE__ */ ne({
|
|
2141
2143
|
__name: "XilnexImportForm",
|
|
2142
2144
|
setup(y, { expose: x }) {
|
|
2143
|
-
const d = U(null), u =
|
|
2145
|
+
const d = U(null), u = we(), g = U(!1), n = U(!1), h = ko(), S = U(!1), V = qe();
|
|
2144
2146
|
U([]);
|
|
2145
|
-
const
|
|
2147
|
+
const w = q({
|
|
2146
2148
|
get() {
|
|
2147
2149
|
var c;
|
|
2148
2150
|
return ((c = h.supplier) == null ? void 0 : c.name) ?? "";
|
|
@@ -2166,7 +2168,7 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2166
2168
|
});
|
|
2167
2169
|
He(async () => {
|
|
2168
2170
|
const c = await V.getNetSuiteLocations();
|
|
2169
|
-
console.log(c),
|
|
2171
|
+
console.log(c), S.value = !0;
|
|
2170
2172
|
});
|
|
2171
2173
|
const v = q({
|
|
2172
2174
|
get() {
|
|
@@ -2174,8 +2176,8 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2174
2176
|
},
|
|
2175
2177
|
set(c) {
|
|
2176
2178
|
if (c) {
|
|
2177
|
-
const f = h.effectiveAt ? new Date(h.effectiveAt) : /* @__PURE__ */ new Date(), [
|
|
2178
|
-
f.setFullYear(parseInt(
|
|
2179
|
+
const f = h.effectiveAt ? new Date(h.effectiveAt) : /* @__PURE__ */ new Date(), [I, A, X] = c.split("-");
|
|
2180
|
+
f.setFullYear(parseInt(I)), f.setMonth(parseInt(A) - 1), f.setDate(parseInt(X)), h.effectiveAt = f.toISOString();
|
|
2179
2181
|
}
|
|
2180
2182
|
}
|
|
2181
2183
|
}), i = q({
|
|
@@ -2184,48 +2186,48 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2184
2186
|
},
|
|
2185
2187
|
set(c) {
|
|
2186
2188
|
if (c) {
|
|
2187
|
-
const f = h.effectiveAt ? new Date(h.effectiveAt) : /* @__PURE__ */ new Date(), [
|
|
2188
|
-
f.setMinutes(parseInt(
|
|
2189
|
+
const f = h.effectiveAt ? new Date(h.effectiveAt) : /* @__PURE__ */ new Date(), [I, A] = c.split(":");
|
|
2190
|
+
f.setMinutes(parseInt(I)), f.setSeconds(parseInt(A)), h.effectiveAt = f.toISOString();
|
|
2189
2191
|
}
|
|
2190
2192
|
}
|
|
2191
|
-
}), o = U(new Array()),
|
|
2192
|
-
() => !!o.value.length ||
|
|
2193
|
-
),
|
|
2193
|
+
}), o = U(new Array()), a = U([]), r = q(
|
|
2194
|
+
() => !!o.value.length || a.value.some((c) => c.errors.length)
|
|
2195
|
+
), s = U();
|
|
2194
2196
|
x({
|
|
2195
2197
|
validateInputs: () => {
|
|
2196
2198
|
var c, f;
|
|
2197
|
-
(f = (c =
|
|
2199
|
+
(f = (c = s.value) == null ? void 0 : c.validateInputs) == null || f.call(c);
|
|
2198
2200
|
},
|
|
2199
2201
|
resetInputsValidation: () => {
|
|
2200
2202
|
var c, f;
|
|
2201
|
-
(f = (c =
|
|
2203
|
+
(f = (c = s.value) == null ? void 0 : c.resetInputsValidation) == null || f.call(c);
|
|
2202
2204
|
},
|
|
2203
2205
|
resetInputs: () => {
|
|
2204
2206
|
var c, f;
|
|
2205
|
-
(f = (c =
|
|
2207
|
+
(f = (c = s.value) == null ? void 0 : c.resetInputs) == null || f.call(c);
|
|
2206
2208
|
}
|
|
2207
2209
|
});
|
|
2208
2210
|
const { t: _ } = ye();
|
|
2209
2211
|
async function F(c) {
|
|
2210
|
-
o.value = [],
|
|
2212
|
+
o.value = [], a.value = [];
|
|
2211
2213
|
try {
|
|
2212
2214
|
g.value = !0;
|
|
2213
2215
|
const [f] = await Promise.all([
|
|
2214
2216
|
ho(c),
|
|
2215
2217
|
// fake buffer
|
|
2216
|
-
new Promise((
|
|
2217
|
-
]),
|
|
2218
|
-
if (
|
|
2218
|
+
new Promise((A) => setTimeout(A, 1e3))
|
|
2219
|
+
]), I = ua(f);
|
|
2220
|
+
if (I.invalidExcel) {
|
|
2219
2221
|
o.value.push(
|
|
2220
|
-
|
|
2222
|
+
I.invalidExcelMessage ?? _("inventory.ingredient.import.fileError.invalidExcel")
|
|
2221
2223
|
);
|
|
2222
2224
|
return;
|
|
2223
2225
|
}
|
|
2224
|
-
if (
|
|
2226
|
+
if (a.value = I.importCreateResult, !a.value.length) {
|
|
2225
2227
|
o.value.push(_("inventory.ingredient.import.fileError.noData"));
|
|
2226
2228
|
return;
|
|
2227
2229
|
}
|
|
2228
|
-
h.items =
|
|
2230
|
+
h.items = a.value.map((A) => A.poItems).flat();
|
|
2229
2231
|
} catch (f) {
|
|
2230
2232
|
u.open({
|
|
2231
2233
|
title: _("inventory.ingredient.import.fileError.unableToRead"),
|
|
@@ -2242,16 +2244,16 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2242
2244
|
return he(d, (c) => {
|
|
2243
2245
|
c && F(c);
|
|
2244
2246
|
}), (c, f) => {
|
|
2245
|
-
const
|
|
2247
|
+
const I = O("FmSelect"), A = O("FmDatePicker"), X = O("FmTimePicker"), z = O("FmCircularProgress"), Z = O("FmLabel"), N = O("FmIcon"), B = O("FmButton"), P = O("FmForm");
|
|
2246
2248
|
return b(), oe(P, {
|
|
2247
2249
|
ref_key: "formRef",
|
|
2248
|
-
ref:
|
|
2250
|
+
ref: s
|
|
2249
2251
|
}, {
|
|
2250
|
-
default:
|
|
2252
|
+
default: M(() => [
|
|
2251
2253
|
t("div", Ca, [
|
|
2252
|
-
m(
|
|
2253
|
-
modelValue:
|
|
2254
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
2254
|
+
m(I, {
|
|
2255
|
+
modelValue: w.value,
|
|
2256
|
+
"onUpdate:modelValue": f[0] || (f[0] = (D) => w.value = D),
|
|
2255
2257
|
label: "Transfer from",
|
|
2256
2258
|
searchable: "",
|
|
2257
2259
|
searchTarget: "label",
|
|
@@ -2266,26 +2268,26 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2266
2268
|
"helper-text": "Helper",
|
|
2267
2269
|
rules: [e(De)()]
|
|
2268
2270
|
}, null, 8, ["modelValue", "rules"]),
|
|
2269
|
-
m(
|
|
2271
|
+
m(A, {
|
|
2270
2272
|
modelValue: v.value,
|
|
2271
|
-
"onUpdate:modelValue": f[1] || (f[1] = (
|
|
2273
|
+
"onUpdate:modelValue": f[1] || (f[1] = (D) => v.value = D),
|
|
2272
2274
|
label: "Transfer date",
|
|
2273
2275
|
rules: [e(De)()]
|
|
2274
2276
|
}, null, 8, ["modelValue", "rules"]),
|
|
2275
|
-
m(
|
|
2277
|
+
m(X, {
|
|
2276
2278
|
modelValue: i.value,
|
|
2277
|
-
"onUpdate:modelValue": f[2] || (f[2] = (
|
|
2279
|
+
"onUpdate:modelValue": f[2] || (f[2] = (D) => i.value = D),
|
|
2278
2280
|
label: "Transfer time",
|
|
2279
2281
|
rules: [e(De)()]
|
|
2280
2282
|
}, null, 8, ["modelValue", "rules"]),
|
|
2281
|
-
n.value ? (b(), T("div",
|
|
2283
|
+
n.value ? (b(), T("div", wa, [
|
|
2282
2284
|
t("div", null, [
|
|
2283
2285
|
m(z, {
|
|
2284
2286
|
size: "md",
|
|
2285
2287
|
color: "neutral-gray-200"
|
|
2286
2288
|
})
|
|
2287
2289
|
]),
|
|
2288
|
-
t("div",
|
|
2290
|
+
t("div", Sa, $(e(_)("inventory.formField.loading")), 1)
|
|
2289
2291
|
])) : (b(), T(re, { key: 1 }, [
|
|
2290
2292
|
m(xo, {
|
|
2291
2293
|
"max-file-size": 5,
|
|
@@ -2295,14 +2297,14 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2295
2297
|
}),
|
|
2296
2298
|
accept: ".xlsx,.xls",
|
|
2297
2299
|
label: pt,
|
|
2298
|
-
onFileUpload: f[3] || (f[3] = (
|
|
2300
|
+
onFileUpload: f[3] || (f[3] = (D) => d.value = D),
|
|
2299
2301
|
"button-label": e(_)("inventory.ingredient.import.selectFile")
|
|
2300
2302
|
}, Pt({ _: 2 }, [
|
|
2301
2303
|
d.value ? {
|
|
2302
2304
|
name: "default",
|
|
2303
|
-
fn:
|
|
2304
|
-
m(
|
|
2305
|
-
default:
|
|
2305
|
+
fn: M(({ openFileDialog: D }) => [
|
|
2306
|
+
m(Z, null, {
|
|
2307
|
+
default: M(() => [
|
|
2306
2308
|
ke($(pt))
|
|
2307
2309
|
]),
|
|
2308
2310
|
_: 1
|
|
@@ -2344,7 +2346,7 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2344
2346
|
label: e(_)("inventory.ingredient.import.replaceFile"),
|
|
2345
2347
|
variant: r.value ? "destructive" : "secondary",
|
|
2346
2348
|
"prepend-icon": r.value ? void 0 : "autorenew",
|
|
2347
|
-
onClick:
|
|
2349
|
+
onClick: D
|
|
2348
2350
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
2349
2351
|
]))
|
|
2350
2352
|
], 2),
|
|
@@ -2368,11 +2370,11 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2368
2370
|
]), 1032, ["class", "button-label"]),
|
|
2369
2371
|
d.value ? (b(), T("div", Va, [
|
|
2370
2372
|
t("div", Pa, $(e(_)("inventory.ingredient.import.summary")), 1),
|
|
2371
|
-
(b(!0), T(re, null, fe(
|
|
2373
|
+
(b(!0), T(re, null, fe(a.value, (D, E) => (b(), oe(ka, {
|
|
2372
2374
|
key: E,
|
|
2373
2375
|
name: `Transfer Note ${E + 1}`,
|
|
2374
|
-
items:
|
|
2375
|
-
errors:
|
|
2376
|
+
items: D.poItems,
|
|
2377
|
+
errors: D.errors,
|
|
2376
2378
|
type: "create"
|
|
2377
2379
|
}, null, 8, ["name", "items", "errors"]))), 128))
|
|
2378
2380
|
])) : K("", !0)
|
|
@@ -2390,28 +2392,28 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2390
2392
|
},
|
|
2391
2393
|
emits: ["update:show", "submitted"],
|
|
2392
2394
|
setup(y, { expose: x, emit: d }) {
|
|
2393
|
-
const u = d, n = _t(y, "show"), h =
|
|
2395
|
+
const u = d, n = _t(y, "show"), h = we(), S = We(), V = U(!1), w = U(), v = U();
|
|
2394
2396
|
x({
|
|
2395
2397
|
validateInputs: () => {
|
|
2396
|
-
var
|
|
2397
|
-
(r = (
|
|
2398
|
+
var a, r;
|
|
2399
|
+
(r = (a = w.value) == null ? void 0 : a.validateInputs) == null || r.call(a);
|
|
2398
2400
|
},
|
|
2399
2401
|
resetInputsValidation: () => {
|
|
2400
|
-
var
|
|
2401
|
-
(r = (
|
|
2402
|
+
var a, r;
|
|
2403
|
+
(r = (a = w.value) == null ? void 0 : a.resetInputsValidation) == null || r.call(a);
|
|
2402
2404
|
},
|
|
2403
2405
|
resetInputs: () => {
|
|
2404
|
-
var
|
|
2405
|
-
(r = (
|
|
2406
|
+
var a, r;
|
|
2407
|
+
(r = (a = w.value) == null ? void 0 : a.resetInputs) == null || r.call(a);
|
|
2406
2408
|
}
|
|
2407
2409
|
});
|
|
2408
2410
|
function i() {
|
|
2409
|
-
var
|
|
2410
|
-
(r = (
|
|
2411
|
+
var a, r;
|
|
2412
|
+
(r = (a = w.value) == null ? void 0 : a.validateInputs) == null || r.call(a);
|
|
2411
2413
|
}
|
|
2412
2414
|
async function o() {
|
|
2413
|
-
var r,
|
|
2414
|
-
if (!((
|
|
2415
|
+
var r, s, _, F, c;
|
|
2416
|
+
if (!((s = (r = v.value) == null ? void 0 : r.supplier) != null && s.name)) {
|
|
2415
2417
|
h.open({
|
|
2416
2418
|
title: "Upload failed",
|
|
2417
2419
|
message: "Location is required",
|
|
@@ -2427,8 +2429,8 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2427
2429
|
});
|
|
2428
2430
|
return;
|
|
2429
2431
|
}
|
|
2430
|
-
const
|
|
2431
|
-
if (!
|
|
2432
|
+
const a = v.value.effectiveAt ? new Date(v.value.effectiveAt) : null;
|
|
2433
|
+
if (!a) {
|
|
2432
2434
|
h.open({
|
|
2433
2435
|
title: "Invalid date",
|
|
2434
2436
|
message: "Transfer date is required",
|
|
@@ -2436,7 +2438,7 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2436
2438
|
});
|
|
2437
2439
|
return;
|
|
2438
2440
|
}
|
|
2439
|
-
if (
|
|
2441
|
+
if (a.getTime() > (/* @__PURE__ */ new Date()).getTime()) {
|
|
2440
2442
|
h.open({
|
|
2441
2443
|
title: "Invalid date",
|
|
2442
2444
|
message: "Transfer date cannot be in the future",
|
|
@@ -2446,9 +2448,9 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2446
2448
|
}
|
|
2447
2449
|
V.value = !0;
|
|
2448
2450
|
try {
|
|
2449
|
-
await
|
|
2451
|
+
await S.importFromXilnex(v.value), u("update:show", !1);
|
|
2450
2452
|
} catch (f) {
|
|
2451
|
-
await new Promise((
|
|
2453
|
+
await new Promise((I) => setTimeout(I, 1e3)), h.open({
|
|
2452
2454
|
title: "Upload failed",
|
|
2453
2455
|
message: f == null ? void 0 : f.message,
|
|
2454
2456
|
type: "error"
|
|
@@ -2457,19 +2459,19 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2457
2459
|
V.value = !1;
|
|
2458
2460
|
}
|
|
2459
2461
|
}
|
|
2460
|
-
return (
|
|
2461
|
-
const
|
|
2462
|
+
return (a, r) => {
|
|
2463
|
+
const s = O("FmSpacer"), _ = O("FmButton"), F = O("FmDialog");
|
|
2462
2464
|
return b(), oe(F, {
|
|
2463
2465
|
modelValue: e(n),
|
|
2464
2466
|
"onUpdate:modelValue": r[2] || (r[2] = (c) => ge(n) ? n.value = c : null),
|
|
2465
2467
|
overlay: !0,
|
|
2466
2468
|
"close-button": !1
|
|
2467
2469
|
}, {
|
|
2468
|
-
"dialog-header":
|
|
2470
|
+
"dialog-header": M(() => r[3] || (r[3] = [
|
|
2469
2471
|
t("div", null, "Xilnex transfer order", -1)
|
|
2470
2472
|
])),
|
|
2471
|
-
"dialog-footer":
|
|
2472
|
-
m(
|
|
2473
|
+
"dialog-footer": M(() => [
|
|
2474
|
+
m(s, { class: "sm:hidden xs:hidden" }),
|
|
2473
2475
|
m(_, {
|
|
2474
2476
|
disabled: V.value,
|
|
2475
2477
|
class: "sm:w-full xs:w-full",
|
|
@@ -2488,11 +2490,11 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2488
2490
|
onClick: i
|
|
2489
2491
|
}, null, 8, ["disabled", "loading"])
|
|
2490
2492
|
]),
|
|
2491
|
-
default:
|
|
2493
|
+
default: M(() => [
|
|
2492
2494
|
t("div", Oa, [
|
|
2493
2495
|
m(Ra, {
|
|
2494
2496
|
ref_key: "formRef",
|
|
2495
|
-
ref:
|
|
2497
|
+
ref: w,
|
|
2496
2498
|
onValidationSuccess: o,
|
|
2497
2499
|
modelValue: v.value,
|
|
2498
2500
|
"onUpdate:modelValue": r[0] || (r[0] = (c) => v.value = c)
|
|
@@ -2506,10 +2508,10 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2506
2508
|
}), Ma = { class: "flex flex-col py-8" }, Ea = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qa = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Ua = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Na = {
|
|
2507
2509
|
key: 0,
|
|
2508
2510
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
2509
|
-
}, Ba = { class: "pt-8" }, ft = "ReceiveRequestViewSearchCriteria",
|
|
2511
|
+
}, Ba = { class: "pt-8" }, ft = "ReceiveRequestViewSearchCriteria", br = /* @__PURE__ */ ne({
|
|
2510
2512
|
__name: "ReceiveRequestView",
|
|
2511
2513
|
setup(y) {
|
|
2512
|
-
const { t: x } = ye(), d =
|
|
2514
|
+
const { t: x } = ye(), d = we();
|
|
2513
2515
|
Ae.object({
|
|
2514
2516
|
name: Ae.string().optional().nullable(),
|
|
2515
2517
|
startDate: Ae.string().optional().nullable(),
|
|
@@ -2517,8 +2519,8 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2517
2519
|
});
|
|
2518
2520
|
const u = q(
|
|
2519
2521
|
() => !o._currentLocation || v.loading.value
|
|
2520
|
-
), g =
|
|
2521
|
-
function
|
|
2522
|
+
), g = Gt(), n = Xe(), h = qe();
|
|
2523
|
+
function S() {
|
|
2522
2524
|
const N = {
|
|
2523
2525
|
name: "",
|
|
2524
2526
|
...dt()
|
|
@@ -2532,31 +2534,31 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2532
2534
|
}
|
|
2533
2535
|
}
|
|
2534
2536
|
function V() {
|
|
2535
|
-
g.setItem(ft, JSON.stringify(
|
|
2537
|
+
g.setItem(ft, JSON.stringify(w.value));
|
|
2536
2538
|
}
|
|
2537
|
-
const
|
|
2539
|
+
const w = U(S()), v = Lt(
|
|
2538
2540
|
Le.RECEIVE_REQUEST,
|
|
2539
|
-
|
|
2541
|
+
w.value
|
|
2540
2542
|
), { columnDefs: i } = jt(
|
|
2541
2543
|
Le.RECEIVE_REQUEST,
|
|
2542
2544
|
v,
|
|
2543
2545
|
v.shipments
|
|
2544
2546
|
), o = Qe();
|
|
2545
|
-
async function
|
|
2546
|
-
const N = `inventory-record_${
|
|
2547
|
-
(
|
|
2547
|
+
async function a() {
|
|
2548
|
+
const N = `inventory-record_${mt(w.value.startDate).format("DD-MM-YYYY_HH-mm")}-${mt(w.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, B = v.purchaseOrders.value.flatMap(
|
|
2549
|
+
(D) => D.items.map((E) => {
|
|
2548
2550
|
var Q;
|
|
2549
|
-
const L = new Date(
|
|
2550
|
-
Qt(E.sku,
|
|
2551
|
+
const L = new Date(Wt(D._id) ?? ""), J = D.effectiveAt ? new Date(D.effectiveAt) : void 0, se = _e(
|
|
2552
|
+
Qt(E.sku, D.deliveryOrder || [])
|
|
2551
2553
|
), k = _e(E.quantity), C = ((Q = E == null ? void 0 : E.measurement) == null ? void 0 : Q.abbrev) || E.sku.unit.abbrev;
|
|
2552
2554
|
return {
|
|
2553
2555
|
"SKU code": E.code,
|
|
2554
2556
|
"SKU name": E.name,
|
|
2555
|
-
"PO #":
|
|
2557
|
+
"PO #": D.seqNumber,
|
|
2556
2558
|
"Effective at": J,
|
|
2557
2559
|
Date: L,
|
|
2558
|
-
Status:
|
|
2559
|
-
Reference:
|
|
2560
|
+
Status: D.status,
|
|
2561
|
+
Reference: D.ref ?? "",
|
|
2560
2562
|
"Received quantity": se,
|
|
2561
2563
|
"Ordered quantity": k,
|
|
2562
2564
|
Unit: C,
|
|
@@ -2574,7 +2576,7 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2574
2576
|
"Ordered quantity",
|
|
2575
2577
|
"Unit"
|
|
2576
2578
|
];
|
|
2577
|
-
n.enableBackdatePo && P.insert("Effective at", 4), n.enableTotalCost && P.push("Total cost"), await
|
|
2579
|
+
n.enableBackdatePo && P.insert("Effective at", 4), n.enableTotalCost && P.push("Total cost"), await Jt(
|
|
2578
2580
|
[
|
|
2579
2581
|
{
|
|
2580
2582
|
name: "purchases",
|
|
@@ -2589,13 +2591,13 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2589
2591
|
type: "success"
|
|
2590
2592
|
});
|
|
2591
2593
|
}
|
|
2592
|
-
const r = U(dt()),
|
|
2594
|
+
const r = U(dt()), s = U("");
|
|
2593
2595
|
he([() => r.value], ([N]) => {
|
|
2594
|
-
!N.startDate || !N.endDate || (
|
|
2595
|
-
|
|
2596
|
-
|
|
2596
|
+
!N.startDate || !N.endDate || (w.value.startDate = N.startDate, w.value.endDate = N.endDate, v.updateDateRange(
|
|
2597
|
+
w.value.startDate,
|
|
2598
|
+
w.value.endDate
|
|
2597
2599
|
), V());
|
|
2598
|
-
}), he([() =>
|
|
2600
|
+
}), he([() => s.value], () => {
|
|
2599
2601
|
V();
|
|
2600
2602
|
});
|
|
2601
2603
|
function _(N) {
|
|
@@ -2615,9 +2617,9 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2615
2617
|
if (N === "refresh")
|
|
2616
2618
|
return v.fetchData();
|
|
2617
2619
|
if (N === "export")
|
|
2618
|
-
return
|
|
2620
|
+
return a();
|
|
2619
2621
|
}
|
|
2620
|
-
const { breakpoints: F } = Ke(), c = q(() => F.value.xs || F.value.sm), f = q(() => c.value ? 10 : 20),
|
|
2622
|
+
const { breakpoints: F } = Ke(), c = q(() => F.value.xs || F.value.sm), f = q(() => c.value ? 10 : 20), I = eo(), A = q(() => [
|
|
2621
2623
|
{
|
|
2622
2624
|
label: x("inventory.transfer.receiveRequest.actions.create"),
|
|
2623
2625
|
value: "create",
|
|
@@ -2638,7 +2640,7 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2638
2640
|
label: x("inventory.common.export"),
|
|
2639
2641
|
value: "export"
|
|
2640
2642
|
}
|
|
2641
|
-
]),
|
|
2643
|
+
]), X = q(() => {
|
|
2642
2644
|
const N = [
|
|
2643
2645
|
{
|
|
2644
2646
|
type: "string",
|
|
@@ -2654,8 +2656,8 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2654
2656
|
key: "netsuiteTransactionNumber",
|
|
2655
2657
|
entity: "purchaseOrder",
|
|
2656
2658
|
values: v.purchaseOrders.value.map((P) => {
|
|
2657
|
-
var
|
|
2658
|
-
return (E = (
|
|
2659
|
+
var D, E;
|
|
2660
|
+
return (E = (D = P.netSuite) == null ? void 0 : D.additionalInfo) == null ? void 0 : E.transactionnumber;
|
|
2659
2661
|
}).filter((P) => P != null)
|
|
2660
2662
|
},
|
|
2661
2663
|
{
|
|
@@ -2663,8 +2665,8 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2663
2665
|
key: "netsuiteOrderNo",
|
|
2664
2666
|
entity: "purchaseOrder",
|
|
2665
2667
|
values: v.purchaseOrders.value.map((P) => {
|
|
2666
|
-
var
|
|
2667
|
-
return (
|
|
2668
|
+
var D;
|
|
2669
|
+
return (D = P.netSuite) == null ? void 0 : D.refNo;
|
|
2668
2670
|
}).filter((P) => P != null)
|
|
2669
2671
|
},
|
|
2670
2672
|
{
|
|
@@ -2672,21 +2674,21 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2672
2674
|
key: "netsuiteOrderId",
|
|
2673
2675
|
entity: "purchaseOrder",
|
|
2674
2676
|
values: v.purchaseOrders.value.map((P) => {
|
|
2675
|
-
var
|
|
2676
|
-
return (
|
|
2677
|
+
var D;
|
|
2678
|
+
return (D = P.netSuite) == null ? void 0 : D.id;
|
|
2677
2679
|
}).filter((P) => P != null)
|
|
2678
2680
|
}
|
|
2679
2681
|
];
|
|
2680
2682
|
return [...N, ...h.isEnabled ? B : []];
|
|
2681
|
-
}), z = U(null),
|
|
2683
|
+
}), z = U(null), Z = q(() => {
|
|
2682
2684
|
if (!z.value)
|
|
2683
2685
|
return v.purchaseOrders.value;
|
|
2684
2686
|
const N = Co.build(z.value);
|
|
2685
2687
|
return v.purchaseOrders.value.filter((B) => {
|
|
2686
|
-
var P,
|
|
2687
|
-
return
|
|
2688
|
+
var P, D, E, L;
|
|
2689
|
+
return wo(
|
|
2688
2690
|
{
|
|
2689
|
-
netsuiteTransactionNumber: (
|
|
2691
|
+
netsuiteTransactionNumber: (D = (P = B.netSuite) == null ? void 0 : P.additionalInfo) == null ? void 0 : D.transactionnumber,
|
|
2690
2692
|
netsuiteOrderNo: (E = B.netSuite) == null ? void 0 : E.refNo,
|
|
2691
2693
|
netsuiteOrderId: (L = B.netSuite) == null ? void 0 : L.id,
|
|
2692
2694
|
status: B.status
|
|
@@ -2697,13 +2699,13 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2697
2699
|
});
|
|
2698
2700
|
return (N, B) => {
|
|
2699
2701
|
const P = O("FmTable");
|
|
2700
|
-
return b(), oe(
|
|
2702
|
+
return b(), oe(to, {
|
|
2701
2703
|
title: e(x)("inventory.transfer.receiveRequest.title2"),
|
|
2702
|
-
actions:
|
|
2704
|
+
actions: A.value,
|
|
2703
2705
|
"onClick:action": _
|
|
2704
2706
|
}, {
|
|
2705
|
-
default:
|
|
2706
|
-
var
|
|
2707
|
+
default: M(() => {
|
|
2708
|
+
var D, E;
|
|
2707
2709
|
return [
|
|
2708
2710
|
t("div", {
|
|
2709
2711
|
class: W([
|
|
@@ -2720,30 +2722,30 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2720
2722
|
"onUpdate:dateRange": B[0] || (B[0] = (L) => r.value = L),
|
|
2721
2723
|
searchable: "",
|
|
2722
2724
|
"change-location": "",
|
|
2723
|
-
search:
|
|
2724
|
-
"onUpdate:search": B[1] || (B[1] = (L) =>
|
|
2725
|
+
search: s.value,
|
|
2726
|
+
"onUpdate:search": B[1] || (B[1] = (L) => s.value = L),
|
|
2725
2727
|
filterable: "",
|
|
2726
|
-
"filter-attributes":
|
|
2728
|
+
"filter-attributes": X.value,
|
|
2727
2729
|
filter: z.value,
|
|
2728
2730
|
"onUpdate:filter": B[2] || (B[2] = (L) => z.value = L)
|
|
2729
2731
|
}, null, 8, ["date-range", "search", "filter-attributes", "filter"]),
|
|
2730
2732
|
(b(), oe(P, {
|
|
2731
|
-
style: vt(e(
|
|
2733
|
+
style: vt(e(I).tableHeight),
|
|
2732
2734
|
"column-defs": e(i),
|
|
2733
|
-
"row-data":
|
|
2734
|
-
"search-value":
|
|
2735
|
+
"row-data": Z.value,
|
|
2736
|
+
"search-value": s.value,
|
|
2735
2737
|
loading: u.value,
|
|
2736
2738
|
onRowClick: B[3] || (B[3] = (L) => e(v).promptShowTransferDetails(L.original)),
|
|
2737
|
-
key: (
|
|
2739
|
+
key: (D = e(o)._currentLocation) == null ? void 0 : D.dbName,
|
|
2738
2740
|
"page-size": f.value
|
|
2739
2741
|
}, {
|
|
2740
|
-
"list-row":
|
|
2742
|
+
"list-row": M((L) => [
|
|
2741
2743
|
m(ht, {
|
|
2742
2744
|
row: L,
|
|
2743
2745
|
onRowClick: e(v).promptShowTransferDetails
|
|
2744
2746
|
}, {
|
|
2745
|
-
default:
|
|
2746
|
-
var se, k, C, Q, le, ie, ee, be, ve, Te, Ve, Pe, Ue, xe,
|
|
2747
|
+
default: M((J) => {
|
|
2748
|
+
var se, k, C, Q, le, ie, ee, be, ve, Te, Ve, Pe, Ue, xe, Se, Fe, Re, l, p, j;
|
|
2747
2749
|
return [
|
|
2748
2750
|
t("div", Ma, [
|
|
2749
2751
|
t("div", Ea, [
|
|
@@ -2762,7 +2764,7 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2762
2764
|
L.original.ref ? (b(), T("div", Na, [
|
|
2763
2765
|
m(e(me), {
|
|
2764
2766
|
render: (Ue = (Pe = (Ve = J.ref) == null ? void 0 : Ve.column) == null ? void 0 : Pe.columnDef) == null ? void 0 : Ue.cell,
|
|
2765
|
-
props: (
|
|
2767
|
+
props: (Se = (xe = J.ref) == null ? void 0 : xe.getContext) == null ? void 0 : Se.call(xe)
|
|
2766
2768
|
}, null, 8, ["render", "props"])
|
|
2767
2769
|
])) : K("", !0),
|
|
2768
2770
|
t("div", Ba, [
|
|
@@ -2803,5 +2805,5 @@ const da = { class: "flex flex-col flex-1" }, ca = { class: "flex flex-col" }, m
|
|
|
2803
2805
|
}
|
|
2804
2806
|
});
|
|
2805
2807
|
export {
|
|
2806
|
-
|
|
2808
|
+
br as default
|
|
2807
2809
|
};
|