@feedmepos/mf-inventory-portal 1.0.7-dev.1 → 1.0.7
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-zspCOQeF.js → App-DF14rGlK.js} +49 -50
- package/dist/{ApprovalView-CKJV87es.js → ApprovalView-C_xhq-_c.js} +24 -24
- package/dist/{BindingsDialog-CTmuzAWi.js → BindingsDialog-CCY1fDj8.js} +4 -4
- package/dist/{BindingsPicker-Dabonsov.js → BindingsPicker-CnXbK5O3.js} +6 -6
- package/dist/{BindingsTable-L0yzAoQq.js → BindingsTable-cQIUUuVv.js} +8 -8
- package/dist/{ClosingDraftView-CddxqfNi.js → ClosingDraftView-DUZ31x3s.js} +463 -464
- package/dist/{ClosingTemplateView-BsW-nPec.js → ClosingTemplateView-6ysEDEcV.js} +10 -10
- package/dist/{DeliveryOrderPrintPreview-DQ4msDpJ.js → DeliveryOrderPrintPreview-BGjFS8h7.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-TnVI2vdF.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CanJ2fzb.js} +32 -32
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BRvXmLV6.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BcKtJQMt.js} +86 -86
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BHLx7Lbo.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bb9xMoX-.js} +1 -1
- package/dist/{IngredientGroupView-CF2GLMSD.js → IngredientGroupView-i08KHlW7.js} +11 -11
- package/dist/{IngredientsView-DopQVz7u.js → IngredientsView-D0tBukwK.js} +14 -15
- package/dist/{IntegrationView-EnD2l7af.js → IntegrationView-BqCrKL13.js} +85 -86
- package/dist/{InventoryBindingForm-VP2_coNH.js → InventoryBindingForm-BJwIFQVS.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-dQF7h_Jp.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DU9j1Q8M.js} +27 -27
- package/dist/{InventoryBindingSummary-BCEXzmFu.js → InventoryBindingSummary-B2M3Th8T.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-RfkBlwxw.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BH4A_Lc5.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CGgxjz4P.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CdxCyEBi.js} +10 -10
- package/dist/{PublishView-ExvxeKR_.js → PublishView-B9x92vDM.js} +7 -7
- package/dist/{PurchaseOrderPrintPreview-59AaXtZ_.js → PurchaseOrderPrintPreview-MbGDNmgh.js} +4 -4
- package/dist/{ReceiveRequestView-BxGss8gu.js → ReceiveRequestView-CTNycYUr.js} +52 -53
- package/dist/{RecipeView-BqTsG4xX.js → RecipeView-sHTcJgzP.js} +32 -32
- package/dist/{StockView-D-WvydHv.js → StockView-CUv4dcGJ.js} +72 -73
- package/dist/{SupplierView-C6ruAEih.js → SupplierView-hu6OhDss.js} +11 -12
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CCKlQGMf.js +1746 -0
- package/dist/{TransferTemplateView-qSA3Txpn.js → TransferTemplateView-DMSkUc0D.js} +290 -291
- package/dist/{UnitView-oHDOLM8k.js → UnitView-B5q7IVbT.js} +23 -23
- package/dist/{WarehouseView-C3EqYfCf.js → WarehouseView-Ds6z4Vz6.js} +26 -26
- package/dist/api/bill.d.ts +2 -2
- package/dist/api/food-market-hub.d.ts +1 -1
- package/dist/api/inventory.d.ts +44 -44
- package/dist/api/netsuite.d.ts +3 -3
- package/dist/api/purchase-order.d.ts +1 -5
- package/dist/{app-DqrcGlGd.js → app-BmsY87Mv.js} +17641 -17171
- package/dist/app.d.ts +7 -7
- package/dist/app.js +1 -1
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +8 -8
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +2 -2
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +5 -5
- package/dist/{decimal-rgCB5DGy.js → decimal-Baw9w4_A.js} +1 -1
- package/dist/{format-unit-display-DUWzu8vU.js → format-unit-display-D0_KiU3j.js} +60 -60
- package/dist/{index-YgIaxVhw.js → index-CDydl7WA.js} +1 -1
- package/dist/{index-CH3OzDYK.js → index-C_GU5Tc8.js} +6 -7
- package/dist/{stock-BPNYXwz1.js → stock-C-hm8Kdq.js} +1 -1
- package/dist/stores/feature.d.ts +20 -3
- package/dist/stores/integration/foodmarkethub.d.ts +1 -1
- package/dist/stores/integration/netsuite.d.ts +7 -7
- package/dist/stores/inventory.d.ts +44 -44
- package/dist/stores/location.d.ts +137 -137
- package/dist/{supplier-CnrH580K.js → supplier-RX_yr24c.js} +4 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CpnJoeWb.js → use-ingredient-select-dialog-BZhczMUl.js} +1 -1
- package/dist/{use-inventory-binding-dialog-DHvNwt_F.js → use-inventory-binding-dialog-dV-92pLe.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +228 -228
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +2 -2
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +1 -1
- package/dist/views/adjustment-template/wastage-template/table.d.ts +234 -234
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +68 -68
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +408 -408
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +4 -4
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +252 -252
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +252 -252
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +12 -12
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +2 -2
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +8 -8
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +3 -3
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +4 -4
- package/dist/views/integration/components/ApplyProduct.vue.d.ts +2 -2
- package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +2 -2
- package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +2 -2
- package/dist/views/integration/components/netsuite/AddLocationDialog.vue.d.ts +204 -204
- package/dist/views/integration/components/netsuite/LocationConfigurationDialog.vue.d.ts +2 -2
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +647 -675
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +22 -22
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +44 -44
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +11 -11
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1146 -1194
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1170 -1218
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -2
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +14 -14
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +22 -22
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +17 -17
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +11 -11
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +813 -813
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +813 -813
- package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +33 -33
- package/dist/{vue-i18n-4m7yAqU2.js → vue-i18n-sbHu6D5a.js} +426 -426
- package/package.json +3 -5
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CQ-Om_rI.js +0 -1894
- package/dist/composable/usePromise.d.ts +0 -41
- package/dist/feature-CifIpcNk.js +0 -17345
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +0 -614
- package/dist/views/receive-request/constants/po-action-to-ui-style.d.ts +0 -6
package/dist/app.d.ts
CHANGED
|
@@ -2335,12 +2335,12 @@ export declare const InventoryBindingForm: import("vue").DefineComponent<import(
|
|
|
2335
2335
|
precision: number;
|
|
2336
2336
|
};
|
|
2337
2337
|
} | null | undefined;
|
|
2338
|
-
id: string;
|
|
2339
2338
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
2340
2339
|
amount: {
|
|
2341
2340
|
amount: number;
|
|
2342
2341
|
precision: number;
|
|
2343
2342
|
};
|
|
2343
|
+
id: string;
|
|
2344
2344
|
}[]>;
|
|
2345
2345
|
default: () => never[];
|
|
2346
2346
|
};
|
|
@@ -2355,12 +2355,12 @@ export declare const InventoryBindingForm: import("vue").DefineComponent<import(
|
|
|
2355
2355
|
precision: number;
|
|
2356
2356
|
};
|
|
2357
2357
|
} | null | undefined;
|
|
2358
|
-
id: string;
|
|
2359
2358
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
2360
2359
|
amount: {
|
|
2361
2360
|
amount: number;
|
|
2362
2361
|
precision: number;
|
|
2363
2362
|
};
|
|
2363
|
+
id: string;
|
|
2364
2364
|
}[]) => import("@feedmepos/ui-library").ValidationResult))[]>;
|
|
2365
2365
|
};
|
|
2366
2366
|
readonly: {
|
|
@@ -2383,12 +2383,12 @@ export declare const InventoryBindingForm: import("vue").DefineComponent<import(
|
|
|
2383
2383
|
precision: number;
|
|
2384
2384
|
};
|
|
2385
2385
|
} | null | undefined;
|
|
2386
|
-
id: string;
|
|
2387
2386
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
2388
2387
|
amount: {
|
|
2389
2388
|
amount: number;
|
|
2390
2389
|
precision: number;
|
|
2391
2390
|
};
|
|
2391
|
+
id: string;
|
|
2392
2392
|
}[]) => void;
|
|
2393
2393
|
"click:pick-inventory-bindings": (type: "RECIPE" | "SKU" | "SKU_GROUP") => void;
|
|
2394
2394
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -2409,12 +2409,12 @@ export declare const InventoryBindingForm: import("vue").DefineComponent<import(
|
|
|
2409
2409
|
precision: number;
|
|
2410
2410
|
};
|
|
2411
2411
|
} | null | undefined;
|
|
2412
|
-
id: string;
|
|
2413
2412
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
2414
2413
|
amount: {
|
|
2415
2414
|
amount: number;
|
|
2416
2415
|
precision: number;
|
|
2417
2416
|
};
|
|
2417
|
+
id: string;
|
|
2418
2418
|
}[]>;
|
|
2419
2419
|
default: () => never[];
|
|
2420
2420
|
};
|
|
@@ -2429,12 +2429,12 @@ export declare const InventoryBindingForm: import("vue").DefineComponent<import(
|
|
|
2429
2429
|
precision: number;
|
|
2430
2430
|
};
|
|
2431
2431
|
} | null | undefined;
|
|
2432
|
-
id: string;
|
|
2433
2432
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
2434
2433
|
amount: {
|
|
2435
2434
|
amount: number;
|
|
2436
2435
|
precision: number;
|
|
2437
2436
|
};
|
|
2437
|
+
id: string;
|
|
2438
2438
|
}[]) => import("@feedmepos/ui-library").ValidationResult))[]>;
|
|
2439
2439
|
};
|
|
2440
2440
|
readonly: {
|
|
@@ -2457,12 +2457,12 @@ export declare const InventoryBindingForm: import("vue").DefineComponent<import(
|
|
|
2457
2457
|
precision: number;
|
|
2458
2458
|
};
|
|
2459
2459
|
} | null | undefined;
|
|
2460
|
-
id: string;
|
|
2461
2460
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
2462
2461
|
amount: {
|
|
2463
2462
|
amount: number;
|
|
2464
2463
|
precision: number;
|
|
2465
2464
|
};
|
|
2465
|
+
id: string;
|
|
2466
2466
|
}[]) => any) | undefined;
|
|
2467
2467
|
"onClick:pick-inventory-bindings"?: ((type: "RECIPE" | "SKU" | "SKU_GROUP") => any) | undefined;
|
|
2468
2468
|
}>, {
|
|
@@ -2476,12 +2476,12 @@ export declare const InventoryBindingForm: import("vue").DefineComponent<import(
|
|
|
2476
2476
|
precision: number;
|
|
2477
2477
|
};
|
|
2478
2478
|
} | null | undefined;
|
|
2479
|
-
id: string;
|
|
2480
2479
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
2481
2480
|
amount: {
|
|
2482
2481
|
amount: number;
|
|
2483
2482
|
precision: number;
|
|
2484
2483
|
};
|
|
2484
|
+
id: string;
|
|
2485
2485
|
}[];
|
|
2486
2486
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2487
2487
|
export declare const InventoryBindingSummary: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
package/dist/app.js
CHANGED
|
@@ -14,12 +14,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
14
14
|
precision: number;
|
|
15
15
|
};
|
|
16
16
|
} | null | undefined;
|
|
17
|
-
id: string;
|
|
18
17
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
19
18
|
amount: {
|
|
20
19
|
amount: number;
|
|
21
20
|
precision: number;
|
|
22
21
|
};
|
|
22
|
+
id: string;
|
|
23
23
|
}[]) => void;
|
|
24
24
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InventoryBindingProps>, {
|
|
25
25
|
modelValue: () => never[];
|
|
@@ -36,12 +36,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
36
36
|
precision: number;
|
|
37
37
|
};
|
|
38
38
|
} | null | undefined;
|
|
39
|
-
id: string;
|
|
40
39
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
41
40
|
amount: {
|
|
42
41
|
amount: number;
|
|
43
42
|
precision: number;
|
|
44
43
|
};
|
|
44
|
+
id: string;
|
|
45
45
|
}[]) => any) | undefined;
|
|
46
46
|
}>, {
|
|
47
47
|
skus: {
|
|
@@ -58,12 +58,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
58
58
|
precision: number;
|
|
59
59
|
};
|
|
60
60
|
} | null | undefined;
|
|
61
|
-
id: string;
|
|
62
61
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
63
62
|
amount: {
|
|
64
63
|
amount: number;
|
|
65
64
|
precision: number;
|
|
66
65
|
};
|
|
66
|
+
id: string;
|
|
67
67
|
}[] | null | undefined;
|
|
68
68
|
} | null | undefined;
|
|
69
69
|
valuation?: "FIFO" | "LIFO" | "FEFO" | "WAVG" | null | undefined;
|
|
@@ -89,9 +89,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
89
89
|
mid: number;
|
|
90
90
|
} | null | undefined;
|
|
91
91
|
customAttributes?: Record<string, any> | null | undefined;
|
|
92
|
-
_id: string;
|
|
93
|
-
name: string;
|
|
94
|
-
code: string;
|
|
95
92
|
unit: {
|
|
96
93
|
_id: string;
|
|
97
94
|
name: string;
|
|
@@ -107,6 +104,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
107
104
|
};
|
|
108
105
|
}[];
|
|
109
106
|
};
|
|
107
|
+
code: string;
|
|
108
|
+
_id: string;
|
|
109
|
+
name: string;
|
|
110
110
|
}[];
|
|
111
111
|
modelValue: {
|
|
112
112
|
measurement?: {
|
|
@@ -118,12 +118,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
118
118
|
precision: number;
|
|
119
119
|
};
|
|
120
120
|
} | null | undefined;
|
|
121
|
-
id: string;
|
|
122
121
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
123
122
|
amount: {
|
|
124
123
|
amount: number;
|
|
125
124
|
precision: number;
|
|
126
125
|
};
|
|
126
|
+
id: string;
|
|
127
127
|
}[];
|
|
128
128
|
recipes: {
|
|
129
129
|
customAttributes?: Record<string, any> | null | undefined;
|
|
@@ -139,12 +139,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
139
139
|
precision: number;
|
|
140
140
|
};
|
|
141
141
|
} | null | undefined;
|
|
142
|
-
id: string;
|
|
143
142
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
144
143
|
amount: {
|
|
145
144
|
amount: number;
|
|
146
145
|
precision: number;
|
|
147
146
|
};
|
|
147
|
+
id: string;
|
|
148
148
|
}[];
|
|
149
149
|
}[];
|
|
150
150
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -22,12 +22,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
22
22
|
precision: number;
|
|
23
23
|
};
|
|
24
24
|
} | null | undefined;
|
|
25
|
-
id: string;
|
|
26
25
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
27
26
|
amount: {
|
|
28
27
|
amount: number;
|
|
29
28
|
precision: number;
|
|
30
29
|
};
|
|
30
|
+
id: string;
|
|
31
31
|
}[]>;
|
|
32
32
|
required: true;
|
|
33
33
|
};
|
|
@@ -59,12 +59,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
59
59
|
precision: number;
|
|
60
60
|
};
|
|
61
61
|
} | null | undefined;
|
|
62
|
-
id: string;
|
|
63
62
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
64
63
|
amount: {
|
|
65
64
|
amount: number;
|
|
66
65
|
precision: number;
|
|
67
66
|
};
|
|
67
|
+
id: string;
|
|
68
68
|
}[]>;
|
|
69
69
|
required: true;
|
|
70
70
|
};
|
|
@@ -38,12 +38,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
38
38
|
precision: number;
|
|
39
39
|
};
|
|
40
40
|
} | null | undefined;
|
|
41
|
-
id: string;
|
|
42
41
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
43
42
|
amount: {
|
|
44
43
|
amount: number;
|
|
45
44
|
precision: number;
|
|
46
45
|
};
|
|
46
|
+
id: string;
|
|
47
47
|
}[] | null | undefined;
|
|
48
48
|
} | null | undefined;
|
|
49
49
|
valuation?: "FIFO" | "LIFO" | "FEFO" | "WAVG" | null | undefined;
|
|
@@ -69,9 +69,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
69
69
|
mid: number;
|
|
70
70
|
} | null | undefined;
|
|
71
71
|
customAttributes?: Record<string, any> | null | undefined;
|
|
72
|
-
_id: string;
|
|
73
|
-
name: string;
|
|
74
|
-
code: string;
|
|
75
72
|
unit: {
|
|
76
73
|
_id: string;
|
|
77
74
|
name: string;
|
|
@@ -87,6 +84,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
87
84
|
};
|
|
88
85
|
}[];
|
|
89
86
|
};
|
|
87
|
+
code: string;
|
|
88
|
+
_id: string;
|
|
89
|
+
name: string;
|
|
90
90
|
}[];
|
|
91
91
|
items: InventoryBinding[];
|
|
92
92
|
editable: boolean;
|
|
@@ -104,12 +104,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
104
104
|
precision: number;
|
|
105
105
|
};
|
|
106
106
|
} | null | undefined;
|
|
107
|
-
id: string;
|
|
108
107
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
109
108
|
amount: {
|
|
110
109
|
amount: number;
|
|
111
110
|
precision: number;
|
|
112
111
|
};
|
|
112
|
+
id: string;
|
|
113
113
|
}[];
|
|
114
114
|
}[];
|
|
115
115
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCoreStore as
|
|
1
|
+
import { Y as Re, a as H, L as Ie, ab as P, s as Ae, ac as pe, v as fe, u as z, j as M, w as Ne, aD as oe, x as ye, b as J, t as j, Q as K, aC as De, av as Oe, W as Fe, y as Pe, z as Me, e as ae, f as Z, R as se, J as Ue, aa as Be, D as W, i as D, h as Le } from "./app-BmsY87Mv.js";
|
|
2
|
+
import { useCoreStore as X, useI18n as ee } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialogChild as Qe, useSnackbar as he, useDialog as He, FmButtonVariant as ie, components as le } from "@feedmepos/ui-library";
|
|
4
4
|
import { defineStore as ve } from "pinia";
|
|
5
|
-
import { defineComponent as ge, resolveComponent as B, openBlock as T, createElementBlock as w, createElementVNode as $, normalizeClass as L, createTextVNode as qe, toDisplayString as I, unref as R, createCommentVNode as Q, createVNode as
|
|
5
|
+
import { defineComponent as ge, resolveComponent as B, openBlock as T, createElementBlock as w, createElementVNode as $, normalizeClass as L, createTextVNode as qe, toDisplayString as I, unref as R, createCommentVNode as Q, createVNode as O, withCtx as G, Fragment as U, renderList as V, ref as C, onMounted as Ve, computed as ce, watch as je, createSlots as ze, createBlock as q, h as Y } from "vue";
|
|
6
6
|
import { useRouter as Ke } from "vue-router";
|
|
7
|
-
import { u as te } from "./supplier-
|
|
7
|
+
import { u as te } from "./supplier-RX_yr24c.js";
|
|
8
8
|
const be = Re((e, t) => {
|
|
9
9
|
function s() {
|
|
10
10
|
var n;
|
|
11
|
-
return `business_${((n =
|
|
11
|
+
return `business_${((n = X().currentBusiness.value) == null ? void 0 : n._id) ?? ""}`;
|
|
12
12
|
}
|
|
13
13
|
return {
|
|
14
14
|
async getTemplate(l) {
|
|
@@ -95,9 +95,9 @@ function Te() {
|
|
|
95
95
|
}
|
|
96
96
|
];
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function We(e) {
|
|
99
99
|
var i;
|
|
100
|
-
const s =
|
|
100
|
+
const s = X().currentBusiness.value, o = (i = e.map((c) => {
|
|
101
101
|
var x;
|
|
102
102
|
const u = c.purchaseOrder.items.map((r) => Se(r)), h = Te(), p = [
|
|
103
103
|
["Template ID", c._id],
|
|
@@ -137,11 +137,11 @@ function Ye(e) {
|
|
|
137
137
|
sheets: {},
|
|
138
138
|
sheetOccurence: {}
|
|
139
139
|
}
|
|
140
|
-
)) == null ? void 0 : i.sheets, n = `${s == null ? void 0 : s.name} transfer templates (${
|
|
140
|
+
)) == null ? void 0 : i.sheets, n = `${s == null ? void 0 : s.name} transfer templates (${Ae(/* @__PURE__ */ new Date())}).xlsx`, y = pe(o);
|
|
141
141
|
return fe(y, n), n;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
const e =
|
|
143
|
+
function Ye() {
|
|
144
|
+
const e = X(), t = te(), s = z(), l = H(), o = e.currentBusiness.value, n = Se({
|
|
145
145
|
sku: {
|
|
146
146
|
unit: {
|
|
147
147
|
_id: "",
|
|
@@ -293,7 +293,7 @@ function Ge(e, t) {
|
|
|
293
293
|
errors: s
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Je(e) {
|
|
297
297
|
if (!e.length || `${e[0]}`.toLocaleLowerCase() === "all")
|
|
298
298
|
return [];
|
|
299
299
|
const t = /(.*) \(((warehouse_|restaurant_).{24,})\)/, l = z().locationByDbName;
|
|
@@ -338,7 +338,7 @@ function Ze(e) {
|
|
|
338
338
|
remark: `${p[1] ?? ""}`.trim()
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Xe(e) {
|
|
342
342
|
const [
|
|
343
343
|
t,
|
|
344
344
|
s,
|
|
@@ -372,9 +372,9 @@ function Je(e) {
|
|
|
372
372
|
);
|
|
373
373
|
return x.map((a, d) => {
|
|
374
374
|
const g = {};
|
|
375
|
-
for (const
|
|
376
|
-
const b = r[
|
|
377
|
-
Object.assign(g, { [b]: a[
|
|
375
|
+
for (const k in r) {
|
|
376
|
+
const b = r[k];
|
|
377
|
+
Object.assign(g, { [b]: a[k] });
|
|
378
378
|
}
|
|
379
379
|
return {
|
|
380
380
|
index: d,
|
|
@@ -391,7 +391,7 @@ function et(e, t, s) {
|
|
|
391
391
|
};
|
|
392
392
|
}
|
|
393
393
|
function tt(e, t, s) {
|
|
394
|
-
const l = H(), o =
|
|
394
|
+
const l = H(), o = J(), n = l.skuByCode[e.code], y = new Array();
|
|
395
395
|
if (!n)
|
|
396
396
|
return y.push(`Cannot find ingredient with code (${e.code}) ${e.name}.`), {
|
|
397
397
|
index: t,
|
|
@@ -431,13 +431,13 @@ function tt(e, t, s) {
|
|
|
431
431
|
K(i, c)
|
|
432
432
|
);
|
|
433
433
|
(Number.isNaN(Number(e.quantityStep)) || Number(e.quantityStep) <= 0) && y.push("Amount step must be more than 0");
|
|
434
|
-
const h =
|
|
434
|
+
const h = De(u), p = et(
|
|
435
435
|
e.minimumQuantity,
|
|
436
436
|
e.maximumQuantity,
|
|
437
437
|
K(i, c)
|
|
438
438
|
), m = p.min, v = p.max;
|
|
439
439
|
p.compareError && y.push(p.compareError);
|
|
440
|
-
const x =
|
|
440
|
+
const x = Oe(+e.minimumQuantity, +e.maximumQuantity), r = j(
|
|
441
441
|
e.defaultQuantity,
|
|
442
442
|
K(i, c)
|
|
443
443
|
), S = h(r);
|
|
@@ -463,16 +463,16 @@ function tt(e, t, s) {
|
|
|
463
463
|
function rt(e) {
|
|
464
464
|
const t = e.SheetNames.filter(
|
|
465
465
|
(n) => !Object.values(re).map(String).includes(n)
|
|
466
|
-
), l = $e().templates, o =
|
|
466
|
+
), l = $e().templates, o = Ne(l, "_id");
|
|
467
467
|
try {
|
|
468
468
|
return t.reduce(
|
|
469
469
|
(n, y) => {
|
|
470
470
|
var a;
|
|
471
471
|
const i = new Array(), c = e.Sheets[y], u = Ze(c), h = Ge(u.transferFrom, u.type);
|
|
472
472
|
i.push(...h.errors);
|
|
473
|
-
const p = h.from, m =
|
|
473
|
+
const p = h.from, m = Je(u.locations), v = m.filter((d) => d.location).map((d) => d.location);
|
|
474
474
|
i.push(...m.flatMap((d) => d.errors));
|
|
475
|
-
const x =
|
|
475
|
+
const x = Xe(c).filter((d) => d.data.code), r = x.map(
|
|
476
476
|
(d, g) => tt(d.data, g, x)
|
|
477
477
|
);
|
|
478
478
|
i.push(
|
|
@@ -484,7 +484,7 @@ function rt(e) {
|
|
|
484
484
|
if (u.id) {
|
|
485
485
|
const d = o[u.id];
|
|
486
486
|
if (!d) {
|
|
487
|
-
const
|
|
487
|
+
const k = {
|
|
488
488
|
_id: u.id,
|
|
489
489
|
_rev: "",
|
|
490
490
|
name: u.name || `(unnamed from sheet ${y || "<unnamed sheet>"})`,
|
|
@@ -492,8 +492,8 @@ function rt(e) {
|
|
|
492
492
|
};
|
|
493
493
|
return i.push(`Template ID ${u.id} is not found.`), n.importUpdateResult.push({
|
|
494
494
|
type: "update",
|
|
495
|
-
original:
|
|
496
|
-
template:
|
|
495
|
+
original: k,
|
|
496
|
+
template: k,
|
|
497
497
|
excelSheetName: y,
|
|
498
498
|
errors: i
|
|
499
499
|
}), n;
|
|
@@ -603,14 +603,14 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
|
|
|
603
603
|
t.type === "create" ? (T(), w("span", lt, "(new)")) : Q("", !0)
|
|
604
604
|
], 2),
|
|
605
605
|
t.errors.length ? (T(), w("div", ct, [
|
|
606
|
-
|
|
606
|
+
O(o, { "z-index": 50 }, {
|
|
607
607
|
content: G(() => [
|
|
608
608
|
$("ol", null, [
|
|
609
609
|
(T(!0), w(U, null, V(t.errors, (c, u) => (T(), w("li", { key: u }, I(c), 1))), 128))
|
|
610
610
|
])
|
|
611
611
|
]),
|
|
612
612
|
default: G(() => [
|
|
613
|
-
|
|
613
|
+
O(l, {
|
|
614
614
|
name: "error",
|
|
615
615
|
size: "sm",
|
|
616
616
|
color: "system-error-300"
|
|
@@ -648,7 +648,7 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
|
|
|
648
648
|
}, gt = { class: "fm-typo-en-body-lg-600" }, bt = /* @__PURE__ */ ge({
|
|
649
649
|
__name: "TransferTemplateImport",
|
|
650
650
|
setup(e) {
|
|
651
|
-
const t =
|
|
651
|
+
const t = C(null), s = Qe(), l = he(), o = C(!1), n = C(!1), y = te();
|
|
652
652
|
Ve(async () => {
|
|
653
653
|
n.value = !0;
|
|
654
654
|
try {
|
|
@@ -663,7 +663,7 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
|
|
|
663
663
|
n.value = !1;
|
|
664
664
|
}
|
|
665
665
|
});
|
|
666
|
-
const i =
|
|
666
|
+
const i = C(new Array()), c = C([]), u = C([]), h = ce(
|
|
667
667
|
() => !!i.value.length || c.value.some((x) => x.errors.length) || u.value.some((x) => x.errors.length)
|
|
668
668
|
), p = ce(
|
|
669
669
|
() => !!c.value.length || !!u.value.length
|
|
@@ -716,14 +716,14 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
|
|
|
716
716
|
r[2] || (r[2] = $("div", { class: "fm-typo-en-body-md-400" }, "Import transfer templates from excel sheets.", -1)),
|
|
717
717
|
n.value ? (T(), w("div", ut, [
|
|
718
718
|
$("div", null, [
|
|
719
|
-
|
|
719
|
+
O(S, {
|
|
720
720
|
size: "md",
|
|
721
721
|
color: "neutral-gray-200"
|
|
722
722
|
})
|
|
723
723
|
]),
|
|
724
724
|
r[1] || (r[1] = $("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "Loading...", -1))
|
|
725
725
|
])) : (T(), w(U, { key: 1 }, [
|
|
726
|
-
|
|
726
|
+
O(Pe, {
|
|
727
727
|
class: L({
|
|
728
728
|
"w-full": !0,
|
|
729
729
|
"h-[200px]": !t.value
|
|
@@ -769,7 +769,7 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
|
|
|
769
769
|
$("div", pt, I(t.value.name), 1)
|
|
770
770
|
], 2),
|
|
771
771
|
o.value ? Q("", !0) : (T(), w("div", ft, [
|
|
772
|
-
|
|
772
|
+
O(f, {
|
|
773
773
|
label: R(m)("inventory.ingredient.import.replaceFile"),
|
|
774
774
|
variant: h.value ? "destructive" : "secondary",
|
|
775
775
|
"prepend-icon": h.value ? void 0 : "autorenew",
|
|
@@ -782,7 +782,7 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
|
|
|
782
782
|
key: g,
|
|
783
783
|
class: "flex gap-8 items-center"
|
|
784
784
|
}, [
|
|
785
|
-
|
|
785
|
+
O(_, {
|
|
786
786
|
name: "error",
|
|
787
787
|
size: "sm",
|
|
788
788
|
color: "system-error-300"
|
|
@@ -823,7 +823,7 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
|
|
|
823
823
|
});
|
|
824
824
|
function xt(e) {
|
|
825
825
|
var n, y;
|
|
826
|
-
const t =
|
|
826
|
+
const t = J();
|
|
827
827
|
if (!t.isEnabled) return !0;
|
|
828
828
|
if (!e.internal) {
|
|
829
829
|
const i = t.getNetSuiteVendor(e._id), c = i == null ? void 0 : i.subsidiaryId, u = (n = t.currentVendorSubsidiary(e._id)) == null ? void 0 : n.id;
|
|
@@ -833,7 +833,7 @@ function xt(e) {
|
|
|
833
833
|
return l && l == o;
|
|
834
834
|
}
|
|
835
835
|
const St = ve("transferTemplateActions", () => {
|
|
836
|
-
const e = He(), t = he(), s = z(), l = $e(), o = be(), n =
|
|
836
|
+
const e = He(), t = he(), s = z(), l = $e(), o = be(), n = J(), y = Ke(), { t: i } = ee(), c = C({});
|
|
837
837
|
function u() {
|
|
838
838
|
c.value = {
|
|
839
839
|
mode: ae.CREATE,
|
|
@@ -876,7 +876,7 @@ const St = ve("transferTemplateActions", () => {
|
|
|
876
876
|
a.value = !0;
|
|
877
877
|
const [g] = await Promise.allSettled([
|
|
878
878
|
o.deleteTemplate(f),
|
|
879
|
-
new Promise((
|
|
879
|
+
new Promise((k) => setTimeout(k, 1e3))
|
|
880
880
|
]);
|
|
881
881
|
if (g.status === "rejected") throw g.reason;
|
|
882
882
|
t.open({
|
|
@@ -894,7 +894,7 @@ const St = ve("transferTemplateActions", () => {
|
|
|
894
894
|
}
|
|
895
895
|
});
|
|
896
896
|
}
|
|
897
|
-
const m =
|
|
897
|
+
const m = C({});
|
|
898
898
|
function v(f) {
|
|
899
899
|
m.value = {
|
|
900
900
|
template: f,
|
|
@@ -911,8 +911,8 @@ const St = ve("transferTemplateActions", () => {
|
|
|
911
911
|
const { promise: f, resolve: a } = Promise.withResolvers(), d = (b) => {
|
|
912
912
|
a(b);
|
|
913
913
|
}, g = l.templates.filter((b) => {
|
|
914
|
-
var
|
|
915
|
-
return ((
|
|
914
|
+
var A, N;
|
|
915
|
+
return ((A = b.purchaseOrder.supplier) == null ? void 0 : A._id) === s.currentLocation.doc._id ? !1 : (N = b.locations) != null && N.length ? b.locations.find((F) => F.doc._id === s.currentLocation.doc._id) : !0;
|
|
916
916
|
});
|
|
917
917
|
if (!g.length)
|
|
918
918
|
return e.open({
|
|
@@ -929,24 +929,24 @@ const St = ve("transferTemplateActions", () => {
|
|
|
929
929
|
}).onPrimary(() => {
|
|
930
930
|
y.push({ name: se.TRANSFER_TEMPLATE }), d(void 0);
|
|
931
931
|
}).onSecondary(() => d(void 0)).onClose(() => d(void 0)), f;
|
|
932
|
-
const
|
|
932
|
+
const k = g.map((b) => {
|
|
933
933
|
var ne;
|
|
934
|
-
const
|
|
934
|
+
const A = !b.purchaseOrder.items.length || b.purchaseOrder.items.some(xe), N = !xt(b.purchaseOrder.supplier), F = b.purchaseOrder.supplier.internal ? n.getNetSuiteLocation(
|
|
935
935
|
`${b.purchaseOrder.supplier.internal}_${b.purchaseOrder.supplier._id}`
|
|
936
|
-
) : n.getNetSuiteVendor(b.purchaseOrder.supplier._id), we =
|
|
937
|
-
location is ${(ne = n.getLocationSubsidiary(F == null ? void 0 : F.netSuiteId)) == null ? void 0 : ne.fullName}.` : void 0,
|
|
936
|
+
) : n.getNetSuiteVendor(b.purchaseOrder.supplier._id), we = N ? `The subsidiary of the request
|
|
937
|
+
location is ${(ne = n.getLocationSubsidiary(F == null ? void 0 : F.netSuiteId)) == null ? void 0 : ne.fullName}.` : void 0, ke = A || N, Ce = A ? "This template is invalid. Update this template." : N ? we : void 0, Ee = `${b.purchaseOrder.supplier.internal ? "Transfer" : "Purchase"} from ${b.purchaseOrder.supplier.name}`;
|
|
938
938
|
return {
|
|
939
939
|
label: b.name,
|
|
940
940
|
value: b._id,
|
|
941
|
-
disabled:
|
|
942
|
-
sublabel:
|
|
941
|
+
disabled: ke,
|
|
942
|
+
sublabel: Ce ?? Ee
|
|
943
943
|
};
|
|
944
944
|
});
|
|
945
|
-
return
|
|
945
|
+
return k.sort((b, A) => +!!b.disabled - +!!A.disabled), e.open({
|
|
946
946
|
title: "Select one template",
|
|
947
947
|
contentComponent: Ue,
|
|
948
948
|
contentComponentProps: {
|
|
949
|
-
items:
|
|
949
|
+
items: k,
|
|
950
950
|
singleSelect: !0
|
|
951
951
|
},
|
|
952
952
|
primaryActions: {
|
|
@@ -1009,7 +1009,7 @@ const St = ve("transferTemplateActions", () => {
|
|
|
1009
1009
|
return;
|
|
1010
1010
|
}
|
|
1011
1011
|
e.close(), S(f);
|
|
1012
|
-
}).onTertiary(
|
|
1012
|
+
}).onTertiary(Ye);
|
|
1013
1013
|
}
|
|
1014
1014
|
async function S(f) {
|
|
1015
1015
|
try {
|
|
@@ -1022,7 +1022,7 @@ const St = ve("transferTemplateActions", () => {
|
|
|
1022
1022
|
)
|
|
1023
1023
|
], d = 100;
|
|
1024
1024
|
let g = 0;
|
|
1025
|
-
const
|
|
1025
|
+
const k = () => {
|
|
1026
1026
|
g += d, t.open({
|
|
1027
1027
|
title: i("inventory.ingredient.import.progress", [
|
|
1028
1028
|
Math.min(g, a.length),
|
|
@@ -1031,7 +1031,7 @@ const St = ve("transferTemplateActions", () => {
|
|
|
1031
1031
|
});
|
|
1032
1032
|
};
|
|
1033
1033
|
for (const b of a.chunk(100))
|
|
1034
|
-
|
|
1034
|
+
k(), await o.importTemplates(b);
|
|
1035
1035
|
t.open({
|
|
1036
1036
|
title: i("inventory.ingredient.import.success"),
|
|
1037
1037
|
type: "success"
|
|
@@ -1047,7 +1047,7 @@ const St = ve("transferTemplateActions", () => {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
1049
1049
|
function _() {
|
|
1050
|
-
const f =
|
|
1050
|
+
const f = We(l.templates);
|
|
1051
1051
|
t.open({
|
|
1052
1052
|
title: i("inventory.ingredient.export.success"),
|
|
1053
1053
|
message: i("inventory.ingredient.export.filename", [f]),
|
|
@@ -1073,7 +1073,7 @@ function de(e) {
|
|
|
1073
1073
|
const $e = ve(
|
|
1074
1074
|
"transferTemplateTable",
|
|
1075
1075
|
function() {
|
|
1076
|
-
const { t } = ee(), s = St(), l =
|
|
1076
|
+
const { t } = ee(), s = St(), l = C(!1), o = C(new Array()), n = be(), y = H();
|
|
1077
1077
|
async function i() {
|
|
1078
1078
|
o.value = [], l.value = !0;
|
|
1079
1079
|
try {
|
|
@@ -1104,11 +1104,11 @@ const $e = ve(
|
|
|
1104
1104
|
}
|
|
1105
1105
|
function u(p, m) {
|
|
1106
1106
|
switch (m = Z(m), p) {
|
|
1107
|
-
case
|
|
1107
|
+
case D.Details:
|
|
1108
1108
|
return s.viewTemplate(m);
|
|
1109
|
-
case
|
|
1109
|
+
case D.Edit:
|
|
1110
1110
|
return s.updateTemplate(m);
|
|
1111
|
-
case
|
|
1111
|
+
case D.Delete:
|
|
1112
1112
|
return s.deleteTemplate(m, l, i);
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
@@ -1141,8 +1141,8 @@ const $e = ve(
|
|
|
1141
1141
|
},
|
|
1142
1142
|
cell(p) {
|
|
1143
1143
|
const m = Number(p.getValue()) || 0, v = p.row.original.purchaseOrder.items.some(xe);
|
|
1144
|
-
return m === 0 || v ?
|
|
1145
|
-
|
|
1144
|
+
return m === 0 || v ? Y("div", { class: "flex justify-end gap-4 items-center" }, [
|
|
1145
|
+
Y(
|
|
1146
1146
|
le.FmTooltip,
|
|
1147
1147
|
{},
|
|
1148
1148
|
{
|
|
@@ -1150,7 +1150,7 @@ const $e = ve(
|
|
|
1150
1150
|
return v ? "The template is invalid due to invalid unit on some of the items. Please update this template." : "The template is invalid due to deleted ingredients. Please update this template.";
|
|
1151
1151
|
},
|
|
1152
1152
|
default() {
|
|
1153
|
-
return
|
|
1153
|
+
return Y(le.FmIcon, {
|
|
1154
1154
|
name: "error",
|
|
1155
1155
|
color: "system-error-300",
|
|
1156
1156
|
size: "sm"
|
|
@@ -1188,9 +1188,9 @@ const $e = ve(
|
|
|
1188
1188
|
id: "action",
|
|
1189
1189
|
cell(p) {
|
|
1190
1190
|
const m = p.row.original, v = [
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1191
|
+
W[D.Details],
|
|
1192
|
+
W[D.Edit],
|
|
1193
|
+
W[D.Delete]
|
|
1194
1194
|
];
|
|
1195
1195
|
return Le(v, (x) => u(x, m));
|
|
1196
1196
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aO as L,
|
|
1
|
+
import { aO as L, aU as U, aV as q, aW as Fe, aX as tl, aY as ar, aZ as Nt } from "./app-BmsY87Mv.js";
|
|
2
2
|
function rl(t, e) {
|
|
3
3
|
for (var r = 0; r < e.length; r++) {
|
|
4
4
|
const n = e[r];
|