@feedmepos/mf-inventory-portal 1.7.15-dev.3 → 1.7.15
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-B1h66sv9.js → App-BbqgGZWB.js} +7 -7
- package/dist/{ApprovalView-DKlVcGah.js → ApprovalView-BAZRD1Hx.js} +9 -9
- package/dist/{BindingsDialog-CxHlh0kQ.js → BindingsDialog-DXtC5adz.js} +2 -2
- package/dist/{BindingsPicker-BiF5OZEi.js → BindingsPicker-Ce5vj1A5.js} +2 -2
- package/dist/{BindingsTable-CygkFbyE.js → BindingsTable-PfOLj0pa.js} +4 -4
- package/dist/{BulkReceiveRequestView-Cf4IHMVn.js → BulkReceiveRequestView-K9-tcO-u.js} +19 -19
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-D6ehNvzX.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CsVLJsmZ.js} +1 -1
- package/dist/{ClosingDraftView-DFnGCAHQ.js → ClosingDraftView-D8ZqZG8w.js} +19 -19
- package/dist/{ClosingHistoryView-c51cSbco.js → ClosingHistoryView-D7DhVW7-.js} +5 -5
- package/dist/{ClosingTemplateView-tKdJEP6p.js → ClosingTemplateView-DfYDtTsy.js} +16 -16
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-Br8lpoIh.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DgRQuPzM.js} +1 -1
- package/dist/{DefaultView-2PPCmcbd.js → DefaultView-B81haf4b.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-BKSQLP79.js → DeliveryOrderPrintPreview-C0e3Y2FD.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DNbWlGwL.js → EmailDialog.vue_vue_type_script_setup_true_lang-BDv4xQjd.js} +2250 -2250
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-D-EePpPI.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-rPKs6RNP.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BUrLcbIR.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B3vT91xx.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BpACpi1j.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Bk8EsjdJ.js} +2 -2
- package/dist/{FmMultiselectDialog-CMUU4YMv.js → FmMultiselectDialog-BXdHaosb.js} +2 -2
- package/dist/{FmMultiselectDialog-4K4U13Fa.js → FmMultiselectDialog-DeGkEc7g.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CWPYtvi-.js → FmUnitInput.vue_vue_type_script_setup_true_lang-4nyY9jxy.js} +6 -6
- package/dist/{ImportView-3BL5dbPC.js → ImportView-Cc2eHTY5.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Gt9-RVuI.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-De2-Unrw.js} +1 -1
- package/dist/{IngredientGroupView-CrQr-Wcc.js → IngredientGroupView-VjMKwRsG.js} +5 -5
- package/dist/{IngredientsView-Co_ULkb6.js → IngredientsView-DgXUz-l0.js} +15 -15
- package/dist/{IntegrationExplorerView-Byz0ZiN7.js → IntegrationExplorerView-Cv16J7tx.js} +4 -4
- package/dist/{IntegrationView-BZvXCtuu.js → IntegrationView-BZwP58eC.js} +14 -14
- package/dist/{InventoryBindingForm-D7at6ntj.js → InventoryBindingForm-K-8kdew3.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BfN7YCnp.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-9WaihFgA.js} +5 -5
- package/dist/{InventoryBindingSummary-DIWHwJwb.js → InventoryBindingSummary-27Bykp8G.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DLIYFBaL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bv--TBuL.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BIjAFa7R.js → PremiumBadge.vue_vue_type_script_setup_true_lang-kSJT3yyW.js} +1 -1
- package/dist/{ProductionView-Cg8tXEj7.js → ProductionView-B1axdHvO.js} +7 -7
- package/dist/{PublishView-qzVWXhU2.js → PublishView-qjgzwicl.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-Dv107ZcE.js → PurchaseOrderPrintPreview-D52XLtO8.js} +2 -2
- package/dist/{ReceiveRequestView-BoDIlSIR.js → ReceiveRequestView-gWXGj7D-.js} +14 -14
- package/dist/{RecipeView-CZExmd9h.js → RecipeView-CDCSf24C.js} +17 -17
- package/dist/{SettingsView-JvHtBOeh.js → SettingsView-BycZDH6R.js} +4 -4
- package/dist/{StockView-DtAlqzrF.js → StockView-g_06USZD.js} +21 -21
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DWxA3wuR.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CtT9E4h5.js} +1 -1
- package/dist/{SupplierView-DIxYLwEk.js → SupplierView-Bcb0KgPP.js} +12 -12
- package/dist/{SurchargeView-BeMy7-Lu.js → SurchargeView-BiiyTzT2.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DrOVu6wg.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-KvEamGzV.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Chhxtkov.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DfTYmB7G.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-2LCcSzCa.js → TransferDetails.vue_vue_type_script_setup_true_lang-D-IyxCHO.js} +20 -20
- package/dist/{TransferTemplateView-DK_UHrGt.js → TransferTemplateView-Bm1IHuOO.js} +20 -20
- package/dist/{UnitCostHistoryView-CbX9hG9F.js → UnitCostHistoryView-pl61dxYI.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-CDQ7c1Gl.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-Lljuq4v8.js} +4 -4
- package/dist/{UnitView-Cc_PTKs_.js → UnitView-CtWTx15D.js} +7 -7
- package/dist/{WarehouseView-a-D3zs6h.js → WarehouseView-D_E0DbRx.js} +334 -334
- package/dist/{WastageTemplateView-CFRi5Pvf.js → WastageTemplateView-CWCnwWf2.js} +14 -14
- package/dist/{app-D8j93Oqu.js → app-UgQkLmkL.js} +15 -15
- package/dist/app.js +1 -1
- package/dist/{closing-template-C1b4O-N3.js → closing-template-Du-v68VE.js} +1 -1
- package/dist/{date2-uOSplHdf.js → date2-CgdtEuTJ.js} +1 -1
- package/dist/{dayjs.min-jzzpE5jZ.js → dayjs.min-DIC_DJx7.js} +1 -1
- package/dist/{decimal-8I4iIvBr.js → decimal-Dllm8sSB.js} +2 -2
- package/dist/{defineDeepModel-DBat73w6.js → defineDeepModel-WqmY6ljj.js} +1 -1
- package/dist/{duplicate-template-hyvvKKZn.js → duplicate-template-Kmbzx_6Y.js} +1 -1
- package/dist/{feature-BtW2IuYH.js → feature-fie4jeUE.js} +2 -2
- package/dist/{format-time-from-id-TNzYsGd2.js → format-time-from-id-CAjwauns.js} +1 -1
- package/dist/{format-unit-display-Bv9J30wI.js → format-unit-display-Dzka2i6E.js} +12 -12
- package/dist/{import-export.helper-xpElLH-b.js → import-export.helper-D6ivxEn7.js} +6 -6
- package/dist/{index-CTQTVKeu.js → index-B7rZD2lV.js} +1 -1
- package/dist/{index-BH22SMzP.js → index-DGm7RRJc.js} +3 -3
- package/dist/{index-CCpcCOf2.js → index-dLrwLte6.js} +1 -1
- package/dist/{inventory-core-dart.default-BfVqWKxc.js → inventory-core-dart.default-Dji576gl.js} +1 -1
- package/dist/{lz-string-BXcuXXWX.js → lz-string-B6yLtJ6P.js} +1 -1
- package/dist/{netsuite-Bawdsy6u.js → netsuite-CJdTXslj.js} +2 -2
- package/dist/{number-q25U2atb.js → number-gNt0EeO1.js} +3 -3
- package/dist/{predefined-templates-DFETDxr0.js → predefined-templates-CsalKmLV.js} +1 -1
- package/dist/{purchase-order-template-BTSTgbF-.js → purchase-order-template-DwOwkhwp.js} +1 -1
- package/dist/{recalculationUtils-B-9ZEV5d.js → recalculationUtils-QxgjxAls.js} +1 -1
- package/dist/{rules-_M2oshOW.js → rules-D8dBrecj.js} +2 -2
- package/dist/{stock-CUsHHW7_.js → stock-BxW58yv4.js} +1 -1
- package/dist/{stock-BdtZ5yDl.js → stock-ClROYD3u.js} +3 -3
- package/dist/{supplier-By-0Dy62.js → supplier-zathW5DT.js} +2 -2
- package/dist/{surcharge-60G2Qke7.js → surcharge-CTh8uOVs.js} +1 -1
- package/dist/{uom-rules-DeGuMW0s.js → uom-rules-CnLYhwa7.js} +1 -1
- package/dist/{use-ingredient-select-dialog-BVOtYoKp.js → use-ingredient-select-dialog-5OGEH3tU.js} +2 -2
- package/dist/{use-inventory-binding-dialog-CHm1Ezmr.js → use-inventory-binding-dialog-ClAO4MWB.js} +2 -2
- package/dist/{use-template-enabled-locations-C9vWaXj1.js → use-template-enabled-locations-DDJSqqPa.js} +2 -2
- package/dist/{use-transfer-locations-VSzkSxBy.js → use-transfer-locations-BPY9mgJI.js} +2 -2
- package/dist/{useHrmPermission-B48iHLre.js → useHrmPermission-CYIP04XE.js} +1 -1
- package/dist/{useNavigationMenu-DwRXSSh_.js → useNavigationMenu-CUWWNM6o.js} +2 -2
- package/dist/{useSseClient-QeF0izVY.js → useSseClient-C35OWc1p.js} +1 -1
- package/dist/{vue-i18n-DLckaDV3.js → vue-i18n-BqxiOeCF.js} +319 -319
- package/dist/{xlsx.util-BjqUaVU_.js → xlsx.util-BjJ7fjg7.js} +2 -2
- package/package.json +4 -4
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { d as Ne, n as Le, o as Ie, c as z, p as Be, S as qe, u as ze } from "./app-
|
|
1
|
+
import { ref as D, defineComponent as j, watch as te, onMounted as le, onUnmounted as De, createElementBlock as q, openBlock as R, toRaw as Ve, reactive as Re, createElementVNode as V, createVNode as k, toDisplayString as N, unref as r, resolveComponent as L, createBlock as O, createCommentVNode as oe, createSlots as We, withCtx as B, createTextVNode as Me, renderSlot as Ee, computed as C, isRef as _e, normalizeClass as Pe, normalizeStyle as Ue } from "vue";
|
|
2
|
+
import { d as Ne, n as Le, o as Ie, c as z, p as Be, S as qe, u as ze } from "./app-UgQkLmkL.js";
|
|
3
3
|
import { useCoreStore as Fe, useI18n as G } from "@feedmepos/mf-common";
|
|
4
4
|
import { D as ke, R as Q } from "./row-action.enum-ncgDYAjP.js";
|
|
5
5
|
import { c as Oe } from "./component-BmLAdDiY.js";
|
|
6
|
-
import { u as
|
|
6
|
+
import { u as Se } from "./netsuite-CJdTXslj.js";
|
|
7
7
|
import { u as je, _ as Ge } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
|
|
8
|
-
import { F as
|
|
9
|
-
import { useDialogChild as Ke, useDialog as
|
|
10
|
-
import { R as I } from "./rules-
|
|
8
|
+
import { F as T } from "./form-mode.enum-BKiNVH6A.js";
|
|
9
|
+
import { useDialogChild as Ke, useDialog as xe, useSnackbar as se, useProxiedModel as ae, useBreakpoints as He } from "@feedmepos/ui-library";
|
|
10
|
+
import { R as I } from "./rules-D8dBrecj.js";
|
|
11
11
|
import { c as $e, u as re, g as Ye } from "./googlemap-D9vA7GsS.js";
|
|
12
|
-
import { d as Ze } from "./index-
|
|
12
|
+
import { d as Ze } from "./index-B7rZD2lV.js";
|
|
13
13
|
import { _ as Je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
import { _ as Qe } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-CG1m-B2p.js";
|
|
15
|
-
import { u as Xe } from "./feature-
|
|
15
|
+
import { u as Xe } from "./feature-fie4jeUE.js";
|
|
16
16
|
import { _ as eo, F as X } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
|
|
17
|
-
import { _ as oo } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
17
|
+
import { _ as oo } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Bk8EsjdJ.js";
|
|
18
18
|
const ee = Ne((f, b) => {
|
|
19
19
|
const g = Fe();
|
|
20
20
|
return {
|
|
21
21
|
async readWarehouses() {
|
|
22
|
-
var
|
|
23
|
-
const a = ((
|
|
24
|
-
return await b.get(
|
|
22
|
+
var d;
|
|
23
|
+
const a = ((d = g.currentBusiness.value) == null ? void 0 : d._id) ?? "", l = `${f.inventoryBackendUrl}/businesses/${a}/warehouses`;
|
|
24
|
+
return await b.get(l);
|
|
25
25
|
},
|
|
26
26
|
async createWarehouse(a) {
|
|
27
27
|
var n;
|
|
28
|
-
const
|
|
29
|
-
return await b.post(
|
|
28
|
+
const l = ((n = g.currentBusiness.value) == null ? void 0 : n._id) ?? "", d = `${f.inventoryBackendUrl}/businesses/${l}/warehouse`;
|
|
29
|
+
return await b.post(d, a);
|
|
30
30
|
},
|
|
31
|
-
async updateWarehouse(a,
|
|
32
|
-
var
|
|
33
|
-
const
|
|
34
|
-
return await b.put(n,
|
|
31
|
+
async updateWarehouse(a, l) {
|
|
32
|
+
var u;
|
|
33
|
+
const d = ((u = g.currentBusiness.value) == null ? void 0 : u._id) ?? "", n = `${f.inventoryBackendUrl}/businesses/${d}/warehouse/${a}`;
|
|
34
|
+
return await b.put(n, l);
|
|
35
35
|
},
|
|
36
36
|
async deleteWarehouse(a) {
|
|
37
37
|
var n;
|
|
38
|
-
const
|
|
39
|
-
return await b.delete(
|
|
38
|
+
const l = ((n = g.currentBusiness.value) == null ? void 0 : n._id) ?? "", d = `${f.inventoryBackendUrl}/businesses/${l}/warehouse/${a}`;
|
|
39
|
+
return await b.delete(d);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
});
|
|
@@ -45,8 +45,8 @@ function to() {
|
|
|
45
45
|
warehouses: []
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
const Ae =
|
|
49
|
-
function
|
|
48
|
+
const Ae = D(to());
|
|
49
|
+
function Te() {
|
|
50
50
|
return {
|
|
51
51
|
// state
|
|
52
52
|
get warehouses() {
|
|
@@ -83,45 +83,45 @@ function De() {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
function ao(f, b) {
|
|
86
|
-
const g =
|
|
87
|
-
function a(
|
|
88
|
-
if (
|
|
89
|
-
f(z(
|
|
86
|
+
const g = Se();
|
|
87
|
+
function a(u, y) {
|
|
88
|
+
if (u === Q.Edit) {
|
|
89
|
+
f(z(y));
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
if (
|
|
93
|
-
b(z(
|
|
92
|
+
if (u === Q.Delete) {
|
|
93
|
+
b(z(y));
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
const { t:
|
|
97
|
+
const { t: l } = G(), d = [
|
|
98
98
|
{
|
|
99
99
|
accessorKey: "warehouse",
|
|
100
|
-
header: () =>
|
|
100
|
+
header: () => l("inventory.warehouse.table.warehouse"),
|
|
101
101
|
size: 200
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
accessorKey: "contact",
|
|
105
|
-
header: () =>
|
|
105
|
+
header: () => l("inventory.warehouse.table.contact"),
|
|
106
106
|
size: 200
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
accessorKey: "email",
|
|
110
|
-
header: () =>
|
|
110
|
+
header: () => l("inventory.warehouse.table.email"),
|
|
111
111
|
size: 200
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
accessorKey: "address",
|
|
115
|
-
header: () =>
|
|
115
|
+
header: () => l("inventory.warehouse.table.address"),
|
|
116
116
|
size: "auto"
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
id: "action",
|
|
120
120
|
header: "",
|
|
121
|
-
cell(
|
|
122
|
-
const
|
|
123
|
-
return Oe(
|
|
124
|
-
a(
|
|
121
|
+
cell(u) {
|
|
122
|
+
const y = u.row.original.original._id, A = !!y && !!g.getNetSuiteLocation(`warehouse_${y}`) ? [] : [ke[Q.Edit], ke[Q.Delete]];
|
|
123
|
+
return Oe(A, (w) => {
|
|
124
|
+
a(w, u.row.original.original);
|
|
125
125
|
});
|
|
126
126
|
},
|
|
127
127
|
enableSorting: !1,
|
|
@@ -132,26 +132,26 @@ function ao(f, b) {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
];
|
|
135
|
-
function n(
|
|
136
|
-
return
|
|
137
|
-
original:
|
|
138
|
-
warehouse:
|
|
139
|
-
contact:
|
|
140
|
-
email:
|
|
135
|
+
function n(u) {
|
|
136
|
+
return u.map((y) => ({
|
|
137
|
+
original: y,
|
|
138
|
+
warehouse: y.profile.name,
|
|
139
|
+
contact: y.profile.phoneNo,
|
|
140
|
+
email: y.profile.email,
|
|
141
141
|
get address() {
|
|
142
|
-
const
|
|
142
|
+
const s = y.profile.address;
|
|
143
143
|
return [
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
].map((
|
|
144
|
+
s == null ? void 0 : s.line1,
|
|
145
|
+
s == null ? void 0 : s.line2,
|
|
146
|
+
s == null ? void 0 : s.city,
|
|
147
|
+
s == null ? void 0 : s.postcode,
|
|
148
|
+
s == null ? void 0 : s.state,
|
|
149
|
+
s == null ? void 0 : s.country
|
|
150
|
+
].map((w) => w == null ? void 0 : w.trim()).filter((w) => w).join(", ");
|
|
151
151
|
}
|
|
152
152
|
}));
|
|
153
153
|
}
|
|
154
|
-
return { columnDefs:
|
|
154
|
+
return { columnDefs: d, formatRowData: n };
|
|
155
155
|
}
|
|
156
156
|
const lo = /* @__PURE__ */ j({
|
|
157
157
|
__name: "GoogleMap",
|
|
@@ -179,107 +179,107 @@ const lo = /* @__PURE__ */ j({
|
|
|
179
179
|
},
|
|
180
180
|
emits: ["map-click", "marker-change", "polygon-change", "polygon-right-click"],
|
|
181
181
|
setup(f, { expose: b, emit: g }) {
|
|
182
|
-
const a = f,
|
|
182
|
+
const a = f, l = g;
|
|
183
183
|
b({
|
|
184
184
|
setCenter: (t) => {
|
|
185
185
|
var c, h;
|
|
186
|
-
(c =
|
|
186
|
+
(c = u.value) == null || c.setCenter(t), (h = u.value) == null || h.setZoom(18);
|
|
187
187
|
}
|
|
188
188
|
});
|
|
189
|
-
const { googleMap:
|
|
190
|
-
function
|
|
189
|
+
const { googleMap: d } = re(), n = D(), u = D(null), y = [];
|
|
190
|
+
function s(t) {
|
|
191
191
|
return {
|
|
192
192
|
lat: t.latLng.lat(),
|
|
193
193
|
lng: t.latLng.lng()
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
function
|
|
197
|
-
const
|
|
198
|
-
|
|
196
|
+
function A(t, c, h) {
|
|
197
|
+
const S = d.maps.event.addListener(t, c, h);
|
|
198
|
+
y.push(S);
|
|
199
199
|
}
|
|
200
|
-
const
|
|
200
|
+
const w = D([]);
|
|
201
201
|
function $(t, c, h) {
|
|
202
|
-
|
|
202
|
+
A(t, c, h);
|
|
203
203
|
}
|
|
204
204
|
function M(t) {
|
|
205
|
-
E(null),
|
|
206
|
-
const
|
|
205
|
+
E(null), w.value = t.map((c, h) => {
|
|
206
|
+
const S = new d.maps.Marker({
|
|
207
207
|
position: c,
|
|
208
208
|
draggable: !0
|
|
209
209
|
});
|
|
210
|
-
return $(
|
|
211
|
-
|
|
212
|
-
}),
|
|
213
|
-
}), E(
|
|
210
|
+
return $(S, "dragend", (p) => {
|
|
211
|
+
l("marker-change", { index: h, position: s(p) });
|
|
212
|
+
}), S;
|
|
213
|
+
}), E(u.value);
|
|
214
214
|
}
|
|
215
215
|
function E(t) {
|
|
216
|
-
|
|
216
|
+
w.value.map((c) => Ve(c).setMap(t));
|
|
217
217
|
}
|
|
218
|
-
const
|
|
218
|
+
const m = D([]);
|
|
219
219
|
function F(t, c, h) {
|
|
220
|
-
|
|
220
|
+
A(t, c, h);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
|
|
222
|
+
function x(t, c, h) {
|
|
223
|
+
A(t, c, h);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
return
|
|
225
|
+
function i(t) {
|
|
226
|
+
return m.value[t].getPath().getArray().map(({ lat: h, lng: S }) => ({
|
|
227
227
|
lat: h(),
|
|
228
|
-
lng:
|
|
228
|
+
lng: S()
|
|
229
229
|
}));
|
|
230
230
|
}
|
|
231
|
-
function
|
|
232
|
-
const c =
|
|
233
|
-
|
|
231
|
+
function v(t) {
|
|
232
|
+
const c = i(t);
|
|
233
|
+
l("polygon-change", { index: t, path: c });
|
|
234
234
|
}
|
|
235
235
|
function _(t, c) {
|
|
236
|
-
const
|
|
237
|
-
|
|
236
|
+
const S = i(t).filter((p, K) => K !== c);
|
|
237
|
+
l("polygon-change", { index: t, path: S });
|
|
238
238
|
}
|
|
239
239
|
function P(t, c) {
|
|
240
|
-
c.vertex !== void 0 ? _(t, c.vertex) :
|
|
240
|
+
c.vertex !== void 0 ? _(t, c.vertex) : l("polygon-right-click", t);
|
|
241
241
|
}
|
|
242
242
|
function W(t) {
|
|
243
|
-
U(null),
|
|
244
|
-
const
|
|
243
|
+
U(null), m.value = t.map((c, h) => {
|
|
244
|
+
const S = new d.maps.Polygon({
|
|
245
245
|
paths: c.paths,
|
|
246
246
|
strokeColor: c.strokeColor,
|
|
247
247
|
fillColor: c.fillColor,
|
|
248
248
|
fillOpacity: 0.5,
|
|
249
249
|
editable: a.editable
|
|
250
250
|
});
|
|
251
|
-
return F(
|
|
252
|
-
|
|
253
|
-
}),
|
|
254
|
-
}), U(
|
|
251
|
+
return F(S, "contextmenu", (p) => P(h, p)), S.getPaths().forEach((p) => {
|
|
252
|
+
x(p, "insert_at", () => v(h)), x(p, "set_at", () => v(h));
|
|
253
|
+
}), S;
|
|
254
|
+
}), U(u.value);
|
|
255
255
|
}
|
|
256
256
|
function U(t) {
|
|
257
|
-
|
|
257
|
+
m.value.map((c) => Ve(c).setMap(t));
|
|
258
258
|
}
|
|
259
259
|
function o(t, c, h) {
|
|
260
|
-
|
|
260
|
+
A(t, c, h);
|
|
261
261
|
}
|
|
262
262
|
function e() {
|
|
263
|
-
|
|
263
|
+
u.value = new d.maps.Map(n.value, {
|
|
264
264
|
center: a.center,
|
|
265
265
|
zoom: a.zoom,
|
|
266
266
|
mapTypeControl: !1,
|
|
267
267
|
streetViewControl: !1,
|
|
268
268
|
draggable: !0,
|
|
269
269
|
scrollwheel: !0
|
|
270
|
-
}), o(
|
|
270
|
+
}), o(u.value, "click", (t) => l("map-click", s(t)));
|
|
271
271
|
}
|
|
272
272
|
return te(() => a.markers, M, { deep: !0 }), te(() => a.polygons, W, { deep: !0 }), le(() => {
|
|
273
|
-
!n.value || !
|
|
274
|
-
}),
|
|
275
|
-
|
|
273
|
+
!n.value || !d || (e(), M(a.markers), W(a.polygons));
|
|
274
|
+
}), De(() => {
|
|
275
|
+
y.forEach((t) => t.remove());
|
|
276
276
|
}), (t, c) => (R(), q("div", {
|
|
277
277
|
ref_key: "mapRef",
|
|
278
278
|
ref: n,
|
|
279
279
|
class: "map app-map"
|
|
280
280
|
}, null, 512));
|
|
281
281
|
}
|
|
282
|
-
}), so = { class: "flex flex-col gap-24" }, ro = { class: "flex flex-col gap-8" }, no = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, uo = { class: "fm-typo-en-body-lg-600" }, io = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, co = { class: "fm-typo-en-body-lg-600" },
|
|
282
|
+
}), so = { class: "flex flex-col gap-24" }, ro = { class: "flex flex-col gap-8" }, no = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, uo = { class: "fm-typo-en-body-lg-600" }, io = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, co = { class: "fm-typo-en-body-lg-600" }, mo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, po = { class: "fm-typo-en-body-lg-600" }, fo = /* @__PURE__ */ j({
|
|
283
283
|
__name: "CoordinateDialog",
|
|
284
284
|
props: {
|
|
285
285
|
address: {
|
|
@@ -292,45 +292,45 @@ const lo = /* @__PURE__ */ j({
|
|
|
292
292
|
}
|
|
293
293
|
},
|
|
294
294
|
setup(f) {
|
|
295
|
-
const b = f, g = Ke(), a = re(), { t:
|
|
295
|
+
const b = f, g = Ke(), a = re(), { t: l } = G(), d = Re(
|
|
296
296
|
z(b.coordinate ? b.coordinate : $e.jb)
|
|
297
|
-
), n =
|
|
297
|
+
), n = D(""), u = Ze(async function() {
|
|
298
298
|
n.value = await a.getFirstMatchingAddress(
|
|
299
|
-
|
|
300
|
-
|
|
299
|
+
d.lat,
|
|
300
|
+
d.lng
|
|
301
301
|
);
|
|
302
302
|
}, 1e3);
|
|
303
303
|
le(() => {
|
|
304
|
-
g.emitData(z(
|
|
304
|
+
g.emitData(z(d)), u();
|
|
305
305
|
});
|
|
306
|
-
function
|
|
307
|
-
|
|
306
|
+
function y({ position: A }) {
|
|
307
|
+
d.lat = A.lat, d.lng = A.lng, g.emitData(z(d)), u();
|
|
308
308
|
}
|
|
309
|
-
const
|
|
310
|
-
return (
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
309
|
+
const s = D();
|
|
310
|
+
return (A, w) => (R(), q("div", so, [
|
|
311
|
+
V("div", ro, [
|
|
312
|
+
V("div", null, [
|
|
313
|
+
V("span", no, N(r(l)("inventory.formField.coordinate.address")) + ": ", 1),
|
|
314
|
+
V("span", uo, N(n.value), 1)
|
|
315
315
|
]),
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
316
|
+
V("div", null, [
|
|
317
|
+
V("span", io, N(r(l)("inventory.formField.coordinate.longitude")) + ": ", 1),
|
|
318
|
+
V("span", co, N(d.lng), 1)
|
|
319
319
|
]),
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
V("div", null, [
|
|
321
|
+
V("span", mo, N(r(l)("inventory.formField.coordinate.latitude")) + ": ", 1),
|
|
322
|
+
V("span", po, N(d.lat), 1)
|
|
323
323
|
])
|
|
324
324
|
]),
|
|
325
325
|
k(lo, {
|
|
326
326
|
ref_key: "gmapRef",
|
|
327
|
-
ref:
|
|
327
|
+
ref: s,
|
|
328
328
|
class: "h-[272px] sm:h-[240px] xs:h-[240px]",
|
|
329
329
|
editable: "",
|
|
330
|
-
center:
|
|
331
|
-
markers: [
|
|
332
|
-
onMarkerChange:
|
|
333
|
-
onMapClick:
|
|
330
|
+
center: d,
|
|
331
|
+
markers: [d],
|
|
332
|
+
onMarkerChange: y,
|
|
333
|
+
onMapClick: w[0] || (w[0] = ($) => y({ position: $ }))
|
|
334
334
|
}, null, 8, ["center", "markers"])
|
|
335
335
|
]));
|
|
336
336
|
}
|
|
@@ -362,80 +362,80 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
362
362
|
},
|
|
363
363
|
emits: ["update:modelValue"],
|
|
364
364
|
setup(f, { emit: b }) {
|
|
365
|
-
const g = f, a = b,
|
|
366
|
-
function
|
|
367
|
-
if (
|
|
368
|
-
return
|
|
365
|
+
const g = f, a = b, l = re(), d = xe(), n = se(), u = ae(g, "modelValue"), y = D(!1), { t: s } = G();
|
|
366
|
+
function A(m) {
|
|
367
|
+
if (m != null && m[0] && (m != null && m[1]))
|
|
368
|
+
return s("inventory.formField.coordinate.longLat", [m[0].toFixed(3), m[1].toFixed(3)]);
|
|
369
369
|
}
|
|
370
|
-
async function
|
|
370
|
+
async function w(m) {
|
|
371
371
|
var _, P;
|
|
372
|
-
const F = g.modelValue,
|
|
373
|
-
|
|
374
|
-
title: g.dialogTitle ?? g.label ??
|
|
372
|
+
const F = g.modelValue, x = !F && ((_ = g.address) != null && _.formatted) ? await l.getFirstMatchingCoordinate(g.address.formatted) : null, i = Ye(g.country), v = F ? Ce(F) : x ? Ce(x) : i;
|
|
373
|
+
d.open({
|
|
374
|
+
title: g.dialogTitle ?? g.label ?? s("inventory.formField.coordinate.pinLocation"),
|
|
375
375
|
closeButton: !0,
|
|
376
376
|
contentComponent: yo,
|
|
377
377
|
contentComponentProps: {
|
|
378
378
|
address: (P = g.address) == null ? void 0 : P.formatted,
|
|
379
|
-
coordinate:
|
|
379
|
+
coordinate: v
|
|
380
380
|
},
|
|
381
381
|
primaryActions: {
|
|
382
|
-
text:
|
|
382
|
+
text: s("common.select"),
|
|
383
383
|
close: !0
|
|
384
384
|
},
|
|
385
385
|
secondaryActions: {
|
|
386
|
-
text:
|
|
386
|
+
text: s("common.close"),
|
|
387
387
|
close: !0
|
|
388
388
|
}
|
|
389
|
-
}).onPrimary(
|
|
389
|
+
}).onPrimary(m);
|
|
390
390
|
}
|
|
391
|
-
const $ = (
|
|
391
|
+
const $ = (m) => a("update:modelValue", m ? vo(m) : null);
|
|
392
392
|
async function M() {
|
|
393
393
|
if (!g.disabled) {
|
|
394
|
-
if (!
|
|
394
|
+
if (!l.isGoogleMapReady) {
|
|
395
395
|
n.open({
|
|
396
|
-
title:
|
|
397
|
-
message:
|
|
396
|
+
title: s("common.error"),
|
|
397
|
+
message: s("inventory.formField.coordinate.error.loadMap"),
|
|
398
398
|
type: "error"
|
|
399
399
|
});
|
|
400
400
|
return;
|
|
401
401
|
}
|
|
402
|
-
|
|
402
|
+
w($);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
function E() {
|
|
406
406
|
a("update:modelValue", null);
|
|
407
407
|
}
|
|
408
|
-
return (
|
|
409
|
-
const
|
|
408
|
+
return (m, F) => {
|
|
409
|
+
const x = L("FmField"), i = L("FmButton"), v = L("FmFormGroup");
|
|
410
410
|
return R(), q("div", ho, [
|
|
411
|
-
k(
|
|
411
|
+
k(v, {
|
|
412
412
|
class: "flex-1",
|
|
413
|
-
"model-value": r(
|
|
414
|
-
label:
|
|
415
|
-
disabled:
|
|
416
|
-
required:
|
|
417
|
-
optional:
|
|
418
|
-
info:
|
|
419
|
-
rules:
|
|
420
|
-
focused:
|
|
421
|
-
"helper-text":
|
|
422
|
-
"helper-state":
|
|
413
|
+
"model-value": r(u),
|
|
414
|
+
label: m.label,
|
|
415
|
+
disabled: m.disabled,
|
|
416
|
+
required: m.labelMark === "required",
|
|
417
|
+
optional: m.labelMark === "optional",
|
|
418
|
+
info: m.labelInfo,
|
|
419
|
+
rules: m.rules,
|
|
420
|
+
focused: y.value,
|
|
421
|
+
"helper-text": m.helperText,
|
|
422
|
+
"helper-state": m.helperState,
|
|
423
423
|
onClick: F[0] || (F[0] = (_) => M())
|
|
424
424
|
}, We({
|
|
425
425
|
default: B(({ invalid: _ }) => [
|
|
426
|
-
|
|
427
|
-
k(
|
|
426
|
+
m.modelValue && m.modelValue[0] && m.modelValue[1] ? (R(), q("div", bo, [
|
|
427
|
+
k(x, {
|
|
428
428
|
invalid: _,
|
|
429
429
|
class: "fm-typo-en-body-lg-400"
|
|
430
430
|
}, {
|
|
431
431
|
default: B(() => [
|
|
432
|
-
Me(N(
|
|
432
|
+
Me(N(A(m.modelValue)), 1)
|
|
433
433
|
]),
|
|
434
434
|
_: 2
|
|
435
435
|
}, 1032, ["invalid"])
|
|
436
436
|
])) : (R(), q("div", go, [
|
|
437
|
-
k(
|
|
438
|
-
label: r(
|
|
437
|
+
k(i, {
|
|
438
|
+
label: r(s)("inventory.formField.coordinate.addCoordinate"),
|
|
439
439
|
"prepend-icon": "add",
|
|
440
440
|
variant: "plain"
|
|
441
441
|
}, null, 8, ["label"])
|
|
@@ -443,15 +443,15 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
443
443
|
]),
|
|
444
444
|
_: 2
|
|
445
445
|
}, [
|
|
446
|
-
|
|
446
|
+
m.$slots.label ? {
|
|
447
447
|
name: "label",
|
|
448
448
|
fn: B(() => [
|
|
449
|
-
Ee(
|
|
449
|
+
Ee(m.$slots, "label")
|
|
450
450
|
]),
|
|
451
451
|
key: "0"
|
|
452
452
|
} : void 0
|
|
453
453
|
]), 1032, ["model-value", "label", "disabled", "required", "optional", "info", "rules", "focused", "helper-text", "helper-state"]),
|
|
454
|
-
|
|
454
|
+
m.modelValue && m.modelValue[0] && m.modelValue[1] ? (R(), O(i, {
|
|
455
455
|
key: 0,
|
|
456
456
|
"prepend-icon": "delete",
|
|
457
457
|
variant: "tertiary",
|
|
@@ -460,10 +460,10 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
460
460
|
]);
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
|
-
}), Vo = { class: "flex flex-col gap-40" }, _o = { class: "flex flex-col gap-16" }, ko = { class: "flex flex-col gap-8" }, Ao = { class: "fm-typo-en-title-sm-600" }, Co = { class: "grid grid-cols-2 gap-24" }, Mo = { class: "flex flex-col gap-8" }, Fo = { class: "fm-typo-en-title-sm-600" },
|
|
463
|
+
}), Vo = { class: "flex flex-col gap-40" }, _o = { class: "flex flex-col gap-16" }, ko = { class: "flex flex-col gap-8" }, Ao = { class: "fm-typo-en-title-sm-600" }, Co = { class: "grid grid-cols-2 gap-24" }, Mo = { class: "flex flex-col gap-8" }, Fo = { class: "fm-typo-en-title-sm-600" }, So = {
|
|
464
464
|
key: 0,
|
|
465
465
|
class: "flex flex-col gap-8"
|
|
466
|
-
},
|
|
466
|
+
}, xo = { class: "fm-typo-en-title-sm-600" }, $o = { class: "flex flex-col gap-8" }, To = { class: "fm-typo-en-title-sm-600" }, Do = { class: "flex flex-col gap-16" }, Ro = /* @__PURE__ */ j({
|
|
467
467
|
__name: "WarehouseForm",
|
|
468
468
|
props: {
|
|
469
469
|
modelValue: {},
|
|
@@ -471,25 +471,25 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
471
471
|
},
|
|
472
472
|
emits: ["update:modelValue", "validation-success"],
|
|
473
473
|
setup(f, { expose: b, emit: g }) {
|
|
474
|
-
const a = f,
|
|
474
|
+
const a = f, l = g, d = Xe(), { t: n } = G(), u = C({
|
|
475
475
|
get() {
|
|
476
476
|
var o, e;
|
|
477
477
|
return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.name) ?? "";
|
|
478
478
|
},
|
|
479
479
|
set(o) {
|
|
480
480
|
const e = a.modelValue ?? {};
|
|
481
|
-
e.profile ?? (e.profile = {}), e.profile.name = o,
|
|
481
|
+
e.profile ?? (e.profile = {}), e.profile.name = o, l("update:modelValue", e);
|
|
482
482
|
}
|
|
483
|
-
}),
|
|
483
|
+
}), y = C({
|
|
484
484
|
get() {
|
|
485
485
|
var o, e;
|
|
486
486
|
return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.regNo) ?? "";
|
|
487
487
|
},
|
|
488
488
|
set(o) {
|
|
489
489
|
const e = a.modelValue ?? {};
|
|
490
|
-
e.profile ?? (e.profile = {}), e.profile.regNo = o,
|
|
490
|
+
e.profile ?? (e.profile = {}), e.profile.regNo = o, l("update:modelValue", e);
|
|
491
491
|
}
|
|
492
|
-
}),
|
|
492
|
+
}), s = C({
|
|
493
493
|
get() {
|
|
494
494
|
var o, e, t;
|
|
495
495
|
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line1) ?? "";
|
|
@@ -497,9 +497,9 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
497
497
|
set(o) {
|
|
498
498
|
var t;
|
|
499
499
|
const e = a.modelValue ?? {};
|
|
500
|
-
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line1 = o,
|
|
500
|
+
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line1 = o, l("update:modelValue", e);
|
|
501
501
|
}
|
|
502
|
-
}),
|
|
502
|
+
}), A = C({
|
|
503
503
|
get() {
|
|
504
504
|
var o, e, t;
|
|
505
505
|
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line2) ?? "";
|
|
@@ -507,9 +507,9 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
507
507
|
set(o) {
|
|
508
508
|
var t;
|
|
509
509
|
const e = a.modelValue ?? {};
|
|
510
|
-
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line2 = o,
|
|
510
|
+
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line2 = o, l("update:modelValue", e);
|
|
511
511
|
}
|
|
512
|
-
}),
|
|
512
|
+
}), w = C({
|
|
513
513
|
get() {
|
|
514
514
|
var o, e, t;
|
|
515
515
|
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.city) ?? "";
|
|
@@ -517,9 +517,9 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
517
517
|
set(o) {
|
|
518
518
|
var t;
|
|
519
519
|
const e = a.modelValue ?? {};
|
|
520
|
-
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.city = o,
|
|
520
|
+
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.city = o, l("update:modelValue", e);
|
|
521
521
|
}
|
|
522
|
-
}), $ =
|
|
522
|
+
}), $ = C({
|
|
523
523
|
get() {
|
|
524
524
|
var o, e, t;
|
|
525
525
|
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.postcode) ?? "";
|
|
@@ -527,9 +527,9 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
527
527
|
set(o) {
|
|
528
528
|
var t;
|
|
529
529
|
const e = a.modelValue ?? {};
|
|
530
|
-
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.postcode = o,
|
|
530
|
+
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.postcode = o, l("update:modelValue", e);
|
|
531
531
|
}
|
|
532
|
-
}), M =
|
|
532
|
+
}), M = C({
|
|
533
533
|
get() {
|
|
534
534
|
var o, e, t;
|
|
535
535
|
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.state) ?? "";
|
|
@@ -537,9 +537,9 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
537
537
|
set(o) {
|
|
538
538
|
var t;
|
|
539
539
|
const e = a.modelValue ?? {};
|
|
540
|
-
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.state = o,
|
|
540
|
+
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.state = o, l("update:modelValue", e);
|
|
541
541
|
}
|
|
542
|
-
}), E =
|
|
542
|
+
}), E = C({
|
|
543
543
|
get() {
|
|
544
544
|
var o, e, t;
|
|
545
545
|
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.country) ?? "";
|
|
@@ -547,9 +547,9 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
547
547
|
set(o) {
|
|
548
548
|
var t;
|
|
549
549
|
const e = a.modelValue ?? {};
|
|
550
|
-
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.country = o,
|
|
550
|
+
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.country = o, l("update:modelValue", e);
|
|
551
551
|
}
|
|
552
|
-
}),
|
|
552
|
+
}), m = C({
|
|
553
553
|
get() {
|
|
554
554
|
var e;
|
|
555
555
|
const o = (e = a.modelValue) == null ? void 0 : e.preparationTime;
|
|
@@ -560,9 +560,9 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
560
560
|
e.profile ?? (e.profile = {}), e.preparationTime = {
|
|
561
561
|
value: parseInt(o),
|
|
562
562
|
unit: Be.Enum.day
|
|
563
|
-
},
|
|
563
|
+
}, l("update:modelValue", e);
|
|
564
564
|
}
|
|
565
|
-
}), F =
|
|
565
|
+
}), F = C({
|
|
566
566
|
get() {
|
|
567
567
|
var o, e, t;
|
|
568
568
|
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.coordinates) ?? null;
|
|
@@ -570,27 +570,27 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
570
570
|
set(o) {
|
|
571
571
|
var t;
|
|
572
572
|
const e = a.modelValue ?? {};
|
|
573
|
-
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.coordinates = o,
|
|
573
|
+
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.coordinates = o, l("update:modelValue", e);
|
|
574
574
|
}
|
|
575
|
-
}),
|
|
575
|
+
}), x = C({
|
|
576
576
|
get() {
|
|
577
577
|
var o, e;
|
|
578
578
|
return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.phoneNo) ?? "";
|
|
579
579
|
},
|
|
580
580
|
set(o) {
|
|
581
581
|
const e = a.modelValue ?? {};
|
|
582
|
-
e.profile ?? (e.profile = {}), e.profile.phoneNo = o,
|
|
582
|
+
e.profile ?? (e.profile = {}), e.profile.phoneNo = o, l("update:modelValue", e);
|
|
583
583
|
}
|
|
584
|
-
}), { enabledCountries:
|
|
584
|
+
}), { enabledCountries: i, currentCountry: v } = Fe(), _ = C(() => v.value || ""), P = C({
|
|
585
585
|
get() {
|
|
586
586
|
var o, e;
|
|
587
587
|
return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.email) ?? "";
|
|
588
588
|
},
|
|
589
589
|
set(o) {
|
|
590
590
|
const e = a.modelValue ?? {};
|
|
591
|
-
e.profile ?? (e.profile = {}), e.profile.email = o,
|
|
591
|
+
e.profile ?? (e.profile = {}), e.profile.email = o, l("update:modelValue", e);
|
|
592
592
|
}
|
|
593
|
-
}), W =
|
|
593
|
+
}), W = C({
|
|
594
594
|
get() {
|
|
595
595
|
var o;
|
|
596
596
|
return ((o = a.modelValue) == null ? void 0 : o.customAttributes) ?? {};
|
|
@@ -599,9 +599,9 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
599
599
|
const e = a.modelValue ? {
|
|
600
600
|
...a.modelValue
|
|
601
601
|
} : {};
|
|
602
|
-
e.customAttributes = o,
|
|
602
|
+
e.customAttributes = o, l("update:modelValue", e);
|
|
603
603
|
}
|
|
604
|
-
}), U =
|
|
604
|
+
}), U = D();
|
|
605
605
|
return b({
|
|
606
606
|
validateInputs: () => {
|
|
607
607
|
var o, e;
|
|
@@ -616,57 +616,57 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
616
616
|
(e = (o = U.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
|
|
617
617
|
}
|
|
618
618
|
}), (o, e) => {
|
|
619
|
-
const t = L("FmTextField"), c = L("FmPill"), h = L("FmPhoneNumber"),
|
|
620
|
-
return R(), O(
|
|
619
|
+
const t = L("FmTextField"), c = L("FmPill"), h = L("FmPhoneNumber"), S = L("FmForm");
|
|
620
|
+
return R(), O(S, {
|
|
621
621
|
ref_key: "formRef",
|
|
622
622
|
ref: U,
|
|
623
|
-
onValidationSuccess: e[13] || (e[13] = (
|
|
623
|
+
onValidationSuccess: e[13] || (e[13] = (p) => l("validation-success"))
|
|
624
624
|
}, {
|
|
625
625
|
default: B(() => [
|
|
626
|
-
|
|
627
|
-
|
|
626
|
+
V("div", Vo, [
|
|
627
|
+
V("div", _o, [
|
|
628
628
|
k(t, {
|
|
629
629
|
disabled: o.disabled,
|
|
630
630
|
rules: [r(I)()],
|
|
631
631
|
"label-mark": "required",
|
|
632
632
|
label: r(n)("inventory.warehouse.companyName"),
|
|
633
|
-
modelValue:
|
|
634
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
633
|
+
modelValue: u.value,
|
|
634
|
+
"onUpdate:modelValue": e[0] || (e[0] = (p) => u.value = p)
|
|
635
635
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
636
636
|
k(t, {
|
|
637
637
|
disabled: o.disabled,
|
|
638
638
|
rules: [r(I)()],
|
|
639
639
|
"label-mark": "required",
|
|
640
640
|
label: r(n)("inventory.warehouse.registrationNo"),
|
|
641
|
-
modelValue:
|
|
642
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
641
|
+
modelValue: y.value,
|
|
642
|
+
"onUpdate:modelValue": e[1] || (e[1] = (p) => y.value = p)
|
|
643
643
|
}, null, 8, ["disabled", "rules", "label", "modelValue"])
|
|
644
644
|
]),
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
645
|
+
V("div", ko, [
|
|
646
|
+
V("div", Ao, N(r(n)("inventory.warehouse.address.title")), 1),
|
|
647
|
+
V("div", Co, [
|
|
648
648
|
k(t, {
|
|
649
649
|
disabled: o.disabled,
|
|
650
650
|
rules: [r(I)()],
|
|
651
651
|
"label-mark": "required",
|
|
652
652
|
label: r(n)("inventory.warehouse.address.line1"),
|
|
653
|
-
modelValue:
|
|
654
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
653
|
+
modelValue: s.value,
|
|
654
|
+
"onUpdate:modelValue": e[2] || (e[2] = (p) => s.value = p)
|
|
655
655
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
656
656
|
k(t, {
|
|
657
657
|
disabled: o.disabled,
|
|
658
658
|
"label-mark": "optional",
|
|
659
659
|
label: r(n)("inventory.warehouse.address.line2"),
|
|
660
|
-
modelValue:
|
|
661
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
660
|
+
modelValue: A.value,
|
|
661
|
+
"onUpdate:modelValue": e[3] || (e[3] = (p) => A.value = p)
|
|
662
662
|
}, null, 8, ["disabled", "label", "modelValue"]),
|
|
663
663
|
k(t, {
|
|
664
664
|
disabled: o.disabled,
|
|
665
665
|
rules: [r(I)()],
|
|
666
666
|
"label-mark": "required",
|
|
667
667
|
label: r(n)("inventory.warehouse.address.city"),
|
|
668
|
-
modelValue:
|
|
669
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
668
|
+
modelValue: w.value,
|
|
669
|
+
"onUpdate:modelValue": e[4] || (e[4] = (p) => w.value = p)
|
|
670
670
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
671
671
|
k(t, {
|
|
672
672
|
disabled: o.disabled,
|
|
@@ -674,7 +674,7 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
674
674
|
"label-mark": "required",
|
|
675
675
|
label: r(n)("inventory.warehouse.address.postcode"),
|
|
676
676
|
modelValue: $.value,
|
|
677
|
-
"onUpdate:modelValue": e[5] || (e[5] = (
|
|
677
|
+
"onUpdate:modelValue": e[5] || (e[5] = (p) => $.value = p)
|
|
678
678
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
679
679
|
k(t, {
|
|
680
680
|
disabled: o.disabled,
|
|
@@ -682,7 +682,7 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
682
682
|
"label-mark": "required",
|
|
683
683
|
label: r(n)("inventory.warehouse.address.state"),
|
|
684
684
|
modelValue: M.value,
|
|
685
|
-
"onUpdate:modelValue": e[6] || (e[6] = (
|
|
685
|
+
"onUpdate:modelValue": e[6] || (e[6] = (p) => M.value = p)
|
|
686
686
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
687
687
|
k(t, {
|
|
688
688
|
disabled: o.disabled,
|
|
@@ -690,61 +690,61 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
690
690
|
"label-mark": "required",
|
|
691
691
|
label: r(n)("inventory.warehouse.address.country"),
|
|
692
692
|
modelValue: E.value,
|
|
693
|
-
"onUpdate:modelValue": e[7] || (e[7] = (
|
|
693
|
+
"onUpdate:modelValue": e[7] || (e[7] = (p) => E.value = p)
|
|
694
694
|
}, null, 8, ["disabled", "rules", "label", "modelValue"])
|
|
695
695
|
])
|
|
696
696
|
]),
|
|
697
|
-
|
|
698
|
-
|
|
697
|
+
V("div", Mo, [
|
|
698
|
+
V("div", Fo, N(r(n)("inventory.warehouse.coordinate.title")), 1),
|
|
699
699
|
k(wo, {
|
|
700
700
|
disabled: o.disabled,
|
|
701
701
|
rules: [r(I)()],
|
|
702
702
|
"label-mark": "required",
|
|
703
703
|
modelValue: F.value,
|
|
704
|
-
"onUpdate:modelValue": e[8] || (e[8] = (
|
|
704
|
+
"onUpdate:modelValue": e[8] || (e[8] = (p) => F.value = p),
|
|
705
705
|
country: _.value
|
|
706
706
|
}, null, 8, ["disabled", "rules", "modelValue", "country"])
|
|
707
707
|
]),
|
|
708
|
-
r(
|
|
709
|
-
|
|
708
|
+
r(d).enableSupplierPreparationTime ? (R(), q("div", So, [
|
|
709
|
+
V("div", xo, [
|
|
710
710
|
Me(N(r(n)("inventory.supplier.delivery.title")) + " ", 1),
|
|
711
711
|
k(c, { variant: "beta" })
|
|
712
712
|
]),
|
|
713
713
|
k(t, {
|
|
714
714
|
disabled: o.disabled,
|
|
715
715
|
label: r(n)("inventory.supplier.delivery.preparationTime"),
|
|
716
|
-
modelValue:
|
|
717
|
-
"onUpdate:modelValue": e[9] || (e[9] = (
|
|
716
|
+
modelValue: m.value,
|
|
717
|
+
"onUpdate:modelValue": e[9] || (e[9] = (p) => m.value = p),
|
|
718
718
|
type: "number"
|
|
719
719
|
}, null, 8, ["disabled", "label", "modelValue"])
|
|
720
720
|
])) : oe("", !0),
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
721
|
+
V("div", $o, [
|
|
722
|
+
V("div", To, N(r(n)("inventory.warehouse.contact.title")), 1),
|
|
723
|
+
V("div", Do, [
|
|
724
724
|
k(h, {
|
|
725
725
|
disabled: o.disabled,
|
|
726
726
|
rules: [r(I)()],
|
|
727
727
|
"label-mark": "required",
|
|
728
728
|
label: r(n)("inventory.warehouse.contact.phoneNumber"),
|
|
729
|
-
modelValue:
|
|
730
|
-
"onUpdate:modelValue": e[10] || (e[10] = (
|
|
731
|
-
"extra-country-codes": r(
|
|
732
|
-
"default-country": r(
|
|
729
|
+
modelValue: x.value,
|
|
730
|
+
"onUpdate:modelValue": e[10] || (e[10] = (p) => x.value = p),
|
|
731
|
+
"extra-country-codes": r(i),
|
|
732
|
+
"default-country": r(v)
|
|
733
733
|
}, null, 8, ["disabled", "rules", "label", "modelValue", "extra-country-codes", "default-country"]),
|
|
734
734
|
k(t, {
|
|
735
735
|
disabled: o.disabled,
|
|
736
736
|
"label-mark": "optional",
|
|
737
737
|
label: r(n)("inventory.warehouse.contact.email"),
|
|
738
738
|
modelValue: P.value,
|
|
739
|
-
"onUpdate:modelValue": e[11] || (e[11] = (
|
|
739
|
+
"onUpdate:modelValue": e[11] || (e[11] = (p) => P.value = p)
|
|
740
740
|
}, null, 8, ["disabled", "label", "modelValue"])
|
|
741
741
|
])
|
|
742
742
|
]),
|
|
743
|
-
|
|
743
|
+
V("div", null, [
|
|
744
744
|
k(Qe, {
|
|
745
745
|
entity: "warehouse",
|
|
746
746
|
modelValue: W.value,
|
|
747
|
-
"onUpdate:modelValue": e[12] || (e[12] = (
|
|
747
|
+
"onUpdate:modelValue": e[12] || (e[12] = (p) => W.value = p)
|
|
748
748
|
}, null, 8, ["modelValue"])
|
|
749
749
|
])
|
|
750
750
|
])
|
|
@@ -765,115 +765,115 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
765
765
|
},
|
|
766
766
|
emits: ["update:show", "submitted"],
|
|
767
767
|
setup(f, { expose: b, emit: g }) {
|
|
768
|
-
const a = f,
|
|
768
|
+
const a = f, l = g, d = D(!1), n = se(), { t: u } = G(), y = Te(), s = C(() => {
|
|
769
769
|
switch (a.mode) {
|
|
770
|
-
case
|
|
770
|
+
case T.READ:
|
|
771
771
|
return "";
|
|
772
|
-
case
|
|
773
|
-
return
|
|
774
|
-
case
|
|
775
|
-
return
|
|
772
|
+
case T.UPDATE:
|
|
773
|
+
return u("inventory.warehouse.update.title");
|
|
774
|
+
case T.CREATE:
|
|
775
|
+
return u("inventory.warehouse.create.title");
|
|
776
776
|
}
|
|
777
777
|
return "";
|
|
778
|
-
}),
|
|
778
|
+
}), A = C(() => {
|
|
779
779
|
switch (a.mode) {
|
|
780
|
-
case
|
|
780
|
+
case T.READ:
|
|
781
781
|
return "";
|
|
782
|
-
case
|
|
783
|
-
return
|
|
784
|
-
case
|
|
785
|
-
return
|
|
782
|
+
case T.UPDATE:
|
|
783
|
+
return u("common.save");
|
|
784
|
+
case T.CREATE:
|
|
785
|
+
return u("common.add");
|
|
786
786
|
}
|
|
787
787
|
return "";
|
|
788
|
-
}),
|
|
788
|
+
}), w = D();
|
|
789
789
|
b({
|
|
790
790
|
validateInputs: () => {
|
|
791
|
-
var
|
|
792
|
-
(
|
|
791
|
+
var i, v;
|
|
792
|
+
(v = (i = w.value) == null ? void 0 : i.validateInputs) == null || v.call(i);
|
|
793
793
|
},
|
|
794
794
|
resetInputsValidation: () => {
|
|
795
|
-
var
|
|
796
|
-
(
|
|
795
|
+
var i, v;
|
|
796
|
+
(v = (i = w.value) == null ? void 0 : i.resetInputsValidation) == null || v.call(i);
|
|
797
797
|
},
|
|
798
798
|
resetInputs: () => {
|
|
799
|
-
var
|
|
800
|
-
(
|
|
799
|
+
var i, v;
|
|
800
|
+
(v = (i = w.value) == null ? void 0 : i.resetInputs) == null || v.call(i);
|
|
801
801
|
}
|
|
802
802
|
});
|
|
803
803
|
const $ = ae(a, "show"), M = ae(a, "warehouse");
|
|
804
804
|
function E() {
|
|
805
|
-
var
|
|
806
|
-
(
|
|
805
|
+
var i, v;
|
|
806
|
+
(v = (i = w.value) == null ? void 0 : i.validateInputs) == null || v.call(i);
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function m() {
|
|
809
809
|
switch (a.mode) {
|
|
810
|
-
case
|
|
810
|
+
case T.READ:
|
|
811
811
|
return;
|
|
812
|
-
case
|
|
813
|
-
return
|
|
814
|
-
case
|
|
812
|
+
case T.UPDATE:
|
|
813
|
+
return x();
|
|
814
|
+
case T.CREATE:
|
|
815
815
|
return F();
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
818
|
async function F() {
|
|
819
|
-
var
|
|
820
|
-
|
|
819
|
+
var i, v;
|
|
820
|
+
d.value = !0;
|
|
821
821
|
try {
|
|
822
822
|
await Promise.all([
|
|
823
|
-
|
|
823
|
+
y.createWarehouse(M.value),
|
|
824
824
|
new Promise((_) => setTimeout(_, 1e3))
|
|
825
825
|
]), n.open({
|
|
826
|
-
title:
|
|
827
|
-
message:
|
|
826
|
+
title: u("inventory.common.success"),
|
|
827
|
+
message: u("inventory.warehouse.create.success", { name: (v = (i = M.value) == null ? void 0 : i.profile) == null ? void 0 : v.name }),
|
|
828
828
|
type: "success"
|
|
829
|
-
}),
|
|
829
|
+
}), l("update:show", !1), l("submitted");
|
|
830
830
|
} catch (_) {
|
|
831
831
|
n.open({
|
|
832
|
-
title:
|
|
833
|
-
message: _ instanceof qe ? _.message :
|
|
832
|
+
title: u("inventory.warehouse.create.error.title"),
|
|
833
|
+
message: _ instanceof qe ? _.message : u("inventory.warehouse.create.error.message"),
|
|
834
834
|
type: "error"
|
|
835
835
|
}), console.error("cannot create warehouse", _);
|
|
836
836
|
} finally {
|
|
837
|
-
|
|
837
|
+
d.value = !1;
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
|
-
async function
|
|
841
|
-
var
|
|
840
|
+
async function x() {
|
|
841
|
+
var i, v;
|
|
842
842
|
if (M.value === null) {
|
|
843
843
|
n.open({
|
|
844
|
-
title:
|
|
845
|
-
message:
|
|
844
|
+
title: u("inventory.warehouse.update.error.title"),
|
|
845
|
+
message: u("inventory.warehouse.update.error.emptyWarehouse"),
|
|
846
846
|
type: "error"
|
|
847
847
|
});
|
|
848
848
|
return;
|
|
849
849
|
}
|
|
850
|
-
|
|
850
|
+
d.value = !0;
|
|
851
851
|
try {
|
|
852
852
|
await Promise.all([
|
|
853
|
-
|
|
853
|
+
y.updateWarehouse(M.value),
|
|
854
854
|
new Promise((_) => setTimeout(_, 1e3))
|
|
855
855
|
]), n.open({
|
|
856
|
-
title:
|
|
857
|
-
message:
|
|
856
|
+
title: u("inventory.common.success"),
|
|
857
|
+
message: u("inventory.warehouse.update.success", { name: (v = (i = M.value) == null ? void 0 : i.profile) == null ? void 0 : v.name }),
|
|
858
858
|
type: "success"
|
|
859
|
-
}),
|
|
859
|
+
}), l("update:show", !1), l("submitted");
|
|
860
860
|
} catch (_) {
|
|
861
861
|
n.open({
|
|
862
|
-
title:
|
|
863
|
-
message:
|
|
862
|
+
title: u("inventory.warehouse.update.error.title"),
|
|
863
|
+
message: u("inventory.warehouse.update.error.message"),
|
|
864
864
|
type: "error"
|
|
865
865
|
}), console.error("cannot update warehouse", _);
|
|
866
866
|
} finally {
|
|
867
|
-
|
|
867
|
+
d.value = !1;
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
return (
|
|
870
|
+
return (i, v) => {
|
|
871
871
|
const _ = L("FmButton"), P = L("FmSideSheet");
|
|
872
872
|
return R(), O(P, {
|
|
873
|
-
header:
|
|
873
|
+
header: s.value,
|
|
874
874
|
modelValue: r($),
|
|
875
|
-
"onUpdate:modelValue":
|
|
876
|
-
"dismiss-away": !
|
|
875
|
+
"onUpdate:modelValue": v[1] || (v[1] = (W) => _e($) ? $.value = W : null),
|
|
876
|
+
"dismiss-away": !d.value,
|
|
877
877
|
"close-button": "",
|
|
878
878
|
"max-width": 500
|
|
879
879
|
}, {
|
|
@@ -883,20 +883,20 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
883
883
|
(R(), O(Ro, {
|
|
884
884
|
class: "w-full",
|
|
885
885
|
ref_key: "formRef",
|
|
886
|
-
ref:
|
|
886
|
+
ref: w,
|
|
887
887
|
modelValue: r(M),
|
|
888
|
-
"onUpdate:modelValue":
|
|
889
|
-
onValidationSuccess:
|
|
890
|
-
key: ((W =
|
|
891
|
-
disabled:
|
|
888
|
+
"onUpdate:modelValue": v[0] || (v[0] = (U) => _e(M) ? M.value = U : null),
|
|
889
|
+
onValidationSuccess: m,
|
|
890
|
+
key: ((W = i.warehouse) == null ? void 0 : W._id) ?? "",
|
|
891
|
+
disabled: d.value || i.mode === r(T).READ
|
|
892
892
|
}, null, 8, ["modelValue", "disabled"]))
|
|
893
893
|
];
|
|
894
894
|
}),
|
|
895
895
|
"side-sheet-footer": B(() => [
|
|
896
|
-
|
|
896
|
+
i.mode !== r(T).READ ? (R(), q("div", Wo, [
|
|
897
897
|
k(_, {
|
|
898
|
-
loading:
|
|
899
|
-
label:
|
|
898
|
+
loading: d.value,
|
|
899
|
+
label: A.value,
|
|
900
900
|
onClick: E
|
|
901
901
|
}, null, 8, ["loading", "label"])
|
|
902
902
|
])) : oe("", !0)
|
|
@@ -911,24 +911,24 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
911
911
|
}, Io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, lt = /* @__PURE__ */ j({
|
|
912
912
|
__name: "WarehouseView",
|
|
913
913
|
setup(f) {
|
|
914
|
-
const b =
|
|
914
|
+
const b = Te(), g = ze(), a = Se(), l = C(() => b.warehouses), d = xe(), n = se(), u = D(!1), { t: y } = G();
|
|
915
915
|
le(() => {
|
|
916
|
-
g._currentLocation &&
|
|
916
|
+
g._currentLocation && i();
|
|
917
917
|
}), te([() => g._currentLocation], () => {
|
|
918
|
-
g._currentLocation &&
|
|
918
|
+
g._currentLocation && i();
|
|
919
919
|
});
|
|
920
|
-
const
|
|
921
|
-
function
|
|
922
|
-
|
|
920
|
+
const s = D({});
|
|
921
|
+
function A() {
|
|
922
|
+
s.value.mode = T.CREATE, s.value.warehouse = {}, s.value.show = !0;
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function w(o) {
|
|
925
925
|
const e = z(o);
|
|
926
|
-
|
|
926
|
+
s.value.mode = a.isEnabled ? T.READ : T.UPDATE, s.value.warehouse = e, s.value.show = !0;
|
|
927
927
|
}
|
|
928
928
|
async function $(o) {
|
|
929
|
-
|
|
930
|
-
title:
|
|
931
|
-
message:
|
|
929
|
+
d.open({
|
|
930
|
+
title: y("inventory.warehouse.delete.confirm"),
|
|
931
|
+
message: y("inventory.warehouse.delete.confirmMessage", { name: o.profile.name }),
|
|
932
932
|
primaryActions: {
|
|
933
933
|
text: "Delete",
|
|
934
934
|
close: !0,
|
|
@@ -941,36 +941,36 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
941
941
|
}).onPrimary(() => M(o));
|
|
942
942
|
}
|
|
943
943
|
async function M(o) {
|
|
944
|
-
|
|
945
|
-
title:
|
|
944
|
+
d.open({
|
|
945
|
+
title: y("inventory.warehouse.delete.deletingWarehouse"),
|
|
946
946
|
closeButton: !1
|
|
947
947
|
});
|
|
948
948
|
try {
|
|
949
949
|
await b.deleteWarehouse(o), n.open({
|
|
950
|
-
title:
|
|
951
|
-
message:
|
|
950
|
+
title: y("inventory.warehouse.delete.success"),
|
|
951
|
+
message: y("inventory.warehouse.delete.deletedWarehouse", { name: o.profile.name }),
|
|
952
952
|
type: "success"
|
|
953
|
-
}), await
|
|
953
|
+
}), await i(!0);
|
|
954
954
|
} catch (e) {
|
|
955
955
|
n.open({
|
|
956
|
-
title:
|
|
957
|
-
message:
|
|
956
|
+
title: y("inventory.warehouse.delete.error"),
|
|
957
|
+
message: y("inventory.warehouse.delete.errorMessage", { name: o.profile.name }),
|
|
958
958
|
type: "error"
|
|
959
959
|
}), console.error("failed to delete warehouse", e);
|
|
960
960
|
} finally {
|
|
961
|
-
|
|
961
|
+
d.close();
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
|
-
const { columnDefs: E, formatRowData:
|
|
965
|
-
|
|
964
|
+
const { columnDefs: E, formatRowData: m } = ao(
|
|
965
|
+
w,
|
|
966
966
|
$
|
|
967
967
|
);
|
|
968
968
|
function F(o) {
|
|
969
|
-
o === "create" &&
|
|
969
|
+
o === "create" && A();
|
|
970
970
|
}
|
|
971
|
-
const
|
|
972
|
-
async function
|
|
973
|
-
|
|
971
|
+
const x = D("");
|
|
972
|
+
async function i(o = !1) {
|
|
973
|
+
u.value = !0;
|
|
974
974
|
try {
|
|
975
975
|
await b.readWarehouses(), o && await g.readLocations();
|
|
976
976
|
} catch {
|
|
@@ -979,12 +979,12 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
979
979
|
type: "error"
|
|
980
980
|
});
|
|
981
981
|
} finally {
|
|
982
|
-
|
|
982
|
+
u.value = !1;
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
|
-
const { breakpoints:
|
|
985
|
+
const { breakpoints: v } = He(), _ = C(() => v.value.xs || v.value.sm), P = C(() => _.value ? 10 : 20), W = je(), U = C(() => [
|
|
986
986
|
{
|
|
987
|
-
label:
|
|
987
|
+
label: y("inventory.warehouse.create.title"),
|
|
988
988
|
value: "create",
|
|
989
989
|
isPrimary: !0,
|
|
990
990
|
prependIcon: "add"
|
|
@@ -993,12 +993,12 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
993
993
|
return (o, e) => {
|
|
994
994
|
const t = L("FmTable");
|
|
995
995
|
return R(), O(Ge, {
|
|
996
|
-
title: r(
|
|
996
|
+
title: r(y)("inventory.warehouse.title"),
|
|
997
997
|
actions: U.value,
|
|
998
998
|
"onClick:action": F
|
|
999
999
|
}, {
|
|
1000
1000
|
default: B(() => [
|
|
1001
|
-
|
|
1001
|
+
V("div", {
|
|
1002
1002
|
class: Pe([
|
|
1003
1003
|
"flex flex-col gap-8 max-h-full",
|
|
1004
1004
|
{
|
|
@@ -1009,47 +1009,47 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
1009
1009
|
}, [
|
|
1010
1010
|
k(oo, {
|
|
1011
1011
|
searchable: "",
|
|
1012
|
-
search:
|
|
1013
|
-
"onUpdate:search": e[0] || (e[0] = (c) =>
|
|
1012
|
+
search: x.value,
|
|
1013
|
+
"onUpdate:search": e[0] || (e[0] = (c) => x.value = c)
|
|
1014
1014
|
}, null, 8, ["search"]),
|
|
1015
1015
|
(R(), O(t, {
|
|
1016
1016
|
style: Ue(r(W).tableHeight),
|
|
1017
1017
|
"column-defs": r(E),
|
|
1018
|
-
"row-data": r(
|
|
1019
|
-
"search-value":
|
|
1020
|
-
loading: !r(g)._currentLocation ||
|
|
1021
|
-
onRowClick: e[1] || (e[1] = (c) =>
|
|
1022
|
-
key:
|
|
1018
|
+
"row-data": r(m)(l.value),
|
|
1019
|
+
"search-value": x.value,
|
|
1020
|
+
loading: !r(g)._currentLocation || u.value,
|
|
1021
|
+
onRowClick: e[1] || (e[1] = (c) => w(c.original.original)),
|
|
1022
|
+
key: l.value.length,
|
|
1023
1023
|
"page-size": P.value
|
|
1024
1024
|
}, {
|
|
1025
1025
|
"list-row": B((c) => [
|
|
1026
1026
|
k(eo, {
|
|
1027
1027
|
row: c,
|
|
1028
|
-
onRowClick: (h) =>
|
|
1028
|
+
onRowClick: (h) => w(h.original)
|
|
1029
1029
|
}, {
|
|
1030
1030
|
default: B((h) => {
|
|
1031
|
-
var
|
|
1031
|
+
var S, p, K, H, ne, ue, ie, de, Y, ce, me, pe, fe, ye, Z, ve, he, be, ge, J, we;
|
|
1032
1032
|
return [
|
|
1033
|
-
|
|
1034
|
-
|
|
1033
|
+
V("div", Po, [
|
|
1034
|
+
V("div", Uo, [
|
|
1035
1035
|
k(r(X), {
|
|
1036
|
-
render: (K = (
|
|
1036
|
+
render: (K = (p = (S = h.warehouse) == null ? void 0 : S.column) == null ? void 0 : p.columnDef) == null ? void 0 : K.cell,
|
|
1037
1037
|
props: (ne = (H = h.warehouse) == null ? void 0 : H.getContext) == null ? void 0 : ne.call(H)
|
|
1038
1038
|
}, null, 8, ["render", "props"])
|
|
1039
1039
|
]),
|
|
1040
|
-
|
|
1040
|
+
V("div", No, [
|
|
1041
1041
|
k(r(X), {
|
|
1042
1042
|
render: (de = (ie = (ue = h.contact) == null ? void 0 : ue.column) == null ? void 0 : ie.columnDef) == null ? void 0 : de.cell,
|
|
1043
1043
|
props: (ce = (Y = h.contact) == null ? void 0 : Y.getContext) == null ? void 0 : ce.call(Y)
|
|
1044
1044
|
}, null, 8, ["render", "props"])
|
|
1045
1045
|
]),
|
|
1046
|
-
(
|
|
1046
|
+
(me = c.original) != null && me.email ? (R(), q("div", Lo, [
|
|
1047
1047
|
k(r(X), {
|
|
1048
|
-
render: (ye = (fe = (
|
|
1048
|
+
render: (ye = (fe = (pe = h.email) == null ? void 0 : pe.column) == null ? void 0 : fe.columnDef) == null ? void 0 : ye.cell,
|
|
1049
1049
|
props: (ve = (Z = h.email) == null ? void 0 : Z.getContext) == null ? void 0 : ve.call(Z)
|
|
1050
1050
|
}, null, 8, ["render", "props"])
|
|
1051
1051
|
])) : oe("", !0),
|
|
1052
|
-
|
|
1052
|
+
V("div", Io, [
|
|
1053
1053
|
k(r(X), {
|
|
1054
1054
|
render: (ge = (be = (he = h.address) == null ? void 0 : he.column) == null ? void 0 : be.columnDef) == null ? void 0 : ge.cell,
|
|
1055
1055
|
props: (we = (J = h.address) == null ? void 0 : J.getContext) == null ? void 0 : we.call(J)
|
|
@@ -1065,11 +1065,11 @@ const ho = { class: "flex gap-8 items-center" }, bo = { key: 0 }, go = { key: 1
|
|
|
1065
1065
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
1066
1066
|
], 2),
|
|
1067
1067
|
k(Eo, {
|
|
1068
|
-
show:
|
|
1069
|
-
"onUpdate:show": e[2] || (e[2] = (c) =>
|
|
1070
|
-
warehouse:
|
|
1071
|
-
mode:
|
|
1072
|
-
onSubmitted: e[3] || (e[3] = (c) =>
|
|
1068
|
+
show: s.value.show,
|
|
1069
|
+
"onUpdate:show": e[2] || (e[2] = (c) => s.value.show = c),
|
|
1070
|
+
warehouse: s.value.warehouse,
|
|
1071
|
+
mode: s.value.mode,
|
|
1072
|
+
onSubmitted: e[3] || (e[3] = (c) => i(!0))
|
|
1073
1073
|
}, null, 8, ["show", "warehouse", "mode"])
|
|
1074
1074
|
]),
|
|
1075
1075
|
_: 1
|