@feedmepos/mf-inventory-portal 0.0.25-dev.9 → 0.0.26-dev.1
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-9zSE_swt.js → App-CipfIdtR.js} +71 -72
- package/dist/ApprovalView-IC33yBg7.js +143 -0
- package/dist/{BindingsDialog-eGbOIQkw.js → BindingsDialog-EN6Kbnu7.js} +2 -2
- package/dist/{BindingsPicker-CVXrd29s.js → BindingsPicker-DQ_LEoqq.js} +3 -3
- package/dist/BindingsTable-DGXpAyM4.js +120 -0
- package/dist/ClosingDraftView-DR9xsW9I.js +1348 -0
- package/dist/ClosingTemplateView-CC1T7ovX.js +1804 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C9un0wCK.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CovzlB-s.js} +43 -43
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BRSABJnM.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BxEtsFXp.js} +29 -29
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DeRvrF7O.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-B8H6vFJ5.js} +1 -1
- package/dist/{IngredientGroupView-ZWCOAljO.js → IngredientGroupView-DRPbXH8d.js} +24 -24
- package/dist/IngredientsView-DSHcH30X.js +1731 -0
- package/dist/{IntegrationView-DO3Ambro.js → IntegrationView-BgACk-jP.js} +605 -669
- package/dist/{InventoryBindingForm-BjtFP29c.js → InventoryBindingForm-Fs-CHoT-.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CFMZ4VsK.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DVHQjAEC.js} +63 -63
- package/dist/{InventoryBindingSummary-C6DkVX-B.js → InventoryBindingSummary-CHWMtGtk.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-nb1t6u2V.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cu9V-8Cf.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BcMAXo4F.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CyVRCAqv.js} +12 -12
- package/dist/PublishView-CI7o5a0F.js +222 -0
- package/dist/{PurchaseOrderPrintPreview-_MCAsdw9.js → PurchaseOrderPrintPreview-CO4a811o.js} +1 -1
- package/dist/ReceiveRequestView-KH5wY5BA.js +2562 -0
- package/dist/{RecipeView-dmmjklwh.js → RecipeView-DxVbUxOG.js} +47 -47
- package/dist/StockView-CiHPAaYh.js +1840 -0
- package/dist/{SupplierView-CO5460uC.js → SupplierView-DPj87kld.js} +448 -461
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CfPPCFh8.js +1566 -0
- package/dist/TransferTemplateView-3W29v8hd.js +1420 -0
- package/dist/{UnitView-DbYzxCXF.js → UnitView-WCtNQFf8.js} +23 -23
- package/dist/{WarehouseView-BII4SEVC.js → WarehouseView-tgFFbQY7.js} +40 -40
- package/dist/api/bill.d.ts +12 -2
- package/dist/api/closing-draft.d.ts +1 -0
- package/dist/api/inventory.d.ts +8 -7
- package/dist/api/netsuite.d.ts +22 -5
- package/dist/api/purchase-order.d.ts +6 -1
- package/dist/api/stock.d.ts +1 -0
- package/dist/{app-IM1yJnE8.js → app-Ba80HxT3.js} +38448 -34777
- package/dist/app.d.ts +965 -120
- package/dist/app.js +1 -1
- package/dist/components/FmDroppableField.vue.d.ts +1 -1
- package/dist/components/FmMultiselectDialog.d.ts +23 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -1
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -1
- package/dist/{decimal-DQUpCN-B.js → decimal-DFqusYHB.js} +1 -1
- package/dist/{format-unit-display-COuIZISg.js → format-unit-display-Bsod5Ra6.js} +232 -238
- package/dist/helper/country.d.ts +1 -0
- package/dist/helper/fuzzy.d.ts +1 -1
- package/dist/helper/number.d.ts +1 -1
- package/dist/index-0ekVGPtB.js +12197 -0
- package/dist/index-ZAEVHtfa.js +84 -0
- package/dist/{stock-BJUTiXXk.js → stock-Cn6EQvTz.js} +29 -25
- package/dist/stores/feature.d.ts +11 -6
- package/dist/stores/helper/generate-backend-urls.d.ts +0 -1
- package/dist/stores/integration/index.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +22 -5
- package/dist/stores/inventory.d.ts +141 -8
- package/dist/stores/location.d.ts +0 -9
- package/dist/stores/stock.d.ts +5 -0
- package/dist/stores/warehouse.d.ts +4 -7
- package/dist/style.css +1 -1
- package/dist/{supplier-CM-qQVyI.js → supplier-P1gi71dg.js} +4 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Cn79xFNg.js → use-ingredient-select-dialog-BW5imbB5.js} +1 -1
- package/dist/{use-inventory-binding-dialog-zwOG19YV.js → use-inventory-binding-dialog-BYxb8nXg.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +0 -24
- package/dist/views/adjustment-template/wastage-template/table.d.ts +0 -24
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +92 -8
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +4 -1
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +552 -48
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +1 -1
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +12 -36
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +12 -36
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +3 -3
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +4 -1
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +529 -489
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +8 -4
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +382 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +5 -2
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1238 -972
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1080 -1003
- package/dist/views/receive-request/import/XilnexImportDialog.vue.d.ts +22 -0
- package/dist/views/receive-request/import/XilnexImportForm.vue.d.ts +17 -0
- package/dist/views/receive-request/import/XilnexResult.vue.d.ts +17 -0
- package/dist/views/receive-request/import/export.d.ts +14 -0
- package/dist/views/receive-request/import/props.d.ts +7 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +6 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +220 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +0 -8
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +0 -1
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +7 -2
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +530 -530
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +530 -530
- package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +305 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -14
- package/dist/vue-i18n-CjtRsQMl.js +2365 -0
- package/package.json +7 -7
- package/dist/ApprovalView-C2tg-wsm.js +0 -138
- package/dist/BindingsTable-CCsQEFnu.js +0 -145
- package/dist/ClosingDraftView-BI8b3CJ9.js +0 -1225
- package/dist/ClosingTemplateView-miJnC-ML.js +0 -1859
- package/dist/IngredientsView-5-pSX6y_.js +0 -1718
- package/dist/PublishView-DOMQdIJ7.js +0 -192
- package/dist/ReceiveRequestView-902hWGtz.js +0 -1877
- package/dist/StockView-C4lEYLXU.js +0 -7847
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-D6sZDCEY.js +0 -1328
- package/dist/TransferTemplateView-C9UwNTnY.js +0 -1371
- package/dist/components/FmAutocompleteTextField.vue.d.ts +0 -31
- package/dist/feature-DMBVVBsQ.js +0 -1005
- package/dist/index-CIrsMt6f.js +0 -35546
- package/dist/views/dev/components/AutocompleteTextField.vue.d.ts +0 -2
- package/dist/vue-i18n-CzPFJ9JY.js +0 -2365
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as J, computed as _, reactive as Q, resolveComponent as x, openBlock as m, createElementBlock as y, createVNode as c, createElementVNode as n, toDisplayString as v, unref as l, createBlock as V, createCommentVNode as g, Fragment as R, renderList as S, withCtx as T, nextTick as X } from "vue";
|
|
2
|
-
import { a as Z,
|
|
3
|
-
import { u as le } from "./use-inventory-binding-dialog-
|
|
4
|
-
import { _ as
|
|
2
|
+
import { a as Z, P as ee, aR as ne, j as B, aS as oe, N, L as te, F as ie } from "./app-Ba80HxT3.js";
|
|
3
|
+
import { u as le } from "./use-inventory-binding-dialog-BYxb8nXg.js";
|
|
4
|
+
import { _ as re, c as se, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BxEtsFXp.js";
|
|
5
5
|
import { useI18n as ae } from "@feedmepos/mf-common";
|
|
6
6
|
const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-16" }, ce = { class: "flex items-center" }, pe = { class: "flex-1 fm-typo-en-title-sm-600" }, fe = { class: "flex flex-col" }, ye = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, ve = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _e = {
|
|
7
7
|
class: "flex items-center w-full border-b border-fm-color-neutral-gray-100",
|
|
@@ -18,7 +18,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
18
18
|
}, Ae = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Re = { class: "line-clamp-1" }, Se = { class: "w-[150px]" }, Te = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "w-[52px]"
|
|
21
|
-
}, Ne = { class: "flex flex-col px-12 pb-4" },
|
|
21
|
+
}, Ne = { class: "flex flex-col px-12 pb-4" }, je = /* @__PURE__ */ J({
|
|
22
22
|
__name: "InventoryBindingForm",
|
|
23
23
|
props: {
|
|
24
24
|
id: {},
|
|
@@ -31,70 +31,70 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
31
31
|
},
|
|
32
32
|
emits: ["update:modelValue", "click:pick-inventory-bindings"],
|
|
33
33
|
setup(P, { emit: M }) {
|
|
34
|
-
const { t: p } = ae(), F = Z(), I = _(() => F.inventory.recipe ?? []), h = _(() => F.inventory.sku ?? []),
|
|
35
|
-
bindings:
|
|
36
|
-
recipes: I.value.map((
|
|
37
|
-
...
|
|
38
|
-
contains:
|
|
39
|
-
} :
|
|
34
|
+
const { t: p } = ae(), F = Z(), I = _(() => F.inventory.recipe ?? []), h = _(() => F.inventory.sku ?? []), r = P, f = M, w = _(() => ee({
|
|
35
|
+
bindings: r.modelValue,
|
|
36
|
+
recipes: I.value.map((o) => o._id === r.id ? {
|
|
37
|
+
...o,
|
|
38
|
+
contains: r.modelValue
|
|
39
|
+
} : o),
|
|
40
40
|
skus: h.value
|
|
41
|
-
}).inventoryBindings.filter((
|
|
41
|
+
}).inventoryBindings.filter((o) => "error" in o && o.error).map((o) => o).filter((o) => o.reason === ne.enum.circularDependency)), D = _(
|
|
42
42
|
() => new Set(w.value.map((e) => {
|
|
43
|
-
var
|
|
44
|
-
return (
|
|
43
|
+
var t;
|
|
44
|
+
return (t = e.bindingPaths[0]) == null ? void 0 : t.id;
|
|
45
45
|
}))
|
|
46
|
-
),
|
|
47
|
-
async function
|
|
48
|
-
if (
|
|
46
|
+
), K = _(() => r.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: j } = le();
|
|
47
|
+
async function z() {
|
|
48
|
+
if (r.iframeMode) {
|
|
49
49
|
f("click:pick-inventory-bindings", "RECIPE");
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
j(
|
|
53
|
+
r.modelValue,
|
|
54
54
|
(e) => f("update:modelValue", e),
|
|
55
|
-
|
|
55
|
+
r.id ? [r.id] : []
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
const U = _(() =>
|
|
59
|
-
async function
|
|
60
|
-
if (
|
|
58
|
+
const U = _(() => r.modelValue.filter((e) => e.type === "SKU") ?? []);
|
|
59
|
+
async function G() {
|
|
60
|
+
if (r.iframeMode) {
|
|
61
61
|
f("click:pick-inventory-bindings", "SKU");
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
$(
|
|
65
|
-
|
|
65
|
+
r.modelValue,
|
|
66
66
|
(e) => f("update:modelValue", e),
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
r.excludeBindingId,
|
|
68
|
+
r.id ? [r.id] : []
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
const
|
|
73
|
-
let d =
|
|
74
|
-
|
|
71
|
+
function L(e, t, o) {
|
|
72
|
+
const s = +t;
|
|
73
|
+
let d = o;
|
|
74
|
+
t.length > 0 && isFinite(s) ? d = o.map((a) => (a.id !== e || (a.amount = te(s)), a)) : d = o.map((a) => (a.id !== e || (a.amount = { amount: 0, precision: 0 }), a)), f("update:modelValue", d);
|
|
75
75
|
}
|
|
76
|
-
function E(e,
|
|
77
|
-
const
|
|
78
|
-
f("update:modelValue",
|
|
76
|
+
function E(e, t) {
|
|
77
|
+
const o = t.filter((s) => s.id !== e);
|
|
78
|
+
f("update:modelValue", o);
|
|
79
79
|
}
|
|
80
80
|
function C(e) {
|
|
81
|
-
var
|
|
81
|
+
var o, s;
|
|
82
82
|
if (e.type !== ie.enum.SKU)
|
|
83
83
|
throw new Error("Non-SKU binding does not have unit");
|
|
84
|
-
if (!((
|
|
84
|
+
if (!((o = h.value.find((d) => d._id === e.id)) == null ? void 0 : o.unit))
|
|
85
85
|
throw new Error(`Cannot find ingredient: ${e.id}`);
|
|
86
|
-
return (
|
|
86
|
+
return (s = h.value.find((d) => d._id === e.id)) == null ? void 0 : s.unit;
|
|
87
87
|
}
|
|
88
88
|
function Y(e) {
|
|
89
89
|
return { amount: e.amount, measurement: e.measurement };
|
|
90
90
|
}
|
|
91
|
-
function O(e,
|
|
92
|
-
const
|
|
91
|
+
function O(e, t, o) {
|
|
92
|
+
const s = o.map((d) => d.id !== e ? d : {
|
|
93
93
|
...d,
|
|
94
|
-
amount:
|
|
95
|
-
measurement:
|
|
94
|
+
amount: t.amount,
|
|
95
|
+
measurement: t.measurement
|
|
96
96
|
});
|
|
97
|
-
f("update:modelValue",
|
|
97
|
+
f("update:modelValue", s);
|
|
98
98
|
}
|
|
99
99
|
const A = Q({});
|
|
100
100
|
function W(e) {
|
|
@@ -106,21 +106,21 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
106
106
|
amountAsString: B(e.amount)
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
function q(e,
|
|
109
|
+
function q(e, t) {
|
|
110
110
|
X(() => {
|
|
111
111
|
A[e.id] = {
|
|
112
112
|
modelValue: {
|
|
113
113
|
amount: e.amount,
|
|
114
114
|
measurement: e.measurement
|
|
115
115
|
},
|
|
116
|
-
amountAsString:
|
|
116
|
+
amountAsString: t
|
|
117
117
|
};
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
return (e,
|
|
121
|
-
const
|
|
120
|
+
return (e, t) => {
|
|
121
|
+
const o = x("FmFormGroup"), s = x("FmButton"), d = x("FmIcon"), a = x("FmTextField"), H = x("FmTooltip");
|
|
122
122
|
return m(), y("div", ue, [
|
|
123
|
-
c(
|
|
123
|
+
c(o, {
|
|
124
124
|
disabled: e.disabled,
|
|
125
125
|
"model-value": e.modelValue,
|
|
126
126
|
rules: e.rules
|
|
@@ -128,23 +128,23 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
128
128
|
n("div", me, [
|
|
129
129
|
n("div", ce, [
|
|
130
130
|
n("div", pe, v(l(p)("inventory.inventoryBindings.recipe")), 1),
|
|
131
|
-
e.readonly ? g("", !0) : (m(), V(
|
|
131
|
+
e.readonly ? g("", !0) : (m(), V(s, {
|
|
132
132
|
key: 0,
|
|
133
133
|
variant: "secondary",
|
|
134
134
|
"text-color": "primary",
|
|
135
135
|
"border-color": "primary",
|
|
136
136
|
label: l(p)("inventory.inventoryBindings.linkRecipe"),
|
|
137
137
|
"prepend-icon": "link",
|
|
138
|
-
onClick:
|
|
138
|
+
onClick: z
|
|
139
139
|
}, null, 8, ["label"]))
|
|
140
140
|
]),
|
|
141
141
|
n("div", fe, [
|
|
142
142
|
n("div", ye, [
|
|
143
143
|
n("div", ve, v(l(p)("inventory.inventoryBindings.recipe")), 1),
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
t[0] || (t[0] = n("div", { class: "w-[200px]" }, null, -1)),
|
|
145
|
+
t[1] || (t[1] = n("div", { class: "w-[52px]" }, null, -1))
|
|
146
146
|
]),
|
|
147
|
-
(m(!0), y(R, null, S(
|
|
147
|
+
(m(!0), y(R, null, S(K.value, (i) => (m(), V(o, {
|
|
148
148
|
key: i.id,
|
|
149
149
|
disabled: e.disabled,
|
|
150
150
|
modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
|
|
@@ -157,13 +157,13 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
157
157
|
n("div", ge, [
|
|
158
158
|
n("div", be, [
|
|
159
159
|
n("div", null, v((b = I.value.find((u) => u._id === i.id)) == null ? void 0 : b.name), 1),
|
|
160
|
-
|
|
160
|
+
D.value.has(i.id) ? (m(), y("div", xe, [
|
|
161
161
|
c(d, {
|
|
162
162
|
name: "error",
|
|
163
163
|
color: "system-error-400",
|
|
164
164
|
size: "sm"
|
|
165
165
|
}),
|
|
166
|
-
|
|
166
|
+
t[2] || (t[2] = n("div", null, "There is circular linking in your binding.", -1))
|
|
167
167
|
])) : g("", !0)
|
|
168
168
|
])
|
|
169
169
|
]),
|
|
@@ -172,12 +172,12 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
172
172
|
class: "w-full",
|
|
173
173
|
disabled: e.disabled,
|
|
174
174
|
modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
|
|
175
|
-
"onUpdate:modelValue": (u) =>
|
|
175
|
+
"onUpdate:modelValue": (u) => L(i.id, u, e.modelValue),
|
|
176
176
|
invalid: k
|
|
177
177
|
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
178
178
|
]),
|
|
179
179
|
e.readonly ? g("", !0) : (m(), y("div", Ve, [
|
|
180
|
-
c(
|
|
180
|
+
c(s, {
|
|
181
181
|
disabled: e.disabled,
|
|
182
182
|
type: "button",
|
|
183
183
|
variant: "plain",
|
|
@@ -196,21 +196,21 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
196
196
|
n("div", Be, [
|
|
197
197
|
n("div", ke, [
|
|
198
198
|
n("div", Fe, v(l(p)("inventory.inventoryBindings.ingredient")), 1),
|
|
199
|
-
e.readonly ? g("", !0) : (m(), V(
|
|
199
|
+
e.readonly ? g("", !0) : (m(), V(s, {
|
|
200
200
|
key: 0,
|
|
201
201
|
variant: "secondary",
|
|
202
202
|
"text-color": "primary",
|
|
203
203
|
"border-color": "primary",
|
|
204
204
|
label: l(p)("inventory.inventoryBindings.linkIngredient"),
|
|
205
205
|
"prepend-icon": "link",
|
|
206
|
-
onClick:
|
|
206
|
+
onClick: G
|
|
207
207
|
}, null, 8, ["label"]))
|
|
208
208
|
]),
|
|
209
209
|
n("div", Ie, [
|
|
210
210
|
n("div", we, [
|
|
211
211
|
n("div", Ue, v(l(p)("inventory.inventoryBindings.ingredient")), 1),
|
|
212
212
|
n("div", Ee, v(l(p)("inventory.inventoryBindings.amount")), 1),
|
|
213
|
-
|
|
213
|
+
t[3] || (t[3] = n("div", { class: "w-[52px]" }, null, -1))
|
|
214
214
|
]),
|
|
215
215
|
(m(!0), y(R, null, S(U.value, (i, k) => {
|
|
216
216
|
var b;
|
|
@@ -240,7 +240,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
240
240
|
}, 8, ["content"])) : g("", !0)
|
|
241
241
|
]),
|
|
242
242
|
n("div", Se, [
|
|
243
|
-
c(
|
|
243
|
+
c(re, {
|
|
244
244
|
"model-value": Y(i),
|
|
245
245
|
"onUpdate:modelValue": (u) => O(i.id, u, e.modelValue),
|
|
246
246
|
"onUpdate:amount": (u) => q(i, u),
|
|
@@ -251,7 +251,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
251
251
|
}, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement", "disabled"])
|
|
252
252
|
]),
|
|
253
253
|
e.readonly ? g("", !0) : (m(), y("div", Te, [
|
|
254
|
-
c(
|
|
254
|
+
c(s, {
|
|
255
255
|
disabled: e.disabled,
|
|
256
256
|
type: "button",
|
|
257
257
|
variant: "tertiary",
|
|
@@ -261,14 +261,14 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
261
261
|
]))
|
|
262
262
|
]),
|
|
263
263
|
n("div", Ne, [
|
|
264
|
-
c(
|
|
264
|
+
c(o, {
|
|
265
265
|
modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
|
|
266
266
|
rules: [l(N)(0)]
|
|
267
267
|
}, null, 8, ["modelValue", "rules"]),
|
|
268
|
-
c(
|
|
268
|
+
c(o, {
|
|
269
269
|
modelValue: W(i),
|
|
270
270
|
rules: [
|
|
271
|
-
l(
|
|
271
|
+
l(se)(),
|
|
272
272
|
l(de)(C(i))
|
|
273
273
|
]
|
|
274
274
|
}, null, 8, ["modelValue", "rules"])
|
|
@@ -282,5 +282,5 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
282
282
|
}
|
|
283
283
|
});
|
|
284
284
|
export {
|
|
285
|
-
|
|
285
|
+
je as _
|
|
286
286
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as s, resolveComponent as c, openBlock as m, createBlock as d, h as g } from "vue";
|
|
2
2
|
import { useI18n as p } from "@feedmepos/mf-common";
|
|
3
3
|
import { components as u } from "@feedmepos/ui-library";
|
|
4
|
-
import { F as r } from "./app-
|
|
4
|
+
import { F as r } from "./app-Ba80HxT3.js";
|
|
5
5
|
const B = /* @__PURE__ */ s({
|
|
6
6
|
__name: "InventoryBindingSummary",
|
|
7
7
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as y, computed as V, ref as w, watch as h, resolveComponent as u, openBlock as F, createBlock as A, withCtx as s, createVNode as g, createElementVNode as k, normalizeClass as K } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { L as d } from "./app-Ba80HxT3.js";
|
|
3
3
|
const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
|
|
4
4
|
__name: "NumberPrecisionInput",
|
|
5
5
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCoreStore as
|
|
3
|
-
import { ref as
|
|
1
|
+
import { ax as d, ay as f, Y as _, u as h } from "./app-Ba80HxT3.js";
|
|
2
|
+
import { useCoreStore as y } from "@feedmepos/mf-common";
|
|
3
|
+
import { ref as F, defineComponent as v, resolveComponent as p, openBlock as k, createElementBlock as g, renderSlot as x, createVNode as l, withCtx as S } from "vue";
|
|
4
4
|
function I(e, t) {
|
|
5
5
|
return t.map((r) => typeof r.selector == "function" ? r.selector(e) : e[r.selector]);
|
|
6
6
|
}
|
|
@@ -8,7 +8,7 @@ function O(e, t) {
|
|
|
8
8
|
const r = t.map((o) => o.name), n = e.map((o) => I(o, t));
|
|
9
9
|
return d.aoa_to_sheet([r, ...n]);
|
|
10
10
|
}
|
|
11
|
-
async function
|
|
11
|
+
async function A(e, t) {
|
|
12
12
|
const r = d.book_new();
|
|
13
13
|
for (const n of e) {
|
|
14
14
|
const o = O(
|
|
@@ -23,7 +23,7 @@ async function z(e, t) {
|
|
|
23
23
|
await f(r, t);
|
|
24
24
|
}
|
|
25
25
|
const m = _((e, t) => {
|
|
26
|
-
const r = h(), n =
|
|
26
|
+
const r = h(), n = y();
|
|
27
27
|
return {
|
|
28
28
|
async getInventoryForecast() {
|
|
29
29
|
var s;
|
|
@@ -51,7 +51,7 @@ function w() {
|
|
|
51
51
|
purchaseOrderForecast: { skus: [] }
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
const c =
|
|
54
|
+
const c = F(w());
|
|
55
55
|
function C() {
|
|
56
56
|
return {
|
|
57
57
|
// state
|
|
@@ -82,7 +82,7 @@ function D(e) {
|
|
|
82
82
|
let t = e.substring(e.indexOf("_") + 1);
|
|
83
83
|
return t.includes("_") && (t = t.substring(0, t.lastIndexOf("_"))), Number.isNaN(Date.parse(t)) ? null : new Date(t).toISOString();
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const b = { class: "flex items-center gap-8" }, B = "Experience enhanced inventory features with premium plan.", N = /* @__PURE__ */ v({
|
|
86
86
|
__name: "PremiumBadge",
|
|
87
87
|
props: {
|
|
88
88
|
zIndex: {}
|
|
@@ -90,15 +90,15 @@ const B = { class: "flex items-center gap-8" }, b = "Experience enhanced invento
|
|
|
90
90
|
setup(e) {
|
|
91
91
|
return (t, r) => {
|
|
92
92
|
const n = p("FmPill"), o = p("FmTooltip");
|
|
93
|
-
return k(), g("div",
|
|
94
|
-
|
|
93
|
+
return k(), g("div", b, [
|
|
94
|
+
x(t.$slots, "default"),
|
|
95
95
|
l(o, {
|
|
96
96
|
variant: "plain",
|
|
97
97
|
placement: "top",
|
|
98
|
-
content:
|
|
98
|
+
content: B,
|
|
99
99
|
"z-index": t.zIndex
|
|
100
100
|
}, {
|
|
101
|
-
default:
|
|
101
|
+
default: S(() => [
|
|
102
102
|
l(n, { variant: "premium" })
|
|
103
103
|
]),
|
|
104
104
|
_: 1
|
|
@@ -109,7 +109,7 @@ const B = { class: "flex items-center gap-8" }, b = "Experience enhanced invento
|
|
|
109
109
|
});
|
|
110
110
|
export {
|
|
111
111
|
N as _,
|
|
112
|
-
|
|
112
|
+
A as e,
|
|
113
113
|
D as i,
|
|
114
114
|
C as u
|
|
115
115
|
};
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { defineComponent as Q, ref as z, computed as r, resolveComponent as s, openBlock as I, createBlock as B, unref as v, createSlots as X, withCtx as u, createElementVNode as h, normalizeClass as Z, createVNode as n, normalizeStyle as ee, Teleport as te, h as f } from "vue";
|
|
2
|
+
import { u as oe, a as ne, aN as ae, B as se, _ as le, af as H } from "./app-Ba80HxT3.js";
|
|
3
|
+
import { useBreakpoints as ie, useDialog as re, useSnackbar as ue, components as N } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as ce } from "./vue-i18n-CjtRsQMl.js";
|
|
5
|
+
const me = { class: "flex flex-col py-8" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ge = /* @__PURE__ */ Q({
|
|
6
|
+
__name: "PublishView",
|
|
7
|
+
setup(ye) {
|
|
8
|
+
const { t } = ce(), { breakpoints: x } = ie(), l = oe(), A = ne(), S = ae(), g = z(!1), c = r(() => A.state.inventory.updatedAt ? A.state.inventory.updatedAt : null), R = se(), C = re(), Y = ue(), $ = r(() => l.locations), _ = r(() => x.value.xs || x.value.sm), U = r(() => _.value ? 10 : 20), q = r(() => [
|
|
9
|
+
{
|
|
10
|
+
label: t("inventory.common.refresh"),
|
|
11
|
+
value: "refresh",
|
|
12
|
+
isPrimary: !1
|
|
13
|
+
},
|
|
14
|
+
{ label: t("inventory.publish.actions.publishAll"), value: "publish", isPrimary: !0 }
|
|
15
|
+
]);
|
|
16
|
+
async function E(e) {
|
|
17
|
+
switch (e) {
|
|
18
|
+
case "publish":
|
|
19
|
+
C.open({
|
|
20
|
+
title: t("inventory.common.publish"),
|
|
21
|
+
message: "Are you sure you want to publish to all locations?",
|
|
22
|
+
primaryActions: { text: t("inventory.common.publish"), close: !0 },
|
|
23
|
+
secondaryActions: { text: "Cancel", close: !0 }
|
|
24
|
+
}).onPrimary(async () => {
|
|
25
|
+
await S.publishAllInventory(), await l.readLocations();
|
|
26
|
+
});
|
|
27
|
+
break;
|
|
28
|
+
case "refresh":
|
|
29
|
+
g.value = !0, await l.readLocations(), g.value = !1;
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const w = z(!1), K = [
|
|
34
|
+
{
|
|
35
|
+
value: "publish",
|
|
36
|
+
label: t("inventory.publish.actions.publishAll")
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
function W(e) {
|
|
40
|
+
switch (w.value = !1, e) {
|
|
41
|
+
case "publish":
|
|
42
|
+
console.log("publish all");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const j = [
|
|
46
|
+
{
|
|
47
|
+
id: "type",
|
|
48
|
+
header: () => t("inventory.publish.columns.type"),
|
|
49
|
+
enableSorting: !0,
|
|
50
|
+
cell(e) {
|
|
51
|
+
return f(N.FmChip, {
|
|
52
|
+
color: "primary",
|
|
53
|
+
label: e.row.original.type
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
accessorKey: "name",
|
|
59
|
+
header: () => t("inventory.publish.columns.location"),
|
|
60
|
+
enableSorting: !0,
|
|
61
|
+
size: 300
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "version",
|
|
65
|
+
header: () => t("inventory.publish.columns.version"),
|
|
66
|
+
enableSorting: !0,
|
|
67
|
+
cell(e) {
|
|
68
|
+
var o, a;
|
|
69
|
+
return (o = e.row.original.inventory) != null && o.updatedAt ? H((a = e.row.original.inventory) == null ? void 0 : a.updatedAt) : "";
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "status",
|
|
74
|
+
header: () => t("inventory.publish.columns.status"),
|
|
75
|
+
enableSorting: !0,
|
|
76
|
+
cell(e) {
|
|
77
|
+
var p;
|
|
78
|
+
if (!c.value)
|
|
79
|
+
return "";
|
|
80
|
+
const o = ((p = e.row.original.inventory) == null ? void 0 : p.updatedAt) == c.value, a = e.row.original.dbName, m = e.row.original.type === "warehouse";
|
|
81
|
+
return f(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
class: "flex items-center gap-8"
|
|
85
|
+
},
|
|
86
|
+
[
|
|
87
|
+
f(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
class: [
|
|
91
|
+
"fm-status-badge",
|
|
92
|
+
o ? "fm-status-badge-success-secondary" : "fm-status-badge-info-secondary"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
t(o ? "inventory.publish.status.published" : "inventory.publish.status.outdated")
|
|
96
|
+
),
|
|
97
|
+
!o && !m ? f(N.FmButton, {
|
|
98
|
+
class: "tertiary",
|
|
99
|
+
variant: "secondary",
|
|
100
|
+
icon: "sync",
|
|
101
|
+
onClick: () => {
|
|
102
|
+
C.open({
|
|
103
|
+
title: t("inventory.common.publish"),
|
|
104
|
+
message: `Are you sure you want to publish this location "${e.row.original.name}"?`,
|
|
105
|
+
primaryActions: { text: t("inventory.common.publish"), close: !0 },
|
|
106
|
+
secondaryActions: { text: "Cancel", close: !0 }
|
|
107
|
+
}).onPrimary(async () => {
|
|
108
|
+
await S.publishInventory(a.split("_")[1]), await l.readLocations(), Y.open({ message: "Publish request submitted", type: "success" });
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}) : null
|
|
112
|
+
]
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// {
|
|
117
|
+
// id: 'action',
|
|
118
|
+
// header: '',
|
|
119
|
+
// cell(props) {
|
|
120
|
+
// return createContextMenuComponents(
|
|
121
|
+
// [DefaultRowActions[RowActionEnum.Edit], DefaultRowActions[RowActionEnum.Delete]],
|
|
122
|
+
// (action) => {
|
|
123
|
+
// onActionMenu(action, props.row.original)
|
|
124
|
+
// }
|
|
125
|
+
// )
|
|
126
|
+
// },
|
|
127
|
+
// enableSorting: false,
|
|
128
|
+
// size: 40,
|
|
129
|
+
// meta: {
|
|
130
|
+
// cellClass: '',
|
|
131
|
+
// headerClass: ''
|
|
132
|
+
// }
|
|
133
|
+
// }
|
|
134
|
+
];
|
|
135
|
+
return (e, o) => {
|
|
136
|
+
const a = s("FmChip"), m = s("FlexRender"), p = s("TableActionableRow"), G = s("FmTable"), J = s("FmCollapsibleTabs"), O = s("FmBottomSheet");
|
|
137
|
+
return I(), B(le, {
|
|
138
|
+
title: v(t)("inventory.publish.title"),
|
|
139
|
+
actions: q.value,
|
|
140
|
+
"onClick:action": E
|
|
141
|
+
}, X({
|
|
142
|
+
default: u(() => [
|
|
143
|
+
h("div", {
|
|
144
|
+
class: Z([
|
|
145
|
+
"flex flex-col gap-8 max-h-full",
|
|
146
|
+
{
|
|
147
|
+
"p-0": _.value,
|
|
148
|
+
"px-24 ": !_.value
|
|
149
|
+
}
|
|
150
|
+
])
|
|
151
|
+
}, [
|
|
152
|
+
n(G, {
|
|
153
|
+
style: ee(v(R).tableHeight),
|
|
154
|
+
"column-defs": j,
|
|
155
|
+
"row-data": $.value,
|
|
156
|
+
loading: !v(l)._currentLocation || g.value,
|
|
157
|
+
"loading-text": "Loading",
|
|
158
|
+
"page-size": U.value
|
|
159
|
+
}, {
|
|
160
|
+
"list-row": u((i) => [
|
|
161
|
+
n(p, { row: i }, {
|
|
162
|
+
default: u((d) => {
|
|
163
|
+
var F, k, M, y, P, L, T, V, b, D;
|
|
164
|
+
return [
|
|
165
|
+
h("div", me, [
|
|
166
|
+
h("div", pe, [
|
|
167
|
+
n(m, {
|
|
168
|
+
render: (M = (k = (F = d.code) == null ? void 0 : F.column) == null ? void 0 : k.columnDef) == null ? void 0 : M.cell,
|
|
169
|
+
props: (P = (y = d.code) == null ? void 0 : y.getContext) == null ? void 0 : P.call(y)
|
|
170
|
+
}, null, 8, ["render", "props"])
|
|
171
|
+
]),
|
|
172
|
+
h("div", de, [
|
|
173
|
+
n(m, {
|
|
174
|
+
render: (V = (T = (L = d.name) == null ? void 0 : L.column) == null ? void 0 : T.columnDef) == null ? void 0 : V.cell,
|
|
175
|
+
props: (D = (b = d.name) == null ? void 0 : b.getContext) == null ? void 0 : D.call(b)
|
|
176
|
+
}, null, 8, ["render", "props"])
|
|
177
|
+
])
|
|
178
|
+
])
|
|
179
|
+
];
|
|
180
|
+
}),
|
|
181
|
+
_: 2
|
|
182
|
+
}, 1032, ["row"])
|
|
183
|
+
]),
|
|
184
|
+
_: 1
|
|
185
|
+
}, 8, ["style", "row-data", "loading", "page-size"])
|
|
186
|
+
], 2),
|
|
187
|
+
(I(), B(te, { to: "body" }, [
|
|
188
|
+
n(O, {
|
|
189
|
+
"dismiss-away": "",
|
|
190
|
+
modelValue: w.value,
|
|
191
|
+
"onUpdate:modelValue": o[1] || (o[1] = (i) => w.value = i)
|
|
192
|
+
}, {
|
|
193
|
+
default: u(() => [
|
|
194
|
+
n(J, {
|
|
195
|
+
class: "pb-8",
|
|
196
|
+
items: K,
|
|
197
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => W(i))
|
|
198
|
+
})
|
|
199
|
+
]),
|
|
200
|
+
_: 1
|
|
201
|
+
}, 8, ["modelValue"])
|
|
202
|
+
]))
|
|
203
|
+
]),
|
|
204
|
+
_: 2
|
|
205
|
+
}, [
|
|
206
|
+
c.value ? {
|
|
207
|
+
name: "headerInfo",
|
|
208
|
+
fn: u(() => [
|
|
209
|
+
n(a, {
|
|
210
|
+
variant: "info",
|
|
211
|
+
label: `Latest: ${v(H)(c.value)}`
|
|
212
|
+
}, null, 8, ["label"])
|
|
213
|
+
]),
|
|
214
|
+
key: "0"
|
|
215
|
+
} : void 0
|
|
216
|
+
]), 1032, ["title", "actions"]);
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
export {
|
|
221
|
+
ge as default
|
|
222
|
+
};
|
package/dist/{PurchaseOrderPrintPreview-_MCAsdw9.js → PurchaseOrderPrintPreview-CO4a811o.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as h, computed as x, ref as m, onMounted as f, openBlock as n, createElementBlock as u, createElementVNode as t, toDisplayString as l, normalizeStyle as g, createTextVNode as i, Fragment as d, createCommentVNode as p, renderList as v, normalizeClass as w } from "vue";
|
|
2
2
|
import { useRoute as k } from "vue-router";
|
|
3
|
-
import {
|
|
3
|
+
import { ar as y, ae as C } from "./app-Ba80HxT3.js";
|
|
4
4
|
const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "text-right" }, N = { class: "header" }, E = { class: "sub-header" }, O = { class: "caption" }, S = { class: "address" }, D = { class: "text-right" }, T = { class: "sub-header" }, q = { class: "address" }, F = { class: "purchase-body" }, L = { class: "text-left" }, U = { class: "text-left" }, V = { class: "text-right" }, z = { style: { "padding-top": "30px" } }, B = { valign: "bottom" }, H = { class: "header" }, I = { class: "caption" }, M = {
|
|
5
5
|
class: "text-left",
|
|
6
6
|
style: { width: "20%" }
|