@feedmepos/mf-inventory-portal 1.8.0-dev.16 → 1.8.0-dev.18
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-xSsyvQV_.js → App-Djr9dJ9q.js} +9 -9
- package/dist/{ApprovalView-DfJ0FAiD.js → ApprovalView-VIVSr66P.js} +9 -9
- package/dist/{BindingsDialog-oAZyjgrN.js → BindingsDialog-NKiZKKA1.js} +2 -2
- package/dist/{BindingsPicker-CEIo7myR.js → BindingsPicker-WLdfNtim.js} +2 -2
- package/dist/{BindingsTable-BKa-JYRR.js → BindingsTable-DGikPjdP.js} +10 -10
- package/dist/{BulkReceiveRequestPage-C6Oyg5-E.js → BulkReceiveRequestPage-GmZ7yxnK.js} +21 -21
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BvleQo5y.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-6n-R2gAL.js} +1 -1
- package/dist/{ClosingDraftView-tJrjqyAC.js → ClosingDraftView-Biir_xEx.js} +19 -19
- package/dist/{ClosingHistoryView-CJQlK4Xc.js → ClosingHistoryView-ZMXQesn4.js} +7 -7
- package/dist/{ClosingTemplateView-DYRtdK5h.js → ClosingTemplateView-B-c3FkLX.js} +18 -18
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DEwi7wFf.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-D2bp6pW-.js} +1 -1
- package/dist/{DefaultView-CxTBlkln.js → DefaultView-D_Jhtw_c.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-Bywdjc2U.js → DeliveryOrderPrintPreview-D5-9lzBd.js} +9 -9
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DcFAUTdO.js → EmailDialog.vue_vue_type_script_setup_true_lang-DEqUAhaS.js} +7759 -7654
- package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C8c6rmJv.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CCzJ6Awz.js} +1 -1
- package/dist/{FeatureCapabilityGate-B41dULfm.js → FeatureCapabilityGate-iW8fvX19.js} +28 -28
- package/dist/{FeaturePageGate.vue_vue_type_script_setup_true_lang-D4G6i1D6.js → FeaturePageGate.vue_vue_type_script_setup_true_lang-f3Y9lCSv.js} +1 -1
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CnqH115V.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-1mVLSzDy.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-QBviJzAO.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D6jnR8Rx.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BqHtzo20.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-tMoK_Ce8.js} +2 -2
- package/dist/{FmMultiselectDialog-M6CvNFW1.js → FmMultiselectDialog-B8P_qEAQ.js} +2 -2
- package/dist/{FmMultiselectDialog-CFNZMzlC.js → FmMultiselectDialog-DP480e0e.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BGco50Ma.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D7pb8F_A.js} +113 -106
- package/dist/{ImportView-C2GOmpuK.js → ImportView-BISXn7Th.js} +6 -6
- package/dist/{IngredientsView-wB9kGiOK.js → IngredientsView-C3LrzIuS.js} +15 -15
- package/dist/{IntegrationExplorerView-BujwGE4q.js → IntegrationExplorerView-B_4Af6OW.js} +6 -6
- package/dist/{IntegrationPlatformView-Wnvj6-BG.js → IntegrationPlatformView-CQUi7sRi.js} +2 -2
- package/dist/{IntegrationView-C77rSbpn.js → IntegrationView-CYkZq_tq.js} +14 -14
- package/dist/{InventoryBindingForm-Bs7Duwfj.js → InventoryBindingForm-D2s_z-6Q.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DawAEeuP.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DXsyVclI.js} +4 -4
- package/dist/{InventoryBindingSummary-BefkYWIr.js → InventoryBindingSummary-BOBGDwSm.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BpUMK6fj.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-gAd41m7W.js} +2 -2
- package/dist/{ProductionRunDetailPage-CVx9LS-P.js → ProductionRunDetailPage-COncuigP.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-4aYz5NwS.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-B3PSF7-H.js} +988 -954
- package/dist/{ProductionRunPage-CuXzmWMc.js → ProductionRunPage-RUkgXlmL.js} +4 -4
- package/dist/{PublishView-Bu8J6ndy.js → PublishView-B0QVNasT.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-DaslFe8u.js → PurchaseOrderPrintPreview-CbjbKRS2.js} +13 -13
- package/dist/{ReceiveRequestView-CKPBpN4x.js → ReceiveRequestView-DAiOgbUO.js} +13 -13
- package/dist/{RecipeView-BeZ9ljtA.js → RecipeView-B-Qr9p-i.js} +15 -15
- package/dist/{SettingsView-CWhMdNfn.js → SettingsView-BnWul5uf.js} +7 -7
- package/dist/StockView-raj4WifG.js +2756 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B9Rx_9b7.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CYLgevQO.js} +1 -1
- package/dist/{SupplierView-BSGajl9V.js → SupplierView-CxAwhXEg.js} +15 -14
- package/dist/{SurchargeView-DtAszxTN.js → SurchargeView-B7R7_JVv.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CfxroS8u.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CrYxhm0y.js} +2 -2
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BSglNZaK.js +332 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B_9i5LzY.js → TransferDetails.vue_vue_type_script_setup_true_lang-CoOidQMw.js} +1583 -1530
- package/dist/{TransferTemplateView-D6_AfMja.js → TransferTemplateView-BXu5OhXF.js} +945 -941
- package/dist/{UnitCostHistoryView-kisQehVE.js → UnitCostHistoryView-BAfxgkjF.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DKoPNZoW.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DTS06g9i.js} +4 -4
- package/dist/{UnitView-jSLennZW.js → UnitView-BnCe1kBW.js} +7 -7
- package/dist/{WarehouseView-CUdWJCMq.js → WarehouseView-D3y9EDWW.js} +8 -8
- package/dist/{WastageTemplateView--B0LSwHa.js → WastageTemplateView-BShli8bj.js} +15 -15
- package/dist/api/inventory.d.ts +9 -9
- package/dist/{app-Bb5HLWTu.js → app-FPg0KzwG.js} +6884 -6971
- package/dist/app.d.ts +49 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-CgDMayoo.js → closing-template-Db-KNAjB.js} +4 -4
- package/dist/components/FeatureCapabilityGate.vue.d.ts +1 -0
- package/dist/components/FmUnitInputProps.d.ts +1 -0
- package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
- package/dist/components/TemplatePublishDialog.d.ts +2 -0
- package/dist/components/TemplatePublishDialog.spec.d.ts +1 -0
- package/dist/composable/defineApi.d.ts +1 -1
- package/dist/{date2-D9gB9BE-.js → date2-YICloR2o.js} +1 -1
- package/dist/{dayjs.min-CumM_kH7.js → dayjs.min-CefWSTKK.js} +1 -1
- package/dist/{decimal-CVF1rRoj.js → decimal-CBsXxlpr.js} +2 -2
- package/dist/defineDeepModel-DdUeiux0.js +19 -0
- package/dist/{duplicate-template-CFYtQfQn.js → duplicate-template-BvMZ2ilL.js} +1 -1
- package/dist/{feature-kti8bU8q.js → feature-HJuftceg.js} +2 -2
- package/dist/{format-time-from-id-CWZ5VGvM.js → format-time-from-id-BUJJn9WM.js} +1 -1
- package/dist/{format-unit-display-BlxdvskN.js → format-unit-display-vkauUh5a.js} +115 -113
- package/dist/{id-to-date-BaH_1Kui.js → id-to-date-BFOeIS4x.js} +1 -1
- package/dist/{import-export.helper-8rKrOB0E.js → import-export.helper-C48DsrFq.js} +5 -5
- package/dist/{index-BHc3cNyz.js → index--e5sOJ5N.js} +3 -3
- package/dist/{index-B9p_OEdk.js → index-4EWcUZB2.js} +1 -1
- package/dist/{index-MEUJonBr.js → index-COy6Gu_M.js} +1768 -1741
- package/dist/{lz-string-IiazGN0W.js → lz-string-CX9VutYB.js} +1 -1
- package/dist/{netsuite-BeDxaeKM.js → netsuite-BOb6Ek6I.js} +247 -262
- package/dist/{netsuite-explorer-4IluitzS.js → netsuite-explorer-Czbq3dDh.js} +1 -1
- package/dist/{predefined-templates-D4qVID1q.js → predefined-templates-Cb97vyso.js} +1 -1
- package/dist/{purchase-order-template-GTOntq3C.js → purchase-order-template-CBjU0dUO.js} +1 -1
- package/dist/{recalculationUtils-Dye8x2TO.js → recalculationUtils-CyoKTNie.js} +1 -1
- package/dist/{row-action.enum-CVJbq_-y.js → row-action.enum-DoY1An1e.js} +1 -1
- package/dist/{rules-Y3zXVj3i.js → rules-C23j4F0_.js} +45 -40
- package/dist/{stock-BR8x3nlx.js → stock-CN-acijK.js} +1 -1
- package/dist/stock-DClY4hP_.js +78 -0
- package/dist/stores/integration/netsuite.d.ts +2 -2
- package/dist/stores/location.d.ts +42 -42
- package/dist/stores/supplier.d.ts +48 -48
- package/dist/stores/warehouse.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-CbdCjiIB.js → supplier-OCIcWTkA.js} +2 -2
- package/dist/{surcharge-BoXLK6o0.js → surcharge-CCqME8iu.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-C5h1AoPJ.js → uom-rules-DyRkdoii.js} +1 -1
- package/dist/{use-ingredient-select-dialog-D196q_qk.js → use-ingredient-select-dialog-B9SD-Gfg.js} +2 -2
- package/dist/{use-inventory-binding-dialog-B4IhhCjM.js → use-inventory-binding-dialog-Dx8nYVH0.js} +2 -2
- package/dist/{use-template-enabled-locations-CDKP3kTS.js → use-template-enabled-locations-C7vIH0p-.js} +2 -2
- package/dist/{use-transfer-locations-DE4vxSDp.js → use-transfer-locations-DfZI178Y.js} +2 -2
- package/dist/{useHrmPermission-D1dkveCP.js → useHrmPermission-BF87diqS.js} +1 -1
- package/dist/{useNavigationMenu-N5_7da8m.js → useNavigationMenu-hmVbINp6.js} +4 -4
- package/dist/{useSseClient-CKpNaz5g.js → useSseClient-D-dJYaOl.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
- package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
- package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
- package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +18 -18
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
- package/dist/views/integration/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
- package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +5 -5
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +39 -39
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +35 -35
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +34 -34
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +6 -6
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +16 -2
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
- package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
- package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
- package/dist/views/transfer-template/helpers/template-item.error.helper.spec.d.ts +1 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
- package/dist/{vue-CxSKQOrZ.js → vue-_3HY6f-w.js} +2 -2
- package/dist/{vue-i18n-CTR_IUvd.js → vue-i18n-B8eq3KRC.js} +158 -158
- package/dist/{xlsx.util-J9pxGRQD.js → xlsx.util-BbyZEE1S.js} +2 -2
- package/package.json +4 -4
- package/dist/StockView-C5IhPGxi.js +0 -2651
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CTj_jYK1.js +0 -299
- package/dist/defineDeepModel-DE-DsQjm.js +0 -19
- package/dist/stock-BIjTQFsR.js +0 -74
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import { defineComponent as q, ref as f, computed as r, watch as G, h as i, resolveComponent as x, createElementBlock as H, openBlock as B, createElementVNode as b, toDisplayString as J, createVNode as y, createBlock as O, createCommentVNode as Q, unref as V } from "vue";
|
|
2
|
-
import { useCoreStore as W, useI18n as X } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as Y, components as A } from "@feedmepos/ui-library";
|
|
4
|
-
import { K as Z, D as ee } from "./app-C39bYJmq.js";
|
|
5
|
-
import { u as le } from "./app-Bb5HLWTu.js";
|
|
6
|
-
import { F as te } from "./FmAdminBadge-DlplQOHb.js";
|
|
7
|
-
const ae = {
|
|
8
|
-
class: "flex flex-col gap-24 h-full",
|
|
9
|
-
style: { "max-height": "50vh" }
|
|
10
|
-
}, oe = { class: "flex items-center flex-shrink-0" }, ne = { class: "fm-typo-en-body-lg-600 flex-1" }, se = { class: "flex gap-8" }, ie = { class: "flex flex-col gap-4 w-full flex-1 min-h-0" }, re = { class: "flex items-center gap-8 flex-shrink-0" }, ue = { class: "flex-1 border border-fm-color-border-secondary rounded-lg overflow-hidden overflow-y-auto min-h-0" }, he = /* @__PURE__ */ q({
|
|
11
|
-
__name: "TemplatePublishDialog",
|
|
12
|
-
props: {
|
|
13
|
-
title: {},
|
|
14
|
-
doc: {},
|
|
15
|
-
controller: {},
|
|
16
|
-
initialPublishedRev: {},
|
|
17
|
-
locations: {},
|
|
18
|
-
enabledLocations: {},
|
|
19
|
-
hideUnpublish: { type: Boolean }
|
|
20
|
-
},
|
|
21
|
-
setup(U) {
|
|
22
|
-
const s = U, p = f(s.initialPublishedRev ?? {}), t = f(), n = f(/* @__PURE__ */ new Set()), C = le(), $ = W(), k = Y(), E = r(() => {
|
|
23
|
-
var e;
|
|
24
|
-
return ((e = $.sessionUser.value) == null ? void 0 : e.role.isAdmin) ?? !1;
|
|
25
|
-
}), S = r(() => {
|
|
26
|
-
var l;
|
|
27
|
-
return ((l = s.enabledLocations) != null && l.length ? s.enabledLocations : s.locations).map((a) => {
|
|
28
|
-
var o;
|
|
29
|
-
if (!!!C.locationByDbName[a.dbName])
|
|
30
|
-
return {
|
|
31
|
-
...a,
|
|
32
|
-
status: "invalid"
|
|
33
|
-
};
|
|
34
|
-
const v = !!(((o = p.value) == null ? void 0 : o[a.dbName]) ?? []).find(
|
|
35
|
-
(_) => _._id === s.doc._id && (_.updatedAt ? _.updatedAt === s.doc.updatedAt : _._rev === s.doc._rev)
|
|
36
|
-
);
|
|
37
|
-
return {
|
|
38
|
-
...a,
|
|
39
|
-
status: v ? "published" : "outdated",
|
|
40
|
-
state: a.doc.profile.address.state
|
|
41
|
-
};
|
|
42
|
-
});
|
|
43
|
-
}), { t: m } = X(), g = f(""), w = f({
|
|
44
|
-
logic: "AND",
|
|
45
|
-
rules: []
|
|
46
|
-
}), D = [
|
|
47
|
-
{
|
|
48
|
-
type: "string",
|
|
49
|
-
key: "status",
|
|
50
|
-
entity: "inventory",
|
|
51
|
-
values: ["published", "outdated"]
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
type: "string",
|
|
55
|
-
key: "state",
|
|
56
|
-
entity: "inventory",
|
|
57
|
-
values: [
|
|
58
|
-
...new Set(C.locations.map((e) => e.doc.profile.address.state).filter(Boolean))
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
], u = r(() => {
|
|
62
|
-
const e = g.value.toLowerCase();
|
|
63
|
-
return S.value.filter((l) => Z(l, w.value)).filter(({ name: l, dbName: a }) => !!(!e || l.toLowerCase().includes(e) || E.value && a.toLowerCase().includes(e)));
|
|
64
|
-
}), N = r(
|
|
65
|
-
() => u.value.filter((e) => e.status !== "invalid")
|
|
66
|
-
);
|
|
67
|
-
G(
|
|
68
|
-
[g, w],
|
|
69
|
-
() => {
|
|
70
|
-
n.value = /* @__PURE__ */ new Set();
|
|
71
|
-
},
|
|
72
|
-
{ deep: !0 }
|
|
73
|
-
);
|
|
74
|
-
const F = r(() => u.value.length === 0 ? !1 : u.value.every((e) => n.value.has(e.dbName))), T = r(() => {
|
|
75
|
-
if (N.value.length === 0) return !1;
|
|
76
|
-
const e = N.value.filter(
|
|
77
|
-
(l) => n.value.has(l.dbName)
|
|
78
|
-
).length;
|
|
79
|
-
return e > 0 && e < N.value.length;
|
|
80
|
-
});
|
|
81
|
-
function z() {
|
|
82
|
-
F.value ? u.value.forEach((e) => n.value.delete(e.dbName)) : u.value.forEach((e) => n.value.add(e.dbName)), n.value = new Set(n.value);
|
|
83
|
-
}
|
|
84
|
-
function P(e) {
|
|
85
|
-
e.status !== "invalid" && (n.value.has(e.dbName) ? n.value.delete(e.dbName) : n.value.add(e.dbName), n.value = new Set(n.value));
|
|
86
|
-
}
|
|
87
|
-
function L() {
|
|
88
|
-
const e = u.value.filter(
|
|
89
|
-
(l) => l.status !== "invalid" && n.value.has(l.dbName)
|
|
90
|
-
);
|
|
91
|
-
return e.length === 0 ? N.value : e;
|
|
92
|
-
}
|
|
93
|
-
const R = r(() => [
|
|
94
|
-
{
|
|
95
|
-
id: "checkbox",
|
|
96
|
-
header: () => "",
|
|
97
|
-
size: 56,
|
|
98
|
-
cell: (e) => {
|
|
99
|
-
const l = e.row.original;
|
|
100
|
-
return l.status === "invalid" ? i("div", { class: "w-56" }) : i(A.FmCheckbox, {
|
|
101
|
-
value: l.dbName,
|
|
102
|
-
modelValue: n.value.has(l.dbName),
|
|
103
|
-
"onUpdate:modelValue": () => P(l)
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
id: "name",
|
|
109
|
-
header: () => "Name",
|
|
110
|
-
size: "auto",
|
|
111
|
-
cell: (e) => {
|
|
112
|
-
const l = e.row.original;
|
|
113
|
-
return i("div", { class: "flex flex-col" }, [
|
|
114
|
-
i("span", {}, l.name),
|
|
115
|
-
i(
|
|
116
|
-
te,
|
|
117
|
-
{},
|
|
118
|
-
{
|
|
119
|
-
default: () => i("div", { class: "flex items-center gap-4" }, [
|
|
120
|
-
i(
|
|
121
|
-
"span",
|
|
122
|
-
{ class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" },
|
|
123
|
-
l.dbName
|
|
124
|
-
),
|
|
125
|
-
i(A.FmButton, {
|
|
126
|
-
variant: "tertiary",
|
|
127
|
-
icon: "content_copy",
|
|
128
|
-
size: "sm",
|
|
129
|
-
onClick: async (a) => {
|
|
130
|
-
a.stopPropagation();
|
|
131
|
-
try {
|
|
132
|
-
await navigator.clipboard.writeText(l.dbName), k == null || k.open({
|
|
133
|
-
title: "Copied to clipboard",
|
|
134
|
-
message: l.name,
|
|
135
|
-
type: "success"
|
|
136
|
-
});
|
|
137
|
-
} catch (h) {
|
|
138
|
-
console.error("Failed to copy:", h);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
})
|
|
142
|
-
])
|
|
143
|
-
}
|
|
144
|
-
)
|
|
145
|
-
]);
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
id: "status",
|
|
150
|
-
header: () => "Status",
|
|
151
|
-
size: 200,
|
|
152
|
-
cell: (e) => {
|
|
153
|
-
const l = e.row.original, a = l.status === "published";
|
|
154
|
-
if (l.status === "invalid")
|
|
155
|
-
return i(
|
|
156
|
-
"div",
|
|
157
|
-
{
|
|
158
|
-
class: ["fm-status-badge", "fm-status-badge-error-secondary"]
|
|
159
|
-
},
|
|
160
|
-
"Invalid"
|
|
161
|
-
);
|
|
162
|
-
let c;
|
|
163
|
-
a && s.controller.unpublishAtLocation && !s.hideUnpublish ? c = i(A.FmButton, {
|
|
164
|
-
variant: "tertiary",
|
|
165
|
-
icon: "block",
|
|
166
|
-
loading: t.value === `unpublish-${l.dbName}`,
|
|
167
|
-
disabled: t.value !== void 0 && t.value !== `unpublish-${l.dbName}`,
|
|
168
|
-
onClick: async () => {
|
|
169
|
-
t.value = `unpublish-${l.dbName}`;
|
|
170
|
-
try {
|
|
171
|
-
const o = await s.controller.unpublishAtLocation(l).delayed(1e3);
|
|
172
|
-
p.value = o;
|
|
173
|
-
} catch (o) {
|
|
174
|
-
console.error("Error unpublishing at location:", o);
|
|
175
|
-
} finally {
|
|
176
|
-
t.value = void 0;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}) : a || (c = i(A.FmButton, {
|
|
180
|
-
variant: "tertiary",
|
|
181
|
-
icon: "ios_share",
|
|
182
|
-
loading: t.value === `publish-${l.dbName}`,
|
|
183
|
-
disabled: t.value !== void 0 && t.value !== `publish-${l.dbName}`,
|
|
184
|
-
onClick: async () => {
|
|
185
|
-
t.value = `publish-${l.dbName}`;
|
|
186
|
-
try {
|
|
187
|
-
const o = await s.controller.publishAtLocation(l).delayed(1e3);
|
|
188
|
-
p.value = o;
|
|
189
|
-
} catch (o) {
|
|
190
|
-
console.error("Error publishing at location:", o);
|
|
191
|
-
} finally {
|
|
192
|
-
t.value = void 0;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}));
|
|
196
|
-
const v = [
|
|
197
|
-
i(
|
|
198
|
-
"div",
|
|
199
|
-
{
|
|
200
|
-
class: [
|
|
201
|
-
"fm-status-badge",
|
|
202
|
-
a ? "fm-status-badge-success-secondary" : "fm-status-badge-info-secondary"
|
|
203
|
-
]
|
|
204
|
-
},
|
|
205
|
-
m(a ? "inventory.publish.status.published" : "inventory.publish.status.outdated")
|
|
206
|
-
)
|
|
207
|
-
];
|
|
208
|
-
return c && v.push(c), i("div", { class: "flex items-center gap-8" }, v);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
]);
|
|
212
|
-
async function I() {
|
|
213
|
-
t.value = "all";
|
|
214
|
-
try {
|
|
215
|
-
const e = L(), l = await s.controller.publishAll(e).delayed(1e3);
|
|
216
|
-
p.value = l;
|
|
217
|
-
} catch (e) {
|
|
218
|
-
console.error("Error publishing all:", e);
|
|
219
|
-
} finally {
|
|
220
|
-
t.value = void 0;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
async function K() {
|
|
224
|
-
if (s.controller.unpublishAll) {
|
|
225
|
-
t.value = "unpublish-all";
|
|
226
|
-
try {
|
|
227
|
-
const e = L(), l = await s.controller.unpublishAll(e).delayed(1e3);
|
|
228
|
-
p.value = l;
|
|
229
|
-
} catch (e) {
|
|
230
|
-
console.error("Error unpublishing all:", e);
|
|
231
|
-
} finally {
|
|
232
|
-
t.value = void 0;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
const d = r(() => n.value.size), M = r(() => d.value === 0 || d.value === S.value.length ? m("inventory.publish.actions.publishAll") : m("inventory.publish.actions.publishSelected", { count: d.value })), j = r(() => d.value === 0 || d.value === S.value.length ? "Unpublish all" : `Unpublish selected ${d.value} location${d.value === 1 ? "" : "s"}`);
|
|
237
|
-
return (e, l) => {
|
|
238
|
-
const a = x("FmButton"), h = x("FmTextField"), c = x("FmCheckbox"), v = x("FmTable");
|
|
239
|
-
return B(), H("div", ae, [
|
|
240
|
-
b("div", oe, [
|
|
241
|
-
b("div", ne, J(e.title), 1),
|
|
242
|
-
b("div", se, [
|
|
243
|
-
y(a, {
|
|
244
|
-
label: M.value,
|
|
245
|
-
variant: "secondary",
|
|
246
|
-
onClick: l[0] || (l[0] = (o) => I()),
|
|
247
|
-
loading: t.value === "all",
|
|
248
|
-
disabled: t.value !== "all" && t.value !== void 0
|
|
249
|
-
}, null, 8, ["label", "loading", "disabled"]),
|
|
250
|
-
e.controller.unpublishAll && !e.hideUnpublish ? (B(), O(a, {
|
|
251
|
-
key: 0,
|
|
252
|
-
label: j.value,
|
|
253
|
-
variant: "tertiary",
|
|
254
|
-
onClick: l[1] || (l[1] = (o) => K()),
|
|
255
|
-
loading: t.value === "unpublish-all",
|
|
256
|
-
disabled: t.value !== "unpublish-all" && t.value !== void 0
|
|
257
|
-
}, null, 8, ["label", "loading", "disabled"])) : Q("", !0)
|
|
258
|
-
])
|
|
259
|
-
]),
|
|
260
|
-
b("div", ie, [
|
|
261
|
-
y(h, {
|
|
262
|
-
modelValue: g.value,
|
|
263
|
-
"onUpdate:modelValue": l[2] || (l[2] = (o) => g.value = o),
|
|
264
|
-
class: "w-full flex-shrink-0",
|
|
265
|
-
placeholder: V(m)("inventory.publish.search.placeholder"),
|
|
266
|
-
"prepend-icon": "search"
|
|
267
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
268
|
-
b("div", re, [
|
|
269
|
-
y(V(ee), {
|
|
270
|
-
modelValue: w.value,
|
|
271
|
-
"onUpdate:modelValue": l[3] || (l[3] = (o) => w.value = o),
|
|
272
|
-
attributes: D
|
|
273
|
-
}, null, 8, ["modelValue"]),
|
|
274
|
-
y(c, {
|
|
275
|
-
value: "select-all",
|
|
276
|
-
"model-value": F.value,
|
|
277
|
-
indeterminate: T.value,
|
|
278
|
-
"onUpdate:modelValue": z,
|
|
279
|
-
label: "Select all"
|
|
280
|
-
}, null, 8, ["model-value", "indeterminate"])
|
|
281
|
-
]),
|
|
282
|
-
b("div", ue, [
|
|
283
|
-
y(v, {
|
|
284
|
-
"row-data": u.value,
|
|
285
|
-
"column-defs": R.value,
|
|
286
|
-
"shrink-at": 9999,
|
|
287
|
-
virtual: !0,
|
|
288
|
-
"page-size": u.value.length,
|
|
289
|
-
"hide-footer": ""
|
|
290
|
-
}, null, 8, ["row-data", "column-defs", "page-size"])
|
|
291
|
-
])
|
|
292
|
-
])
|
|
293
|
-
]);
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
});
|
|
297
|
-
export {
|
|
298
|
-
he as _
|
|
299
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { c as a, ab as u } from "./app-Bb5HLWTu.js";
|
|
2
|
-
import { getCurrentInstance as d, reactive as b, watch as o } from "vue";
|
|
3
|
-
function g(i = "modelValue", e) {
|
|
4
|
-
var n, c;
|
|
5
|
-
const s = ((n = d()) == null ? void 0 : n.props) ?? {}, f = ((c = d()) == null ? void 0 : c.emit) ?? (() => {
|
|
6
|
-
}), t = b(a(s[i] ?? (e == null ? void 0 : e.default) ?? {})), m = `update:${u(i)}`;
|
|
7
|
-
return e != null && e.watchProps && o(
|
|
8
|
-
() => s[i],
|
|
9
|
-
(r) => {
|
|
10
|
-
r && r !== t && Object.assign(t, a(r));
|
|
11
|
-
},
|
|
12
|
-
{ deep: !0, immediate: !0 }
|
|
13
|
-
), o(t, (r) => {
|
|
14
|
-
f(m, r);
|
|
15
|
-
}), t;
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
g as d
|
|
19
|
-
};
|
package/dist/stock-BIjTQFsR.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { u as i } from "./stock-BR8x3nlx.js";
|
|
2
|
-
import { a as s, s as p, Z as B } from "./app-Bb5HLWTu.js";
|
|
3
|
-
import { computed as k, ref as d } from "vue";
|
|
4
|
-
function v() {
|
|
5
|
-
return {
|
|
6
|
-
stockBalance: {
|
|
7
|
-
_id: "",
|
|
8
|
-
items: []
|
|
9
|
-
},
|
|
10
|
-
productBalance: []
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
const m = p.fromNumber(0), f = {
|
|
14
|
-
id: "",
|
|
15
|
-
balance: m,
|
|
16
|
-
closing: null,
|
|
17
|
-
costs: null
|
|
18
|
-
}, a = d(v()), h = () => {
|
|
19
|
-
const r = s(), u = k(() => {
|
|
20
|
-
var n;
|
|
21
|
-
const c = (n = a.value.stockBalance.skus) == null ? void 0 : n.groupBy((t) => t.id), o = (t) => {
|
|
22
|
-
var e;
|
|
23
|
-
return ((e = c == null ? void 0 : c.get(t)) == null ? void 0 : e[0]) ?? { ...f, id: t };
|
|
24
|
-
};
|
|
25
|
-
return r.skus.map((t) => o(t._id));
|
|
26
|
-
}), l = i();
|
|
27
|
-
return {
|
|
28
|
-
// state
|
|
29
|
-
get stockBalance() {
|
|
30
|
-
return {
|
|
31
|
-
...a.value.stockBalance,
|
|
32
|
-
skus: u.value
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
set stockBalance(c) {
|
|
36
|
-
a.value.stockBalance = c;
|
|
37
|
-
},
|
|
38
|
-
get productBalance() {
|
|
39
|
-
return a.value.productBalance;
|
|
40
|
-
},
|
|
41
|
-
set productBalance(c) {
|
|
42
|
-
a.value.productBalance = c;
|
|
43
|
-
},
|
|
44
|
-
// actions
|
|
45
|
-
async readStockBalance() {
|
|
46
|
-
this.stockBalance = await l.readStockBalance();
|
|
47
|
-
},
|
|
48
|
-
async readProductBalance() {
|
|
49
|
-
this.productBalance = [];
|
|
50
|
-
const c = s(), o = B({
|
|
51
|
-
recipes: c.recipes,
|
|
52
|
-
skus: c.skus,
|
|
53
|
-
skuGroups: [],
|
|
54
|
-
inventoryBindingMapping: {},
|
|
55
|
-
stockBalance: this.stockBalance
|
|
56
|
-
// silent: true
|
|
57
|
-
});
|
|
58
|
-
function n(t, e) {
|
|
59
|
-
return Object.prototype.hasOwnProperty.call(t, e);
|
|
60
|
-
}
|
|
61
|
-
for (const t in o.convertCountdown)
|
|
62
|
-
if (n(o.convertCountdown, t)) {
|
|
63
|
-
const e = o.convertCountdown[t];
|
|
64
|
-
this.productBalance.push({
|
|
65
|
-
id: t,
|
|
66
|
-
count: e
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
export {
|
|
73
|
-
h as u
|
|
74
|
-
};
|