@feedmepos/mf-inventory-portal 0.0.19-dev.9 → 0.0.20-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.vue.d.ts +1 -1
- package/dist/{ApprovalView-Bcxk6B7K.js → ApprovalView-CF-RhtHH.js} +5 -5
- package/dist/{BindingsDialog-XDkcjW_c.js → BindingsDialog-0_fCmf7t.js} +26 -26
- package/dist/{BindingsPicker-CgbiqX72.js → BindingsPicker-CT-56t-W.js} +17 -17
- package/dist/BindingsTable-DEftAnTN.js +120 -0
- package/dist/Entry.vue.d.ts +1 -1
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-6yg6_JPe.js +308 -0
- package/dist/IngredientsView-Au6oRwF2.js +1663 -0
- package/dist/{IntegrationView-CErHEVAO.js → IntegrationView-D7hqf0P5.js} +278 -278
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-XXoPyhlc.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-HcOKpAlW.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BpyUheXn.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BTOE1vFl.js} +1 -1
- package/dist/PurchaseOrderPrintPreview-C92PdleC.js +152 -0
- package/dist/{ReceiveRequestView-BKbeFDxm.js → ReceiveRequestView-BaxEQWOD.js} +8 -8
- package/dist/{RecipeView-Drp4l4gL.js → RecipeView-CDgZpLPk.js} +181 -181
- package/dist/Standalone.vue.d.ts +1 -1
- package/dist/{StockView-Cj6fErwD.js → StockView-B77CrARl.js} +498 -502
- package/dist/SupplierView-DQ3hB7q2.js +819 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-lsyakQIl.js +738 -0
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-DN7NCT72.js +1435 -0
- package/dist/TransferTemplateView-Dt04xMCK.js +1290 -0
- package/dist/{UnitView-C_tAxIpq.js → UnitView-DlmlVNOx.js} +242 -242
- package/dist/{WarehouseView-BAqVtbD6.js → WarehouseView-DXWls5vv.js} +360 -362
- package/dist/api/bill.d.ts +238 -84
- package/dist/api/inventory.d.ts +3 -3
- package/dist/api/purchase-order-template.d.ts +4 -0
- package/dist/api/stock.d.ts +0 -8
- package/dist/api/supplier.d.ts +2 -0
- package/dist/app-P7rGzGsF.js +68600 -0
- package/dist/app.d.ts +200 -7
- package/dist/app.js +3 -3
- package/dist/{array-AvWd53LI.js → array-ClJzD_Lt.js} +3 -3
- package/dist/components/ChangeLocationComponent.vue.d.ts +14 -1
- package/dist/components/DeferableLoading.vue.d.ts +1 -1
- package/dist/components/DeleteDialog.vue.d.ts +1 -1
- package/dist/components/FmCoordinateInput.vue.d.ts +3 -3
- package/dist/components/FmDroppableField.vue.d.ts +6 -6
- package/dist/components/FmFilterableSelect.vue.d.ts +3 -3
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +19 -10
- package/dist/components/FmMinMaxInput.vue.d.ts +20 -0
- package/dist/components/FmMinMaxInputProps.d.ts +16 -0
- package/dist/components/FmMinMaxInputRules.d.ts +4 -0
- package/dist/components/FmMultiselectDialog.vue.d.ts +5 -5
- package/dist/components/FmMultiselectDialogProps.d.ts +14 -1
- package/dist/components/FmUnitInputRules.d.ts +1 -0
- package/dist/components/MultiSelectDialog.vue.d.ts +1 -1
- package/dist/components/NavigationTab.vue.d.ts +1 -1
- package/dist/components/NumberPrecisionInput.vue.d.ts +3 -3
- package/dist/components/PremiumBadge.vue.d.ts +3 -3
- package/dist/components/PreviewBadge.vue.d.ts +3 -3
- package/dist/components/StockForecast.vue.d.ts +1 -1
- package/dist/components/TableActionableRow.vue.d.ts +4 -4
- package/dist/components/UnitDisplayControl.vue.d.ts +1 -1
- package/dist/components/icons/IconCommunity.vue.d.ts +1 -1
- package/dist/components/icons/IconDocumentation.vue.d.ts +1 -1
- package/dist/components/icons/IconEcosystem.vue.d.ts +1 -1
- package/dist/components/icons/IconSupport.vue.d.ts +1 -1
- package/dist/components/icons/IconTooling.vue.d.ts +1 -1
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +6 -6
- package/dist/components/map/CoordinateDialog.vue.d.ts +4 -4
- package/dist/components/map/GoogleMap.vue.d.ts +6 -6
- package/dist/components/nested-multiselect/FmNestedMultiselectDialog.vue.d.ts +3 -3
- package/dist/components/row-action.enum.d.ts +3 -1
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +3 -3
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +6 -6
- package/dist/components/ui-library/FmDateRangePickerChip.vue.d.ts +5 -5
- package/dist/composable/useIframe.d.ts +1 -1
- package/dist/composable/useSearch.d.ts +1 -1
- package/dist/{decimal-D3KXLC4T.js → decimal-4ONRlhOO.js} +1 -1
- package/dist/format-unit-display-DJpElzu_.js +707 -0
- package/dist/helper/number.d.ts +2 -0
- package/dist/{id-to-date-Cj02m808.js → id-to-date-D8Ey2CVj.js} +1 -1
- package/dist/is-linked-ingredient-error-fJ2TJb3z.js +37 -0
- package/dist/layout/InventoryLayout.vue.d.ts +1 -1
- package/dist/layout/SingleColumnLayout.vue.d.ts +6 -5
- package/dist/layout/components/NavigationButton.vue.d.ts +4 -4
- package/dist/layout-D-zXtsSp.js +151 -0
- package/dist/row-action.enum-PMKMRrZR.js +50 -0
- package/dist/stores/feature.d.ts +5 -1
- package/dist/stores/inventory.d.ts +4 -4
- package/dist/stores/location.d.ts +185 -152
- package/dist/stores/supplier.d.ts +666 -12
- package/dist/stores/warehouse.d.ts +17 -5
- package/dist/supplier-DsUIjl-L.js +69 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/InventoryView.vue.d.ts +1 -1
- package/dist/views/SelectBussinessDialog.vue.d.ts +1 -1
- package/dist/views/approval/ApprovalView.vue.d.ts +1 -1
- package/dist/views/dev/ComponentPreview.vue.d.ts +1 -1
- package/dist/views/dev/components/CoordinateTest.vue.d.ts +1 -1
- package/dist/views/dev/components/DateRange.vue.d.ts +1 -1
- package/dist/views/dev/components/FmDecimalInputTest.vue.d.ts +1 -1
- package/dist/views/dev/components/FmMultiselectDialogGrouped.vue.d.ts +2 -0
- package/dist/views/dev/components/FmSelectTest.vue.d.ts +1 -1
- package/dist/views/dev/components/InventoryIframe.vue.d.ts +1 -1
- package/dist/views/dev/components/LayoutDev.vue.d.ts +1 -1
- package/dist/views/dev/components/MfCommontTest.vue.d.ts +1 -1
- package/dist/views/dev/components/NestedSelection.vue.d.ts +1 -1
- package/dist/views/dev/components/NumberStepper.vue.d.ts +1 -1
- package/dist/views/dev/components/TabStorageTest.vue.d.ts +1 -1
- package/dist/views/dev/components/UnitInput.vue.d.ts +1 -1
- package/dist/views/dev/helpers/pinia-test.d.ts +1 -1
- package/dist/views/home/HomeView.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-dialog/BindingsDialog.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-picker/BindingsPicker.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-table/BindingsTable.vue.d.ts +1 -1
- package/dist/views/ingredients/IngredientsView.vue.d.ts +1 -1
- package/dist/views/ingredients/components/cannot-delete/CannotDelete.vue.d.ts +4 -4
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +3 -3
- package/dist/views/ingredients/components/import-ingredients/ImportIngredientItem.vue.d.ts +1 -1
- package/dist/views/ingredients/components/import-ingredients/ImportIngredients.vue.d.ts +1 -1
- package/dist/views/ingredients/components/ingredient-binded-item/IngredientBindedItem.vue.d.ts +1 -1
- package/dist/views/ingredients/components/ingredient-dialog/IngredientDialog.vue.d.ts +5 -5
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +6 -6
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -5
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +3 -3
- package/dist/views/ingredients/composables/use-ingredient-form.d.ts +8 -8
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
- package/dist/views/integration/IntegrationView.vue.d.ts +1 -1
- package/dist/views/integration/components/ApplyAddon.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProduct.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +5 -5
- package/dist/views/receive-request/ReceiveRequestView.vue.d.ts +1 -1
- package/dist/views/receive-request/components/select-template-dialog/SelectTemplateDialog.vue.d.ts +8 -0
- package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistory.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-dialog/TransferDialog.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -32
- package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +8 -2
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +6 -6
- package/dist/views/receive-request/components/transfer-form/components/TransferItem.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/composables/use-backdate-po.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/composables/use-compare-price.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -9
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1016 -70
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +36 -36
- package/dist/views/receive-request/print-preview/PurchaseOrderPrintPreview.vue.d.ts +1 -1
- package/dist/views/recipe/RecipeView.vue.d.ts +1 -1
- package/dist/views/recipe/components/recipe-dialog/RecipeDialog.vue.d.ts +5 -5
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +4 -4
- package/dist/views/recipe/composables/use-recipe-form.d.ts +8 -8
- package/dist/views/stock/StockView.vue.d.ts +1 -1
- package/dist/views/stock/components/StockHeaderPreview.vue.d.ts +1 -1
- package/dist/views/stock/components/StockHistory.vue.d.ts +3 -3
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +123 -46
- package/dist/views/stock/components/dialog/AdjustSkuDialog.vue.d.ts +4 -4
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +5 -5
- package/dist/views/stock/components/dialog/ConvertSkuDialog.vue.d.ts +4 -4
- package/dist/views/stock/composables/use-stock-action.d.ts +11 -11
- package/dist/views/stock/helper/stock-row-action.d.ts +4 -2
- package/dist/views/supplier/SupplierView.vue.d.ts +1 -1
- package/dist/views/supplier/components/SupplierDialog.vue.d.ts +4 -4
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +10 -10
- package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -3
- package/dist/views/supplier/composables/use-supplier-table.d.ts +3 -3
- package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +1 -1
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +20 -0
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +9 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +4 -4
- package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +3 -3
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +7 -7
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +15 -9
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1428 -43
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +893 -13
- package/dist/views/unit/UnitView.vue.d.ts +1 -1
- package/dist/views/unit/components/unit-dialog/UnitDialog.vue.d.ts +5 -5
- package/dist/views/unit/components/unit-form/UnitForm.vue.d.ts +4 -4
- package/dist/views/unit/components/unit-summary/UnitSummary.vue.d.ts +3 -3
- package/dist/views/unit/components/unit-used-by/UnitUsedBy.vue.d.ts +1 -1
- package/dist/views/unit/composables/use-unit-form.d.ts +8 -8
- package/dist/views/warehouse/WarehouseView.vue.d.ts +1 -1
- package/dist/views/warehouse/components/WarehouseDialog.vue.d.ts +4 -4
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +38 -14
- package/dist/{xlsx-B-2KyDJq.js → xlsx-zfERRe6K.js} +3383 -3383
- package/dist/{xlsx.util-D6EzRE71.js → xlsx.util-DnbiJzsk.js} +4 -4
- package/package.json +6 -5
- package/dist/BindingsTable-xNXNsBAd.js +0 -145
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DFPkUHl-.js +0 -272
- package/dist/IngredientsView-DD7ns3mP.js +0 -1751
- package/dist/PurchaseOrderPrintPreview-L_iaaURb.js +0 -152
- package/dist/SupplierView-EFsHWet-.js +0 -801
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-kM5fyqq6.js +0 -745
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-CyFMCmXw.js +0 -1605
- package/dist/TransferTemplateView-Cymhrayh.js +0 -933
- package/dist/app-CeUU5Gd8.js +0 -66938
- package/dist/is-linked-ingredient-error-C6AghEwR.js +0 -37
- package/dist/layout-2zzAZIVO.js +0 -147
- package/dist/purchase-order-transaction-type-Dz0YF5qh.js +0 -294
- package/dist/row-action.enum-7jVyol1k.js +0 -36
- package/dist/supplier-mDVKd7Ge.js +0 -54
- package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +0 -9
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { defineComponent as c, openBlock as n, createElementBlock as s, createElementVNode as r, createTextVNode as a, toDisplayString as o, Fragment as d, renderList as m } from "vue";
|
|
2
|
-
const u = { class: "w-[400px] h-[100px]" }, p = { class: "font-bold text-neutral-500 mx-1" }, _ = { class: "mt-3" }, g = /* @__PURE__ */ c({
|
|
3
|
-
__name: "CannotDelete",
|
|
4
|
-
props: {
|
|
5
|
-
subject: {
|
|
6
|
-
type: String
|
|
7
|
-
},
|
|
8
|
-
items: {
|
|
9
|
-
type: Array,
|
|
10
|
-
default: () => []
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
setup(e) {
|
|
14
|
-
return (t, f) => (n(), s("div", u, [
|
|
15
|
-
r("div", null, [
|
|
16
|
-
a(" Cannot delete "),
|
|
17
|
-
r("span", p, o(e.subject), 1),
|
|
18
|
-
a(" because this unit is linked in these inventory items: ")
|
|
19
|
-
]),
|
|
20
|
-
r("ol", _, [
|
|
21
|
-
(n(!0), s(d, null, m(e.items, (i, l) => (n(), s("li", {
|
|
22
|
-
class: "pl-5 font-bold text-neutral-500",
|
|
23
|
-
key: l
|
|
24
|
-
}, " • (" + o(i.module) + ") " + o(i.name), 1))), 128))
|
|
25
|
-
])
|
|
26
|
-
]));
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
function x(e) {
|
|
30
|
-
return e.errorResponse.error === "validation failed" && Array.isArray(e.errorResponse.message) && e.errorResponse.message.every(
|
|
31
|
-
(t) => typeof t.module == "string" && typeof t.name == "string"
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
g as _,
|
|
36
|
-
x as i
|
|
37
|
-
};
|
package/dist/layout-2zzAZIVO.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { components as I, useBreakpoints as R } from "@feedmepos/ui-library";
|
|
2
|
-
import { h as i, defineComponent as F, computed as B, openBlock as u, createBlock as M, resolveDynamicComponent as V, unref as p, normalizeClass as x, withCtx as z, createElementVNode as d, renderSlot as D, normalizeProps as L, guardReactiveProps as N, createElementBlock as c, Fragment as k, renderList as P, createVNode as w, createCommentVNode as y } from "vue";
|
|
3
|
-
import { af as _ } from "./app-CeUU5Gd8.js";
|
|
4
|
-
const { FmMenu: E, FmButton: S, FmMenuItem: $ } = I;
|
|
5
|
-
function O(o, n) {
|
|
6
|
-
return i(
|
|
7
|
-
E,
|
|
8
|
-
{
|
|
9
|
-
trigger: "click",
|
|
10
|
-
stopClickPropagation: !0
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"menu-button": () => i(S, {
|
|
14
|
-
type: "button",
|
|
15
|
-
variant: "tertiary",
|
|
16
|
-
icon: "more_vert",
|
|
17
|
-
iconColor: "#000000",
|
|
18
|
-
size: "md"
|
|
19
|
-
}),
|
|
20
|
-
default: () => i(
|
|
21
|
-
"div",
|
|
22
|
-
{
|
|
23
|
-
style: {
|
|
24
|
-
backgroundColor: "white",
|
|
25
|
-
padding: "4px",
|
|
26
|
-
width: "160px"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
o.map(({ label: r, color: e, value: t }) => i(
|
|
30
|
-
$,
|
|
31
|
-
{
|
|
32
|
-
onClick() {
|
|
33
|
-
n(t ?? r);
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: () => i(
|
|
38
|
-
"span",
|
|
39
|
-
{
|
|
40
|
-
class: e
|
|
41
|
-
},
|
|
42
|
-
r
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
))
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* vue-table
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) TanStack
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
-
*
|
|
58
|
-
* @license MIT
|
|
59
|
-
*/
|
|
60
|
-
const b = F({
|
|
61
|
-
props: ["render", "props"],
|
|
62
|
-
setup: (o) => () => typeof o.render == "function" || typeof o.render == "object" ? i(o.render, o.props) : o.render
|
|
63
|
-
}), j = { class: "flex gap-4 w-full" }, A = { class: "flex-1" }, H = { class: "flex flex-col" }, T = { key: 0 }, q = { key: 0 }, Q = /* @__PURE__ */ F({
|
|
64
|
-
__name: "TableActionableRow",
|
|
65
|
-
props: {
|
|
66
|
-
row: {},
|
|
67
|
-
onRowClick: {},
|
|
68
|
-
actionColumnId: { default: "action" }
|
|
69
|
-
},
|
|
70
|
-
setup(o) {
|
|
71
|
-
const n = o, r = B(
|
|
72
|
-
() => n.row.getVisibleCells().reduce(
|
|
73
|
-
(e, t) => (e[t.column.id] = t, e),
|
|
74
|
-
{}
|
|
75
|
-
)
|
|
76
|
-
);
|
|
77
|
-
return (e, t) => (u(), M(V(e.onRowClick ? p(I).FmListItem : "div"), {
|
|
78
|
-
class: x([
|
|
79
|
-
"w-full border-b border-fm-color-neutral-gray-100",
|
|
80
|
-
{
|
|
81
|
-
"bg-fm-color-neutral-gray-100": e.row.getIsSelected(),
|
|
82
|
-
"cursor-pointer": typeof e.onRowClick == "function"
|
|
83
|
-
}
|
|
84
|
-
]),
|
|
85
|
-
onClick: t[0] || (t[0] = (m) => {
|
|
86
|
-
var s;
|
|
87
|
-
return (s = e.onRowClick) == null ? void 0 : s.call(e, e.row.original);
|
|
88
|
-
})
|
|
89
|
-
}, {
|
|
90
|
-
default: z(() => {
|
|
91
|
-
var m, s, f, a, C;
|
|
92
|
-
return [
|
|
93
|
-
d("div", j, [
|
|
94
|
-
d("div", A, [
|
|
95
|
-
D(e.$slots, "default", L(N(r.value)), () => [
|
|
96
|
-
d("div", H, [
|
|
97
|
-
(u(!0), c(k, null, P(n.row.getVisibleCells(), (l) => {
|
|
98
|
-
var g, v, h;
|
|
99
|
-
return u(), c(k, {
|
|
100
|
-
key: l.id
|
|
101
|
-
}, [
|
|
102
|
-
l.column.id !== e.actionColumnId ? (u(), c("div", T, [
|
|
103
|
-
w(p(b), {
|
|
104
|
-
render: (v = (g = l.column) == null ? void 0 : g.columnDef) == null ? void 0 : v.cell,
|
|
105
|
-
props: (h = l.getContext) == null ? void 0 : h.call(l)
|
|
106
|
-
}, null, 8, ["render", "props"])
|
|
107
|
-
])) : y("", !0)
|
|
108
|
-
], 64);
|
|
109
|
-
}), 128))
|
|
110
|
-
])
|
|
111
|
-
])
|
|
112
|
-
]),
|
|
113
|
-
r.value[e.actionColumnId ?? ""] ? (u(), c("div", q, [
|
|
114
|
-
d("div", null, [
|
|
115
|
-
w(p(b), {
|
|
116
|
-
render: (f = (s = (m = r.value[e.actionColumnId ?? ""]) == null ? void 0 : m.column) == null ? void 0 : s.columnDef) == null ? void 0 : f.cell,
|
|
117
|
-
props: (C = (a = r.value[e.actionColumnId ?? ""]) == null ? void 0 : a.getContext) == null ? void 0 : C.call(a)
|
|
118
|
-
}, null, 8, ["render", "props"])
|
|
119
|
-
])
|
|
120
|
-
])) : y("", !0)
|
|
121
|
-
])
|
|
122
|
-
];
|
|
123
|
-
}),
|
|
124
|
-
_: 3
|
|
125
|
-
}, 8, ["class"]));
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
function U() {
|
|
129
|
-
return {
|
|
130
|
-
get tableHeight() {
|
|
131
|
-
const o = _(), { breakpoints: n } = R();
|
|
132
|
-
return o.isIframeMode ? n.value.xs || n.value.sm ? {
|
|
133
|
-
height: "calc(100dvh - 180px)"
|
|
134
|
-
} : {
|
|
135
|
-
height: "calc(100dvh - 124px)"
|
|
136
|
-
} : {
|
|
137
|
-
height: "calc(100dvh - 180px)"
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
export {
|
|
143
|
-
b as F,
|
|
144
|
-
Q as _,
|
|
145
|
-
O as c,
|
|
146
|
-
U as u
|
|
147
|
-
};
|
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
import { n as x, j as N, ad as l, ac as j, J as H, K as q, ae as Y, c as V, a9 as W, w as G, b as J } from "./app-CeUU5Gd8.js";
|
|
2
|
-
import { ref as h, computed as K } from "vue";
|
|
3
|
-
import { i as Q } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DFPkUHl-.js";
|
|
4
|
-
import { F as C } from "./row-action.enum-7jVyol1k.js";
|
|
5
|
-
import { useDialog as Z, useSnackbar as z } from "@feedmepos/ui-library";
|
|
6
|
-
const X = x((s, t) => {
|
|
7
|
-
const i = N();
|
|
8
|
-
return {
|
|
9
|
-
async readRequests(n) {
|
|
10
|
-
const o = n ?? i.currentLocationDBName, a = `${s.inventoryBackendUrl}/${o}/purchase-request`;
|
|
11
|
-
return await t.get(a);
|
|
12
|
-
},
|
|
13
|
-
async getPurchaseOrders({
|
|
14
|
-
start: n,
|
|
15
|
-
end: o
|
|
16
|
-
}) {
|
|
17
|
-
const a = i.currentLocationDBName, d = `${s.inventoryBackendUrl}/${a}/purchase-order`;
|
|
18
|
-
return await t.get(`${d}?start=${n}&end=${o}`);
|
|
19
|
-
},
|
|
20
|
-
async getPurchaseOrderById(n) {
|
|
21
|
-
const o = i.currentLocationDBName, a = `${s.inventoryBackendUrl}/${o}/purchase-order`;
|
|
22
|
-
return await t.get(`${a}/${n}`);
|
|
23
|
-
},
|
|
24
|
-
async processPurchaseOrder(n, o) {
|
|
25
|
-
const a = i.currentLocationDBName, d = o || a, p = `${s.inventoryBackendUrl}/${d}/purchase-order/run-operation`;
|
|
26
|
-
return await t.put(p, n);
|
|
27
|
-
},
|
|
28
|
-
async createPurchaseOrder(n) {
|
|
29
|
-
const o = i.currentLocationDBName, a = `${s.inventoryBackendUrl}/${o}/purchase-order`;
|
|
30
|
-
return await t.post(a, n);
|
|
31
|
-
},
|
|
32
|
-
async updatePurchaseOrder(n) {
|
|
33
|
-
const o = i.currentLocationDBName, a = `${s.inventoryBackendUrl}/${o}/purchase-order`;
|
|
34
|
-
return await t.put(a, n);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
}), ee = {
|
|
38
|
-
[l.enum.confirmDraft]: {
|
|
39
|
-
primaryActions: {
|
|
40
|
-
text: "Confirm draft",
|
|
41
|
-
close: !0
|
|
42
|
-
},
|
|
43
|
-
title: "Confirm draft?",
|
|
44
|
-
message: "Purchase order cannot be changed after confirm draft.",
|
|
45
|
-
successMessage: "Purchase order draft has been confirmed"
|
|
46
|
-
},
|
|
47
|
-
[l.enum.cancelDraft]: {
|
|
48
|
-
primaryActions: {
|
|
49
|
-
text: "Cancel draft",
|
|
50
|
-
close: !0,
|
|
51
|
-
variant: "destructive"
|
|
52
|
-
},
|
|
53
|
-
title: "Cancel draft?",
|
|
54
|
-
message: "Purchase order cannot be changed after cancelled draft.",
|
|
55
|
-
successMessage: "Purchase order draft has been cancelled"
|
|
56
|
-
},
|
|
57
|
-
[l.enum.submitRequest]: {
|
|
58
|
-
primaryActions: {
|
|
59
|
-
text: "Submit request",
|
|
60
|
-
close: !0
|
|
61
|
-
},
|
|
62
|
-
title: "Confirm draft?",
|
|
63
|
-
message: "Purchase order cannot be changed after confirm draft.",
|
|
64
|
-
successMessage: "Purchase order draft has been submitted"
|
|
65
|
-
},
|
|
66
|
-
[l.enum.completeReceive]: {
|
|
67
|
-
primaryActions: {
|
|
68
|
-
text: "Mark received",
|
|
69
|
-
close: !0
|
|
70
|
-
},
|
|
71
|
-
title: "Mark as received",
|
|
72
|
-
message: "Purchase order cannot be changed after it has complete receiving.",
|
|
73
|
-
successMessage: "Purchase order has been marked as received"
|
|
74
|
-
},
|
|
75
|
-
[l.enum.approveRequest]: {
|
|
76
|
-
primaryActions: {
|
|
77
|
-
text: "Approve request",
|
|
78
|
-
close: !0
|
|
79
|
-
},
|
|
80
|
-
title: "Approve request?",
|
|
81
|
-
message: "Purchase order will be approved.",
|
|
82
|
-
successMessage: "Purchase order has been approved"
|
|
83
|
-
},
|
|
84
|
-
[l.enum.rejectRequest]: {
|
|
85
|
-
primaryActions: {
|
|
86
|
-
text: "Reject request",
|
|
87
|
-
close: !0,
|
|
88
|
-
variant: "destructive"
|
|
89
|
-
},
|
|
90
|
-
title: "Reject request?",
|
|
91
|
-
message: "Purchase order will be rejected.",
|
|
92
|
-
successMessage: "Purchase order has been rejected"
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
function ce(s) {
|
|
96
|
-
const t = O(s);
|
|
97
|
-
return t === null ? "" : j(t);
|
|
98
|
-
}
|
|
99
|
-
function O(s) {
|
|
100
|
-
const t = s.match(/\w+_(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z).*/);
|
|
101
|
-
if (!t) return null;
|
|
102
|
-
const i = /* @__PURE__ */ new Date(`${t[1]}`);
|
|
103
|
-
return isNaN(i.getTime()) ? null : i;
|
|
104
|
-
}
|
|
105
|
-
function ue(s, t) {
|
|
106
|
-
const i = Z(), n = N(), o = J(), a = h(!1), d = z(), p = X(), y = h(new Array()), D = h(
|
|
107
|
-
t != null && t.startDate && (t != null && t.endDate) ? t : Q()
|
|
108
|
-
), E = K(() => {
|
|
109
|
-
const r = new Date(D.value.startDate), e = new Date(D.value.endDate);
|
|
110
|
-
return {
|
|
111
|
-
start: H(r).toISOString(),
|
|
112
|
-
end: q(e).toISOString()
|
|
113
|
-
};
|
|
114
|
-
}), b = h(new Array()), T = Y(), S = h(null), g = h();
|
|
115
|
-
function U(r) {
|
|
116
|
-
const e = {
|
|
117
|
-
mode: C.CREATE,
|
|
118
|
-
modelValue: r || void 0,
|
|
119
|
-
show: !0,
|
|
120
|
-
"onUpdate:show"(c) {
|
|
121
|
-
g.value.show = c;
|
|
122
|
-
},
|
|
123
|
-
lastClosingDate: S.value
|
|
124
|
-
};
|
|
125
|
-
g.value = e;
|
|
126
|
-
}
|
|
127
|
-
function M(r) {
|
|
128
|
-
const e = {
|
|
129
|
-
mode: C.UPDATE,
|
|
130
|
-
modelValue: V(r),
|
|
131
|
-
show: !0,
|
|
132
|
-
"onUpdate:show"(c) {
|
|
133
|
-
g.value.show = c;
|
|
134
|
-
},
|
|
135
|
-
lastClosingDate: S.value
|
|
136
|
-
};
|
|
137
|
-
g.value = e;
|
|
138
|
-
}
|
|
139
|
-
async function B() {
|
|
140
|
-
y.value = [], a.value = !0;
|
|
141
|
-
try {
|
|
142
|
-
y.value = await p.getPurchaseOrders(E.value).then((c) => c.sort((u, m) => m._id.localeCompare(u._id)));
|
|
143
|
-
const r = await T.readLastClosing(!0), e = r == null ? void 0 : r._id;
|
|
144
|
-
e && (S.value = O(e));
|
|
145
|
-
} catch {
|
|
146
|
-
d.open({
|
|
147
|
-
title: "Something went wrong",
|
|
148
|
-
message: "Error at fetching purchase orders",
|
|
149
|
-
type: "error"
|
|
150
|
-
});
|
|
151
|
-
} finally {
|
|
152
|
-
a.value = !1;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
async function _() {
|
|
156
|
-
b.value = [], a.value = !0;
|
|
157
|
-
try {
|
|
158
|
-
b.value = await p.readRequests();
|
|
159
|
-
} catch {
|
|
160
|
-
d.open({
|
|
161
|
-
title: "Something went wrong",
|
|
162
|
-
message: "Error at fetching purchase requests",
|
|
163
|
-
type: "error"
|
|
164
|
-
});
|
|
165
|
-
} finally {
|
|
166
|
-
a.value = !1;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
function w() {
|
|
170
|
-
switch (s) {
|
|
171
|
-
case "receive/request":
|
|
172
|
-
return B();
|
|
173
|
-
case "approval":
|
|
174
|
-
return _();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
function k(r, e) {
|
|
178
|
-
D.value = {
|
|
179
|
-
startDate: r,
|
|
180
|
-
endDate: e
|
|
181
|
-
}, w();
|
|
182
|
-
}
|
|
183
|
-
n.watchLocation(async (r) => {
|
|
184
|
-
if (!r) {
|
|
185
|
-
y.value = [];
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
await w();
|
|
189
|
-
});
|
|
190
|
-
const v = h(), $ = h(Math.random().toString());
|
|
191
|
-
async function L(r, e) {
|
|
192
|
-
var f, P;
|
|
193
|
-
const c = Math.random().toString();
|
|
194
|
-
$.value = c;
|
|
195
|
-
const u = s === "receive/request" ? n.currentLocation : e == null ? void 0 : e.to, m = {
|
|
196
|
-
purchaseOrder: r,
|
|
197
|
-
transferTo: u == null ? void 0 : u.name,
|
|
198
|
-
transferToDbName: u == null ? void 0 : u.dbName,
|
|
199
|
-
show: !0,
|
|
200
|
-
canResubmit: !1,
|
|
201
|
-
canApprove: s === "approval",
|
|
202
|
-
"onUpdate:show"(A) {
|
|
203
|
-
v.value.show = A;
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
if (v.value = m, !(e || r.status !== W.enum.REQUESTING)) {
|
|
207
|
-
try {
|
|
208
|
-
e = (await p.readRequests(
|
|
209
|
-
`${r.supplier.internal}_${r.supplier._id}`
|
|
210
|
-
)).find((R) => R.purchaseOrderId === r._id);
|
|
211
|
-
} catch {
|
|
212
|
-
console.error("Error at fetching po request to check");
|
|
213
|
-
}
|
|
214
|
-
c === $.value && (v.value.canResubmit = !e, v.value.transferTo = (f = e == null ? void 0 : e.to) == null ? void 0 : f.name, v.value.transferToDbName = (P = e == null ? void 0 : e.to) == null ? void 0 : P.dbName);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
async function F(r, e, c, u) {
|
|
218
|
-
a.value = !0;
|
|
219
|
-
try {
|
|
220
|
-
await p.processPurchaseOrder(
|
|
221
|
-
{
|
|
222
|
-
operation: e,
|
|
223
|
-
doc: r,
|
|
224
|
-
options: (
|
|
225
|
-
// auto receive for supplier to warehouse
|
|
226
|
-
(e === l.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
227
|
-
e === l.enum.completeReceive) && o.autoReceiveWarehouse ? {
|
|
228
|
-
autoReceive: !0
|
|
229
|
-
} : void 0
|
|
230
|
-
)
|
|
231
|
-
},
|
|
232
|
-
u
|
|
233
|
-
), await new Promise((P) => setTimeout(P, 1e3));
|
|
234
|
-
const f = N().currentLocationDBName.startsWith("restaurant_");
|
|
235
|
-
e === l.enum.confirmDraft && r.effectiveAt && f ? d.open({
|
|
236
|
-
title: "Success",
|
|
237
|
-
message: `${c}. The backdate will be reflected once your POS has received this change.`,
|
|
238
|
-
type: "success"
|
|
239
|
-
}) : d.open({
|
|
240
|
-
title: "Success",
|
|
241
|
-
message: c,
|
|
242
|
-
type: "success"
|
|
243
|
-
});
|
|
244
|
-
} catch (m) {
|
|
245
|
-
d.open({
|
|
246
|
-
title: "Something went wrong",
|
|
247
|
-
message: "Please try again.",
|
|
248
|
-
type: "error"
|
|
249
|
-
}), console.error("Error when submitting PO operation", e, r, m);
|
|
250
|
-
} finally {
|
|
251
|
-
a.value = !1, w();
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
async function I(r, e, c) {
|
|
255
|
-
const u = ee[e];
|
|
256
|
-
if (!u) {
|
|
257
|
-
d.open({
|
|
258
|
-
title: "Something went wrong",
|
|
259
|
-
message: `Cannot process order: ${G(e)}`,
|
|
260
|
-
type: "error"
|
|
261
|
-
});
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
const { successMessage: m, ...f } = u;
|
|
265
|
-
i.open({
|
|
266
|
-
title: f.title,
|
|
267
|
-
message: f.message,
|
|
268
|
-
primaryActions: f.primaryActions
|
|
269
|
-
}).onPrimary(() => {
|
|
270
|
-
F(r, e, m, c);
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
return {
|
|
274
|
-
purchaseOrders: y,
|
|
275
|
-
purchaseRequests: b,
|
|
276
|
-
updateDateRange: k,
|
|
277
|
-
fetchData: w,
|
|
278
|
-
loading: a,
|
|
279
|
-
transferDialogProps: g,
|
|
280
|
-
promptCreateTransferDialog: U,
|
|
281
|
-
promptUpdateTransferDialog: M,
|
|
282
|
-
transferDetailsProps: v,
|
|
283
|
-
promptShowTransferDetails: L,
|
|
284
|
-
submitAction: I
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
var re = /* @__PURE__ */ ((s) => (s.PURCHASE = "PURCHASE", s.TRANSFER = "TRANSFER", s))(re || {});
|
|
288
|
-
export {
|
|
289
|
-
re as P,
|
|
290
|
-
X as a,
|
|
291
|
-
ee as d,
|
|
292
|
-
ce as f,
|
|
293
|
-
ue as u
|
|
294
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var t = /* @__PURE__ */ ((e) => (e.READ = "READ", e.UPDATE = "UPDATE", e.CREATE = "CREATE", e))(t || {}), r = /* @__PURE__ */ ((e) => (e.Add = "Add", e.Create = "Create", e.Print = "Print", e.Update = "Update", e.Details = "Details", e.Edit = "Edit", e.Delete = "Delete", e))(r || {});
|
|
2
|
-
const l = {
|
|
3
|
-
Add: {
|
|
4
|
-
label: "Add",
|
|
5
|
-
color: "text-fm-color-typo-primary"
|
|
6
|
-
},
|
|
7
|
-
Create: {
|
|
8
|
-
label: "Create",
|
|
9
|
-
color: "text-fm-color-typo-primary"
|
|
10
|
-
},
|
|
11
|
-
Update: {
|
|
12
|
-
label: "Update",
|
|
13
|
-
color: "text-fm-color-typo-primary"
|
|
14
|
-
},
|
|
15
|
-
Details: {
|
|
16
|
-
label: "Details",
|
|
17
|
-
color: "text-fm-color-typo-primary"
|
|
18
|
-
},
|
|
19
|
-
Print: {
|
|
20
|
-
label: "Print",
|
|
21
|
-
color: "text-fm-color-typo-primary"
|
|
22
|
-
},
|
|
23
|
-
Edit: {
|
|
24
|
-
label: "Edit",
|
|
25
|
-
color: "text-fm-color-typo-primary"
|
|
26
|
-
},
|
|
27
|
-
Delete: {
|
|
28
|
-
label: "Delete",
|
|
29
|
-
color: "text-fm-color-typo-error"
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
l as D,
|
|
34
|
-
t as F,
|
|
35
|
-
r as R
|
|
36
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { n as o, j as s, Q as u, T as c } from "./app-CeUU5Gd8.js";
|
|
2
|
-
import { defineStore as l } from "pinia";
|
|
3
|
-
import { ref as d } from "vue";
|
|
4
|
-
const n = o((t, e) => {
|
|
5
|
-
const r = s();
|
|
6
|
-
return {
|
|
7
|
-
async readSuppliers() {
|
|
8
|
-
const p = r.currentLocation.dbName, a = `${t.inventoryBackendUrl}/${p}/supplier`;
|
|
9
|
-
return await e.get(a);
|
|
10
|
-
},
|
|
11
|
-
async createSupplier(p) {
|
|
12
|
-
const a = r.currentLocation.dbName, i = `${t.inventoryBackendUrl}/${a}/supplier`;
|
|
13
|
-
return await e.post(i, p);
|
|
14
|
-
},
|
|
15
|
-
async updateSupplier(p) {
|
|
16
|
-
const a = r.currentLocation.dbName, i = `${t.inventoryBackendUrl}/${a}/supplier`;
|
|
17
|
-
return await e.put(i, p);
|
|
18
|
-
},
|
|
19
|
-
async deleteSupplier(p) {
|
|
20
|
-
const a = r.currentLocation.dbName, i = `${t.inventoryBackendUrl}/${a}/supplier`;
|
|
21
|
-
return await e.delete(i, p);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}), m = l("supplier", () => {
|
|
25
|
-
const t = d(new Array());
|
|
26
|
-
return {
|
|
27
|
-
// action
|
|
28
|
-
async readSuppliers() {
|
|
29
|
-
const e = n();
|
|
30
|
-
t.value = await e.readSuppliers();
|
|
31
|
-
},
|
|
32
|
-
async createSupplier(e) {
|
|
33
|
-
await n().createSupplier(e);
|
|
34
|
-
},
|
|
35
|
-
async updateSupplier(e) {
|
|
36
|
-
await n().updateSupplier(e);
|
|
37
|
-
},
|
|
38
|
-
async deleteSupplier(e) {
|
|
39
|
-
await n().deleteSupplier(e);
|
|
40
|
-
},
|
|
41
|
-
async init() {
|
|
42
|
-
const e = u();
|
|
43
|
-
try {
|
|
44
|
-
await this.readSuppliers();
|
|
45
|
-
} catch (r) {
|
|
46
|
-
throw r instanceof c || e.error("Error at reading suppliers"), r;
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
suppliers: t
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
export {
|
|
53
|
-
m as u
|
|
54
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface StockRecalculateDialogEvents {
|
|
2
|
-
(event: 'close'): void;
|
|
3
|
-
}
|
|
4
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
-
close: () => void;
|
|
6
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
7
|
-
onClose?: (() => any) | undefined;
|
|
8
|
-
}, {}, {}>;
|
|
9
|
-
export default _default;
|