@feedmepos/mf-inventory-portal 0.0.22-dev.7 → 0.0.22-dev.9
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/{ApprovalView-B9s4exkr.js → ApprovalView-BPsScR5_.js} +4 -4
- package/dist/{BindingsDialog-uksEDFFX.js → BindingsDialog-GzX9Bo2g.js} +1 -1
- package/dist/{BindingsPicker-B2rQ9kJH.js → BindingsPicker-SbOetc0-.js} +19 -19
- package/dist/{BindingsTable-BLN_bAjO.js → BindingsTable-CAcE5y8U.js} +1 -1
- package/dist/{ClosingTemplateView-Bi06Gxzo.js → ClosingTemplateView-DECwEnlK.js} +91 -90
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CeBoTYGq.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnogYrRE.js} +1 -1
- package/dist/{IngredientsView-DY6yY-Fk.js → IngredientsView-8fT1Ljd5.js} +3 -3
- package/dist/{IntegrationView-C74CJ4PS.js → IntegrationView-CjGLRM78.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BmsbeAvi.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1FCwvO8A.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-RoZStI7P.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DlhNc8Vk.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-Dn5CQDnd.js → PurchaseOrderPrintPreview-5HIWHR_f.js} +1 -1
- package/dist/{ReceiveRequestView-BC61WMFL.js → ReceiveRequestView-CXZv8g5U.js} +6 -6
- package/dist/{RecipeView-DYbuUEFK.js → RecipeView-sB0Lgmob.js} +3 -3
- package/dist/{StockView-D_ZzX7yp.js → StockView-CY2kNohB.js} +6 -6
- package/dist/{SupplierView-ChewCZKN.js → SupplierView-DTqeZPts.js} +37 -37
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BBby29tW.js +762 -0
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-ByNQap9n.js +1498 -0
- package/dist/TransferTemplateView-DkRVfAox.js +1277 -0
- package/dist/{UnitView-Cx1xe3Wg.js → UnitView-BpU0Yk7X.js} +4 -4
- package/dist/{WarehouseView-CQQf0YFc.js → WarehouseView-DqxWgogc.js} +2 -2
- package/dist/api/inventory.d.ts +5 -7
- package/dist/api/netsuite.d.ts +40 -0
- package/dist/api/purchase-order-template.d.ts +0 -4
- package/dist/{app-emo4vLKK.js → app-BuyAj4kw.js} +11903 -11636
- package/dist/app.d.ts +6 -0
- package/dist/app.js +3 -3
- package/dist/{decimal-BO9I7LUt.js → decimal-DWbwRn_v.js} +1 -1
- package/dist/{defineDeepModel-D06lO_R2.js → defineDeepModel-DuVmbMwq.js} +4 -4
- package/dist/{format-time-from-id-HTOA-soi.js → format-time-from-id-BnmaRuab.js} +1 -1
- package/dist/{id-to-date-DAnKDcfC.js → id-to-date-CI5Vv0Ji.js} +1 -1
- package/dist/purchase-order-transaction-type-DrFJFvtK.js +676 -0
- package/dist/stores/api.d.ts +1 -0
- package/dist/stores/feature.d.ts +0 -1
- package/dist/stores/helper/core-store-proxy.d.ts +3 -0
- package/dist/stores/helper/generate-backend-urls.d.ts +1 -0
- package/dist/stores/location.d.ts +24 -42
- package/dist/stores/netsuite.d.ts +49 -0
- package/dist/stores/warehouse.d.ts +4 -7
- package/dist/style.css +1 -1
- package/dist/{supplier-CBf_J6D6.js → supplier-BQyK2eSZ.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-Bo3g55rA.js → use-template-enabled-locations-2-ClBq9FjN.js} +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +48 -84
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +48 -84
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +14 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +42 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +42 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +4 -7
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +2 -2
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +132 -84
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +44 -1014
- package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +11 -7
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -14
- package/dist/{xlsx-DX8dk9eD.js → xlsx-DiOKvJ6l.js} +1 -1
- package/dist/{xlsx.util-BaeMOrlY.js → xlsx.util-CZ7zYxdP.js} +2 -2
- package/package.json +5 -5
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CXmk2PYd.js +0 -740
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-D9XERa2u.js +0 -1409
- package/dist/TransferTemplateView-BIsn4jRY.js +0 -1238
- package/dist/purchase-order-transaction-type-73S8OLUt.js +0 -702
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as ee, ref as h, watch as te, computed as U, resolveComponent as ae, openBlock as g, createBlock as Z, unref as e, withCtx as b, createElementVNode as s, normalizeClass as oe, createVNode as n, normalizeStyle as re, toDisplayString as ne, createElementBlock as se, createCommentVNode as le, Teleport as ie, mergeProps as ce } from "vue";
|
|
2
|
-
import { Z as f, O as G, j as pe } from "./app-
|
|
3
|
-
import { b as ue, u as me, _ as de, a as fe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { u as _e } from "./purchase-order-transaction-type-
|
|
5
|
-
import { u as ve, _ as De } from "./TransferDetails.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { Z as f, O as G, j as pe } from "./app-BuyAj4kw.js";
|
|
3
|
+
import { b as ue, u as me, _ as de, a as fe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnogYrRE.js";
|
|
4
|
+
import { u as _e } from "./purchase-order-transaction-type-DrFJFvtK.js";
|
|
5
|
+
import { u as ve, _ as De } from "./TransferDetails.vue_vue_type_script_setup_true_lang-BBby29tW.js";
|
|
6
6
|
import { _ as he, F as _ } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
7
7
|
import { useBreakpoints as ge } from "@feedmepos/ui-library";
|
|
8
8
|
import { useI18n as be } from "@feedmepos/mf-common";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as d, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
|
|
2
|
-
import { u as V,
|
|
2
|
+
import { u as V, ao as L, _ as S } from "./app-BuyAj4kw.js";
|
|
3
3
|
const U = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex justify-end gap-8 items-center"
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as S, computed as
|
|
2
|
-
import { u as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as S, computed as u, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as r, createElementVNode as k } from "vue";
|
|
2
|
+
import { u as M, ao as x, y as z } from "./app-BuyAj4kw.js";
|
|
3
|
+
const F = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex flex-col gap-16"
|
|
6
|
-
},
|
|
6
|
+
}, K = { class: "flex justify-end gap-8 items-center" }, w = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "p-24 flex items-center justify-center gap-16"
|
|
9
9
|
}, N = /* @__PURE__ */ S({
|
|
10
10
|
__name: "BindingsPicker",
|
|
11
11
|
setup(L) {
|
|
12
|
-
const d =
|
|
12
|
+
const d = M(), C = u(() => d.recipes), I = u(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = u(() => a.value === "SKU" ? I.value.map((s) => ({
|
|
13
13
|
label: s.name,
|
|
14
14
|
sublabel: s.code,
|
|
15
15
|
value: s
|
|
16
16
|
})) : C.value.map((s) => ({
|
|
17
17
|
label: s.name,
|
|
18
18
|
value: s
|
|
19
|
-
}))), b =
|
|
19
|
+
}))), b = u({
|
|
20
20
|
get() {
|
|
21
21
|
if (a.value === "SKU") {
|
|
22
22
|
const e = i.value.filter((n) => n.type === "SKU");
|
|
@@ -62,9 +62,9 @@ const K = {
|
|
|
62
62
|
];
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
}),
|
|
65
|
+
}), y = l(), o = x(B);
|
|
66
66
|
async function B() {
|
|
67
|
-
await d.readInventory(),
|
|
67
|
+
await d.readInventory(), y.value = o.onMessage(
|
|
68
68
|
"props:binding-items",
|
|
69
69
|
(e) => {
|
|
70
70
|
g.value = !1, a.value = e.type, i.value = e.bindings;
|
|
@@ -77,38 +77,38 @@ const K = {
|
|
|
77
77
|
function R() {
|
|
78
78
|
o.sendMessage("@submit:items", i.value);
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const _ = l();
|
|
81
81
|
return U(() => {
|
|
82
|
-
const e =
|
|
82
|
+
const e = _.value;
|
|
83
83
|
e && new ResizeObserver(() => {
|
|
84
84
|
o.sendMessage("resize", e.scrollHeight);
|
|
85
85
|
}).observe(e);
|
|
86
86
|
}), V(() => {
|
|
87
87
|
var e, s;
|
|
88
|
-
(s = (e =
|
|
88
|
+
(s = (e = y.value) == null ? void 0 : e.removeEventListener) == null || s.call(e);
|
|
89
89
|
}), (e, s) => {
|
|
90
90
|
const n = E("FmButton"), t = E("FmCircularProgress");
|
|
91
91
|
return p(), f("div", {
|
|
92
92
|
class: "bg-white",
|
|
93
93
|
ref_key: "resizeableRef",
|
|
94
|
-
ref:
|
|
94
|
+
ref: _
|
|
95
95
|
}, [
|
|
96
|
-
g.value ? (p(), f("div",
|
|
97
|
-
|
|
96
|
+
g.value ? (p(), f("div", w, [
|
|
97
|
+
r(t, { size: "md" }),
|
|
98
98
|
s[1] || (s[1] = k("div", null, "Loading bindings dialog...", -1))
|
|
99
|
-
])) : (p(), f("div",
|
|
100
|
-
|
|
99
|
+
])) : (p(), f("div", F, [
|
|
100
|
+
r(z, {
|
|
101
101
|
"model-value": b.value,
|
|
102
102
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => b.value = m),
|
|
103
103
|
items: c.value
|
|
104
104
|
}, null, 8, ["model-value", "items"]),
|
|
105
|
-
k("div",
|
|
106
|
-
|
|
105
|
+
k("div", K, [
|
|
106
|
+
r(n, {
|
|
107
107
|
variant: "tertiary",
|
|
108
108
|
label: "Close",
|
|
109
109
|
onClick: P
|
|
110
110
|
}),
|
|
111
|
-
|
|
111
|
+
r(n, {
|
|
112
112
|
label: "Submit",
|
|
113
113
|
onClick: R
|
|
114
114
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as _, ref as c, provide as C, computed as f, resolveComponent as b, openBlock as p, createBlock as h, h as z, onMounted as B, onUnmounted as I, createElementBlock as y, createVNode as N, createElementVNode as x } from "vue";
|
|
2
|
-
import { q as v, u as E,
|
|
2
|
+
import { q as v, u as E, ao as L } from "./app-BuyAj4kw.js";
|
|
3
3
|
import { components as F } from "@feedmepos/ui-library";
|
|
4
4
|
import "@feedmepos/mf-common";
|
|
5
5
|
const P = /* @__PURE__ */ _({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { u as Ue, _ as Ee, a as Ne } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { ref as S, h as x, computed as P, defineComponent as Y, openBlock as k, createElementBlock as F, createElementVNode as f, toDisplayString as A, createVNode as w, unref as u, Fragment as _e, renderList as Ce, resolveComponent as V, createBlock as z, withCtx as I, watch as Me, isRef as Pe, createTextVNode as ve, normalizeClass as Se, normalizeStyle as Fe, Teleport as Ae, normalizeProps as Ve, guardReactiveProps as Ie, mergeProps as Re } from "vue";
|
|
2
|
+
import { u as Ue, _ as Ee, a as Ne } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnogYrRE.js";
|
|
3
3
|
import { useCoreStore as Be, useI18n as q } from "@feedmepos/mf-common";
|
|
4
|
-
import { useDialog as Q, useSnackbar as W, FmButtonVariant as be, components as
|
|
4
|
+
import { useDialog as Q, useSnackbar as W, FmButtonVariant as be, components as R, useProxiedModel as ze, useBreakpoints as Le } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as we, storeToRefs as Ye } from "pinia";
|
|
6
6
|
import { F as U, D as ye, R as E } from "./row-action.enum-PMKMRrZR.js";
|
|
7
|
-
import { n as je, c as xe, j as ke, u as Ke, R as He, y as Je, i as qe, Q as he } from "./app-
|
|
7
|
+
import { n as je, c as xe, j as ke, u as Ke, R as He, y as Je, i as qe, Q as he } from "./app-BuyAj4kw.js";
|
|
8
8
|
import { c as Ge, F as B, _ as Te } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
|
-
import { f as Oe } from "./format-time-from-id-
|
|
9
|
+
import { f as Oe } from "./format-time-from-id-BnmaRuab.js";
|
|
10
10
|
import "vue-router";
|
|
11
|
-
import { d as Qe } from "./defineDeepModel-
|
|
12
|
-
import { u as We } from "./use-template-enabled-locations-2-
|
|
11
|
+
import { d as Qe } from "./defineDeepModel-DuVmbMwq.js";
|
|
12
|
+
import { u as We } from "./use-template-enabled-locations-2-ClBq9FjN.js";
|
|
13
13
|
const G = je((m, g) => {
|
|
14
14
|
function v() {
|
|
15
15
|
var t;
|
|
@@ -46,7 +46,7 @@ const G = je((m, g) => {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}), O = we("closingTemplateActions", () => {
|
|
49
|
-
const m = Q(), g = W(), v = G(), s =
|
|
49
|
+
const m = Q(), g = W(), v = G(), s = S({});
|
|
50
50
|
function n() {
|
|
51
51
|
s.value = {
|
|
52
52
|
mode: U.CREATE,
|
|
@@ -107,7 +107,7 @@ const G = je((m, g) => {
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
const a =
|
|
110
|
+
const a = S({});
|
|
111
111
|
function i(d) {
|
|
112
112
|
a.value = {
|
|
113
113
|
template: d,
|
|
@@ -128,10 +128,10 @@ const G = je((m, g) => {
|
|
|
128
128
|
templateDialogProps: s,
|
|
129
129
|
templateDetailsProps: a
|
|
130
130
|
};
|
|
131
|
-
}),
|
|
131
|
+
}), De = we(
|
|
132
132
|
"closingTable",
|
|
133
133
|
function() {
|
|
134
|
-
const { t: g } = q(), { viewTemplate: v, updateTemplate: s, deleteTemplate: n } = O(), t =
|
|
134
|
+
const { t: g } = q(), { viewTemplate: v, updateTemplate: s, deleteTemplate: n } = O(), t = S({}), b = S(new Array()), a = S(!1), i = ke(), d = G();
|
|
135
135
|
async function c() {
|
|
136
136
|
if (b.value = [], !!i._currentLocation) {
|
|
137
137
|
a.value = !0;
|
|
@@ -229,22 +229,23 @@ const G = je((m, g) => {
|
|
|
229
229
|
header: () => "Status",
|
|
230
230
|
enableSorting: !1,
|
|
231
231
|
cell(e) {
|
|
232
|
-
var
|
|
233
|
-
const o = e.row.original, h = o._rev,
|
|
234
|
-
return
|
|
235
|
-
|
|
236
|
-
{
|
|
237
|
-
class: "fm-chip-success-secondary",
|
|
238
|
-
compact: !0
|
|
239
|
-
},
|
|
240
|
-
"Published"
|
|
241
|
-
) : x(
|
|
242
|
-
V.FmChip,
|
|
232
|
+
var C;
|
|
233
|
+
const o = e.row.original, h = o._rev, D = (C = t.value.publishedRevs) == null ? void 0 : C[o._id], $ = h === D;
|
|
234
|
+
return x(
|
|
235
|
+
"div",
|
|
243
236
|
{
|
|
244
|
-
class: "
|
|
245
|
-
compact: !0
|
|
237
|
+
class: "flex"
|
|
246
238
|
},
|
|
247
|
-
|
|
239
|
+
x(
|
|
240
|
+
"div",
|
|
241
|
+
{
|
|
242
|
+
class: [
|
|
243
|
+
"fm-status-badge",
|
|
244
|
+
$ ? "fm-status-badge-success-secondary" : "fm-status-badge-info-secondary"
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
$ ? "Published" : "Unpublished"
|
|
248
|
+
)
|
|
248
249
|
);
|
|
249
250
|
}
|
|
250
251
|
},
|
|
@@ -255,7 +256,7 @@ const G = je((m, g) => {
|
|
|
255
256
|
ye[E.Edit],
|
|
256
257
|
ye[E.Delete]
|
|
257
258
|
];
|
|
258
|
-
return Ge(h, (
|
|
259
|
+
return Ge(h, (D) => p(D, o));
|
|
259
260
|
},
|
|
260
261
|
enableSorting: !1,
|
|
261
262
|
size: 40,
|
|
@@ -276,7 +277,7 @@ const G = je((m, g) => {
|
|
|
276
277
|
var L = /* @__PURE__ */ ((m) => (m.Name = "Name", m.Unit = "Unit", m.Delete = "Delete", m))(L || {});
|
|
277
278
|
function Xe(m) {
|
|
278
279
|
return {
|
|
279
|
-
columnDefs:
|
|
280
|
+
columnDefs: P(() => {
|
|
280
281
|
const v = m.items.map((n) => n.sku.unit.measurements.length).reduce((n, t) => Math.max(n, t), 0);
|
|
281
282
|
return [
|
|
282
283
|
{
|
|
@@ -315,7 +316,7 @@ function Xe(m) {
|
|
|
315
316
|
var b, a, i;
|
|
316
317
|
const t = n.row.original;
|
|
317
318
|
return x(
|
|
318
|
-
|
|
319
|
+
R.FmFormGroup,
|
|
319
320
|
{
|
|
320
321
|
value: t.sku.unit._id,
|
|
321
322
|
modelValue: !((b = t.disabledMeasurements) != null && b.includes(t.sku.unit._id))
|
|
@@ -326,7 +327,7 @@ function Xe(m) {
|
|
|
326
327
|
class: "flex items-center gap-4"
|
|
327
328
|
},
|
|
328
329
|
[
|
|
329
|
-
x(
|
|
330
|
+
x(R.FmCheckbox, {
|
|
330
331
|
value: t.sku.unit._id,
|
|
331
332
|
modelValue: !((a = t.disabledMeasurements) != null && a.includes(t.sku.unit._id)),
|
|
332
333
|
disabled: m.disabled || !((i = t.disabledMeasurements) != null && i.includes(t.sku.unit._id)) && t.sku.unit.measurements.every(
|
|
@@ -354,7 +355,7 @@ function Xe(m) {
|
|
|
354
355
|
}
|
|
355
356
|
}),
|
|
356
357
|
x(
|
|
357
|
-
|
|
358
|
+
R.FmTooltip,
|
|
358
359
|
{ zIndex: 51 },
|
|
359
360
|
{
|
|
360
361
|
content() {
|
|
@@ -384,7 +385,7 @@ function Xe(m) {
|
|
|
384
385
|
var d, c, y, p;
|
|
385
386
|
const a = b.row.original, i = a.sku.unit.measurements[t];
|
|
386
387
|
return i ? x(
|
|
387
|
-
|
|
388
|
+
R.FmFormGroup,
|
|
388
389
|
{
|
|
389
390
|
modelValue: !((d = a.disabledMeasurements) != null && d.includes(i.id)),
|
|
390
391
|
value: i.id
|
|
@@ -395,7 +396,7 @@ function Xe(m) {
|
|
|
395
396
|
class: "flex items-center gap-4"
|
|
396
397
|
},
|
|
397
398
|
[
|
|
398
|
-
x(
|
|
399
|
+
x(R.FmCheckbox, {
|
|
399
400
|
value: i.id,
|
|
400
401
|
modelValue: !((c = a.disabledMeasurements) != null && c.includes(i.id)),
|
|
401
402
|
disabled: m.disabled || !((y = a.disabledMeasurements) != null && y.includes(i.id)) && ((p = a.disabledMeasurements) == null ? void 0 : p.includes(a.sku.unit._id)) && a.sku.unit.measurements.filter((_) => _.id != i.id).every((_) => {
|
|
@@ -421,7 +422,7 @@ function Xe(m) {
|
|
|
421
422
|
}
|
|
422
423
|
}),
|
|
423
424
|
x(
|
|
424
|
-
|
|
425
|
+
R.FmTooltip,
|
|
425
426
|
{ zIndex: 51 },
|
|
426
427
|
{
|
|
427
428
|
content() {
|
|
@@ -450,7 +451,7 @@ function Xe(m) {
|
|
|
450
451
|
return x(
|
|
451
452
|
"div",
|
|
452
453
|
{ class: "w-full flex justify-end" },
|
|
453
|
-
x(
|
|
454
|
+
x(R.FmButton, {
|
|
454
455
|
class: "delete-button",
|
|
455
456
|
key: t.sku._id,
|
|
456
457
|
type: "button",
|
|
@@ -482,7 +483,7 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
482
483
|
row: {}
|
|
483
484
|
},
|
|
484
485
|
setup(m) {
|
|
485
|
-
const g = m, v =
|
|
486
|
+
const g = m, v = P(() => g.row), s = P(
|
|
486
487
|
() => v.value.getVisibleCells().filter((n) => n.column.id !== L.Name && n.column.id !== L.Delete)
|
|
487
488
|
);
|
|
488
489
|
return (n, t) => {
|
|
@@ -535,7 +536,7 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
535
536
|
setLocations(e) {
|
|
536
537
|
s.locations = e;
|
|
537
538
|
}
|
|
538
|
-
}), c =
|
|
539
|
+
}), c = S();
|
|
539
540
|
g({
|
|
540
541
|
validateInputs: () => {
|
|
541
542
|
var e, o;
|
|
@@ -563,15 +564,15 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
563
564
|
get disabled() {
|
|
564
565
|
return v.disabled;
|
|
565
566
|
}
|
|
566
|
-
}), p =
|
|
567
|
+
}), p = P(() => y.columnDefs.value);
|
|
567
568
|
function _() {
|
|
568
569
|
const e = t.skus.map((h) => ({
|
|
569
570
|
label: h.name,
|
|
570
571
|
sublabel: h.code,
|
|
571
572
|
value: h
|
|
572
573
|
})), o = e.filter((h) => {
|
|
573
|
-
var
|
|
574
|
-
return (
|
|
574
|
+
var D;
|
|
575
|
+
return (D = s.items) == null ? void 0 : D.find(($) => $.sku._id === h.value._id);
|
|
575
576
|
}).map((h) => h.value);
|
|
576
577
|
b.open({
|
|
577
578
|
title: n("inventory.closing.form.items.selectItem"),
|
|
@@ -592,24 +593,24 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
592
593
|
variant: "tertiary"
|
|
593
594
|
}
|
|
594
595
|
}).onPrimary((h) => {
|
|
595
|
-
const
|
|
596
|
-
const l =
|
|
596
|
+
const D = s.items ?? [], $ = h.map((C) => {
|
|
597
|
+
const l = D.find((N) => N.sku._id === C._id);
|
|
597
598
|
return l || {
|
|
598
|
-
sku:
|
|
599
|
+
sku: C
|
|
599
600
|
};
|
|
600
601
|
});
|
|
601
|
-
|
|
602
|
+
$.sort((C, l) => C.sku.code.localeCompare(l.sku.code)), s.items = $;
|
|
602
603
|
});
|
|
603
604
|
}
|
|
604
605
|
return (e, o) => {
|
|
605
|
-
const h =
|
|
606
|
-
return k(), z(
|
|
606
|
+
const h = V("FmTextField"), D = V("FmButton"), $ = V("FmTable"), C = V("FmForm");
|
|
607
|
+
return k(), z(C, {
|
|
607
608
|
ref_key: "formRef",
|
|
608
609
|
ref: c,
|
|
609
610
|
class: "flex flex-col gap-32",
|
|
610
611
|
disabled: e.disabled
|
|
611
612
|
}, {
|
|
612
|
-
default:
|
|
613
|
+
default: I(() => [
|
|
613
614
|
f("div", at, [
|
|
614
615
|
f("div", it, [
|
|
615
616
|
w(h, {
|
|
@@ -630,7 +631,7 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
630
631
|
f("div", rt, [
|
|
631
632
|
f("div", ct, [
|
|
632
633
|
o[3] || (o[3] = f("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
|
|
633
|
-
w(
|
|
634
|
+
w(D, {
|
|
634
635
|
disabled: e.disabled,
|
|
635
636
|
label: "Select location",
|
|
636
637
|
"prepend-icon": "add",
|
|
@@ -639,7 +640,7 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
639
640
|
onClick: u(a)
|
|
640
641
|
}, null, 8, ["disabled", "onClick"])
|
|
641
642
|
]),
|
|
642
|
-
w(
|
|
643
|
+
w($, {
|
|
643
644
|
"column-defs": u(i),
|
|
644
645
|
"row-data": u(d),
|
|
645
646
|
"shrink-at": 9999,
|
|
@@ -649,7 +650,7 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
649
650
|
f("div", ut, [
|
|
650
651
|
f("div", dt, [
|
|
651
652
|
f("div", mt, A(u(n)("inventory.closing.form.items.title")), 1),
|
|
652
|
-
w(
|
|
653
|
+
w(D, {
|
|
653
654
|
disabled: e.disabled,
|
|
654
655
|
label: u(n)("inventory.closing.form.items.addItem"),
|
|
655
656
|
"prepend-icon": "add",
|
|
@@ -659,18 +660,18 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
659
660
|
size: "md"
|
|
660
661
|
}, null, 8, ["disabled", "label"])
|
|
661
662
|
]),
|
|
662
|
-
(k(), z(
|
|
663
|
+
(k(), z($, {
|
|
663
664
|
"column-defs": p.value,
|
|
664
665
|
"row-data": u(s).items,
|
|
665
666
|
key: u(s).items.map((l) => l.sku._id).join("."),
|
|
666
667
|
"hide-footer": ""
|
|
667
668
|
}, {
|
|
668
|
-
"list-row":
|
|
669
|
+
"list-row": I((l) => [
|
|
669
670
|
(k(), z(Te, {
|
|
670
671
|
row: l,
|
|
671
672
|
key: u(s).items.map((r) => r.sku._id).join(".")
|
|
672
673
|
}, {
|
|
673
|
-
default:
|
|
674
|
+
default: I((r) => [
|
|
674
675
|
w(nt, {
|
|
675
676
|
row: l,
|
|
676
677
|
"cell-by-col-id": r
|
|
@@ -696,7 +697,7 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
696
697
|
},
|
|
697
698
|
emits: ["update:show", "submitted"],
|
|
698
699
|
setup(m, { expose: g, emit: v }) {
|
|
699
|
-
var
|
|
700
|
+
var C;
|
|
700
701
|
const s = m, n = v, t = G(), b = W(), { t: a } = q(), i = ze(s, "show");
|
|
701
702
|
function d() {
|
|
702
703
|
return {
|
|
@@ -705,7 +706,7 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
705
706
|
items: []
|
|
706
707
|
};
|
|
707
708
|
}
|
|
708
|
-
const c =
|
|
709
|
+
const c = S(s.modelValue ?? d()), y = S(((C = s.modelValue) == null ? void 0 : C._id) ?? `${Math.random()}`);
|
|
709
710
|
Me(
|
|
710
711
|
() => s.show,
|
|
711
712
|
(l) => {
|
|
@@ -713,7 +714,7 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
713
714
|
l && (c.value = s.modelValue ?? d(), y.value = ((r = s.modelValue) == null ? void 0 : r._id) ?? `${Math.random()}`);
|
|
714
715
|
}
|
|
715
716
|
);
|
|
716
|
-
const p =
|
|
717
|
+
const p = S(!1), _ = P(() => {
|
|
717
718
|
switch (s.mode) {
|
|
718
719
|
case U.READ:
|
|
719
720
|
return "";
|
|
@@ -723,7 +724,7 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
723
724
|
return a("inventory.closing.template.update.title");
|
|
724
725
|
}
|
|
725
726
|
return "";
|
|
726
|
-
}), e =
|
|
727
|
+
}), e = S();
|
|
727
728
|
g({
|
|
728
729
|
validateInputs: () => {
|
|
729
730
|
var l, r;
|
|
@@ -780,7 +781,7 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
780
781
|
}
|
|
781
782
|
}
|
|
782
783
|
}
|
|
783
|
-
function
|
|
784
|
+
function D() {
|
|
784
785
|
switch (s.mode) {
|
|
785
786
|
case U.CREATE:
|
|
786
787
|
return o();
|
|
@@ -788,42 +789,42 @@ const Ze = { class: "flex flex-col gap-16 py-12" }, et = { class: "flex" }, tt =
|
|
|
788
789
|
return h();
|
|
789
790
|
}
|
|
790
791
|
}
|
|
791
|
-
function
|
|
792
|
+
function $() {
|
|
792
793
|
var l, r;
|
|
793
794
|
(r = (l = e.value) == null ? void 0 : l.validateInputs) == null || r.call(l);
|
|
794
795
|
}
|
|
795
796
|
return (l, r) => {
|
|
796
|
-
const N =
|
|
797
|
-
return k(), z(
|
|
797
|
+
const N = V("FmButton"), M = V("FmSideSheet");
|
|
798
|
+
return k(), z(M, {
|
|
798
799
|
modelValue: u(i),
|
|
799
800
|
"onUpdate:modelValue": r[2] || (r[2] = (T) => Pe(i) ? i.value = T : null),
|
|
800
801
|
"dismiss-away": "",
|
|
801
802
|
"close-button": "",
|
|
802
803
|
"max-width": 800
|
|
803
804
|
}, {
|
|
804
|
-
"side-sheet-header":
|
|
805
|
+
"side-sheet-header": I(() => [
|
|
805
806
|
f("div", ft, [
|
|
806
807
|
f("div", gt, A(_.value), 1)
|
|
807
808
|
])
|
|
808
809
|
]),
|
|
809
|
-
default:
|
|
810
|
+
default: I(() => [
|
|
810
811
|
(k(), z(pt, {
|
|
811
812
|
class: "w-full",
|
|
812
813
|
ref_key: "formRef",
|
|
813
814
|
ref: e,
|
|
814
|
-
onValidationSuccess:
|
|
815
|
+
onValidationSuccess: D,
|
|
815
816
|
"model-value": c.value,
|
|
816
817
|
"onUpdate:modelValue": r[0] || (r[0] = (T) => c.value = T),
|
|
817
818
|
disabled: p.value,
|
|
818
819
|
key: y.value
|
|
819
820
|
}, null, 8, ["model-value", "disabled"]))
|
|
820
821
|
]),
|
|
821
|
-
"side-sheet-footer":
|
|
822
|
+
"side-sheet-footer": I(() => [
|
|
822
823
|
f("div", vt, [
|
|
823
824
|
w(N, {
|
|
824
825
|
loading: p.value,
|
|
825
826
|
label: u(a)("common.save"),
|
|
826
|
-
onClick:
|
|
827
|
+
onClick: $
|
|
827
828
|
}, null, 8, ["loading", "label"]),
|
|
828
829
|
w(N, {
|
|
829
830
|
disabled: p.value,
|
|
@@ -847,14 +848,14 @@ const _t = /* @__PURE__ */ qe(yt, [["render", ht]]), wt = { class: "flex flex-co
|
|
|
847
848
|
}, Tt = {
|
|
848
849
|
key: 2,
|
|
849
850
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary"
|
|
850
|
-
},
|
|
851
|
+
}, Dt = {
|
|
851
852
|
key: 3,
|
|
852
853
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary flex flex-col gap-12"
|
|
853
|
-
},
|
|
854
|
+
}, $t = { key: 4 }, Ct = { class: "flex sm:flex-col xs:flex-col justify-end gap-8 w-full mb-16" }, Mt = /* @__PURE__ */ Y({
|
|
854
855
|
__name: "ClosingTemplatePublish",
|
|
855
856
|
emits: ["close"],
|
|
856
857
|
setup(m, { emit: g }) {
|
|
857
|
-
const v =
|
|
858
|
+
const v = S(!1), s = W(), n = G(), t = De(), b = g;
|
|
858
859
|
async function a() {
|
|
859
860
|
v.value = !0;
|
|
860
861
|
try {
|
|
@@ -873,14 +874,14 @@ const _t = /* @__PURE__ */ qe(yt, [["render", ht]]), wt = { class: "flex flex-co
|
|
|
873
874
|
v.value = !1;
|
|
874
875
|
}
|
|
875
876
|
}
|
|
876
|
-
const i =
|
|
877
|
+
const i = P(() => t.recentPublish.recentJob), d = P(
|
|
877
878
|
() => t.templates.length && (!i.value || i.value.outlets.length === i.value.completed.length)
|
|
878
879
|
);
|
|
879
880
|
function c() {
|
|
880
881
|
b("close");
|
|
881
882
|
}
|
|
882
883
|
return (y, p) => {
|
|
883
|
-
const _ =
|
|
884
|
+
const _ = V("FmCircularProgress"), e = V("FmButton");
|
|
884
885
|
return k(), F("div", wt, [
|
|
885
886
|
u(t).templates.length ? v.value ? (k(), F("div", kt, [
|
|
886
887
|
f("div", null, [
|
|
@@ -892,14 +893,14 @@ const _t = /* @__PURE__ */ qe(yt, [["render", ht]]), wt = { class: "flex flex-co
|
|
|
892
893
|
p[0] || (p[0] = f("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, [
|
|
893
894
|
f("span", null, "Sending a task to publish templates to all outlets...")
|
|
894
895
|
], -1))
|
|
895
|
-
])) : i.value ? i.value.outlets.length === i.value.completed.length ? (k(), F("div",
|
|
896
|
+
])) : i.value ? i.value.outlets.length === i.value.completed.length ? (k(), F("div", Dt, [
|
|
896
897
|
f("p", null, [
|
|
897
898
|
ve(" Your recent publishing task at " + A(u(he)(new Date(i.value.createdAt))) + " has ", 1),
|
|
898
899
|
p[1] || (p[1] = f("span", { class: "fm-typo-en-body-lg-600" }, "completed", -1)),
|
|
899
900
|
ve(" at " + A(u(he)(new Date(i.value.updatedAt))) + ". ", 1)
|
|
900
901
|
]),
|
|
901
902
|
p[2] || (p[2] = f("p", null, "Do you want to publish to all outlets?", -1))
|
|
902
|
-
])) : (k(), F("div",
|
|
903
|
+
])) : (k(), F("div", $t, " Your recent publishing task is still pending (" + A(i.value.completed.length) + " / " + A(i.value.outlets.length) + "). Please wait until all publishing task has completed. ", 1)) : (k(), F("div", Tt, " You have no recent publish activity. Do you want to publish to all outlets? ")) : (k(), F("div", xt, "You have no template to publish.")),
|
|
903
904
|
f("div", Ct, [
|
|
904
905
|
w(e, {
|
|
905
906
|
disabled: !d.value,
|
|
@@ -919,9 +920,9 @@ const _t = /* @__PURE__ */ qe(yt, [["render", ht]]), wt = { class: "flex flex-co
|
|
|
919
920
|
}), Pt = { class: "flex-1 flex flex-col gap-8" }, St = { class: "flex flex-col" }, Ft = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, At = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Vt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, It = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, qt = /* @__PURE__ */ Y({
|
|
920
921
|
__name: "ClosingTemplateView",
|
|
921
922
|
setup(m) {
|
|
922
|
-
const { t: g } = q(), { createTemplate: v, updateTemplate: s } = O(), { templateDialogProps: n, templateDetailsProps: t } = Ye(O()), b = ke(), a = Q(), i =
|
|
923
|
+
const { t: g } = q(), { createTemplate: v, updateTemplate: s } = O(), { templateDialogProps: n, templateDetailsProps: t } = Ye(O()), b = ke(), a = Q(), i = De(), d = Ue(), { breakpoints: c } = Le();
|
|
923
924
|
b.watchLocation(i.fetchTemplates);
|
|
924
|
-
const y =
|
|
925
|
+
const y = P(() => i.loading), p = S(""), _ = P(() => c.value.xs || c.value.sm), e = P(() => _.value ? 10 : 20);
|
|
925
926
|
function o(l) {
|
|
926
927
|
switch (l) {
|
|
927
928
|
case E.Add:
|
|
@@ -941,10 +942,10 @@ const _t = /* @__PURE__ */ qe(yt, [["render", ht]]), wt = { class: "flex flex-co
|
|
|
941
942
|
}
|
|
942
943
|
});
|
|
943
944
|
}
|
|
944
|
-
function
|
|
945
|
+
function D(l) {
|
|
945
946
|
return l;
|
|
946
947
|
}
|
|
947
|
-
const
|
|
948
|
+
const $ = P(() => {
|
|
948
949
|
const l = [
|
|
949
950
|
{
|
|
950
951
|
label: g("inventory.closing.template.create.title"),
|
|
@@ -961,19 +962,19 @@ const _t = /* @__PURE__ */ qe(yt, [["render", ht]]), wt = { class: "flex flex-co
|
|
|
961
962
|
isPrimary: !1
|
|
962
963
|
}
|
|
963
964
|
];
|
|
964
|
-
}),
|
|
965
|
+
}), C = P(() => {
|
|
965
966
|
const l = [{ icon: "refresh", onClick: i.fetchTemplates }];
|
|
966
967
|
return _.value ? [{ icon: "publish", onClick: h }, ...l] : l;
|
|
967
968
|
});
|
|
968
969
|
return (l, r) => {
|
|
969
|
-
const N =
|
|
970
|
+
const N = V("FmTable");
|
|
970
971
|
return k(), F(_e, null, [
|
|
971
972
|
w(Ee, {
|
|
972
973
|
title: u(g)("inventory.closing.template.title"),
|
|
973
|
-
actions:
|
|
974
|
+
actions: $.value,
|
|
974
975
|
"onClick:action": o
|
|
975
976
|
}, {
|
|
976
|
-
default:
|
|
977
|
+
default: I(() => [
|
|
977
978
|
f("div", {
|
|
978
979
|
class: Se([
|
|
979
980
|
"flex flex-col gap-8 max-h-full",
|
|
@@ -986,8 +987,8 @@ const _t = /* @__PURE__ */ qe(yt, [["render", ht]]), wt = { class: "flex flex-co
|
|
|
986
987
|
w(Ne, {
|
|
987
988
|
searchable: "",
|
|
988
989
|
search: p.value,
|
|
989
|
-
"onUpdate:search": r[0] || (r[0] = (
|
|
990
|
-
actions:
|
|
990
|
+
"onUpdate:search": r[0] || (r[0] = (M) => p.value = M),
|
|
991
|
+
actions: C.value
|
|
991
992
|
}, null, 8, ["search", "actions"]),
|
|
992
993
|
w(N, {
|
|
993
994
|
style: Fe(u(d).tableHeight),
|
|
@@ -995,15 +996,15 @@ const _t = /* @__PURE__ */ qe(yt, [["render", ht]]), wt = { class: "flex flex-co
|
|
|
995
996
|
"row-data": u(i).templates,
|
|
996
997
|
"search-value": p.value,
|
|
997
998
|
loading: y.value,
|
|
998
|
-
onRowClick: r[1] || (r[1] = (
|
|
999
|
+
onRowClick: r[1] || (r[1] = (M) => u(s)(M.original)),
|
|
999
1000
|
"page-size": e.value
|
|
1000
1001
|
}, {
|
|
1001
|
-
"list-row":
|
|
1002
|
+
"list-row": I((M) => [
|
|
1002
1003
|
w(Te, {
|
|
1003
|
-
row:
|
|
1004
|
+
row: M,
|
|
1004
1005
|
onRowClick: (T) => u(s)(T)
|
|
1005
1006
|
}, {
|
|
1006
|
-
default:
|
|
1007
|
+
default: I((T) => {
|
|
1007
1008
|
var X, Z, ee, j, te, se, le, oe, K, ne, ae, ie, re, ce, ue, H, de, me, pe, fe, J, ge;
|
|
1008
1009
|
return [
|
|
1009
1010
|
f("div", Pt, [
|
|
@@ -1020,10 +1021,10 @@ const _t = /* @__PURE__ */ qe(yt, [["render", ht]]), wt = { class: "flex flex-co
|
|
|
1020
1021
|
props: (ne = (K = T.name) == null ? void 0 : K.getContext) == null ? void 0 : ne.call(K)
|
|
1021
1022
|
}, null, 8, ["render", "props"])
|
|
1022
1023
|
]),
|
|
1023
|
-
f("div", null, A((ae =
|
|
1024
|
+
f("div", null, A((ae = M.original.locations) != null && ae.length ? `Enabled for ${(ie = M.original.locations) == null ? void 0 : ie.length} outlets` : "Enabled for all outlets"), 1),
|
|
1024
1025
|
f("div", Vt, A([
|
|
1025
|
-
...
|
|
1026
|
-
...
|
|
1026
|
+
...M.original.items.slice(0, 3).map(($e) => $e.sku.name),
|
|
1027
|
+
...M.original.items.length >= 3 ? [`and ${M.original.items.length - 3} more items`] : []
|
|
1027
1028
|
].join(", ")), 1),
|
|
1028
1029
|
f("div", It, [
|
|
1029
1030
|
w(u(B), {
|
|
@@ -1053,7 +1054,7 @@ const _t = /* @__PURE__ */ qe(yt, [["render", ht]]), wt = { class: "flex flex-co
|
|
|
1053
1054
|
(k(), z(Ae, { to: "body" }, [
|
|
1054
1055
|
w(_t, Ve(Ie(u(t))), null, 16),
|
|
1055
1056
|
w(bt, Re(u(n), {
|
|
1056
|
-
onSubmitted: r[2] || (r[2] = (
|
|
1057
|
+
onSubmitted: r[2] || (r[2] = (M) => u(i).fetchTemplates())
|
|
1057
1058
|
}), null, 16)
|
|
1058
1059
|
]))
|
|
1059
1060
|
], 64);
|