@feedmepos/mf-inventory-portal 0.0.19-dev.13 → 0.0.19-dev.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.vue.d.ts +1 -1
- package/dist/{ApprovalView-9MdmwrUz.js → ApprovalView-CRHU3Bv0.js} +5 -5
- package/dist/{BindingsDialog-C-q6Y04n.js → BindingsDialog-ChIRg0d3.js} +22 -22
- package/dist/{BindingsPicker-syyx9h8v.js → BindingsPicker-BJAbeiDf.js} +17 -17
- package/dist/{BindingsTable-CQ0WyX2i.js → BindingsTable-5MxWD_qa.js} +29 -29
- package/dist/Entry.vue.d.ts +1 -1
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0j4VOis.js +306 -0
- package/dist/{IngredientsView-Ofs2UG-9.js → IngredientsView-qXrDtzSK.js} +294 -294
- package/dist/{IntegrationView-BCruLSTA.js → IntegrationView-D6yFqod1.js} +278 -278
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bvw_BkWY.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DGurlvYg.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BLVAIHDv.js → PremiumBadge.vue_vue_type_script_setup_true_lang-2Ady4pB4.js} +1 -1
- package/dist/PurchaseOrderPrintPreview-BWwjMRqb.js +152 -0
- package/dist/{ReceiveRequestView-Dw-AC1Mw.js → ReceiveRequestView-C94SWDaj.js} +7 -7
- package/dist/{RecipeView-B5WkUzLO.js → RecipeView-CG9H_ZOo.js} +181 -181
- package/dist/Standalone.vue.d.ts +1 -1
- package/dist/{StockView-CMTxj8Ly.js → StockView-BdXGfDNl.js} +23 -23
- package/dist/SupplierView-ClL2oc8K.js +813 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B8IGZmDZ.js → TransferDetails.vue_vue_type_script_setup_true_lang-DktBkwCx.js} +106 -106
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-BE95F9r1.js +1437 -0
- package/dist/TransferTemplateView-BXrNS8pg.js +1279 -0
- package/dist/{UnitView-CExCsCFg.js → UnitView-Dx2vWJXi.js} +242 -242
- package/dist/{WarehouseView-DuPizg7w.js → WarehouseView-UkmUZnqH.js} +360 -362
- package/dist/api/bill.d.ts +238 -84
- package/dist/api/supplier.d.ts +4 -4
- package/dist/app-BLzTa0Ut.js +68571 -0
- package/dist/app.d.ts +14 -0
- package/dist/app.js +3 -3
- package/dist/components/ChangeLocationComponent.vue.d.ts +11 -1
- package/dist/components/DeferableLoading.vue.d.ts +1 -1
- package/dist/components/DeleteDialog.vue.d.ts +1 -1
- package/dist/components/FmCoordinateInput.vue.d.ts +3 -3
- package/dist/components/FmDroppableField.vue.d.ts +6 -6
- package/dist/components/FmFilterableSelect.vue.d.ts +3 -3
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +21 -10
- package/dist/components/FmMinMaxInput.vue.d.ts +20 -0
- package/dist/components/FmMinMaxInputProps.d.ts +16 -0
- package/dist/components/FmMinMaxInputRules.d.ts +4 -0
- package/dist/components/FmMultiselectDialog.vue.d.ts +5 -5
- package/dist/components/FmMultiselectDialogProps.d.ts +6 -1
- package/dist/components/FmUnitInputRules.d.ts +1 -0
- package/dist/components/MultiSelectDialog.vue.d.ts +1 -1
- package/dist/components/NavigationTab.vue.d.ts +1 -1
- package/dist/components/NumberPrecisionInput.vue.d.ts +3 -3
- package/dist/components/PremiumBadge.vue.d.ts +3 -3
- package/dist/components/PreviewBadge.vue.d.ts +3 -3
- package/dist/components/StockForecast.vue.d.ts +1 -1
- package/dist/components/TableActionableRow.vue.d.ts +4 -4
- package/dist/components/UnitDisplayControl.vue.d.ts +1 -1
- package/dist/components/icons/IconCommunity.vue.d.ts +1 -1
- package/dist/components/icons/IconDocumentation.vue.d.ts +1 -1
- package/dist/components/icons/IconEcosystem.vue.d.ts +1 -1
- package/dist/components/icons/IconSupport.vue.d.ts +1 -1
- package/dist/components/icons/IconTooling.vue.d.ts +1 -1
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +5 -5
- package/dist/components/map/CoordinateDialog.vue.d.ts +4 -4
- package/dist/components/map/GoogleMap.vue.d.ts +6 -6
- package/dist/components/nested-multiselect/FmNestedMultiselectDialog.vue.d.ts +3 -3
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +3 -3
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +5 -5
- package/dist/components/ui-library/FmDateRangePickerChip.vue.d.ts +5 -5
- package/dist/composable/useIframe.d.ts +1 -1
- package/dist/composable/useSearch.d.ts +1 -1
- package/dist/{decimal-GwZ2MmM_.js → decimal-DLYVb_I_.js} +1 -1
- package/dist/format-unit-display-D_Z4TNZd.js +668 -0
- package/dist/helper/number.d.ts +2 -0
- package/dist/{id-to-date-CMUZ2glF.js → id-to-date-CKplrnj_.js} +1 -1
- package/dist/is-linked-ingredient-error-fJ2TJb3z.js +37 -0
- package/dist/layout/InventoryLayout.vue.d.ts +1 -1
- package/dist/layout/SingleColumnLayout.vue.d.ts +5 -5
- package/dist/layout/components/NavigationButton.vue.d.ts +4 -4
- package/dist/{layout-C3IEOm7C.js → layout-B9sdKjL9.js} +1 -1
- package/dist/stores/feature.d.ts +3 -1
- package/dist/stores/location.d.ts +112 -148
- package/dist/stores/supplier.d.ts +672 -18
- package/dist/stores/warehouse.d.ts +9 -5
- package/dist/supplier-BZ6HZcYB.js +60 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/InventoryView.vue.d.ts +1 -1
- package/dist/views/SelectBussinessDialog.vue.d.ts +1 -1
- package/dist/views/approval/ApprovalView.vue.d.ts +1 -1
- package/dist/views/dev/ComponentPreview.vue.d.ts +1 -1
- package/dist/views/dev/components/CoordinateTest.vue.d.ts +1 -1
- package/dist/views/dev/components/DateRange.vue.d.ts +1 -1
- package/dist/views/dev/components/FmDecimalInputTest.vue.d.ts +1 -1
- package/dist/views/dev/components/FmMultiselectDialogGrouped.vue.d.ts +1 -1
- package/dist/views/dev/components/FmSelectTest.vue.d.ts +1 -1
- package/dist/views/dev/components/InventoryIframe.vue.d.ts +1 -1
- package/dist/views/dev/components/LayoutDev.vue.d.ts +1 -1
- package/dist/views/dev/components/MfCommontTest.vue.d.ts +1 -1
- package/dist/views/dev/components/NestedSelection.vue.d.ts +1 -1
- package/dist/views/dev/components/NumberStepper.vue.d.ts +1 -1
- package/dist/views/dev/components/TabStorageTest.vue.d.ts +1 -1
- package/dist/views/dev/components/UnitInput.vue.d.ts +1 -1
- package/dist/views/dev/helpers/pinia-test.d.ts +1 -1
- package/dist/views/home/HomeView.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-dialog/BindingsDialog.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-picker/BindingsPicker.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-table/BindingsTable.vue.d.ts +1 -1
- package/dist/views/ingredients/IngredientsView.vue.d.ts +1 -1
- package/dist/views/ingredients/components/cannot-delete/CannotDelete.vue.d.ts +4 -4
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +3 -3
- package/dist/views/ingredients/components/import-ingredients/ImportIngredientItem.vue.d.ts +1 -1
- package/dist/views/ingredients/components/import-ingredients/ImportIngredients.vue.d.ts +1 -1
- package/dist/views/ingredients/components/ingredient-binded-item/IngredientBindedItem.vue.d.ts +1 -1
- package/dist/views/ingredients/components/ingredient-dialog/IngredientDialog.vue.d.ts +5 -5
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -4
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -5
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +3 -3
- package/dist/views/ingredients/composables/use-ingredient-form.d.ts +8 -8
- package/dist/views/integration/IntegrationView.vue.d.ts +1 -1
- package/dist/views/integration/components/ApplyAddon.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProduct.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +5 -5
- package/dist/views/receive-request/ReceiveRequestView.vue.d.ts +1 -1
- package/dist/views/receive-request/components/select-template-dialog/SelectTemplateDialog.vue.d.ts +8 -0
- package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistory.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-dialog/TransferDialog.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +27 -27
- package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/components/TransferItem.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/composables/use-backdate-po.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/composables/use-compare-price.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +0 -8
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1013 -67
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +24 -24
- package/dist/views/receive-request/print-preview/PurchaseOrderPrintPreview.vue.d.ts +1 -1
- package/dist/views/recipe/RecipeView.vue.d.ts +1 -1
- package/dist/views/recipe/components/recipe-dialog/RecipeDialog.vue.d.ts +5 -5
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +4 -4
- package/dist/views/recipe/composables/use-recipe-form.d.ts +8 -8
- package/dist/views/stock/StockView.vue.d.ts +1 -1
- package/dist/views/stock/components/StockHeaderPreview.vue.d.ts +1 -1
- package/dist/views/stock/components/StockHistory.vue.d.ts +3 -3
- package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +2 -2
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +123 -46
- package/dist/views/stock/components/dialog/AdjustSkuDialog.vue.d.ts +4 -4
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +3 -3
- package/dist/views/stock/components/dialog/ConvertSkuDialog.vue.d.ts +4 -4
- package/dist/views/stock/composables/use-stock-action.d.ts +11 -11
- package/dist/views/supplier/SupplierView.vue.d.ts +1 -1
- package/dist/views/supplier/components/SupplierDialog.vue.d.ts +4 -4
- package/dist/views/supplier/components/SupplierDialogProps.d.ts +1 -0
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +10 -10
- package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -3
- package/dist/views/supplier/composables/use-supplier-table.d.ts +3 -3
- package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +1 -1
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +3 -3
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +4 -4
- package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +3 -3
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +7 -7
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +13 -8
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1020 -79
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +309 -11
- package/dist/views/unit/UnitView.vue.d.ts +1 -1
- package/dist/views/unit/components/unit-dialog/UnitDialog.vue.d.ts +5 -5
- package/dist/views/unit/components/unit-form/UnitForm.vue.d.ts +4 -4
- package/dist/views/unit/components/unit-summary/UnitSummary.vue.d.ts +3 -3
- package/dist/views/unit/components/unit-used-by/UnitUsedBy.vue.d.ts +1 -1
- package/dist/views/unit/composables/use-unit-form.d.ts +8 -8
- package/dist/views/warehouse/WarehouseView.vue.d.ts +1 -1
- package/dist/views/warehouse/components/WarehouseDialog.vue.d.ts +4 -4
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +22 -14
- package/dist/{xlsx-CjErNF-B.js → xlsx-C3AV6UrJ.js} +2759 -2759
- package/dist/{xlsx.util-CMXCCmUA.js → xlsx.util-slrhXhsk.js} +2 -2
- package/package.json +2 -1
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DlIq3AyC.js +0 -272
- package/dist/PurchaseOrderPrintPreview-Do2KxBzF.js +0 -152
- package/dist/SupplierView-OmZ0X1E1.js +0 -801
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-BJMBsA9j.js +0 -1672
- package/dist/TransferTemplateView-Da6ehaJF.js +0 -1101
- package/dist/app-Chj8x632.js +0 -67206
- package/dist/is-linked-ingredient-error-C6AghEwR.js +0 -37
- package/dist/purchase-order-transaction-type-DpZQe_jA.js +0 -299
- package/dist/supplier-dG_APcwB.js +0 -54
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { ref as W, defineComponent as O, watch as ee, onMounted as te, onUnmounted as Fe, openBlock as
|
|
2
|
-
import { n as Re, Q as
|
|
1
|
+
import { ref as W, defineComponent as O, watch as ee, onMounted as te, onUnmounted as Fe, openBlock as S, createElementBlock as j, toRaw as be, reactive as $e, createElementVNode as b, toDisplayString as L, unref as c, createVNode as k, resolveComponent as B, createSlots as De, withCtx as q, createTextVNode as We, renderSlot as Pe, createBlock as z, createCommentVNode as xe, computed as D, isRef as we, normalizeStyle as Se } from "vue";
|
|
2
|
+
import { n as Re, Q as Te, T as Ee, c as G, V as ae, W as le, X as Ue, i as Le, R as N, j as Ne } from "./app-BLzTa0Ut.js";
|
|
3
3
|
import { useCoreStore as Be, useI18n as I } from "@feedmepos/mf-common";
|
|
4
|
-
import { D as Ve, R as Z, F as
|
|
5
|
-
import { c as qe, _ as Ie, F as J, u as
|
|
6
|
-
import { _ as
|
|
4
|
+
import { D as Ve, R as Z, F as E } from "./row-action.enum-PMKMRrZR.js";
|
|
5
|
+
import { c as qe, _ as Ie, F as J, u as je } from "./layout-B9sdKjL9.js";
|
|
6
|
+
import { _ as ze, a as Oe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0j4VOis.js";
|
|
7
7
|
import { useDialogChild as Ge, useDialog as Ae, useSnackbar as se, useProxiedModel as oe, useBreakpoints as Ke } from "@feedmepos/ui-library";
|
|
8
|
-
const Y = Re((
|
|
8
|
+
const Y = Re((p, m) => {
|
|
9
9
|
const f = Be();
|
|
10
10
|
return {
|
|
11
11
|
async readWarehouses() {
|
|
12
|
-
var
|
|
13
|
-
const
|
|
12
|
+
var l;
|
|
13
|
+
const a = ((l = f.currentBusiness.value) == null ? void 0 : l._id) ?? "", s = `${p.inventoryBackendUrl}/businesses/${a}/warehouses`;
|
|
14
14
|
return await m.get(s);
|
|
15
15
|
},
|
|
16
|
-
async createWarehouse(
|
|
17
|
-
var
|
|
18
|
-
const s = ((
|
|
19
|
-
return await m.post(
|
|
16
|
+
async createWarehouse(a) {
|
|
17
|
+
var u;
|
|
18
|
+
const s = ((u = f.currentBusiness.value) == null ? void 0 : u._id) ?? "", l = `${p.inventoryBackendUrl}/businesses/${s}/warehouse`;
|
|
19
|
+
return await m.post(l, a);
|
|
20
20
|
},
|
|
21
|
-
async updateWarehouse(
|
|
21
|
+
async updateWarehouse(a, s) {
|
|
22
22
|
var r;
|
|
23
|
-
const
|
|
24
|
-
return await m.put(
|
|
23
|
+
const l = ((r = f.currentBusiness.value) == null ? void 0 : r._id) ?? "", u = `${p.inventoryBackendUrl}/businesses/${l}/warehouse/${a}`;
|
|
24
|
+
return await m.put(u, s);
|
|
25
25
|
},
|
|
26
|
-
async deleteWarehouse(
|
|
27
|
-
var
|
|
28
|
-
const s = ((
|
|
29
|
-
return await m.delete(
|
|
26
|
+
async deleteWarehouse(a) {
|
|
27
|
+
var u;
|
|
28
|
+
const s = ((u = f.currentBusiness.value) == null ? void 0 : u._id) ?? "", l = `${p.inventoryBackendUrl}/businesses/${s}/warehouse/${a}`;
|
|
29
|
+
return await m.delete(l);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
});
|
|
@@ -36,79 +36,79 @@ function He() {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
const _e = W(He());
|
|
39
|
-
function
|
|
39
|
+
function Me() {
|
|
40
40
|
return {
|
|
41
41
|
// state
|
|
42
42
|
get warehouses() {
|
|
43
43
|
return _e.value.warehouses;
|
|
44
44
|
},
|
|
45
|
-
set warehouses(
|
|
46
|
-
_e.value.warehouses =
|
|
45
|
+
set warehouses(p) {
|
|
46
|
+
_e.value.warehouses = p;
|
|
47
47
|
},
|
|
48
48
|
// actions
|
|
49
49
|
async readWarehouses() {
|
|
50
|
-
const
|
|
51
|
-
this.warehouses = await
|
|
50
|
+
const p = Y();
|
|
51
|
+
this.warehouses = await p.readWarehouses();
|
|
52
52
|
},
|
|
53
|
-
async createWarehouse(
|
|
54
|
-
await Y().createWarehouse(
|
|
53
|
+
async createWarehouse(p) {
|
|
54
|
+
await Y().createWarehouse(p);
|
|
55
55
|
},
|
|
56
|
-
async updateWarehouse(
|
|
57
|
-
await Y().updateWarehouse(
|
|
56
|
+
async updateWarehouse(p) {
|
|
57
|
+
await Y().updateWarehouse(p._id, p.profile);
|
|
58
58
|
},
|
|
59
|
-
async deleteWarehouse(
|
|
60
|
-
await Y().deleteWarehouse(
|
|
59
|
+
async deleteWarehouse(p) {
|
|
60
|
+
await Y().deleteWarehouse(p._id);
|
|
61
61
|
},
|
|
62
62
|
async init() {
|
|
63
|
-
const
|
|
63
|
+
const p = Te();
|
|
64
64
|
try {
|
|
65
65
|
await this.readWarehouses();
|
|
66
66
|
} catch (m) {
|
|
67
|
-
throw m instanceof
|
|
67
|
+
throw m instanceof Ee || p.error("Error at reading warehouses"), m;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function Qe(
|
|
73
|
-
function f(
|
|
74
|
-
if (
|
|
75
|
-
|
|
72
|
+
function Qe(p, m) {
|
|
73
|
+
function f(u, r) {
|
|
74
|
+
if (u === Z.Edit) {
|
|
75
|
+
p(G(r));
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
if (
|
|
78
|
+
if (u === Z.Delete) {
|
|
79
79
|
m(G(r));
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
const { t:
|
|
83
|
+
const { t: a } = I(), s = [
|
|
84
84
|
{
|
|
85
85
|
accessorKey: "warehouse",
|
|
86
|
-
header: () =>
|
|
86
|
+
header: () => a("inventory.warehouse.table.warehouse"),
|
|
87
87
|
size: 200
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
accessorKey: "contact",
|
|
91
|
-
header: () =>
|
|
91
|
+
header: () => a("inventory.warehouse.table.contact"),
|
|
92
92
|
size: 200
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
accessorKey: "email",
|
|
96
|
-
header: () =>
|
|
96
|
+
header: () => a("inventory.warehouse.table.email"),
|
|
97
97
|
size: 200
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
accessorKey: "address",
|
|
101
|
-
header: () =>
|
|
101
|
+
header: () => a("inventory.warehouse.table.address"),
|
|
102
102
|
size: "auto"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
id: "action",
|
|
106
106
|
header: "",
|
|
107
|
-
cell(
|
|
107
|
+
cell(u) {
|
|
108
108
|
return qe(
|
|
109
109
|
[Ve[Z.Edit], Ve[Z.Delete]],
|
|
110
110
|
(r) => {
|
|
111
|
-
f(r,
|
|
111
|
+
f(r, u.row.original.original);
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
},
|
|
@@ -120,26 +120,26 @@ function Qe(c, m) {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
];
|
|
123
|
-
function
|
|
124
|
-
return
|
|
123
|
+
function l(u) {
|
|
124
|
+
return u.map((r) => ({
|
|
125
125
|
original: r,
|
|
126
126
|
warehouse: r.profile.name,
|
|
127
127
|
contact: r.profile.phoneNo,
|
|
128
128
|
email: r.profile.email,
|
|
129
129
|
get address() {
|
|
130
|
-
const
|
|
130
|
+
const n = r.profile.address;
|
|
131
131
|
return [
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
n == null ? void 0 : n.line1,
|
|
133
|
+
n == null ? void 0 : n.line2,
|
|
134
|
+
n == null ? void 0 : n.city,
|
|
135
|
+
n == null ? void 0 : n.postcode,
|
|
136
|
+
n == null ? void 0 : n.state,
|
|
137
|
+
n == null ? void 0 : n.country
|
|
138
138
|
].map((v) => v == null ? void 0 : v.trim()).filter((v) => v).join(", ");
|
|
139
139
|
}
|
|
140
140
|
}));
|
|
141
141
|
}
|
|
142
|
-
return { columnDefs: s, formatRowData:
|
|
142
|
+
return { columnDefs: s, formatRowData: l };
|
|
143
143
|
}
|
|
144
144
|
const Xe = /* @__PURE__ */ O({
|
|
145
145
|
__name: "GoogleMap",
|
|
@@ -166,53 +166,53 @@ const Xe = /* @__PURE__ */ O({
|
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
168
|
emits: ["map-click", "marker-change", "polygon-change", "polygon-right-click"],
|
|
169
|
-
setup(
|
|
170
|
-
const
|
|
169
|
+
setup(p, { expose: m, emit: f }) {
|
|
170
|
+
const a = p, s = f;
|
|
171
171
|
m({
|
|
172
172
|
setCenter: (d) => {
|
|
173
|
-
var h,
|
|
174
|
-
(h = r.value) == null || h.setCenter(d), (
|
|
173
|
+
var h, _;
|
|
174
|
+
(h = r.value) == null || h.setCenter(d), (_ = r.value) == null || _.setZoom(18);
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
|
-
const { googleMap:
|
|
178
|
-
function
|
|
177
|
+
const { googleMap: l } = le(), u = W(), r = W(null), n = [];
|
|
178
|
+
function V(d) {
|
|
179
179
|
return {
|
|
180
180
|
lat: d.latLng.lat(),
|
|
181
181
|
lng: d.latLng.lng()
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function v(d, h,
|
|
185
|
-
const $ =
|
|
186
|
-
|
|
184
|
+
function v(d, h, _) {
|
|
185
|
+
const $ = l.maps.event.addListener(d, h, _);
|
|
186
|
+
n.push($);
|
|
187
187
|
}
|
|
188
188
|
const g = W([]);
|
|
189
|
-
function
|
|
190
|
-
v(d, h,
|
|
189
|
+
function x(d, h, _) {
|
|
190
|
+
v(d, h, _);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
|
|
194
|
-
const $ = new
|
|
192
|
+
function A(d) {
|
|
193
|
+
R(null), g.value = d.map((h, _) => {
|
|
194
|
+
const $ = new l.maps.Marker({
|
|
195
195
|
position: h,
|
|
196
196
|
draggable: !0
|
|
197
197
|
});
|
|
198
|
-
return
|
|
199
|
-
s("marker-change", { index:
|
|
198
|
+
return x($, "dragend", (U) => {
|
|
199
|
+
s("marker-change", { index: _, position: V(U) });
|
|
200
200
|
}), $;
|
|
201
|
-
}),
|
|
201
|
+
}), R(r.value);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function R(d) {
|
|
204
204
|
g.value.map((h) => be(h).setMap(d));
|
|
205
205
|
}
|
|
206
206
|
const i = W([]);
|
|
207
|
-
function
|
|
208
|
-
v(d, h,
|
|
207
|
+
function M(d, h, _) {
|
|
208
|
+
v(d, h, _);
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
v(d, h,
|
|
210
|
+
function C(d, h, _) {
|
|
211
|
+
v(d, h, _);
|
|
212
212
|
}
|
|
213
213
|
function o(d) {
|
|
214
|
-
return i.value[d].getPath().getArray().map(({ lat:
|
|
215
|
-
lat:
|
|
214
|
+
return i.value[d].getPath().getArray().map(({ lat: _, lng: $ }) => ({
|
|
215
|
+
lat: _(),
|
|
216
216
|
lng: $()
|
|
217
217
|
}));
|
|
218
218
|
}
|
|
@@ -228,85 +228,83 @@ const Xe = /* @__PURE__ */ O({
|
|
|
228
228
|
h.vertex !== void 0 ? t(d, h.vertex) : s("polygon-right-click", d);
|
|
229
229
|
}
|
|
230
230
|
function w(d) {
|
|
231
|
-
y(null), i.value = d.map((h,
|
|
232
|
-
const $ = new
|
|
231
|
+
y(null), i.value = d.map((h, _) => {
|
|
232
|
+
const $ = new l.maps.Polygon({
|
|
233
233
|
paths: h.paths,
|
|
234
234
|
strokeColor: h.strokeColor,
|
|
235
235
|
fillColor: h.fillColor,
|
|
236
236
|
fillOpacity: 0.5,
|
|
237
|
-
editable:
|
|
237
|
+
editable: a.editable
|
|
238
238
|
});
|
|
239
|
-
return
|
|
240
|
-
|
|
239
|
+
return M($, "contextmenu", (U) => F(_, U)), $.getPaths().forEach((U) => {
|
|
240
|
+
C(U, "insert_at", () => e(_)), C(U, "set_at", () => e(_));
|
|
241
241
|
}), $;
|
|
242
242
|
}), y(r.value);
|
|
243
243
|
}
|
|
244
244
|
function y(d) {
|
|
245
245
|
i.value.map((h) => be(h).setMap(d));
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
v(d, h,
|
|
247
|
+
function T(d, h, _) {
|
|
248
|
+
v(d, h, _);
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
r.value = new
|
|
252
|
-
center:
|
|
253
|
-
zoom:
|
|
250
|
+
function P() {
|
|
251
|
+
r.value = new l.maps.Map(u.value, {
|
|
252
|
+
center: a.center,
|
|
253
|
+
zoom: a.zoom,
|
|
254
254
|
mapTypeControl: !1,
|
|
255
255
|
streetViewControl: !1,
|
|
256
256
|
draggable: !0,
|
|
257
257
|
scrollwheel: !0
|
|
258
|
-
}),
|
|
258
|
+
}), T(r.value, "click", (d) => s("map-click", V(d)));
|
|
259
259
|
}
|
|
260
|
-
return ee(() =>
|
|
261
|
-
!
|
|
260
|
+
return ee(() => a.markers, A, { deep: !0 }), ee(() => a.polygons, w, { deep: !0 }), te(() => {
|
|
261
|
+
!u.value || !l || (P(), A(a.markers), w(a.polygons));
|
|
262
262
|
}), Fe(() => {
|
|
263
|
-
|
|
264
|
-
}), (d, h) => (
|
|
263
|
+
n.forEach((d) => d.remove());
|
|
264
|
+
}), (d, h) => (S(), j("div", {
|
|
265
265
|
ref_key: "mapRef",
|
|
266
|
-
ref:
|
|
266
|
+
ref: u,
|
|
267
267
|
class: "map app-map"
|
|
268
268
|
}, null, 512));
|
|
269
269
|
}
|
|
270
270
|
});
|
|
271
271
|
var re = { exports: {} };
|
|
272
|
-
function
|
|
273
|
-
if (typeof
|
|
274
|
-
throw new TypeError(`Expected the first parameter to be a function, got \`${typeof
|
|
272
|
+
function Ce(p, m = 100, f = {}) {
|
|
273
|
+
if (typeof p != "function")
|
|
274
|
+
throw new TypeError(`Expected the first parameter to be a function, got \`${typeof p}\`.`);
|
|
275
275
|
if (m < 0)
|
|
276
276
|
throw new RangeError("`wait` must not be negative.");
|
|
277
|
-
const { immediate:
|
|
278
|
-
let s,
|
|
279
|
-
function
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
n = setTimeout(_, m - g);
|
|
283
|
-
else if (n = void 0, !l) {
|
|
284
|
-
const A = s, x = a;
|
|
285
|
-
s = void 0, a = void 0, u = c.apply(A, x);
|
|
286
|
-
}
|
|
277
|
+
const { immediate: a } = typeof f == "boolean" ? { immediate: f } : f;
|
|
278
|
+
let s, l, u, r, n;
|
|
279
|
+
function V() {
|
|
280
|
+
const x = s, A = l;
|
|
281
|
+
return s = void 0, l = void 0, n = p.apply(x, A), n;
|
|
287
282
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
if (
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
return u;
|
|
283
|
+
function v() {
|
|
284
|
+
const x = Date.now() - r;
|
|
285
|
+
x < m && x >= 0 ? u = setTimeout(v, m - x) : (u = void 0, a || (n = V()));
|
|
286
|
+
}
|
|
287
|
+
const g = function(...x) {
|
|
288
|
+
if (s && this !== s && Object.getPrototypeOf(this) === Object.getPrototypeOf(s))
|
|
289
|
+
throw new Error("Debounced method called with different contexts of the same prototype.");
|
|
290
|
+
s = this, l = x, r = Date.now();
|
|
291
|
+
const A = a && !u;
|
|
292
|
+
return u || (u = setTimeout(v, m)), A && (n = V()), n;
|
|
298
293
|
};
|
|
299
|
-
return
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
294
|
+
return Object.defineProperty(g, "isPending", {
|
|
295
|
+
get() {
|
|
296
|
+
return u !== void 0;
|
|
297
|
+
}
|
|
298
|
+
}), g.clear = () => {
|
|
299
|
+
u && (clearTimeout(u), u = void 0);
|
|
300
|
+
}, g.flush = () => {
|
|
301
|
+
u && g.trigger();
|
|
302
|
+
}, g.trigger = () => {
|
|
303
|
+
n = V(), g.clear();
|
|
304
|
+
}, g;
|
|
307
305
|
}
|
|
308
|
-
re.exports.debounce =
|
|
309
|
-
re.exports =
|
|
306
|
+
re.exports.debounce = Ce;
|
|
307
|
+
re.exports = Ce;
|
|
310
308
|
var Ze = re.exports;
|
|
311
309
|
const Je = /* @__PURE__ */ Ue(Ze), Ye = { class: "flex flex-col gap-24" }, eo = { class: "flex flex-col gap-8" }, oo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, to = { class: "fm-typo-en-body-lg-600" }, ao = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, lo = { class: "fm-typo-en-body-lg-600" }, so = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ro = { class: "fm-typo-en-body-lg-600" }, no = /* @__PURE__ */ O({
|
|
312
310
|
__name: "CoordinateDialog",
|
|
@@ -320,58 +318,58 @@ const Je = /* @__PURE__ */ Ue(Ze), Ye = { class: "flex flex-col gap-24" }, eo =
|
|
|
320
318
|
default: void 0
|
|
321
319
|
}
|
|
322
320
|
},
|
|
323
|
-
setup(
|
|
324
|
-
const m =
|
|
321
|
+
setup(p) {
|
|
322
|
+
const m = p, f = Ge(), a = le(), { t: s } = I(), l = $e(
|
|
325
323
|
G(m.coordinate ? m.coordinate : ae.jb)
|
|
326
|
-
),
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
324
|
+
), u = W(""), r = Je(async function() {
|
|
325
|
+
u.value = await a.getFirstMatchingAddress(
|
|
326
|
+
l.lat,
|
|
327
|
+
l.lng
|
|
330
328
|
);
|
|
331
329
|
}, 1e3);
|
|
332
330
|
te(() => {
|
|
333
|
-
f.emitData(G(
|
|
331
|
+
f.emitData(G(l)), r();
|
|
334
332
|
});
|
|
335
|
-
function
|
|
336
|
-
|
|
333
|
+
function n({ position: v }) {
|
|
334
|
+
l.lat = v.lat, l.lng = v.lng, f.emitData(G(l)), r();
|
|
337
335
|
}
|
|
338
|
-
const
|
|
339
|
-
return (v, g) => (
|
|
336
|
+
const V = W();
|
|
337
|
+
return (v, g) => (S(), j("div", Ye, [
|
|
340
338
|
b("div", eo, [
|
|
341
339
|
b("div", null, [
|
|
342
|
-
b("span", oo, L(
|
|
343
|
-
b("span", to, L(
|
|
340
|
+
b("span", oo, L(c(s)("inventory.formField.coordinate.address")) + ": ", 1),
|
|
341
|
+
b("span", to, L(u.value), 1)
|
|
344
342
|
]),
|
|
345
343
|
b("div", null, [
|
|
346
|
-
b("span", ao, L(
|
|
347
|
-
b("span", lo, L(
|
|
344
|
+
b("span", ao, L(c(s)("inventory.formField.coordinate.longitude")) + ": ", 1),
|
|
345
|
+
b("span", lo, L(l.lng), 1)
|
|
348
346
|
]),
|
|
349
347
|
b("div", null, [
|
|
350
|
-
b("span", so, L(
|
|
351
|
-
b("span", ro, L(
|
|
348
|
+
b("span", so, L(c(s)("inventory.formField.coordinate.latitude")) + ": ", 1),
|
|
349
|
+
b("span", ro, L(l.lat), 1)
|
|
352
350
|
])
|
|
353
351
|
]),
|
|
354
352
|
k(Xe, {
|
|
355
353
|
ref_key: "gmapRef",
|
|
356
|
-
ref:
|
|
354
|
+
ref: V,
|
|
357
355
|
class: "h-[272px] sm:h-[240px] xs:h-[240px]",
|
|
358
356
|
editable: "",
|
|
359
|
-
center:
|
|
360
|
-
markers: [
|
|
361
|
-
onMarkerChange:
|
|
362
|
-
onMapClick: g[0] || (g[0] = (
|
|
357
|
+
center: l,
|
|
358
|
+
markers: [l],
|
|
359
|
+
onMarkerChange: n,
|
|
360
|
+
onMapClick: g[0] || (g[0] = (x) => n({ position: x }))
|
|
363
361
|
}, null, 8, ["center", "markers"])
|
|
364
362
|
]));
|
|
365
363
|
}
|
|
366
364
|
}), uo = /* @__PURE__ */ Le(no, [["__scopeId", "data-v-272f5e8b"]]);
|
|
367
|
-
function ke([
|
|
365
|
+
function ke([p, m]) {
|
|
368
366
|
return {
|
|
369
367
|
lat: m,
|
|
370
|
-
lng:
|
|
368
|
+
lng: p
|
|
371
369
|
};
|
|
372
370
|
}
|
|
373
|
-
function io({ lng:
|
|
374
|
-
return [
|
|
371
|
+
function io({ lng: p, lat: m }) {
|
|
372
|
+
return [p, m];
|
|
375
373
|
}
|
|
376
374
|
const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1 }, fo = /* @__PURE__ */ O({
|
|
377
375
|
__name: "FmCoordinateInput",
|
|
@@ -389,17 +387,17 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
389
387
|
rules: {}
|
|
390
388
|
},
|
|
391
389
|
emits: ["update:modelValue"],
|
|
392
|
-
setup(
|
|
393
|
-
const f =
|
|
390
|
+
setup(p, { emit: m }) {
|
|
391
|
+
const f = p, a = m, s = le(), l = Ae(), u = se(), r = oe(f, "modelValue"), n = W(!1), { t: V } = I();
|
|
394
392
|
function v(i) {
|
|
395
393
|
if (i != null && i[0] && (i != null && i[1]))
|
|
396
|
-
return
|
|
394
|
+
return V("inventory.formField.coordinate.longLat", [i[0].toFixed(3), i[1].toFixed(3)]);
|
|
397
395
|
}
|
|
398
396
|
async function g(i) {
|
|
399
397
|
var e, t;
|
|
400
|
-
const
|
|
401
|
-
|
|
402
|
-
title: f.dialogTitle ?? f.label ??
|
|
398
|
+
const M = f.modelValue, C = !M && ((e = f.address) != null && e.formatted) ? await s.getFirstMatchingCoordinate(f.address.formatted) : null, o = M ? ke(M) : C ? ke(C) : ae.jb;
|
|
399
|
+
l.open({
|
|
400
|
+
title: f.dialogTitle ?? f.label ?? V("inventory.formField.coordinate.pinLocation"),
|
|
403
401
|
closeButton: !0,
|
|
404
402
|
contentComponent: uo,
|
|
405
403
|
contentComponentProps: {
|
|
@@ -407,52 +405,52 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
407
405
|
coordinate: o
|
|
408
406
|
},
|
|
409
407
|
primaryActions: {
|
|
410
|
-
text:
|
|
408
|
+
text: V("common.select"),
|
|
411
409
|
close: !0
|
|
412
410
|
},
|
|
413
411
|
secondaryActions: {
|
|
414
|
-
text:
|
|
412
|
+
text: V("common.close"),
|
|
415
413
|
close: !0
|
|
416
414
|
}
|
|
417
415
|
}).onPrimary(i);
|
|
418
416
|
}
|
|
419
|
-
const
|
|
420
|
-
async function
|
|
417
|
+
const x = (i) => a("update:modelValue", i ? io(i) : null);
|
|
418
|
+
async function A() {
|
|
421
419
|
if (!f.disabled) {
|
|
422
420
|
if (!s.isGoogleMapReady) {
|
|
423
|
-
|
|
424
|
-
title:
|
|
425
|
-
message:
|
|
421
|
+
u.open({
|
|
422
|
+
title: V("common.error"),
|
|
423
|
+
message: V("inventory.formField.coordinate.error.loadMap"),
|
|
426
424
|
type: "error"
|
|
427
425
|
});
|
|
428
426
|
return;
|
|
429
427
|
}
|
|
430
|
-
g(
|
|
428
|
+
g(x);
|
|
431
429
|
}
|
|
432
430
|
}
|
|
433
|
-
function
|
|
434
|
-
|
|
431
|
+
function R() {
|
|
432
|
+
a("update:modelValue", null);
|
|
435
433
|
}
|
|
436
|
-
return (i,
|
|
437
|
-
const
|
|
438
|
-
return
|
|
434
|
+
return (i, M) => {
|
|
435
|
+
const C = B("FmField"), o = B("FmButton"), e = B("FmFormGroup");
|
|
436
|
+
return S(), j("div", co, [
|
|
439
437
|
k(e, {
|
|
440
438
|
class: "flex-1",
|
|
441
|
-
"model-value":
|
|
439
|
+
"model-value": c(r),
|
|
442
440
|
label: i.label,
|
|
443
441
|
disabled: i.disabled,
|
|
444
442
|
required: i.labelMark === "required",
|
|
445
443
|
optional: i.labelMark === "optional",
|
|
446
444
|
info: i.labelInfo,
|
|
447
445
|
rules: i.rules,
|
|
448
|
-
focused:
|
|
446
|
+
focused: n.value,
|
|
449
447
|
"helper-text": i.helperText,
|
|
450
448
|
"helper-state": i.helperState,
|
|
451
|
-
onClick:
|
|
449
|
+
onClick: M[0] || (M[0] = (t) => A())
|
|
452
450
|
}, De({
|
|
453
451
|
default: q(({ invalid: t }) => [
|
|
454
|
-
i.modelValue && i.modelValue[0] && i.modelValue[1] ? (
|
|
455
|
-
k(
|
|
452
|
+
i.modelValue && i.modelValue[0] && i.modelValue[1] ? (S(), j("div", po, [
|
|
453
|
+
k(C, {
|
|
456
454
|
invalid: t,
|
|
457
455
|
class: "fm-typo-en-body-lg-400"
|
|
458
456
|
}, {
|
|
@@ -461,9 +459,9 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
461
459
|
]),
|
|
462
460
|
_: 2
|
|
463
461
|
}, 1032, ["invalid"])
|
|
464
|
-
])) : (
|
|
462
|
+
])) : (S(), j("div", mo, [
|
|
465
463
|
k(o, {
|
|
466
|
-
label:
|
|
464
|
+
label: c(V)("inventory.formField.coordinate.addCoordinate"),
|
|
467
465
|
"prepend-icon": "add",
|
|
468
466
|
variant: "plain"
|
|
469
467
|
}, null, 8, ["label"])
|
|
@@ -474,16 +472,16 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
474
472
|
i.$slots.label ? {
|
|
475
473
|
name: "label",
|
|
476
474
|
fn: q(() => [
|
|
477
|
-
|
|
475
|
+
Pe(i.$slots, "label")
|
|
478
476
|
]),
|
|
479
477
|
key: "0"
|
|
480
478
|
} : void 0
|
|
481
479
|
]), 1032, ["model-value", "label", "disabled", "required", "optional", "info", "rules", "focused", "helper-text", "helper-state"]),
|
|
482
|
-
i.modelValue && i.modelValue[0] && i.modelValue[1] ? (
|
|
480
|
+
i.modelValue && i.modelValue[0] && i.modelValue[1] ? (S(), z(o, {
|
|
483
481
|
key: 0,
|
|
484
482
|
"prepend-icon": "delete",
|
|
485
483
|
variant: "tertiary",
|
|
486
|
-
onClick:
|
|
484
|
+
onClick: M[1] || (M[1] = (t) => R())
|
|
487
485
|
})) : xe("", !0)
|
|
488
486
|
]);
|
|
489
487
|
};
|
|
@@ -495,132 +493,132 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
495
493
|
disabled: { type: Boolean }
|
|
496
494
|
},
|
|
497
495
|
emits: ["update:modelValue", "validation-success"],
|
|
498
|
-
setup(
|
|
499
|
-
const
|
|
496
|
+
setup(p, { expose: m, emit: f }) {
|
|
497
|
+
const a = p, s = f, { t: l } = I(), u = D({
|
|
500
498
|
get() {
|
|
501
499
|
var o, e;
|
|
502
|
-
return ((e = (o =
|
|
500
|
+
return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.name) ?? "";
|
|
503
501
|
},
|
|
504
502
|
set(o) {
|
|
505
|
-
const e =
|
|
503
|
+
const e = a.modelValue ?? {};
|
|
506
504
|
e.profile ?? (e.profile = {}), e.profile.name = o, s("update:modelValue", e);
|
|
507
505
|
}
|
|
508
506
|
}), r = D({
|
|
509
507
|
get() {
|
|
510
508
|
var o, e;
|
|
511
|
-
return ((e = (o =
|
|
509
|
+
return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.regNo) ?? "";
|
|
512
510
|
},
|
|
513
511
|
set(o) {
|
|
514
|
-
const e =
|
|
512
|
+
const e = a.modelValue ?? {};
|
|
515
513
|
e.profile ?? (e.profile = {}), e.profile.regNo = o, s("update:modelValue", e);
|
|
516
514
|
}
|
|
517
|
-
}),
|
|
515
|
+
}), n = D({
|
|
518
516
|
get() {
|
|
519
517
|
var o, e, t;
|
|
520
|
-
return ((t = (e = (o =
|
|
518
|
+
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line1) ?? "";
|
|
521
519
|
},
|
|
522
520
|
set(o) {
|
|
523
521
|
var t;
|
|
524
|
-
const e =
|
|
522
|
+
const e = a.modelValue ?? {};
|
|
525
523
|
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line1 = o, s("update:modelValue", e);
|
|
526
524
|
}
|
|
527
|
-
}),
|
|
525
|
+
}), V = D({
|
|
528
526
|
get() {
|
|
529
527
|
var o, e, t;
|
|
530
|
-
return ((t = (e = (o =
|
|
528
|
+
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line2) ?? "";
|
|
531
529
|
},
|
|
532
530
|
set(o) {
|
|
533
531
|
var t;
|
|
534
|
-
const e =
|
|
532
|
+
const e = a.modelValue ?? {};
|
|
535
533
|
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line2 = o, s("update:modelValue", e);
|
|
536
534
|
}
|
|
537
535
|
}), v = D({
|
|
538
536
|
get() {
|
|
539
537
|
var o, e, t;
|
|
540
|
-
return ((t = (e = (o =
|
|
538
|
+
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.city) ?? "";
|
|
541
539
|
},
|
|
542
540
|
set(o) {
|
|
543
541
|
var t;
|
|
544
|
-
const e =
|
|
542
|
+
const e = a.modelValue ?? {};
|
|
545
543
|
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.city = o, s("update:modelValue", e);
|
|
546
544
|
}
|
|
547
545
|
}), g = D({
|
|
548
546
|
get() {
|
|
549
547
|
var o, e, t;
|
|
550
|
-
return ((t = (e = (o =
|
|
548
|
+
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.postcode) ?? "";
|
|
551
549
|
},
|
|
552
550
|
set(o) {
|
|
553
551
|
var t;
|
|
554
|
-
const e =
|
|
552
|
+
const e = a.modelValue ?? {};
|
|
555
553
|
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.postcode = o, s("update:modelValue", e);
|
|
556
554
|
}
|
|
557
|
-
}),
|
|
555
|
+
}), x = D({
|
|
558
556
|
get() {
|
|
559
557
|
var o, e, t;
|
|
560
|
-
return ((t = (e = (o =
|
|
558
|
+
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.state) ?? "";
|
|
561
559
|
},
|
|
562
560
|
set(o) {
|
|
563
561
|
var t;
|
|
564
|
-
const e =
|
|
562
|
+
const e = a.modelValue ?? {};
|
|
565
563
|
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.state = o, s("update:modelValue", e);
|
|
566
564
|
}
|
|
567
|
-
}),
|
|
565
|
+
}), A = D({
|
|
568
566
|
get() {
|
|
569
567
|
var o, e, t;
|
|
570
|
-
return ((t = (e = (o =
|
|
568
|
+
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.country) ?? "";
|
|
571
569
|
},
|
|
572
570
|
set(o) {
|
|
573
571
|
var t;
|
|
574
|
-
const e =
|
|
572
|
+
const e = a.modelValue ?? {};
|
|
575
573
|
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.country = o, s("update:modelValue", e);
|
|
576
574
|
}
|
|
577
|
-
}),
|
|
575
|
+
}), R = D({
|
|
578
576
|
get() {
|
|
579
577
|
var o, e, t;
|
|
580
|
-
return ((t = (e = (o =
|
|
578
|
+
return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.coordinates) ?? null;
|
|
581
579
|
},
|
|
582
580
|
set(o) {
|
|
583
581
|
var t;
|
|
584
|
-
const e =
|
|
582
|
+
const e = a.modelValue ?? {};
|
|
585
583
|
e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.coordinates = o, s("update:modelValue", e);
|
|
586
584
|
}
|
|
587
585
|
}), i = D({
|
|
588
586
|
get() {
|
|
589
587
|
var o, e;
|
|
590
|
-
return ((e = (o =
|
|
588
|
+
return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.phoneNo) ?? "";
|
|
591
589
|
},
|
|
592
590
|
set(o) {
|
|
593
|
-
const e =
|
|
591
|
+
const e = a.modelValue ?? {};
|
|
594
592
|
e.profile ?? (e.profile = {}), e.profile.phoneNo = o, s("update:modelValue", e);
|
|
595
593
|
}
|
|
596
|
-
}),
|
|
594
|
+
}), M = D({
|
|
597
595
|
get() {
|
|
598
596
|
var o, e;
|
|
599
|
-
return ((e = (o =
|
|
597
|
+
return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.email) ?? "";
|
|
600
598
|
},
|
|
601
599
|
set(o) {
|
|
602
|
-
const e =
|
|
600
|
+
const e = a.modelValue ?? {};
|
|
603
601
|
e.profile ?? (e.profile = {}), e.profile.email = o, s("update:modelValue", e);
|
|
604
602
|
}
|
|
605
|
-
}),
|
|
603
|
+
}), C = W();
|
|
606
604
|
return m({
|
|
607
605
|
validateInputs: () => {
|
|
608
606
|
var o, e;
|
|
609
|
-
(e = (o =
|
|
607
|
+
(e = (o = C.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
|
|
610
608
|
},
|
|
611
609
|
resetInputsValidation: () => {
|
|
612
610
|
var o, e;
|
|
613
|
-
(e = (o =
|
|
611
|
+
(e = (o = C.value) == null ? void 0 : o.resetInputsValidation) == null || e.call(o);
|
|
614
612
|
},
|
|
615
613
|
resetInputs: () => {
|
|
616
614
|
var o, e;
|
|
617
|
-
(e = (o =
|
|
615
|
+
(e = (o = C.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
|
|
618
616
|
}
|
|
619
617
|
}), (o, e) => {
|
|
620
618
|
const t = B("FmTextField"), F = B("FmPhoneNumber"), w = B("FmForm");
|
|
621
|
-
return
|
|
619
|
+
return S(), z(w, {
|
|
622
620
|
ref_key: "formRef",
|
|
623
|
-
ref:
|
|
621
|
+
ref: C,
|
|
624
622
|
onValidationSuccess: e[11] || (e[11] = (y) => s("validation-success"))
|
|
625
623
|
}, {
|
|
626
624
|
default: q(() => [
|
|
@@ -628,100 +626,100 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
628
626
|
b("div", yo, [
|
|
629
627
|
k(t, {
|
|
630
628
|
disabled: o.disabled,
|
|
631
|
-
rules: [
|
|
629
|
+
rules: [c(N)()],
|
|
632
630
|
"label-mark": "required",
|
|
633
|
-
label:
|
|
634
|
-
modelValue:
|
|
635
|
-
"onUpdate:modelValue": e[0] || (e[0] = (y) =>
|
|
631
|
+
label: c(l)("inventory.warehouse.companyName"),
|
|
632
|
+
modelValue: u.value,
|
|
633
|
+
"onUpdate:modelValue": e[0] || (e[0] = (y) => u.value = y)
|
|
636
634
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
637
635
|
k(t, {
|
|
638
636
|
disabled: o.disabled,
|
|
639
|
-
rules: [
|
|
637
|
+
rules: [c(N)()],
|
|
640
638
|
"label-mark": "required",
|
|
641
|
-
label:
|
|
639
|
+
label: c(l)("inventory.warehouse.registrationNo"),
|
|
642
640
|
modelValue: r.value,
|
|
643
641
|
"onUpdate:modelValue": e[1] || (e[1] = (y) => r.value = y)
|
|
644
642
|
}, null, 8, ["disabled", "rules", "label", "modelValue"])
|
|
645
643
|
]),
|
|
646
644
|
b("div", vo, [
|
|
647
|
-
b("div", go, L(
|
|
645
|
+
b("div", go, L(c(l)("inventory.warehouse.address.title")), 1),
|
|
648
646
|
b("div", bo, [
|
|
649
647
|
k(t, {
|
|
650
648
|
disabled: o.disabled,
|
|
651
|
-
rules: [
|
|
649
|
+
rules: [c(N)()],
|
|
652
650
|
"label-mark": "required",
|
|
653
|
-
label:
|
|
654
|
-
modelValue:
|
|
655
|
-
"onUpdate:modelValue": e[2] || (e[2] = (y) =>
|
|
651
|
+
label: c(l)("inventory.warehouse.address.line1"),
|
|
652
|
+
modelValue: n.value,
|
|
653
|
+
"onUpdate:modelValue": e[2] || (e[2] = (y) => n.value = y)
|
|
656
654
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
657
655
|
k(t, {
|
|
658
656
|
disabled: o.disabled,
|
|
659
657
|
"label-mark": "optional",
|
|
660
|
-
label:
|
|
661
|
-
modelValue:
|
|
662
|
-
"onUpdate:modelValue": e[3] || (e[3] = (y) =>
|
|
658
|
+
label: c(l)("inventory.warehouse.address.line2"),
|
|
659
|
+
modelValue: V.value,
|
|
660
|
+
"onUpdate:modelValue": e[3] || (e[3] = (y) => V.value = y)
|
|
663
661
|
}, null, 8, ["disabled", "label", "modelValue"]),
|
|
664
662
|
k(t, {
|
|
665
663
|
disabled: o.disabled,
|
|
666
|
-
rules: [
|
|
664
|
+
rules: [c(N)()],
|
|
667
665
|
"label-mark": "required",
|
|
668
|
-
label:
|
|
666
|
+
label: c(l)("inventory.warehouse.address.city"),
|
|
669
667
|
modelValue: v.value,
|
|
670
668
|
"onUpdate:modelValue": e[4] || (e[4] = (y) => v.value = y)
|
|
671
669
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
672
670
|
k(t, {
|
|
673
671
|
disabled: o.disabled,
|
|
674
|
-
rules: [
|
|
672
|
+
rules: [c(N)()],
|
|
675
673
|
"label-mark": "required",
|
|
676
|
-
label:
|
|
674
|
+
label: c(l)("inventory.warehouse.address.postcode"),
|
|
677
675
|
modelValue: g.value,
|
|
678
676
|
"onUpdate:modelValue": e[5] || (e[5] = (y) => g.value = y)
|
|
679
677
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
680
678
|
k(t, {
|
|
681
679
|
disabled: o.disabled,
|
|
682
|
-
rules: [
|
|
680
|
+
rules: [c(N)()],
|
|
683
681
|
"label-mark": "required",
|
|
684
|
-
label:
|
|
685
|
-
modelValue:
|
|
686
|
-
"onUpdate:modelValue": e[6] || (e[6] = (y) =>
|
|
682
|
+
label: c(l)("inventory.warehouse.address.state"),
|
|
683
|
+
modelValue: x.value,
|
|
684
|
+
"onUpdate:modelValue": e[6] || (e[6] = (y) => x.value = y)
|
|
687
685
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
688
686
|
k(t, {
|
|
689
687
|
disabled: o.disabled,
|
|
690
|
-
rules: [
|
|
688
|
+
rules: [c(N)()],
|
|
691
689
|
"label-mark": "required",
|
|
692
|
-
label:
|
|
693
|
-
modelValue:
|
|
694
|
-
"onUpdate:modelValue": e[7] || (e[7] = (y) =>
|
|
690
|
+
label: c(l)("inventory.warehouse.address.country"),
|
|
691
|
+
modelValue: A.value,
|
|
692
|
+
"onUpdate:modelValue": e[7] || (e[7] = (y) => A.value = y)
|
|
695
693
|
}, null, 8, ["disabled", "rules", "label", "modelValue"])
|
|
696
694
|
])
|
|
697
695
|
]),
|
|
698
696
|
b("div", wo, [
|
|
699
|
-
b("div", Vo, L(
|
|
697
|
+
b("div", Vo, L(c(l)("inventory.warehouse.coordinate.title")), 1),
|
|
700
698
|
k(fo, {
|
|
701
699
|
disabled: o.disabled,
|
|
702
|
-
rules: [
|
|
700
|
+
rules: [c(N)()],
|
|
703
701
|
"label-mark": "required",
|
|
704
|
-
modelValue:
|
|
705
|
-
"onUpdate:modelValue": e[8] || (e[8] = (y) =>
|
|
702
|
+
modelValue: R.value,
|
|
703
|
+
"onUpdate:modelValue": e[8] || (e[8] = (y) => R.value = y)
|
|
706
704
|
}, null, 8, ["disabled", "rules", "modelValue"])
|
|
707
705
|
]),
|
|
708
706
|
b("div", _o, [
|
|
709
|
-
b("div", ko, L(
|
|
707
|
+
b("div", ko, L(c(l)("inventory.warehouse.contact.title")), 1),
|
|
710
708
|
b("div", xo, [
|
|
711
709
|
k(F, {
|
|
712
710
|
disabled: o.disabled,
|
|
713
|
-
rules: [
|
|
711
|
+
rules: [c(N)()],
|
|
714
712
|
"label-mark": "required",
|
|
715
|
-
label:
|
|
713
|
+
label: c(l)("inventory.warehouse.contact.phoneNumber"),
|
|
716
714
|
modelValue: i.value,
|
|
717
715
|
"onUpdate:modelValue": e[9] || (e[9] = (y) => i.value = y)
|
|
718
716
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
719
717
|
k(t, {
|
|
720
718
|
disabled: o.disabled,
|
|
721
719
|
"label-mark": "optional",
|
|
722
|
-
label:
|
|
723
|
-
modelValue:
|
|
724
|
-
"onUpdate:modelValue": e[10] || (e[10] = (y) =>
|
|
720
|
+
label: c(l)("inventory.warehouse.contact.email"),
|
|
721
|
+
modelValue: M.value,
|
|
722
|
+
"onUpdate:modelValue": e[10] || (e[10] = (y) => M.value = y)
|
|
725
723
|
}, null, 8, ["disabled", "label", "modelValue"])
|
|
726
724
|
])
|
|
727
725
|
])
|
|
@@ -731,7 +729,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
731
729
|
}, 512);
|
|
732
730
|
};
|
|
733
731
|
}
|
|
734
|
-
}),
|
|
732
|
+
}), Mo = { class: "flex gap-4" }, Co = /* @__PURE__ */ O({
|
|
735
733
|
__name: "WarehouseDialog",
|
|
736
734
|
props: {
|
|
737
735
|
mode: {},
|
|
@@ -739,24 +737,24 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
739
737
|
show: { type: Boolean }
|
|
740
738
|
},
|
|
741
739
|
emits: ["update:show", "submitted"],
|
|
742
|
-
setup(
|
|
743
|
-
const
|
|
744
|
-
switch (
|
|
745
|
-
case
|
|
740
|
+
setup(p, { expose: m, emit: f }) {
|
|
741
|
+
const a = p, s = f, l = W(!1), u = se(), { t: r } = I(), n = Me(), V = D(() => {
|
|
742
|
+
switch (a.mode) {
|
|
743
|
+
case E.READ:
|
|
746
744
|
return "";
|
|
747
|
-
case
|
|
745
|
+
case E.UPDATE:
|
|
748
746
|
return r("inventory.warehouse.update.title");
|
|
749
|
-
case
|
|
747
|
+
case E.CREATE:
|
|
750
748
|
return r("inventory.warehouse.create.title");
|
|
751
749
|
}
|
|
752
750
|
return "";
|
|
753
751
|
}), v = D(() => {
|
|
754
|
-
switch (
|
|
755
|
-
case
|
|
752
|
+
switch (a.mode) {
|
|
753
|
+
case E.READ:
|
|
756
754
|
return "";
|
|
757
|
-
case
|
|
755
|
+
case E.UPDATE:
|
|
758
756
|
return r("common.save");
|
|
759
|
-
case
|
|
757
|
+
case E.CREATE:
|
|
760
758
|
return r("common.add");
|
|
761
759
|
}
|
|
762
760
|
return "";
|
|
@@ -775,104 +773,104 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
775
773
|
(e = (o = g.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
|
|
776
774
|
}
|
|
777
775
|
});
|
|
778
|
-
const
|
|
779
|
-
function
|
|
776
|
+
const x = oe(a, "show"), A = oe(a, "warehouse");
|
|
777
|
+
function R() {
|
|
780
778
|
var o, e;
|
|
781
779
|
(e = (o = g.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
|
|
782
780
|
}
|
|
783
781
|
function i() {
|
|
784
|
-
switch (
|
|
785
|
-
case
|
|
782
|
+
switch (a.mode) {
|
|
783
|
+
case E.READ:
|
|
786
784
|
return;
|
|
787
|
-
case
|
|
788
|
-
return M();
|
|
789
|
-
case P.CREATE:
|
|
785
|
+
case E.UPDATE:
|
|
790
786
|
return C();
|
|
787
|
+
case E.CREATE:
|
|
788
|
+
return M();
|
|
791
789
|
}
|
|
792
790
|
}
|
|
793
|
-
async function
|
|
791
|
+
async function M() {
|
|
794
792
|
var o, e;
|
|
795
|
-
|
|
793
|
+
l.value = !0;
|
|
796
794
|
try {
|
|
797
795
|
await Promise.all([
|
|
798
|
-
|
|
796
|
+
n.createWarehouse(A.value),
|
|
799
797
|
new Promise((t) => setTimeout(t, 1e3))
|
|
800
|
-
]),
|
|
798
|
+
]), u.open({
|
|
801
799
|
title: r("common.success"),
|
|
802
|
-
message: r("inventory.warehouse.create.success", { name: (e = (o =
|
|
800
|
+
message: r("inventory.warehouse.create.success", { name: (e = (o = A.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
|
|
803
801
|
type: "success"
|
|
804
802
|
}), s("update:show", !1), s("submitted");
|
|
805
803
|
} catch (t) {
|
|
806
|
-
|
|
804
|
+
u.open({
|
|
807
805
|
title: r("inventory.warehouse.create.error.title"),
|
|
808
806
|
message: r("inventory.warehouse.create.error.message"),
|
|
809
807
|
type: "error"
|
|
810
808
|
}), console.error("cannot create warehouse", t);
|
|
811
809
|
} finally {
|
|
812
|
-
|
|
810
|
+
l.value = !1;
|
|
813
811
|
}
|
|
814
812
|
}
|
|
815
|
-
async function
|
|
813
|
+
async function C() {
|
|
816
814
|
var o, e;
|
|
817
|
-
if (
|
|
818
|
-
|
|
815
|
+
if (A.value === null) {
|
|
816
|
+
u.open({
|
|
819
817
|
title: r("inventory.warehouse.update.error.title"),
|
|
820
818
|
message: r("inventory.warehouse.update.error.emptyWarehouse"),
|
|
821
819
|
type: "error"
|
|
822
820
|
});
|
|
823
821
|
return;
|
|
824
822
|
}
|
|
825
|
-
|
|
823
|
+
l.value = !0;
|
|
826
824
|
try {
|
|
827
825
|
await Promise.all([
|
|
828
|
-
|
|
826
|
+
n.updateWarehouse(A.value),
|
|
829
827
|
new Promise((t) => setTimeout(t, 1e3))
|
|
830
|
-
]),
|
|
828
|
+
]), u.open({
|
|
831
829
|
title: r("common.success"),
|
|
832
|
-
message: r("inventory.warehouse.update.success", { name: (e = (o =
|
|
830
|
+
message: r("inventory.warehouse.update.success", { name: (e = (o = A.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
|
|
833
831
|
type: "success"
|
|
834
832
|
}), s("update:show", !1), s("submitted");
|
|
835
833
|
} catch (t) {
|
|
836
|
-
|
|
834
|
+
u.open({
|
|
837
835
|
title: r("inventory.warehouse.update.error.title"),
|
|
838
836
|
message: r("inventory.warehouse.update.error.message"),
|
|
839
837
|
type: "error"
|
|
840
838
|
}), console.error("cannot update warehouse", t);
|
|
841
839
|
} finally {
|
|
842
|
-
|
|
840
|
+
l.value = !1;
|
|
843
841
|
}
|
|
844
842
|
}
|
|
845
843
|
return (o, e) => {
|
|
846
844
|
const t = B("FmButton"), F = B("FmSideSheet");
|
|
847
|
-
return
|
|
848
|
-
header:
|
|
849
|
-
modelValue:
|
|
850
|
-
"onUpdate:modelValue": e[1] || (e[1] = (w) => we(
|
|
851
|
-
"dismiss-away": !
|
|
845
|
+
return S(), z(F, {
|
|
846
|
+
header: V.value,
|
|
847
|
+
modelValue: c(x),
|
|
848
|
+
"onUpdate:modelValue": e[1] || (e[1] = (w) => we(x) ? x.value = w : null),
|
|
849
|
+
"dismiss-away": !l.value,
|
|
852
850
|
"close-button": "",
|
|
853
851
|
"max-width": 500
|
|
854
852
|
}, {
|
|
855
853
|
default: q(() => {
|
|
856
854
|
var w;
|
|
857
855
|
return [
|
|
858
|
-
(
|
|
856
|
+
(S(), z(Ao, {
|
|
859
857
|
class: "w-full",
|
|
860
858
|
ref_key: "formRef",
|
|
861
859
|
ref: g,
|
|
862
|
-
modelValue:
|
|
863
|
-
"onUpdate:modelValue": e[0] || (e[0] = (y) => we(
|
|
860
|
+
modelValue: c(A),
|
|
861
|
+
"onUpdate:modelValue": e[0] || (e[0] = (y) => we(A) ? A.value = y : null),
|
|
864
862
|
onValidationSuccess: i,
|
|
865
863
|
key: ((w = o.warehouse) == null ? void 0 : w._id) ?? "",
|
|
866
|
-
disabled:
|
|
864
|
+
disabled: l.value
|
|
867
865
|
}, null, 8, ["modelValue", "disabled"]))
|
|
868
866
|
];
|
|
869
867
|
}),
|
|
870
868
|
"side-sheet-footer": q(() => [
|
|
871
|
-
b("div",
|
|
869
|
+
b("div", Mo, [
|
|
872
870
|
k(t, {
|
|
873
|
-
loading:
|
|
871
|
+
loading: l.value,
|
|
874
872
|
label: v.value,
|
|
875
|
-
onClick:
|
|
873
|
+
onClick: R
|
|
876
874
|
}, null, 8, ["loading", "label"])
|
|
877
875
|
])
|
|
878
876
|
]),
|
|
@@ -880,24 +878,24 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
880
878
|
}, 8, ["header", "modelValue", "dismiss-away"]);
|
|
881
879
|
};
|
|
882
880
|
}
|
|
883
|
-
}), Fo = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, $o = { class: "flex flex-col py-8" }, Do = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
881
|
+
}), Fo = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, $o = { class: "flex flex-col py-8" }, Do = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Po = {
|
|
884
882
|
key: 0,
|
|
885
883
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
886
|
-
},
|
|
884
|
+
}, So = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, qo = /* @__PURE__ */ O({
|
|
887
885
|
__name: "WarehouseView",
|
|
888
|
-
setup(
|
|
889
|
-
const m =
|
|
886
|
+
setup(p) {
|
|
887
|
+
const m = Me(), f = Ne(), a = D(() => m.warehouses), s = Ae(), l = se(), u = W(!1), { t: r } = I();
|
|
890
888
|
te(() => {
|
|
891
|
-
f._currentLocation &&
|
|
889
|
+
f._currentLocation && C();
|
|
892
890
|
}), ee([() => f._currentLocation], () => {
|
|
893
|
-
f._currentLocation &&
|
|
891
|
+
f._currentLocation && C();
|
|
894
892
|
});
|
|
895
|
-
const
|
|
896
|
-
function
|
|
897
|
-
|
|
893
|
+
const n = W({});
|
|
894
|
+
function V() {
|
|
895
|
+
n.value.mode = E.CREATE, n.value.warehouse = {}, n.value.show = !0;
|
|
898
896
|
}
|
|
899
897
|
function v(F) {
|
|
900
|
-
|
|
898
|
+
n.value.mode = E.UPDATE, n.value.warehouse = F, n.value.show = !0;
|
|
901
899
|
}
|
|
902
900
|
async function g(F) {
|
|
903
901
|
s.open({
|
|
@@ -912,22 +910,22 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
912
910
|
text: "Cancel",
|
|
913
911
|
close: !0
|
|
914
912
|
}
|
|
915
|
-
}).onPrimary(() =>
|
|
913
|
+
}).onPrimary(() => x(F));
|
|
916
914
|
}
|
|
917
|
-
async function
|
|
915
|
+
async function x(F) {
|
|
918
916
|
const { t: w } = I();
|
|
919
917
|
s.open({
|
|
920
918
|
title: w("inventory.warehouse.delete.deletingWarehouse"),
|
|
921
919
|
closeButton: !1
|
|
922
920
|
});
|
|
923
921
|
try {
|
|
924
|
-
await m.deleteWarehouse(F),
|
|
922
|
+
await m.deleteWarehouse(F), l.open({
|
|
925
923
|
title: w("inventory.warehouse.delete.success"),
|
|
926
924
|
message: w("inventory.warehouse.delete.deletedWarehouse", { name: F.profile.name }),
|
|
927
925
|
type: "success"
|
|
928
|
-
}), await
|
|
926
|
+
}), await C(!0);
|
|
929
927
|
} catch (y) {
|
|
930
|
-
|
|
928
|
+
l.open({
|
|
931
929
|
title: w("inventory.warehouse.delete.error"),
|
|
932
930
|
message: w("inventory.warehouse.delete.errorMessage", { name: F.profile.name }),
|
|
933
931
|
type: "error"
|
|
@@ -936,35 +934,35 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
936
934
|
s.close();
|
|
937
935
|
}
|
|
938
936
|
}
|
|
939
|
-
const { columnDefs:
|
|
937
|
+
const { columnDefs: A, formatRowData: R } = Qe(
|
|
940
938
|
v,
|
|
941
939
|
g
|
|
942
940
|
);
|
|
943
941
|
function i(F) {
|
|
944
|
-
F === "create" &&
|
|
942
|
+
F === "create" && V();
|
|
945
943
|
}
|
|
946
|
-
const
|
|
947
|
-
async function
|
|
948
|
-
|
|
944
|
+
const M = W("");
|
|
945
|
+
async function C(F = !1) {
|
|
946
|
+
u.value = !0;
|
|
949
947
|
try {
|
|
950
948
|
await m.readWarehouses(), F && await f.readLocations();
|
|
951
949
|
} catch {
|
|
952
|
-
|
|
950
|
+
l.open({
|
|
953
951
|
title: "Cannot fetch warehouse list",
|
|
954
952
|
type: "error"
|
|
955
953
|
});
|
|
956
954
|
} finally {
|
|
957
|
-
|
|
955
|
+
u.value = !1;
|
|
958
956
|
}
|
|
959
957
|
}
|
|
960
|
-
const { breakpoints: o } = Ke(), e = D(() => o.value.xs || o.value.sm ? 10 : 20), t =
|
|
958
|
+
const { breakpoints: o } = Ke(), e = D(() => o.value.xs || o.value.sm ? 10 : 20), t = je();
|
|
961
959
|
return (F, w) => {
|
|
962
960
|
const y = B("FmTable");
|
|
963
|
-
return
|
|
964
|
-
title:
|
|
961
|
+
return S(), z(ze, {
|
|
962
|
+
title: c(r)("inventory.warehouse.title"),
|
|
965
963
|
actions: [
|
|
966
964
|
{
|
|
967
|
-
label:
|
|
965
|
+
label: c(r)("inventory.warehouse.create.title"),
|
|
968
966
|
value: "create",
|
|
969
967
|
isPrimary: !0,
|
|
970
968
|
prependIcon: "add"
|
|
@@ -977,50 +975,50 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
977
975
|
k(Oe, {
|
|
978
976
|
searchable: "",
|
|
979
977
|
"change-location": "",
|
|
980
|
-
search:
|
|
981
|
-
"onUpdate:search": w[0] || (w[0] = (
|
|
978
|
+
search: M.value,
|
|
979
|
+
"onUpdate:search": w[0] || (w[0] = (T) => M.value = T)
|
|
982
980
|
}, null, 8, ["search"]),
|
|
983
|
-
(
|
|
984
|
-
style:
|
|
985
|
-
"column-defs":
|
|
986
|
-
"row-data":
|
|
987
|
-
"search-value":
|
|
988
|
-
loading: !
|
|
989
|
-
onRowClick: w[1] || (w[1] = (
|
|
990
|
-
key:
|
|
981
|
+
(S(), z(y, {
|
|
982
|
+
style: Se(c(t).tableHeight),
|
|
983
|
+
"column-defs": c(A),
|
|
984
|
+
"row-data": c(R)(a.value),
|
|
985
|
+
"search-value": M.value,
|
|
986
|
+
loading: !c(f)._currentLocation || u.value,
|
|
987
|
+
onRowClick: w[1] || (w[1] = (T) => v(T.original.original)),
|
|
988
|
+
key: a.value.length,
|
|
991
989
|
"page-size": e.value
|
|
992
990
|
}, {
|
|
993
|
-
"list-row": q((
|
|
991
|
+
"list-row": q((T) => [
|
|
994
992
|
k(Ie, {
|
|
995
|
-
row:
|
|
996
|
-
onRowClick: (
|
|
993
|
+
row: T,
|
|
994
|
+
onRowClick: (P) => v(P.original)
|
|
997
995
|
}, {
|
|
998
|
-
default: q((
|
|
999
|
-
var d, h,
|
|
996
|
+
default: q((P) => {
|
|
997
|
+
var d, h, _, $, U, K, ne, ue, H, ie, de, ce, pe, me, Q, fe, he, ye, ve, X, ge;
|
|
1000
998
|
return [
|
|
1001
999
|
b("div", $o, [
|
|
1002
1000
|
b("div", Do, [
|
|
1003
|
-
k(
|
|
1004
|
-
render: (
|
|
1005
|
-
props: (U = ($ =
|
|
1001
|
+
k(c(J), {
|
|
1002
|
+
render: (_ = (h = (d = P.warehouse) == null ? void 0 : d.column) == null ? void 0 : h.columnDef) == null ? void 0 : _.cell,
|
|
1003
|
+
props: (U = ($ = P.warehouse) == null ? void 0 : $.getContext) == null ? void 0 : U.call($)
|
|
1006
1004
|
}, null, 8, ["render", "props"])
|
|
1007
1005
|
]),
|
|
1008
1006
|
b("div", Wo, [
|
|
1009
|
-
k(
|
|
1010
|
-
render: (ue = (ne = (K =
|
|
1011
|
-
props: (ie = (H =
|
|
1007
|
+
k(c(J), {
|
|
1008
|
+
render: (ue = (ne = (K = P.contact) == null ? void 0 : K.column) == null ? void 0 : ne.columnDef) == null ? void 0 : ue.cell,
|
|
1009
|
+
props: (ie = (H = P.contact) == null ? void 0 : H.getContext) == null ? void 0 : ie.call(H)
|
|
1012
1010
|
}, null, 8, ["render", "props"])
|
|
1013
1011
|
]),
|
|
1014
|
-
(de =
|
|
1015
|
-
k(
|
|
1016
|
-
render: (me = (pe = (ce =
|
|
1017
|
-
props: (fe = (Q =
|
|
1012
|
+
(de = T.original) != null && de.email ? (S(), j("div", Po, [
|
|
1013
|
+
k(c(J), {
|
|
1014
|
+
render: (me = (pe = (ce = P.email) == null ? void 0 : ce.column) == null ? void 0 : pe.columnDef) == null ? void 0 : me.cell,
|
|
1015
|
+
props: (fe = (Q = P.email) == null ? void 0 : Q.getContext) == null ? void 0 : fe.call(Q)
|
|
1018
1016
|
}, null, 8, ["render", "props"])
|
|
1019
1017
|
])) : xe("", !0),
|
|
1020
|
-
b("div",
|
|
1021
|
-
k(
|
|
1022
|
-
render: (ve = (ye = (he =
|
|
1023
|
-
props: (ge = (X =
|
|
1018
|
+
b("div", So, [
|
|
1019
|
+
k(c(J), {
|
|
1020
|
+
render: (ve = (ye = (he = P.address) == null ? void 0 : he.column) == null ? void 0 : ye.columnDef) == null ? void 0 : ve.cell,
|
|
1021
|
+
props: (ge = (X = P.address) == null ? void 0 : X.getContext) == null ? void 0 : ge.call(X)
|
|
1024
1022
|
}, null, 8, ["render", "props"])
|
|
1025
1023
|
])
|
|
1026
1024
|
])
|
|
@@ -1032,12 +1030,12 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
|
|
|
1032
1030
|
_: 1
|
|
1033
1031
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
1034
1032
|
]),
|
|
1035
|
-
k(
|
|
1036
|
-
show:
|
|
1037
|
-
"onUpdate:show": w[2] || (w[2] = (
|
|
1038
|
-
warehouse:
|
|
1039
|
-
mode:
|
|
1040
|
-
onSubmitted: w[3] || (w[3] = (
|
|
1033
|
+
k(Co, {
|
|
1034
|
+
show: n.value.show,
|
|
1035
|
+
"onUpdate:show": w[2] || (w[2] = (T) => n.value.show = T),
|
|
1036
|
+
warehouse: n.value.warehouse,
|
|
1037
|
+
mode: n.value.mode,
|
|
1038
|
+
onSubmitted: w[3] || (w[3] = (T) => C(!0))
|
|
1041
1039
|
}, null, 8, ["show", "warehouse", "mode"])
|
|
1042
1040
|
]),
|
|
1043
1041
|
_: 1
|