@feedmepos/mf-inventory-portal 0.0.22-dev.12 → 0.0.22-dev.16
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-Cjeqabxg.js → ApprovalView-CAYVSFN0.js} +4 -4
- package/dist/{BindingsDialog-DYf9izzO.js → BindingsDialog-vA6l3jG3.js} +1 -1
- package/dist/{BindingsPicker--GhOF5Zy.js → BindingsPicker-CtkS9du1.js} +8 -8
- package/dist/{BindingsTable-DFGX1bO_.js → BindingsTable-BsTvZ3Uc.js} +1 -1
- package/dist/{ClosingTemplateView-D0ZehXOT.js → ClosingTemplateView-Bjd9mypa.js} +5 -5
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CzXWOCCv.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-C-ixTs_z.js} +1 -1
- package/dist/{IngredientsView-D-M4VjtX.js → IngredientsView-mZKGdmy8.js} +3 -3
- package/dist/{IntegrationView-D29NyKuw.js → IntegrationView-DQXcW-ln.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DMzUk8cN.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CkIFefTS.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CrYQR5oS.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DbP09mHM.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-BmzWBQYf.js → PurchaseOrderPrintPreview-B8fEITH6.js} +1 -1
- package/dist/{ReceiveRequestView-D5uhgByr.js → ReceiveRequestView-0gHjqve_.js} +6 -6
- package/dist/RecipeView-D9Xl9ezv.js +590 -0
- package/dist/Standalone.vue.d.ts +2 -0
- package/dist/{StockView-jAGaTT7q.js → StockView-D1Q8Y387.js} +6 -6
- package/dist/{SupplierView-BjkhByNr.js → SupplierView-kheETesd.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CInXmMf_.js → TransferDetails.vue_vue_type_script_setup_true_lang-Cigg5L-V.js} +178 -177
- package/dist/{TransferDialog.vue_vue_type_script_setup_true_lang-CLiLhIMS.js → TransferDialog.vue_vue_type_script_setup_true_lang-Ck5_VSjb.js} +440 -437
- package/dist/TransferTemplateView-Cp6Qqig-.js +1209 -0
- package/dist/{UnitView-BrlpQn3T.js → UnitView-BAcYAfVj.js} +4 -4
- package/dist/{WarehouseView-CbTTIdv9.js → WarehouseView-CkhMv-Om.js} +2 -2
- package/dist/{app-BDzV3RNp.js → app-BdUHoQTw.js} +3418 -3400
- package/dist/app.js +1 -1
- package/dist/components/FmMinMaxInputRules.d.ts +2 -0
- package/dist/components/FmUnitInputRules.d.ts +2 -0
- package/dist/{decimal-CRTw2PGO.js → decimal-DEVEov-F.js} +1 -1
- package/dist/{defineDeepModel-BoSSw2c6.js → defineDeepModel-BZrIgGc7.js} +1 -1
- package/dist/{format-time-from-id-CxoHtJa5.js → format-time-from-id-DkDDZc4Y.js} +1 -1
- package/dist/helper/rules.d.ts +7 -1
- package/dist/helper/rules.spec.d.ts +1 -0
- package/dist/{id-to-date-CJbxtIFh.js → id-to-date-CN0cWcz6.js} +1 -1
- package/dist/{purchase-order-transaction-type-0nZnCUE7.js → purchase-order-transaction-type-B80tMuy6.js} +28 -27
- package/dist/{supplier-BA6jJGNv.js → supplier-BKYn47F9.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-Di0NHn-g.js → use-template-enabled-locations-2-Cg7uYAyw.js} +1 -1
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +522 -0
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +21 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +21 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +1 -1
- package/dist/{xlsx-BEDKASqP.js → xlsx-BshS3GM8.js} +1 -1
- package/dist/{xlsx.util-MTUBPx67.js → xlsx.util-B_wXW9m4.js} +2 -2
- package/package.json +1 -1
- package/dist/RecipeView-CREeE1nK.js +0 -581
- package/dist/TransferTemplateView-CUqEsRJ6.js +0 -1262
package/dist/app.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { FmMinMaxInputModel } from './FmMinMaxInputProps';
|
|
2
|
+
import type { FdoDecimal } from '@feedmepos/core/entity';
|
|
2
3
|
export declare function FmMinMaxRequired(): (model?: FmMinMaxInputModel) => true | "Required";
|
|
3
4
|
/** Both `min` and `max` are inclusive */
|
|
4
5
|
export declare function FmMinMaxBoundary(min: number, max: number): (model?: FmMinMaxInputModel) => string | true;
|
|
6
|
+
export declare function FmMinMaxMultipleOf(decimal: FdoDecimal): (model?: FmMinMaxInputModel) => string | true;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { FmGroupModelValue } from './FmUnitInputProps';
|
|
2
2
|
import type { ValidationResult } from '@feedmepos/ui-library';
|
|
3
|
+
import type { FdoDecimal } from '@feedmepos/core/entity';
|
|
3
4
|
export declare function FmUnitInputAmountIsNumberRule(): (value: FmGroupModelValue) => true | "Must be a number";
|
|
4
5
|
export declare function FmUnitInputAmountAtLeastRule(minimum: number): (value: FmGroupModelValue) => string | true;
|
|
5
6
|
export declare function FmUnitInputAmountMoreThanRule(minimum: number): (value: FmGroupModelValue) => string | true;
|
|
6
7
|
export declare function FmUnitInputAmountAtMostRule(maximum: number): (value: FmGroupModelValue) => string | true;
|
|
7
8
|
export declare function FmUnitInputMaxPrecisionRule(unit: FdoInventoryUnit, applyAmountRule?: boolean): (value: any) => ValidationResult;
|
|
8
9
|
export declare function FmUnitInputMaxPrecisionRule(precision: number, applyAmountRule?: boolean): (value: any) => ValidationResult;
|
|
10
|
+
export declare function FmUnitInputAmountMultipleOf(decimal: FdoDecimal): (value: FmGroupModelValue) => ValidationResult;
|
package/dist/helper/rules.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ValidationResult } from 'node_modules/@feedmepos/ui-library/dist/composables/useValidation';
|
|
2
2
|
import { type AdjustmentAmount } from './number';
|
|
3
3
|
import type { ISelectItem } from '@feedmepos/ui-library';
|
|
4
|
+
import type { FdoDecimal } from '@feedmepos/core/entity';
|
|
4
5
|
export declare function Required(): (val: string) => true | "Required";
|
|
5
6
|
export declare function isAdjustmentAmount(val: any): val is AdjustmentAmount;
|
|
6
7
|
export declare function AtLeast(amount: number | AdjustmentAmount, message?: string | ((current: number) => string)): (val: any) => string | true;
|
|
@@ -20,4 +21,9 @@ export declare function MaximumPrecision(unit: FdoInventoryUnit, measurement?: F
|
|
|
20
21
|
};
|
|
21
22
|
export declare function MaximumPrecisionLiteral(precision: number, message?: string | ((precision: number) => string)): (val: string) => string | true;
|
|
22
23
|
export declare function Unique(pool: ISelectItem[], current?: string, message?: (item: ISelectItem) => string): (value: any) => string | true;
|
|
23
|
-
export declare function MultipleOf(n: number):
|
|
24
|
+
export declare function MultipleOf(n: number): {
|
|
25
|
+
(val: any): ValidationResult;
|
|
26
|
+
};
|
|
27
|
+
export declare function MultipleOf(n: FdoDecimal): {
|
|
28
|
+
(val: any): ValidationResult;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ref as y, h as I, defineComponent as fe, onMounted as he, computed as R, resolveComponent as j, openBlock as E, createElementBlock as
|
|
3
|
-
import { i as ge } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { o as G, j as C, am as S, c as O, u as Q, z as ne, aa as se, K as ce, L as le, an as ie, ag as ue, x as de, b as me, a as pe } from "./app-BdUHoQTw.js";
|
|
2
|
+
import { ref as y, h as I, defineComponent as fe, onMounted as he, computed as R, resolveComponent as j, openBlock as E, createElementBlock as z, createElementVNode as $, createVNode as L, createCommentVNode as ve, createBlock as K } from "vue";
|
|
3
|
+
import { i as ge } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-C-ixTs_z.js";
|
|
4
4
|
import { F as B, D as M, R as _ } from "./row-action.enum-PMKMRrZR.js";
|
|
5
|
-
import { useDialog as Y, useSnackbar as J, FmButtonVariant as
|
|
6
|
-
import { f as ye, p as be } from "./format-time-from-id-
|
|
5
|
+
import { useDialog as Y, useSnackbar as J, FmButtonVariant as q, components as H } from "@feedmepos/ui-library";
|
|
6
|
+
import { f as ye, p as be } from "./format-time-from-id-DkDDZc4Y.js";
|
|
7
7
|
import { c as we } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
8
8
|
import { useCoreStore as Te, useI18n as Se } from "@feedmepos/mf-common";
|
|
9
9
|
import { defineStore as De } from "pinia";
|
|
@@ -150,12 +150,12 @@ const Ae = G((o, l) => {
|
|
|
150
150
|
message: "Deleted template can no longer be retrieved",
|
|
151
151
|
primaryActions: {
|
|
152
152
|
text: "Delete",
|
|
153
|
-
variant:
|
|
153
|
+
variant: q.Destructive,
|
|
154
154
|
close: !0
|
|
155
155
|
},
|
|
156
156
|
secondaryActions: {
|
|
157
157
|
text: "Cancel",
|
|
158
|
-
variant:
|
|
158
|
+
variant: q.Plain,
|
|
159
159
|
close: !0
|
|
160
160
|
}
|
|
161
161
|
}).onPrimary(async () => {
|
|
@@ -194,11 +194,11 @@ const Ae = G((o, l) => {
|
|
|
194
194
|
p.value.show = g;
|
|
195
195
|
},
|
|
196
196
|
"onAction:edit"() {
|
|
197
|
-
p.value.show = !1, d(
|
|
197
|
+
p.value.show = !1, d(O(u));
|
|
198
198
|
},
|
|
199
199
|
"onAction:use"(g) {
|
|
200
200
|
const m = C(), s = m.locations.find((i) => i.doc._id === g);
|
|
201
|
-
m.selectLocation(s), p.value.show = !1, b(
|
|
201
|
+
m.selectLocation(s), p.value.show = !1, b(O(u));
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
204
|
}
|
|
@@ -220,7 +220,7 @@ const Ae = G((o, l) => {
|
|
|
220
220
|
};
|
|
221
221
|
});
|
|
222
222
|
function W(o) {
|
|
223
|
-
const { skuById: l } = Q(), n =
|
|
223
|
+
const { skuById: l } = Q(), n = O(o);
|
|
224
224
|
return n.purchaseOrder.items = o.purchaseOrder.items.filter((e) => l[e.sku._id]), n;
|
|
225
225
|
}
|
|
226
226
|
const $e = "use";
|
|
@@ -257,7 +257,7 @@ function Ne() {
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
function g(s, i) {
|
|
260
|
-
switch (i =
|
|
260
|
+
switch (i = O(i), s) {
|
|
261
261
|
case $e:
|
|
262
262
|
return t(i);
|
|
263
263
|
case _.Details:
|
|
@@ -364,10 +364,10 @@ function Ne() {
|
|
|
364
364
|
loadTemplate: u
|
|
365
365
|
};
|
|
366
366
|
}
|
|
367
|
-
const
|
|
367
|
+
const Oe = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" }, Ue = {
|
|
368
368
|
key: 0,
|
|
369
369
|
class: "flex gap-8 fm-typo-en-body-md-400 text-fm-color-typo-warning"
|
|
370
|
-
},
|
|
370
|
+
}, ke = { class: "flex gap-12" }, Ee = /* @__PURE__ */ fe({
|
|
371
371
|
__name: "SelectTemplateDialog",
|
|
372
372
|
emits: ["close", "update:modelValue"],
|
|
373
373
|
setup(o, { emit: l }) {
|
|
@@ -397,7 +397,7 @@ const ke = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" },
|
|
|
397
397
|
}
|
|
398
398
|
return (m, s) => {
|
|
399
399
|
const i = j("FmIcon"), w = j("FmButton");
|
|
400
|
-
return E(),
|
|
400
|
+
return E(), z("div", Oe, [
|
|
401
401
|
s[2] || (s[2] = $("div", { class: "h-32 text-fm-color-typo-primary fm-typo-en-title-md-600" }, "Select one template", -1)),
|
|
402
402
|
L(ne, {
|
|
403
403
|
"model-value": [e.value],
|
|
@@ -407,7 +407,7 @@ const ke = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" },
|
|
|
407
407
|
"no-shadow": "",
|
|
408
408
|
"single-select": ""
|
|
409
409
|
}, null, 8, ["model-value", "items", "loading"]),
|
|
410
|
-
!f.value && !p.value.length ? (E(),
|
|
410
|
+
!f.value && !p.value.length ? (E(), z("div", Ue, [
|
|
411
411
|
$("div", null, [
|
|
412
412
|
L(i, {
|
|
413
413
|
name: "warning",
|
|
@@ -416,14 +416,14 @@ const ke = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" },
|
|
|
416
416
|
]),
|
|
417
417
|
s[0] || (s[0] = $("div", null, "You have not configured any templates", -1))
|
|
418
418
|
])) : ve("", !0),
|
|
419
|
-
$("div",
|
|
419
|
+
$("div", ke, [
|
|
420
420
|
s[1] || (s[1] = $("div", { class: "flex-1" }, null, -1)),
|
|
421
|
-
!f.value && !p.value.length ? (E(),
|
|
421
|
+
!f.value && !p.value.length ? (E(), K(w, {
|
|
422
422
|
key: 0,
|
|
423
423
|
label: "Create template",
|
|
424
424
|
"prepend-icon": "add",
|
|
425
425
|
onClick: T
|
|
426
|
-
})) : (E(),
|
|
426
|
+
})) : (E(), K(w, {
|
|
427
427
|
key: 1,
|
|
428
428
|
loading: f.value,
|
|
429
429
|
disabled: !e.value,
|
|
@@ -502,7 +502,7 @@ function xe(o, l) {
|
|
|
502
502
|
function w(c) {
|
|
503
503
|
const a = {
|
|
504
504
|
mode: B.UPDATE,
|
|
505
|
-
modelValue:
|
|
505
|
+
modelValue: O(c),
|
|
506
506
|
show: !0,
|
|
507
507
|
"onUpdate:show"(h) {
|
|
508
508
|
N.value.show = h;
|
|
@@ -541,7 +541,7 @@ function xe(o, l) {
|
|
|
541
541
|
r.value = !1;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function U() {
|
|
545
545
|
switch (o) {
|
|
546
546
|
case "receive/request":
|
|
547
547
|
return x();
|
|
@@ -553,21 +553,22 @@ function xe(o, l) {
|
|
|
553
553
|
T.value = {
|
|
554
554
|
startDate: c,
|
|
555
555
|
endDate: a
|
|
556
|
-
},
|
|
556
|
+
}, U();
|
|
557
557
|
}
|
|
558
558
|
e.watchLocation(async (c) => {
|
|
559
559
|
if (!c) {
|
|
560
560
|
p.value = [];
|
|
561
561
|
return;
|
|
562
562
|
}
|
|
563
|
-
await
|
|
563
|
+
await U();
|
|
564
564
|
});
|
|
565
565
|
const A = y(), V = y(Math.random().toString());
|
|
566
566
|
async function te(c, a) {
|
|
567
|
-
var P,
|
|
567
|
+
var P, k;
|
|
568
568
|
const h = Math.random().toString();
|
|
569
569
|
V.value = h;
|
|
570
570
|
const v = o === "receive/request" ? e.currentLocation : a == null ? void 0 : a.to, D = {
|
|
571
|
+
poRequest: a,
|
|
571
572
|
purchaseOrder: c,
|
|
572
573
|
transferTo: v == null ? void 0 : v.name,
|
|
573
574
|
transferToDbName: v == null ? void 0 : v.dbName,
|
|
@@ -586,7 +587,7 @@ function xe(o, l) {
|
|
|
586
587
|
} catch {
|
|
587
588
|
console.error("Error at fetching po request to check");
|
|
588
589
|
}
|
|
589
|
-
h === V.value && (A.value.canResubmit = !a, A.value.transferTo = (P = a == null ? void 0 : a.to) == null ? void 0 : P.name, A.value.transferToDbName = (
|
|
590
|
+
h === V.value && (A.value.canResubmit = !a, A.value.transferTo = (P = a == null ? void 0 : a.to) == null ? void 0 : P.name, A.value.transferToDbName = (k = a == null ? void 0 : a.to) == null ? void 0 : k.dbName);
|
|
590
591
|
}
|
|
591
592
|
}
|
|
592
593
|
async function re(c, a, h, v) {
|
|
@@ -605,7 +606,7 @@ function xe(o, l) {
|
|
|
605
606
|
)
|
|
606
607
|
},
|
|
607
608
|
v
|
|
608
|
-
), await new Promise((
|
|
609
|
+
), await new Promise((k) => setTimeout(k, 1e3));
|
|
609
610
|
const P = C().currentLocationDBName.startsWith("restaurant_");
|
|
610
611
|
a === S.enum.confirmDraft && c.effectiveAt && P ? d.open({
|
|
611
612
|
title: "Success",
|
|
@@ -623,7 +624,7 @@ function xe(o, l) {
|
|
|
623
624
|
type: "error"
|
|
624
625
|
}), console.error("Error when submitting PO operation", a, c, D);
|
|
625
626
|
} finally {
|
|
626
|
-
r.value = !1,
|
|
627
|
+
r.value = !1, U();
|
|
627
628
|
}
|
|
628
629
|
}
|
|
629
630
|
async function ae(c, a, h) {
|
|
@@ -649,7 +650,7 @@ function xe(o, l) {
|
|
|
649
650
|
purchaseOrders: p,
|
|
650
651
|
purchaseRequests: u,
|
|
651
652
|
updateDateRange: ee,
|
|
652
|
-
fetchData:
|
|
653
|
+
fetchData: U,
|
|
653
654
|
loading: r,
|
|
654
655
|
transferDialogProps: N,
|
|
655
656
|
promptCreateTransferDialog: i,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as S, j as u, V as m, W as y } from "./app-BdUHoQTw.js";
|
|
2
2
|
import { useCoreStore as c } from "@feedmepos/mf-common";
|
|
3
3
|
import { defineStore as b } from "pinia";
|
|
4
4
|
import { ref as l, computed as v } from "vue";
|