@feedmepos/mf-inventory-portal 1.3.7-dev.1 → 1.3.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-CJwfIjMX.js → App-D1-fT3jF.js} +3 -3
- package/dist/ApprovalView-0FbsslVD.js +226 -0
- package/dist/{BindingsDialog-DCrRYbJJ.js → BindingsDialog-DeavyPY-.js} +5 -5
- package/dist/{BindingsPicker-B6gakVEN.js → BindingsPicker-BGzhKq8G.js} +3 -3
- package/dist/{BindingsTable-IVHY6t4x.js → BindingsTable-Dr9hWkE1.js} +5 -5
- package/dist/{ClosingDraftView-D1CJtcPl.js → ClosingDraftView-6gwWEWWB.js} +57 -57
- package/dist/{ClosingHistoryView-DMGhfS9R.js → ClosingHistoryView-D4rNnlsq.js} +4 -4
- package/dist/{ClosingTemplateView-Djo0juNV.js → ClosingTemplateView-DxCLH1GH.js} +16 -16
- package/dist/{DeliveryOrderPrintPreview-yIr0KaZ-.js → DeliveryOrderPrintPreview-D-XeZX-z.js} +17 -17
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CboUeuGd.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DeoaPLQm.js} +14 -14
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang--Kdh7Lws.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BMhSHZ3Z.js} +2 -2
- package/dist/{FmMultiselectDialog-Dfd2CP8Q.js → FmMultiselectDialog-BQZmTWDb.js} +2 -2
- package/dist/{FmMultiselectDialog-CmT3UKF6.js → FmMultiselectDialog-DJFi54mG.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C0nfecTl.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DAivpdPp.js} +4 -4
- package/dist/{ImportView-M6gfAQRh.js → ImportView-DPQY0ELT.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Cl1U0OoC.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DeVYXEzb.js} +1 -1
- package/dist/{IngredientGroupView-C29gfI37.js → IngredientGroupView-5AuPbMDz.js} +7 -7
- package/dist/{IngredientsView-DnM7eqv0.js → IngredientsView-qMotWYnL.js} +17 -17
- package/dist/{IntegrationView-CxXZ90Dg.js → IntegrationView-CVdwhNTA.js} +13 -13
- package/dist/{InventoryBindingForm-FImVaTic.js → InventoryBindingForm-B5KUYKIu.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bay13kwv.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-pbyMU879.js} +5 -5
- package/dist/{InventoryBindingSummary-DwHKeLyV.js → InventoryBindingSummary-Bm3A2kmC.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-cViXSxPS.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-NnoVkA8W.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CCF4_Pyr.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Dp4gFbs5.js} +1 -1
- package/dist/PublishView-DOIiAeDK.js +208 -0
- package/dist/{PurchaseOrderPrintPreview-CJSISF6B.js → PurchaseOrderPrintPreview-BE-8EJFv.js} +12 -12
- package/dist/ReceiveRequestView-ur3OeHuv.js +2802 -0
- package/dist/{RecipeView-HugMCN1V.js → RecipeView-CM-BrVSe.js} +21 -22
- package/dist/{StockView-B3hLSoWp.js → StockView-DDqlms0m.js} +20 -21
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CuFB8tHC.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CcQ6bBWG.js} +1 -1
- package/dist/{SupplierView-DK9liRuA.js → SupplierView-CM2PrtHi.js} +14 -14
- package/dist/{SurchargeView-Cnz3QPAF.js → SurchargeView-q2NfASMH.js} +8 -8
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-BsesD9UR.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-BbZQZQTQ.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DHvOhMtd.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bp3joqMK.js} +67 -60
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-GhRFdMoW.js +3521 -0
- package/dist/{TransferTemplateView-hUBkM1Y0.js → TransferTemplateView-B26H_T9Q.js} +19 -20
- package/dist/{UnitCostHistoryView-gHpyp4-l.js → UnitCostHistoryView-BzumRVdx.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DOC0W_-a.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CfWpv2Mv.js} +4 -4
- package/dist/{UnitView-Bt4EY0DU.js → UnitView-Cxfg--TU.js} +9 -9
- package/dist/{WarehouseView-C7Aa5MQz.js → WarehouseView-CvoafTrd.js} +7 -7
- package/dist/{WastageTemplateView-B59wFpmS.js → WastageTemplateView-Bqd4Wp3d.js} +16 -16
- package/dist/{app-Bd2n830Y.js → app-CrrDFeMj.js} +3181 -3267
- package/dist/app.d.ts +0 -32
- package/dist/app.js +2 -2
- package/dist/{closing-template-CbIMkUm-.js → closing-template-Ew74NLQj.js} +1 -1
- package/dist/{component-kqxARxvM.js → component-DpCUABT3.js} +21 -30
- package/dist/components/row-action.enum.d.ts +0 -3
- package/dist/{date2-CH3V-Ucj.js → date2-Bklbk2g-.js} +1 -1
- package/dist/{dayjs.min-0pcsGWEW.js → dayjs.min-B463GIlc.js} +1 -1
- package/dist/{decimal-DqMF4lgE.js → decimal-Dm2vbfDq.js} +2 -2
- package/dist/defineDeepModel-SD5OUepJ.js +19 -0
- package/dist/{duplicate-template-VcCheWzy.js → duplicate-template-CR79OmLy.js} +1 -1
- package/dist/{export-DAK4eXwZ.js → export-CQJcxfPC.js} +1 -1
- package/dist/{inventory-core-dart.default-BVmmW4IN.js → feature-CZHvliez.js} +1395 -322
- package/dist/{format-time-from-id-C1atPaNT.js → format-time-from-id-61ydd8RS.js} +1 -1
- package/dist/{format-unit-display-B4zjXa1i.js → format-unit-display-BLtW28yU.js} +13 -13
- package/dist/{import-export.helper-DWUpF27a.js → import-export.helper-uhFwjH6X.js} +6 -6
- package/dist/{index-Co-3wUpY.js → index-CouegIcG.js} +1 -1
- package/dist/{index-DoyDKyP_.js → index-Dx5HvWR_.js} +1 -1
- package/dist/{index-BFpquHWG.js → index-uA6bkf1x.js} +3 -3
- package/dist/{lodash-BsMM-AaB.js → lodash-CjyamSgJ.js} +1 -1
- package/dist/{lz-string-BfBty02S.js → lz-string-BbZdMrTL.js} +1 -1
- package/dist/{netsuite-B86m9YM_.js → netsuite-2v3F8ILe.js} +3 -3
- package/dist/{number-Bu93lKcU.js → number-BYbxsJHr.js} +3 -3
- package/dist/{purchase-order-template-DDmIZDfJ.js → purchase-order-template-s1AiueV_.js} +1 -1
- package/dist/router/name.d.ts +0 -1
- package/dist/{row-action.enum-Co_O4qD9.js → row-action.enum-BcW_L_nE.js} +3 -11
- package/dist/{rules-BXeKMOa6.js → rules-C7L-LFOd.js} +2 -2
- package/dist/{stock-BkjUFSH-.js → stock-CvYOcgWb.js} +3 -3
- package/dist/{stock-D6A9nUUq.js → stock-D2s88pz1.js} +1 -1
- package/dist/stores/feature.d.ts +0 -2
- package/dist/style.css +1 -1
- package/dist/{supplier-BEFK8KT8.js → supplier-DmobM7mD.js} +2 -2
- package/dist/{surcharge-BKuJQ1bw.js → surcharge-BdZOVfi0.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CtkHGZVI.js → use-ingredient-select-dialog-BUCJBHjV.js} +2 -2
- package/dist/{use-inventory-binding-dialog-Df4UAdJI.js → use-inventory-binding-dialog-DiN1hBIm.js} +2 -2
- package/dist/{use-template-enabled-locations-2-CNT1brYI.js → use-template-enabled-locations-CmH6I2cy.js} +33 -21
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +0 -4
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +7 -93
- package/dist/vue-i18n-D0Q6LFcu.js +2365 -0
- package/dist/{xlsx-Dig-xBj4.js → xlsx-D4PML26z.js} +398 -398
- package/dist/{xlsx.util-R4tPgyBp.js → xlsx.util-BWLcCmO_.js} +1 -1
- package/package.json +4 -7
- package/dist/ApprovalView-DOq2oFvo.js +0 -241
- package/dist/PublishView-D8aVGgPP.js +0 -234
- package/dist/ReceiveRequestView-DeOwJD3K.js +0 -2817
- package/dist/SettingsView-BqNC4kXc.js +0 -695
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-xg5Ac0I2.js +0 -3790
- package/dist/defineDeepModel-nM-22Ofl.js +0 -19
- package/dist/feature-D9W_Z06D.js +0 -1081
- package/dist/modules/print-template/api/print-template.d.ts +0 -29
- package/dist/modules/print-template/components/BlockConfigPanel.vue.d.ts +0 -19
- package/dist/modules/print-template/components/CustomPrintTemplatePreview.vue.d.ts +0 -25
- package/dist/modules/print-template/components/PrintTemplateEditorDialog.vue.d.ts +0 -45
- package/dist/modules/print-template/components/TemplatePreview.vue.d.ts +0 -22
- package/dist/modules/print-template/composables/print-po-with-template.d.ts +0 -25
- package/dist/modules/print-template/definitions/block-definitions.d.ts +0 -88
- package/dist/modules/print-template/definitions/predefined-templates.d.ts +0 -22
- package/dist/modules/print-template/definitions/template-renderer.d.ts +0 -17
- package/dist/modules/print-template/index.d.ts +0 -11
- package/dist/modules/print-template/store/print-template.d.ts +0 -170
- package/dist/modules/print-template/types/print-data.d.ts +0 -52
- package/dist/modules/print-template/utils/sanitize-html.d.ts +0 -32
- package/dist/predefined-templates-swTNxWXc.js +0 -4542
- package/dist/views/settings/SettingsView.vue.d.ts +0 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +0 -13
- package/dist/vue-i18n-BaovYGY4.js +0 -2365
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-inventory-portal",
|
|
3
|
-
"version": "1.3.7
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@feedmepos/feature-flag": "^0.0.15",
|
|
20
20
|
"@feedmepos/menu": "1.5.22",
|
|
21
21
|
"@feedmepos/mf-common": "^1.29.11",
|
|
22
|
-
"@feedmepos/ui-library": "1.8.
|
|
22
|
+
"@feedmepos/ui-library": "1.8.3",
|
|
23
23
|
"@tanstack/vue-table": "^8.17.3",
|
|
24
24
|
"@types/dinero.js": "^1.9.4",
|
|
25
25
|
"@typescript-eslint/typescript-estree": "^8.21.0",
|
|
@@ -30,12 +30,10 @@
|
|
|
30
30
|
"dayjs": "^1.11.11",
|
|
31
31
|
"debounce": "^2.0.0",
|
|
32
32
|
"dinero.js": "^1.9.1",
|
|
33
|
-
"dompurify": "^3.3.1",
|
|
34
33
|
"dotenv": "^16.4.5",
|
|
35
34
|
"fuzzy": "^0.1.3",
|
|
36
35
|
"fuzzy-search": "^3.2.1",
|
|
37
36
|
"google-maps": "^4.3.3",
|
|
38
|
-
"handlebars": "^4.7.8",
|
|
39
37
|
"libphonenumber-js": "^1.11.18",
|
|
40
38
|
"lodash": "^4.17.20",
|
|
41
39
|
"lz-string": "^1.5.0",
|
|
@@ -49,16 +47,15 @@
|
|
|
49
47
|
"@feedmepos/inventory-core": "^1.0.1-dev.2",
|
|
50
48
|
"@feedmepos/inventory-core-2": "^2.0.0",
|
|
51
49
|
"@feedmepos/inventory-core-dart": "^1.0.0",
|
|
50
|
+
"@feedmepos/zod-inventory": "^2.0.0",
|
|
52
51
|
"@feedmepos/inventory-core-js": "^1.0.1",
|
|
53
|
-
"@feedmepos/netsuite-core": "^1.0.0"
|
|
54
|
-
"@feedmepos/zod-inventory": "^2.0.0"
|
|
52
|
+
"@feedmepos/netsuite-core": "^1.0.0"
|
|
55
53
|
},
|
|
56
54
|
"devDependencies": {
|
|
57
55
|
"@rushstack/eslint-patch": "^1.10.3",
|
|
58
56
|
"@testing-library/vue": "^8.1.0",
|
|
59
57
|
"@tsconfig/node18": "^18.2.4",
|
|
60
58
|
"@types/debounce": "^1.2.4",
|
|
61
|
-
"@types/dompurify": "^3.2.0",
|
|
62
59
|
"@types/fuzzy-search": "^2.1.5",
|
|
63
60
|
"@types/lodash": "^4.17.16",
|
|
64
61
|
"@types/node": "^18.19.33",
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ce, ref as y, watch as de, computed as c, resolveComponent as fe, openBlock as x, createBlock as Z, unref as a, withCtx as T, createElementVNode as p, normalizeClass as ve, createVNode as u, normalizeStyle as he, toDisplayString as _e, createElementBlock as De, createCommentVNode as ge, Teleport as ye, mergeProps as be, isRef as Re } from "vue";
|
|
2
|
-
import { u as Oe, m as b } from "./app-Bd2n830Y.js";
|
|
3
|
-
import { a as Se, _ as Pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang--Kdh7Lws.js";
|
|
4
|
-
import { a as xe, P as w, b as Te, _ as we, c as ke } from "./TransferDetails.vue_vue_type_script_setup_true_lang-xg5Ac0I2.js";
|
|
5
|
-
import { d as I } from "./date2-CH3V-Ucj.js";
|
|
6
|
-
import { u as qe, _ as Ce } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CkPuJQWF.js";
|
|
7
|
-
import { _ as Ne, F as R } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
|
|
8
|
-
import { useBreakpoints as Ve } from "@feedmepos/ui-library";
|
|
9
|
-
import { useI18n as Ae } from "@feedmepos/mf-common";
|
|
10
|
-
import { P as Me, J as Fe } from "./app-DiX-EfV6.js";
|
|
11
|
-
import { u as Le } from "./netsuite-B86m9YM_.js";
|
|
12
|
-
import { f as $e } from "./predefined-templates-swTNxWXc.js";
|
|
13
|
-
import "./inventory-core-dart.default-BVmmW4IN.js";
|
|
14
|
-
const ze = { class: "flex flex-col py-8" }, Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ue = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, He = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
17
|
-
}, je = { class: "pt-8" }, ot = /* @__PURE__ */ ce({
|
|
18
|
-
__name: "ApprovalView",
|
|
19
|
-
setup(Je) {
|
|
20
|
-
const s = xe(w.APPROVAL), {
|
|
21
|
-
columnDefs: B,
|
|
22
|
-
showCustomPrintDialog: O,
|
|
23
|
-
customPrintHtml: ee,
|
|
24
|
-
customPrintTemplateName: te,
|
|
25
|
-
customPrintIsDefault: ae
|
|
26
|
-
} = Te(w.APPROVAL, s, s.shipments), re = Oe(), se = Le();
|
|
27
|
-
$e().fetchTemplates(), b.object({
|
|
28
|
-
name: b.string().optional().nullable(),
|
|
29
|
-
start: b.date().optional().nullable(),
|
|
30
|
-
end: b.date().optional().nullable()
|
|
31
|
-
});
|
|
32
|
-
const k = y({
|
|
33
|
-
name: "",
|
|
34
|
-
...Se()
|
|
35
|
-
}), l = y({
|
|
36
|
-
startDate: I(k.value.start ?? /* @__PURE__ */ new Date()),
|
|
37
|
-
endDate: I(k.value.end ?? /* @__PURE__ */ new Date())
|
|
38
|
-
});
|
|
39
|
-
de([() => l.value.startDate], () => {
|
|
40
|
-
if (!l.value.startDate)
|
|
41
|
-
return;
|
|
42
|
-
if (!l.value.endDate) {
|
|
43
|
-
l.value.endDate = l.value.startDate;
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const i = new Date(l.value.startDate);
|
|
47
|
-
if (new Date(l.value.endDate).getTime() < i.getTime()) {
|
|
48
|
-
l.value.endDate = l.value.startDate;
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
s.updateDateRange(l.value.startDate, l.value.endDate);
|
|
52
|
-
});
|
|
53
|
-
const S = y(""), { breakpoints: q } = Ve(), P = c(() => q.value.xs || q.value.sm), ne = c(() => P.value ? 10 : 20), oe = qe(), { t: C } = Ae(), le = c(() => [
|
|
54
|
-
{
|
|
55
|
-
label: C("inventory.common.refresh"),
|
|
56
|
-
value: "refresh"
|
|
57
|
-
}
|
|
58
|
-
]);
|
|
59
|
-
function ue(i) {
|
|
60
|
-
switch (i) {
|
|
61
|
-
case "refresh":
|
|
62
|
-
return s.fetchData();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const ie = c(() => {
|
|
66
|
-
const i = [
|
|
67
|
-
{
|
|
68
|
-
type: "string",
|
|
69
|
-
key: "status",
|
|
70
|
-
entity: "purchaseOrderRequest",
|
|
71
|
-
values: Array.from(
|
|
72
|
-
new Set(
|
|
73
|
-
s.purchaseRequests.value.map((e) => {
|
|
74
|
-
var n;
|
|
75
|
-
return ((n = e.purchaseOrder) == null ? void 0 : n.status) ?? "";
|
|
76
|
-
}).filter((e) => e !== "")
|
|
77
|
-
)
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
], r = [
|
|
81
|
-
{
|
|
82
|
-
type: "string",
|
|
83
|
-
key: "netsuiteTransactionNumber",
|
|
84
|
-
entity: "purchaseOrderRequest",
|
|
85
|
-
values: s.purchaseRequests.value.map((e) => {
|
|
86
|
-
var n, t;
|
|
87
|
-
return (t = (n = e.netSuite) == null ? void 0 : n.additionalInfo) == null ? void 0 : t.transactionnumber;
|
|
88
|
-
}).filter((e) => e != null)
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
type: "string",
|
|
92
|
-
key: "netsuiteOrderNo",
|
|
93
|
-
entity: "purchaseOrderRequest",
|
|
94
|
-
values: s.purchaseRequests.value.map((e) => {
|
|
95
|
-
var n;
|
|
96
|
-
return (n = e.netSuite) == null ? void 0 : n.refNo;
|
|
97
|
-
}).filter((e) => e != null)
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
type: "string",
|
|
101
|
-
key: "netsuiteOrderId",
|
|
102
|
-
entity: "purchaseOrderRequest",
|
|
103
|
-
values: s.purchaseRequests.value.map((e) => {
|
|
104
|
-
var n;
|
|
105
|
-
return (n = e.netSuite) == null ? void 0 : n.id;
|
|
106
|
-
}).filter((e) => e != null)
|
|
107
|
-
}
|
|
108
|
-
];
|
|
109
|
-
return [...i, ...se.isEnabled ? r : []];
|
|
110
|
-
}), d = y(null), pe = c(() => {
|
|
111
|
-
if (!d.value)
|
|
112
|
-
return s.purchaseRequests.value;
|
|
113
|
-
const i = Me.build(d.value);
|
|
114
|
-
return s.purchaseRequests.value.filter((r) => {
|
|
115
|
-
var e, n, t, o, m;
|
|
116
|
-
return Fe(
|
|
117
|
-
{
|
|
118
|
-
netsuiteTransactionNumber: (n = (e = r.netSuite) == null ? void 0 : e.additionalInfo) == null ? void 0 : n.transactionnumber,
|
|
119
|
-
netsuiteOrderNo: (t = r.netSuite) == null ? void 0 : t.refNo,
|
|
120
|
-
netsuiteOrderId: (o = r.netSuite) == null ? void 0 : o.id,
|
|
121
|
-
status: (m = r.purchaseOrder) == null ? void 0 : m.status
|
|
122
|
-
},
|
|
123
|
-
i
|
|
124
|
-
);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
return (i, r) => {
|
|
128
|
-
const e = fe("FmTable");
|
|
129
|
-
return x(), Z(Ce, {
|
|
130
|
-
title: a(C)("inventory.transfer.approval.title"),
|
|
131
|
-
actions: le.value,
|
|
132
|
-
"onClick:action": ue
|
|
133
|
-
}, {
|
|
134
|
-
default: T(() => {
|
|
135
|
-
var n;
|
|
136
|
-
return [
|
|
137
|
-
p("div", {
|
|
138
|
-
class: ve([
|
|
139
|
-
"flex flex-col gap-8 max-h-full",
|
|
140
|
-
{
|
|
141
|
-
"p-0": P.value,
|
|
142
|
-
"px-24 ": !P.value
|
|
143
|
-
}
|
|
144
|
-
])
|
|
145
|
-
}, [
|
|
146
|
-
u(Pe, {
|
|
147
|
-
"date-range-query": "",
|
|
148
|
-
"date-range": l.value,
|
|
149
|
-
"onUpdate:dateRange": r[0] || (r[0] = (t) => l.value = t),
|
|
150
|
-
searchable: "",
|
|
151
|
-
"change-location": "",
|
|
152
|
-
search: S.value,
|
|
153
|
-
"onUpdate:search": r[1] || (r[1] = (t) => S.value = t),
|
|
154
|
-
filterable: "",
|
|
155
|
-
"filter-attributes": ie.value,
|
|
156
|
-
filter: d.value,
|
|
157
|
-
"onUpdate:filter": r[2] || (r[2] = (t) => d.value = t)
|
|
158
|
-
}, null, 8, ["date-range", "search", "filter-attributes", "filter"]),
|
|
159
|
-
u(e, {
|
|
160
|
-
style: he(a(oe).tableHeight),
|
|
161
|
-
"column-defs": a(B),
|
|
162
|
-
"row-data": pe.value,
|
|
163
|
-
"search-value": S.value,
|
|
164
|
-
loading: !a(re)._currentLocation || a(s).loading.value,
|
|
165
|
-
onRowClick: r[3] || (r[3] = (t) => a(s).promptShowTransferDetails(
|
|
166
|
-
t.original.purchaseOrder,
|
|
167
|
-
t.original
|
|
168
|
-
)),
|
|
169
|
-
"page-size": ne.value
|
|
170
|
-
}, {
|
|
171
|
-
"list-row": T((t) => [
|
|
172
|
-
u(Ne, {
|
|
173
|
-
row: t,
|
|
174
|
-
onRowClick: (o) => a(s).promptShowTransferDetails(o.purchaseOrder, o)
|
|
175
|
-
}, {
|
|
176
|
-
default: T((o) => {
|
|
177
|
-
var m, N, V, f, A, M, F, L, v, $, z, h, E, _, U, Y, H, j, J, D, G, K, Q, W, g, X;
|
|
178
|
-
return [
|
|
179
|
-
p("div", ze, [
|
|
180
|
-
p("div", Ee, [
|
|
181
|
-
u(a(R), {
|
|
182
|
-
render: (V = (N = (m = o.purchaseOrder__id) == null ? void 0 : m.column) == null ? void 0 : N.columnDef) == null ? void 0 : V.cell,
|
|
183
|
-
props: (A = (f = o.purchaseOrder__id) == null ? void 0 : f.getContext) == null ? void 0 : A.call(f)
|
|
184
|
-
}, null, 8, ["render", "props"])
|
|
185
|
-
]),
|
|
186
|
-
p("div", Ue, [
|
|
187
|
-
u(a(R), {
|
|
188
|
-
render: (L = (F = (M = o.to_name) == null ? void 0 : M.column) == null ? void 0 : F.columnDef) == null ? void 0 : L.cell,
|
|
189
|
-
props: ($ = (v = o.to_name) == null ? void 0 : v.getContext) == null ? void 0 : $.call(v)
|
|
190
|
-
}, null, 8, ["render", "props"])
|
|
191
|
-
]),
|
|
192
|
-
p("div", Ye, _e((U = (_ = (E = (h = (z = t.original.purchaseOrder) == null ? void 0 : z.items) == null ? void 0 : h.map) == null ? void 0 : E.call(h, (me) => `${me.name}`)) == null ? void 0 : _.join) == null ? void 0 : U.call(_, ", ")), 1),
|
|
193
|
-
(Y = t.original.purchaseOrder) != null && Y.ref ? (x(), De("div", He, [
|
|
194
|
-
u(a(R), {
|
|
195
|
-
render: (J = (j = (H = o.purchaseOrder_ref) == null ? void 0 : H.column) == null ? void 0 : j.columnDef) == null ? void 0 : J.cell,
|
|
196
|
-
props: (G = (D = o.purchaseOrder_ref) == null ? void 0 : D.getContext) == null ? void 0 : G.call(D)
|
|
197
|
-
}, null, 8, ["render", "props"])
|
|
198
|
-
])) : ge("", !0),
|
|
199
|
-
p("div", je, [
|
|
200
|
-
u(a(R), {
|
|
201
|
-
render: (W = (Q = (K = o.purchaseOrder_status) == null ? void 0 : K.column) == null ? void 0 : Q.columnDef) == null ? void 0 : W.cell,
|
|
202
|
-
props: (X = (g = o.purchaseOrder_status) == null ? void 0 : g.getContext) == null ? void 0 : X.call(g)
|
|
203
|
-
}, null, 8, ["render", "props"])
|
|
204
|
-
])
|
|
205
|
-
])
|
|
206
|
-
];
|
|
207
|
-
}),
|
|
208
|
-
_: 2
|
|
209
|
-
}, 1032, ["row", "onRowClick"])
|
|
210
|
-
]),
|
|
211
|
-
_: 1
|
|
212
|
-
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
213
|
-
], 2),
|
|
214
|
-
(x(), Z(ye, { to: "body" }, [
|
|
215
|
-
u(we, be({
|
|
216
|
-
scope: a(w).APPROVAL
|
|
217
|
-
}, {
|
|
218
|
-
...a(s).transferDetailsProps.value,
|
|
219
|
-
receivedMap: ((n = a(s).transferDetailsProps.value) == null ? void 0 : n.receivedMap) ?? {},
|
|
220
|
-
shipments: a(s).shipments.value ?? []
|
|
221
|
-
}, {
|
|
222
|
-
onSubmitted: a(s).fetchData
|
|
223
|
-
}), null, 16, ["scope", "onSubmitted"]),
|
|
224
|
-
u(ke, {
|
|
225
|
-
modelValue: a(O),
|
|
226
|
-
"onUpdate:modelValue": r[4] || (r[4] = (t) => Re(O) ? O.value = t : null),
|
|
227
|
-
html: a(ee),
|
|
228
|
-
"template-name": a(te),
|
|
229
|
-
"is-default": a(ae)
|
|
230
|
-
}, null, 8, ["modelValue", "html", "template-name", "is-default"])
|
|
231
|
-
]))
|
|
232
|
-
];
|
|
233
|
-
}),
|
|
234
|
-
_: 1
|
|
235
|
-
}, 8, ["title", "actions"]);
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
export {
|
|
240
|
-
ot as default
|
|
241
|
-
};
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Q, ref as z, computed as c, watch as X, resolveComponent as l, openBlock as D, createBlock as W, unref as h, createSlots as Z, withCtx as u, createElementVNode as f, normalizeClass as ee, createVNode as a, normalizeStyle as te, Teleport as oe, h as g } from "vue";
|
|
2
|
-
import { u as ne, a as ae, z as se } from "./app-Bd2n830Y.js";
|
|
3
|
-
import { u as le, _ as ie } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CkPuJQWF.js";
|
|
4
|
-
import { useBreakpoints as re, useDialog as ce, useSnackbar as ue, components as B } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as me } from "./vue-i18n-BaovYGY4.js";
|
|
6
|
-
import { a as H } from "./date2-CH3V-Ucj.js";
|
|
7
|
-
const pe = { class: "flex flex-col py-8" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, xe = /* @__PURE__ */ Q({
|
|
8
|
-
__name: "PublishView",
|
|
9
|
-
setup(ve) {
|
|
10
|
-
const { t } = me(), { breakpoints: x } = re(), n = ne(), A = ae(), S = se(), i = z(!1), m = c(() => A.state.inventory.updatedAt ? A.state.inventory.updatedAt : null), R = le(), C = ce(), Y = ue(), N = c(() => n.locationsWithInventory), _ = c(() => x.value.xs || x.value.sm), $ = c(() => _.value ? 10 : 20);
|
|
11
|
-
X(
|
|
12
|
-
() => n._locations,
|
|
13
|
-
async () => {
|
|
14
|
-
var e;
|
|
15
|
-
i.value = !0, (!n._locationWithInventory || ((e = n._locationWithInventory) == null ? void 0 : e.length) === 0) && await n.readLocationsWithInventory(), i.value = !1;
|
|
16
|
-
},
|
|
17
|
-
{ immediate: !0 }
|
|
18
|
-
// Optional: triggers the watcher immediately on mount
|
|
19
|
-
);
|
|
20
|
-
const U = c(() => [
|
|
21
|
-
{
|
|
22
|
-
label: t("inventory.common.refresh"),
|
|
23
|
-
value: "refresh",
|
|
24
|
-
isPrimary: !1
|
|
25
|
-
},
|
|
26
|
-
{ label: t("inventory.publish.actions.publishAll"), value: "publish", isPrimary: !0 }
|
|
27
|
-
]);
|
|
28
|
-
async function q(e) {
|
|
29
|
-
switch (e) {
|
|
30
|
-
case "publish":
|
|
31
|
-
C.open({
|
|
32
|
-
title: t("inventory.common.publish"),
|
|
33
|
-
message: "Are you sure you want to publish to all locations?",
|
|
34
|
-
primaryActions: { text: t("inventory.common.publish"), close: !0 },
|
|
35
|
-
secondaryActions: { text: "Cancel", close: !0 }
|
|
36
|
-
}).onPrimary(async () => {
|
|
37
|
-
await S.publishAllInventory(), await n.readLocationsWithInventory();
|
|
38
|
-
});
|
|
39
|
-
break;
|
|
40
|
-
case "refresh":
|
|
41
|
-
i.value = !0, await n.readLocationsWithInventory(), i.value = !1;
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
const w = z(!1), E = [
|
|
46
|
-
{
|
|
47
|
-
value: "publish",
|
|
48
|
-
label: t("inventory.publish.actions.publishAll")
|
|
49
|
-
}
|
|
50
|
-
];
|
|
51
|
-
function K(e) {
|
|
52
|
-
switch (w.value = !1, e) {
|
|
53
|
-
case "publish":
|
|
54
|
-
console.log("publish all");
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
const j = [
|
|
58
|
-
{
|
|
59
|
-
id: "type",
|
|
60
|
-
header: () => t("inventory.publish.columns.type"),
|
|
61
|
-
enableSorting: !0,
|
|
62
|
-
cell(e) {
|
|
63
|
-
return g(B.FmChip, {
|
|
64
|
-
color: "primary",
|
|
65
|
-
label: e.row.original.type
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
accessorKey: "name",
|
|
71
|
-
header: () => t("inventory.publish.columns.location"),
|
|
72
|
-
enableSorting: !0,
|
|
73
|
-
size: 300
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
id: "version",
|
|
77
|
-
header: () => t("inventory.publish.columns.version"),
|
|
78
|
-
enableSorting: !0,
|
|
79
|
-
cell(e) {
|
|
80
|
-
var o, s;
|
|
81
|
-
return (o = e.row.original.inventory) != null && o.updatedAt ? H((s = e.row.original.inventory) == null ? void 0 : s.updatedAt) : "";
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: "status",
|
|
86
|
-
header: () => t("inventory.publish.columns.status"),
|
|
87
|
-
enableSorting: !0,
|
|
88
|
-
cell(e) {
|
|
89
|
-
var d;
|
|
90
|
-
if (!m.value)
|
|
91
|
-
return "";
|
|
92
|
-
const o = ((d = e.row.original.inventory) == null ? void 0 : d.updatedAt) == m.value, s = e.row.original.dbName, p = e.row.original.type === "warehouse";
|
|
93
|
-
return g(
|
|
94
|
-
"div",
|
|
95
|
-
{
|
|
96
|
-
class: "flex items-center gap-8"
|
|
97
|
-
},
|
|
98
|
-
[
|
|
99
|
-
g(
|
|
100
|
-
"div",
|
|
101
|
-
{
|
|
102
|
-
class: [
|
|
103
|
-
"fm-status-badge",
|
|
104
|
-
o ? "fm-status-badge-success-secondary" : "fm-status-badge-info-secondary"
|
|
105
|
-
]
|
|
106
|
-
},
|
|
107
|
-
t(o ? "inventory.publish.status.published" : "inventory.publish.status.outdated")
|
|
108
|
-
),
|
|
109
|
-
!o && !p ? g(B.FmButton, {
|
|
110
|
-
class: "tertiary",
|
|
111
|
-
variant: "secondary",
|
|
112
|
-
icon: "sync",
|
|
113
|
-
onClick: () => {
|
|
114
|
-
C.open({
|
|
115
|
-
title: t("inventory.common.publish"),
|
|
116
|
-
message: `Are you sure you want to publish this location "${e.row.original.name}"?`,
|
|
117
|
-
primaryActions: { text: t("inventory.common.publish"), close: !0 },
|
|
118
|
-
secondaryActions: { text: "Cancel", close: !0 }
|
|
119
|
-
}).onPrimary(async () => {
|
|
120
|
-
await S.publishInventory(s.split("_")[1]), await n.readLocations(), Y.open({ message: "Publish request submitted", type: "success" });
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
}) : null
|
|
124
|
-
]
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
// {
|
|
129
|
-
// id: 'action',
|
|
130
|
-
// header: '',
|
|
131
|
-
// cell(props) {
|
|
132
|
-
// return createContextMenuComponents(
|
|
133
|
-
// [DefaultRowActions[RowActionEnum.Edit], DefaultRowActions[RowActionEnum.Delete]],
|
|
134
|
-
// (action) => {
|
|
135
|
-
// onActionMenu(action, props.row.original)
|
|
136
|
-
// }
|
|
137
|
-
// )
|
|
138
|
-
// },
|
|
139
|
-
// enableSorting: false,
|
|
140
|
-
// size: 40,
|
|
141
|
-
// meta: {
|
|
142
|
-
// cellClass: '',
|
|
143
|
-
// headerClass: ''
|
|
144
|
-
// }
|
|
145
|
-
// }
|
|
146
|
-
];
|
|
147
|
-
return (e, o) => {
|
|
148
|
-
const s = l("FmChip"), p = l("FlexRender"), d = l("TableActionableRow"), G = l("FmTable"), J = l("FmCollapsibleTabs"), O = l("FmBottomSheet");
|
|
149
|
-
return D(), W(ie, {
|
|
150
|
-
title: h(t)("inventory.publish.title"),
|
|
151
|
-
actions: U.value,
|
|
152
|
-
"onClick:action": q
|
|
153
|
-
}, Z({
|
|
154
|
-
default: u(() => [
|
|
155
|
-
f("div", {
|
|
156
|
-
class: ee([
|
|
157
|
-
"flex flex-col gap-8 max-h-full",
|
|
158
|
-
{
|
|
159
|
-
"p-0": _.value,
|
|
160
|
-
"px-24 ": !_.value
|
|
161
|
-
}
|
|
162
|
-
])
|
|
163
|
-
}, [
|
|
164
|
-
a(G, {
|
|
165
|
-
style: te(h(R).tableHeight),
|
|
166
|
-
"column-defs": j,
|
|
167
|
-
"row-data": N.value,
|
|
168
|
-
loading: !h(n)._currentLocation || i.value,
|
|
169
|
-
"loading-text": "Loading",
|
|
170
|
-
"page-size": $.value
|
|
171
|
-
}, {
|
|
172
|
-
"list-row": u((r) => [
|
|
173
|
-
a(d, { row: r }, {
|
|
174
|
-
default: u((y) => {
|
|
175
|
-
var F, I, k, v, M, L, P, T, b, V;
|
|
176
|
-
return [
|
|
177
|
-
f("div", pe, [
|
|
178
|
-
f("div", de, [
|
|
179
|
-
a(p, {
|
|
180
|
-
render: (k = (I = (F = y.code) == null ? void 0 : F.column) == null ? void 0 : I.columnDef) == null ? void 0 : k.cell,
|
|
181
|
-
props: (M = (v = y.code) == null ? void 0 : v.getContext) == null ? void 0 : M.call(v)
|
|
182
|
-
}, null, 8, ["render", "props"])
|
|
183
|
-
]),
|
|
184
|
-
f("div", ye, [
|
|
185
|
-
a(p, {
|
|
186
|
-
render: (T = (P = (L = y.name) == null ? void 0 : L.column) == null ? void 0 : P.columnDef) == null ? void 0 : T.cell,
|
|
187
|
-
props: (V = (b = y.name) == null ? void 0 : b.getContext) == null ? void 0 : V.call(b)
|
|
188
|
-
}, null, 8, ["render", "props"])
|
|
189
|
-
])
|
|
190
|
-
])
|
|
191
|
-
];
|
|
192
|
-
}),
|
|
193
|
-
_: 2
|
|
194
|
-
}, 1032, ["row"])
|
|
195
|
-
]),
|
|
196
|
-
_: 1
|
|
197
|
-
}, 8, ["style", "row-data", "loading", "page-size"])
|
|
198
|
-
], 2),
|
|
199
|
-
(D(), W(oe, { to: "body" }, [
|
|
200
|
-
a(O, {
|
|
201
|
-
"dismiss-away": "",
|
|
202
|
-
modelValue: w.value,
|
|
203
|
-
"onUpdate:modelValue": o[1] || (o[1] = (r) => w.value = r)
|
|
204
|
-
}, {
|
|
205
|
-
default: u(() => [
|
|
206
|
-
a(J, {
|
|
207
|
-
class: "pb-8",
|
|
208
|
-
items: E,
|
|
209
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) => K(r))
|
|
210
|
-
})
|
|
211
|
-
]),
|
|
212
|
-
_: 1
|
|
213
|
-
}, 8, ["modelValue"])
|
|
214
|
-
]))
|
|
215
|
-
]),
|
|
216
|
-
_: 2
|
|
217
|
-
}, [
|
|
218
|
-
m.value ? {
|
|
219
|
-
name: "headerInfo",
|
|
220
|
-
fn: u(() => [
|
|
221
|
-
a(s, {
|
|
222
|
-
variant: "info",
|
|
223
|
-
label: `Latest: ${h(H)(m.value)}`
|
|
224
|
-
}, null, 8, ["label"])
|
|
225
|
-
]),
|
|
226
|
-
key: "0"
|
|
227
|
-
} : void 0
|
|
228
|
-
]), 1032, ["title", "actions"]);
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
export {
|
|
233
|
-
xe as default
|
|
234
|
-
};
|