@feedmepos/mf-inventory-portal 0.0.23-dev.24 → 0.0.23-dev.26
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-dQy0_X6Q.js → App-C0hXAs5E.js} +49 -45
- package/dist/{ApprovalView-CxwAuXae.js → ApprovalView-Db5Aq3gK.js} +15 -15
- package/dist/{BindingsDialog-BX8J03Uc.js → BindingsDialog-dKNKrWKv.js} +9 -9
- package/dist/{BindingsPicker-CAW_3sSv.js → BindingsPicker-dN1bNnc0.js} +5 -5
- package/dist/{BindingsTable-7UmxSmdW.js → BindingsTable-BA461fcU.js} +8 -8
- package/dist/{ClosingDraftView-DukJAMlK.js → ClosingDraftView-aRHVKTA6.js} +68 -69
- package/dist/{ClosingTemplateView-Dm7_gMTo.js → ClosingTemplateView-BYnC4Whw.js} +58 -61
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DN3N20Nb.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BdjeCWX1.js} +13 -13
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BrPRiS_u.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CP2euPwM.js} +46 -46
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bln1lReW.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C4aYGbW2.js} +7 -7
- package/dist/{IngredientGroupView-BKIJHeh9.js → IngredientGroupView-vdG6npct.js} +40 -40
- package/dist/{IngredientsView-Blnohl3I.js → IngredientsView-DWRAoLHx.js} +207 -210
- package/dist/{IntegrationView-Dna4bUA7.js → IntegrationView-Dp_A-Swf.js} +89 -90
- package/dist/{InventoryBindingForm-D6HSF8Wn.js → InventoryBindingForm-D_wSUUKv.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CnWvwNjJ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-2Mnqz6HN.js} +27 -27
- package/dist/{InventoryBindingSummary-CNNCv8NX.js → InventoryBindingSummary-oyRdM7Pd.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CrMkMTAt.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CSabNdfV.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Cw3E2NKS.js → PremiumBadge.vue_vue_type_script_setup_true_lang-tu1Al7wM.js} +17 -18
- package/dist/{PurchaseOrderPrintPreview-PEN03dZK.js → PurchaseOrderPrintPreview-B4m8t90I.js} +1 -1
- package/dist/{ReceiveRequestView-rTUhjMLY.js → ReceiveRequestView-DIJb_dU2.js} +26 -27
- package/dist/{RecipeView-V1hx1AUG.js → RecipeView-Ch5KMGLJ.js} +47 -48
- package/dist/{StockView-B5nDn8nO.js → StockView-BVuzsMG7.js} +7 -7
- package/dist/{SupplierView-DyyRxm6k.js → SupplierView-DEC2LmtN.js} +203 -206
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D6oZOwHL.js → TransferDetails.vue_vue_type_script_setup_true_lang-9UZWws3P.js} +61 -62
- package/dist/{TransferTemplateView-OTR9Re51.js → TransferTemplateView-DAMQ_Whn.js} +144 -145
- package/dist/{UnitView-DGhm1JXD.js → UnitView-CFwHRgQ-.js} +3 -3
- package/dist/{WarehouseView-DMAvFisd.js → WarehouseView-HE71bVOX.js} +52 -52
- package/dist/app-CRSuR04o.js +84133 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-DuJEFEYp.js → decimal-B5DqWjel.js} +1 -1
- package/dist/{feature-BRqas45f.js → feature-DxNphYNO.js} +1 -1
- package/dist/{format-unit-display-G6VtlQe7.js → format-unit-display-D40MKAIU.js} +50 -53
- package/dist/{index-D3f51k-I.js → index-BWDsx2Ik.js} +1 -1
- package/dist/{stock-DZkj2LE0.js → stock-BAPZYfON.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-Cm5Cw3u7.js → supplier-Bp7xaTFX.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-DCt0wUiw.js → use-inventory-binding-dialog-cxY29PPx.js} +1 -1
- package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
- package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
- package/dist/views/adjustment-template/import/export.d.ts +60 -0
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +1 -1
- package/package.json +1 -1
- package/dist/FmDroppableField-BqZcDO2v.js +0 -154
- package/dist/app-DQRbwx-z.js +0 -58903
- package/dist/netsuite-D4b5JceM.js +0 -251
- package/dist/xlsx-9Gc42bxv.js +0 -24004
- package/dist/xlsx.util-CEvUL8mk.js +0 -78
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface AdjustmentTemplateImportItemProps {
|
|
2
|
+
type: 'create' | 'update';
|
|
3
|
+
name: string;
|
|
4
|
+
locations?: FdoInventoryLocation[] | null | undefined;
|
|
5
|
+
items?: FdoAdjustmentTemplateItem[] | null | undefined;
|
|
6
|
+
errors: string[];
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AdjustmentTemplateImportItemProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AdjustmentTemplateImportItemProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
12
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
13
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
14
|
+
} : {
|
|
15
|
+
type: import('vue').PropType<T[K]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { WorkBook, WorkSheet } from 'xlsx';
|
|
2
|
+
import type { RevisionIdMeta } from '@feedmepos/inventory-core';
|
|
3
|
+
import type { FdoMenuV4 } from '@feedmepos/menu/entity';
|
|
4
|
+
export declare enum ReservedSheetNames {
|
|
5
|
+
Ingredients = "Ingredients"
|
|
6
|
+
}
|
|
7
|
+
export interface AdjustmentItemRow {
|
|
8
|
+
type?: string;
|
|
9
|
+
code?: string | null;
|
|
10
|
+
name?: string;
|
|
11
|
+
/** abbrev for base unit or measurement unit */
|
|
12
|
+
unit?: string;
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface TemplateInfo {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
reference: string;
|
|
19
|
+
locations: string[];
|
|
20
|
+
}
|
|
21
|
+
export interface ImportCreateResult {
|
|
22
|
+
type: 'create';
|
|
23
|
+
template: Omit<FdoAdjustmentTemplate, '_id'>;
|
|
24
|
+
excelSheetName: string;
|
|
25
|
+
errors: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface ImportUpdateResult {
|
|
28
|
+
type: 'update';
|
|
29
|
+
original: FdoAdjustmentTemplate;
|
|
30
|
+
template: FdoAdjustmentTemplate & RevisionIdMeta;
|
|
31
|
+
excelSheetName: string;
|
|
32
|
+
errors: string[];
|
|
33
|
+
}
|
|
34
|
+
export type ImportResult = {
|
|
35
|
+
invalidExcel: boolean;
|
|
36
|
+
invalidExcelMessage?: string;
|
|
37
|
+
importCreateResult: ImportCreateResult[];
|
|
38
|
+
importUpdateResult: ImportUpdateResult[];
|
|
39
|
+
};
|
|
40
|
+
export type ObjectWithIndex<T> = {
|
|
41
|
+
index: number;
|
|
42
|
+
data: T;
|
|
43
|
+
};
|
|
44
|
+
export declare const FakeUnit: FdoInventoryUnit;
|
|
45
|
+
export declare function templateItemToExcelRow(item: FdoAdjustmentTemplateItem, inventory: FdoInventory, menu?: FdoMenuV4 | null): AdjustmentItemRow[];
|
|
46
|
+
export type ColIdHeader<T> = {
|
|
47
|
+
id: keyof T;
|
|
48
|
+
name: string;
|
|
49
|
+
};
|
|
50
|
+
export declare function getExcelHeaders(): ColIdHeader<AdjustmentItemRow>[];
|
|
51
|
+
export declare function exportTemplates(templates: FdoAdjustmentTemplate[]): string;
|
|
52
|
+
export declare function exportImportTemplate(): string;
|
|
53
|
+
/** @returns empty array if for all locations */
|
|
54
|
+
export declare function extractLocations(locationRow: string[]): {
|
|
55
|
+
location?: FdoInventoryLocation;
|
|
56
|
+
errors: string[];
|
|
57
|
+
}[];
|
|
58
|
+
export declare function worksheetToTemplateMeta(sheet: WorkSheet): TemplateInfo;
|
|
59
|
+
export declare function worksheetToItemRow(sheet: WorkSheet): ObjectWithIndex<AdjustmentItemRow>[];
|
|
60
|
+
export declare function getItemToCreateUpdate(workbook: WorkBook): ImportResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ColumnDef } from '@feedmepos/ui-library';
|
|
2
2
|
import type { RevisionIdMeta } from '@feedmepos/inventory-core';
|
|
3
|
-
export declare const useClosingDraftTable: import("pinia").StoreDefinition<"
|
|
3
|
+
export declare const useClosingDraftTable: import("pinia").StoreDefinition<"closingDraftTable", import("pinia")._UnwrapAll<Pick<{
|
|
4
4
|
columnDefs: ColumnDef<{
|
|
5
5
|
remark?: string | null | undefined;
|
|
6
6
|
_rev?: string | null | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ColumnDef } from '@feedmepos/ui-library';
|
|
2
2
|
import { type RecentPublish } from '@/api/closing-template';
|
|
3
3
|
import type { RevisionIdMeta } from '@feedmepos/inventory-core';
|
|
4
|
-
export declare const useClosingTemplateTable: import("pinia").StoreDefinition<"
|
|
4
|
+
export declare const useClosingTemplateTable: import("pinia").StoreDefinition<"closingTemplateTable", import("pinia")._UnwrapAll<Pick<{
|
|
5
5
|
columnDefs: ColumnDef<{
|
|
6
6
|
ref?: string | null | undefined;
|
|
7
7
|
_rev?: string | null | undefined;
|
package/package.json
CHANGED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { defineComponent as U, ref as d, computed as y, resolveComponent as k, openBlock as s, createElementBlock as c, createElementVNode as p, createCommentVNode as S, renderSlot as u, createBlock as C, normalizeClass as f, toDisplayString as F, unref as B } from "vue";
|
|
2
|
-
import { useI18n as W } from "@feedmepos/mf-common";
|
|
3
|
-
import { _ as q } from "./app-DQRbwx-z.js";
|
|
4
|
-
const G = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "relative"
|
|
7
|
-
}, H = ["accept", "disabled"], J = { class: "flex flex-col gap-8" }, K = ["accept", "disabled"], M = /* @__PURE__ */ U({
|
|
8
|
-
__name: "FmDroppableField",
|
|
9
|
-
props: {
|
|
10
|
-
buttonLabel: {},
|
|
11
|
-
label: { default: "" },
|
|
12
|
-
disabled: { type: Boolean, default: !1 },
|
|
13
|
-
accept: { default: "" },
|
|
14
|
-
maxFileSize: { default: 8e6 },
|
|
15
|
-
contentClass: {}
|
|
16
|
-
},
|
|
17
|
-
emits: ["file-upload", "file-rejected"],
|
|
18
|
-
setup(T, { emit: V }) {
|
|
19
|
-
const l = T, g = V, { t: r } = W(), t = d(!1), i = d(null), n = d(null), m = d(), R = (e) => {
|
|
20
|
-
l.disabled || (e.stopPropagation(), e.preventDefault());
|
|
21
|
-
}, $ = (e) => {
|
|
22
|
-
l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !0);
|
|
23
|
-
}, j = (e) => {
|
|
24
|
-
l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !1);
|
|
25
|
-
}, E = (e) => {
|
|
26
|
-
var a;
|
|
27
|
-
l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !1, h((a = e.dataTransfer) == null ? void 0 : a.files));
|
|
28
|
-
};
|
|
29
|
-
function h(e) {
|
|
30
|
-
if (e)
|
|
31
|
-
if (m.value = e, i.value = I(e[0]), n.value = P(e[0]), i.value && n.value)
|
|
32
|
-
g("file-upload", e[0]);
|
|
33
|
-
else {
|
|
34
|
-
const a = L();
|
|
35
|
-
g("file-rejected", [
|
|
36
|
-
{
|
|
37
|
-
file: e[0],
|
|
38
|
-
reason: a
|
|
39
|
-
}
|
|
40
|
-
]);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
const L = () => {
|
|
44
|
-
const e = new Array();
|
|
45
|
-
return i.value || e.push("invalid-type"), n.value || e.push("invalid-size"), e;
|
|
46
|
-
}, I = (e) => {
|
|
47
|
-
if (!l.accept) return !0;
|
|
48
|
-
const a = l.accept.split(",").map((o) => o.trim());
|
|
49
|
-
for (const o of a)
|
|
50
|
-
if (w(o)) {
|
|
51
|
-
if (D(o) === D(e.type)) return !0;
|
|
52
|
-
} else if (A(e) === o || e.type === o) return !0;
|
|
53
|
-
return !1;
|
|
54
|
-
}, P = (e) => e.size <= l.maxFileSize, w = (e) => e.indexOf("*") !== -1, A = (e) => "." + e.name.split(".").pop(), D = (e) => e.substring(0, e.indexOf("/")), O = y(() => {
|
|
55
|
-
if (t.value) return r("inventory.formField.dropField.dropToUpload");
|
|
56
|
-
if (i.value) {
|
|
57
|
-
if (!n.value)
|
|
58
|
-
return r("inventory.formField.dropField.fileSizeExceeded", { size: l.maxFileSize });
|
|
59
|
-
} else return r("inventory.formField.dropField.invalidFileType");
|
|
60
|
-
return "";
|
|
61
|
-
}), v = y(() => m.value ? !i.value || !n.value : !1), _ = (e) => {
|
|
62
|
-
const a = e.target;
|
|
63
|
-
h(a.files);
|
|
64
|
-
}, N = y(() => {
|
|
65
|
-
var e;
|
|
66
|
-
return (e = m.value) == null ? void 0 : e.item(0);
|
|
67
|
-
}), b = d();
|
|
68
|
-
return (e, a) => {
|
|
69
|
-
const o = k("FmLabel"), x = k("FmButton");
|
|
70
|
-
return s(), c("label", {
|
|
71
|
-
class: "fm-droppable-field",
|
|
72
|
-
ref_key: "fmButtonRef",
|
|
73
|
-
ref: b
|
|
74
|
-
}, [
|
|
75
|
-
e.$slots.default ? (s(), c("div", G, [
|
|
76
|
-
p("input", {
|
|
77
|
-
accept: e.accept,
|
|
78
|
-
disabled: e.disabled,
|
|
79
|
-
class: "fm-droppable-field__input",
|
|
80
|
-
type: "file",
|
|
81
|
-
onChange: _
|
|
82
|
-
}, null, 40, H)
|
|
83
|
-
])) : S("", !0),
|
|
84
|
-
u(e.$slots, "default", {
|
|
85
|
-
isDragging: t.value,
|
|
86
|
-
isValidFileType: i.value,
|
|
87
|
-
isValidFileSize: n.value,
|
|
88
|
-
singleValidFile: N.value,
|
|
89
|
-
openFileDialog: () => {
|
|
90
|
-
var z;
|
|
91
|
-
return console.log("click", b.value), (z = b.value) == null ? void 0 : z.click();
|
|
92
|
-
}
|
|
93
|
-
}, () => [
|
|
94
|
-
p("div", J, [
|
|
95
|
-
e.$slots.label ? u(e.$slots, "label", { key: 0 }, void 0, !0) : (s(), C(o, {
|
|
96
|
-
key: 1,
|
|
97
|
-
label: e.label
|
|
98
|
-
}, null, 8, ["label"]))
|
|
99
|
-
]),
|
|
100
|
-
p("div", {
|
|
101
|
-
class: f([[
|
|
102
|
-
e.contentClass ? e.contentClass : "w-full h-full",
|
|
103
|
-
{
|
|
104
|
-
"fm-droppable-field__container--dragging": t.value,
|
|
105
|
-
"fm-droppable-field__container--invalid": v.value && !e.disabled,
|
|
106
|
-
"fm-droppable-field__container--disabled": e.disabled
|
|
107
|
-
}
|
|
108
|
-
], "fm-droppable-field__container"]),
|
|
109
|
-
onDragenter: R,
|
|
110
|
-
onDragleave: j,
|
|
111
|
-
onDragover: $,
|
|
112
|
-
onDrop: E
|
|
113
|
-
}, [
|
|
114
|
-
(t.value || v.value) && !e.disabled ? (s(), c("div", {
|
|
115
|
-
key: 0,
|
|
116
|
-
class: f({
|
|
117
|
-
"fm-typo-en-body-lg-600": !0,
|
|
118
|
-
"text-fm-color-primary": t.value,
|
|
119
|
-
"text-fm-color-typo-error": v.value
|
|
120
|
-
})
|
|
121
|
-
}, F(O.value), 3)) : (s(), C(x, {
|
|
122
|
-
key: 1,
|
|
123
|
-
disabled: e.disabled,
|
|
124
|
-
label: e.buttonLabel ?? "Add files",
|
|
125
|
-
size: "md",
|
|
126
|
-
variant: "secondary"
|
|
127
|
-
}, null, 8, ["disabled", "label"])),
|
|
128
|
-
u(e.$slots, "accept-text", {}, () => [
|
|
129
|
-
l.accept ? (s(), c("div", {
|
|
130
|
-
key: 0,
|
|
131
|
-
class: f([[e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-md-400"])
|
|
132
|
-
}, F(B(r)("inventory.formField.dropField.accepts", { fileTypes: e.accept })), 3)) : S("", !0)
|
|
133
|
-
], !0),
|
|
134
|
-
p("input", {
|
|
135
|
-
accept: e.accept,
|
|
136
|
-
disabled: e.disabled,
|
|
137
|
-
class: "fm-droppable-field__input",
|
|
138
|
-
type: "file",
|
|
139
|
-
onChange: _
|
|
140
|
-
}, null, 40, K)
|
|
141
|
-
], 34),
|
|
142
|
-
u(e.$slots, "helper-text", {}, () => [
|
|
143
|
-
p("div", {
|
|
144
|
-
class: f([[e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-sm-400"])
|
|
145
|
-
}, F(B(r)("inventory.formField.dropField.maxSize", { size: e.maxFileSize })), 3)
|
|
146
|
-
], !0)
|
|
147
|
-
], !0)
|
|
148
|
-
], 512);
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
}), Z = /* @__PURE__ */ q(M, [["__scopeId", "data-v-e121b2c1"]]);
|
|
152
|
-
export {
|
|
153
|
-
Z as F
|
|
154
|
-
};
|