@feedmepos/mf-inventory-portal 1.8.0-dev.1 → 1.8.0-dev.10
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-BjFIh5km.js +1466 -0
- package/dist/{ApprovalView-C8_ax05b.js → ApprovalView-CauRuf64.js} +26 -25
- package/dist/{BindingsDialog-t0ZY9eh5.js → BindingsDialog-U-tzIfGX.js} +2 -2
- package/dist/{BindingsPicker-C0Qblmml.js → BindingsPicker-CV_oghtz.js} +2 -2
- package/dist/{BindingsTable-CsqUBbRA.js → BindingsTable-TKSQxAxV.js} +4 -4
- package/dist/{BulkReceiveRequestView-DAG-TMox.js → BulkReceiveRequestView-Cyeq26qc.js} +21 -21
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BpJhboKU.js +151 -0
- package/dist/{ClosingDraftView-CdKp4Ny6.js → ClosingDraftView-UqeHsxyJ.js} +748 -746
- package/dist/ClosingHistoryView-Cr6cQq6j.js +769 -0
- package/dist/{ClosingTemplateView-C326DL4q.js → ClosingTemplateView-DZ0Mdc87.js} +303 -291
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CXjubRbj.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-C-OsCTxZ.js} +1 -1
- package/dist/{DefaultView-CsIMmQAY.js → DefaultView-DQKHG5Jl.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-eTrMvJzA.js → DeliveryOrderPrintPreview-Z_kBbMMO.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-B7nBbxMo.js → EmailDialog.vue_vue_type_script_setup_true_lang-Ce6Ly9pT.js} +6228 -6216
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-BUYI8koH.js +47 -0
- package/dist/FeatureCapabilityGate-DOn2IVJb.js +74 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CI2KTzDs.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BJuo4lEh.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Db_FiSRe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DZxz5hbo.js} +2 -2
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CiBhz5sq.js +120 -0
- package/dist/FmMultiselectDialog-Bx9cLdYs.js +123 -0
- package/dist/{FmMultiselectDialog-CYUxtxnS.js → FmMultiselectDialog-DvaWLGY5.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DOkV11NN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D6f1M96D.js} +72 -73
- package/dist/ImportView-1-cjN7ay.js +1290 -0
- package/dist/{IngredientsView-CZ6E7cXf.js → IngredientsView-JfKlUU2E.js} +656 -649
- package/dist/{IntegrationExplorerView-B15ND4Fg.js → IntegrationExplorerView-uElgWH8i.js} +602 -614
- package/dist/IntegrationPlatformView-g2dU5SG6.js +13061 -0
- package/dist/{IntegrationView-hkNhsqx2.js → IntegrationView-B9g888K4.js} +2956 -2922
- package/dist/{InventoryBindingForm-SfuUF0_O.js → InventoryBindingForm-DfGOKZWg.js} +1 -1
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CNjTdNL7.js +472 -0
- package/dist/{InventoryBindingSummary-DUcukkyJ.js → InventoryBindingSummary-CSii8B2X.js} +1 -1
- package/dist/JsonViewer.vue_vue_type_script_setup_true_lang-C_hg75l0.js +25 -0
- package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D_Xk4SOH.js +79 -0
- package/dist/PlanTierBadge.vue_vue_type_script_setup_true_lang-DJvfMOND.js +274 -0
- package/dist/PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-Bdjm0Y4w.js +79 -0
- package/dist/{ProductionRunDetailView-BwgRX-14.js → ProductionRunDetailView-HgH2Wp99.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BbNXNhpr.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-C88pjV2s.js} +9 -9
- package/dist/{ProductionRunView-CZU7LY9-.js → ProductionRunView-BkvQHeCP.js} +16 -15
- package/dist/{PublishView-DS2FZ66p.js → PublishView-CIei_T5e.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-CZa0MVAs.js → PurchaseOrderPrintPreview-Wmv7676h.js} +2 -2
- package/dist/{ReceiveRequestView-Bk5b3nVB.js → ReceiveRequestView-MqOIpIDB.js} +15 -15
- package/dist/RecipeView-WzXJX4JU.js +3440 -0
- package/dist/SettingsView-1YlgjyzB.js +1032 -0
- package/dist/StockView-C-dIRXPv.js +2651 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DdZg9T4n.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CewKTZzy.js} +1 -1
- package/dist/{SupplierView-D8q6siZW.js → SupplierView-53rHhQ63.js} +577 -571
- package/dist/{SurchargeView-Db_5YFoR.js → SurchargeView-DuJb5EUn.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-WOVs4Fr1.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-C_YmC-ZX.js} +2 -2
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js +71 -0
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BtoP4XgE.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CyQujMzv.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Bljc4Vuy.js → TransferDetails.vue_vue_type_script_setup_true_lang-CMwqjlb0.js} +1722 -1672
- package/dist/TransferTemplateView-B6OGfKQr.js +2343 -0
- package/dist/{UnitCostHistoryView-BqDiQ4IE.js → UnitCostHistoryView-BVlq4BNG.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BjSmg5LX.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CULJEeCU.js} +4 -4
- package/dist/{UnitView-CM695-VI.js → UnitView-AuIJokVF.js} +84 -84
- package/dist/{WarehouseView-BdidU4p6.js → WarehouseView-Cjv8S1ov.js} +194 -189
- package/dist/{WastageTemplateView-DdhwdXT6.js → WastageTemplateView-mxSTzVSZ.js} +19 -18
- package/dist/api/feature-flags.d.ts +12 -0
- package/dist/api/integration-sync-log.d.ts +0 -13
- package/dist/api/inventory.d.ts +9 -9
- package/dist/api/license.d.ts +8 -0
- package/dist/{app-Cb5s4jMu.js → app-OztWApio.js} +6085 -6053
- package/dist/app.d.ts +36 -150
- package/dist/app.js +1 -1
- package/dist/{closing-template-DnqnpXxn.js → closing-template-DIxXDgZQ.js} +1 -1
- package/dist/components/ChangeLocationComponent.vue.d.ts +21 -14
- package/dist/components/DeprecateSoonWarningDialog.vue.d.ts +22 -0
- package/dist/components/FeatureCapabilityBadge.vue.d.ts +29 -0
- package/dist/components/FeatureCapabilityGate.spec.d.ts +1 -0
- package/dist/components/FeatureCapabilityGate.vue.d.ts +29 -0
- package/dist/components/FmUnitInputRules.d.ts +1 -1
- package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
- package/dist/components/NumberPrecisionInput.spec.d.ts +1 -0
- package/dist/components/{PremiumBadge.vue.d.ts → PlanTierBadge.vue.d.ts} +5 -13
- package/dist/components/PlanUpgradeDialog.vue.d.ts +30 -0
- package/dist/composable/useNavigationMenu.d.ts +2 -1
- package/dist/{date2-BPhD_1Of.js → date2-BTzYzk-x.js} +1 -1
- package/dist/{dayjs.min-Zbd6-uVD.js → dayjs.min-BIg6CfC4.js} +1 -1
- package/dist/{decimal-Df6a50Ld.js → decimal-B34w3X7O.js} +2 -2
- package/dist/{defineDeepModel-Brbsikbi.js → defineDeepModel-CrZAv12u.js} +1 -1
- package/dist/{duplicate-template-B9kuShaF.js → duplicate-template-BKVPhi40.js} +1 -1
- package/dist/{inventory-core-dart.default-DDRxXXnt.js → feature-BUVZ_ab3.js} +766 -398
- package/dist/feature-flags/core.d.ts +28 -0
- package/dist/feature-flags/core.spec.d.ts +1 -0
- package/dist/feature-flags/navigation-capabilities.d.ts +23 -0
- package/dist/feature-flags/navigation-capabilities.spec.d.ts +1 -0
- package/dist/feature-flags/plan-tier.d.ts +6 -0
- package/dist/feature-flags/plan-tier.spec.d.ts +1 -0
- package/dist/feature-flags/portal-feature-catalog.d.ts +19 -0
- package/dist/feature-flags/portal-feature-catalog.spec.d.ts +1 -0
- package/dist/feature-flags/vue.d.ts +16 -0
- package/dist/feature-flags/vue.spec.d.ts +1 -0
- package/dist/{format-time-from-id-DmUjUcVj.js → format-time-from-id-DGLxhRFH.js} +1 -1
- package/dist/{format-unit-display-CsQA0SQd.js → format-unit-display-BhudItCc.js} +118 -119
- package/dist/helper/menu-usage-module.d.ts +1 -1
- package/dist/helper/number.d.ts +5 -1
- package/dist/helper/rules.d.ts +1 -1
- package/dist/id-to-date-BfwadWDS.js +67 -0
- package/dist/{import-export.helper-DCQ6oX9s.js → import-export.helper-BdQ_d-fT.js} +16 -17
- package/dist/{index-UmM6gHJ1.js → index-BTNI4XZ2.js} +1 -1
- package/dist/{index-C-mazZwS.js → index-B_hoeQNL.js} +3 -3
- package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
- package/dist/{index-BXaIMGnI.js → index-CCvxPS3E.js} +1 -1
- package/dist/index-eGvSlWMU.js +1892 -0
- package/dist/{lz-string-Bibw5D_6.js → lz-string-CVEGZpSC.js} +1 -1
- package/dist/{netsuite-Bev0OtQT.js → netsuite-DEhdSyBn.js} +9 -3
- package/dist/{predefined-templates-BHvUnTk_.js → predefined-templates-BTdQl7jj.js} +1 -1
- package/dist/{purchase-order-template-DgOKEzhS.js → purchase-order-template-DfMmpsrJ.js} +1 -1
- package/dist/{recalculationUtils-Dv__DzZh.js → recalculationUtils-Ds9Jcg0l.js} +1 -1
- package/dist/router/name.d.ts +2 -2
- package/dist/{row-action.enum-ncgDYAjP.js → row-action.enum-B2Y5YFbc.js} +2 -2
- package/dist/rules-D01xYhgI.js +238 -0
- package/dist/{stock-CxCRZo_D.js → stock-D3kBNq3e.js} +1 -1
- package/dist/stock-DyTC4Teu.js +74 -0
- package/dist/stores/feature.d.ts +20 -2
- package/dist/stores/integration/netsuite.d.ts +2 -2
- package/dist/stores/inventory.d.ts +0 -47
- package/dist/stores/inventory.no-location.spec.d.ts +1 -0
- package/dist/stores/location.d.ts +42 -42
- package/dist/stores/supplier.d.ts +49 -49
- package/dist/stores/warehouse.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-CkZdeMcl.js → supplier-DaidezrO.js} +2 -2
- package/dist/{surcharge-FRSFqjGl.js → surcharge-C-PFvvlU.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-Cm1styDr.js → uom-rules-Un5bhcrm.js} +1 -1
- package/dist/{use-ingredient-select-dialog-ntAqHX04.js → use-ingredient-select-dialog-DV_hkAt9.js} +2 -2
- package/dist/use-inventory-binding-dialog-CTceyFrg.js +113 -0
- package/dist/{use-template-enabled-locations-CIZqw-Z8.js → use-template-enabled-locations-DGqw8tvz.js} +2 -2
- package/dist/{use-transfer-locations-CM5vNttA.js → use-transfer-locations-DgtKajec.js} +2 -2
- package/dist/{useHrmPermission-CslLuBoP.js → useHrmPermission-BMpZlah6.js} +1 -1
- package/dist/useNavigationMenu-D0NtXAnB.js +346 -0
- package/dist/{useSseClient-CCV4mPzD.js → useSseClient-CHZZxy7Z.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-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/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/recipe-amount-validation.spec.d.ts +1 -0
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -1
- package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +1 -1
- package/dist/{components/PreviewBadge.vue.d.ts → views/integration/IntegrationPlatformView.vue.d.ts} +11 -13
- package/dist/views/integration/components/IntegrationCard.vue.d.ts +38 -0
- package/dist/views/integration/components/Synergy/importFn.spec.d.ts +1 -0
- package/dist/views/integration/components/Xilnex/importFn.spec.d.ts +1 -0
- 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/integration/helper/opening-balance.d.ts +22 -0
- package/dist/views/integration/helper/opening-balance.spec.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
- package/dist/views/receive-request/composables/netsuite-order-label.d.ts +11 -0
- package/dist/views/receive-request/composables/netsuite-order-label.spec.d.ts +1 -0
- 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/import/export.spec.d.ts +1 -0
- 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/recipe/components/recipe-bulk-editor/components/ModificationCard.spec.d.ts +1 -0
- package/dist/views/recipe/helper/bulk-edit-simulation.helper.d.ts +0 -1
- package/dist/views/recipe/helper/import-recipe.d.ts +2 -2
- package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
- package/dist/views/{ingredient-group/IngredientGroupView.vue.d.ts → settings/FeatureFlagView.vue.d.ts} +0 -1
- package/dist/views/settings/PlanLicenseDisplay.spec.d.ts +1 -0
- package/dist/views/{integration/components/IntegrationSyncLogTab.vue.d.ts → settings/PlanLicenseDisplay.vue.d.ts} +2 -2
- package/dist/views/stock/components/dialog/AmendAdjustmentForm.spec.d.ts +1 -0
- package/dist/views/stock/components/dialog/ConvertSkuDialog.spec.d.ts +1 -0
- 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/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts +1 -0
- 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/warehouse/components/WarehouseForm.vue.d.ts +2 -2
- package/dist/{vue-i18n-C5j4EQhi.js → vue-i18n-mXrQUZTi.js} +519 -519
- package/dist/{xlsx.util-B50OvX4z.js → xlsx.util-CKx0NYTq.js} +2 -2
- package/package.json +71 -66
- package/dist/App-BXgpGzGR.js +0 -1476
- package/dist/ClosingHistoryView-Blyq9-BS.js +0 -761
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-zcEv1Swg.js +0 -243
- package/dist/FmMultiselectDialog-BAw-gp5K.js +0 -77
- package/dist/ImportView-BmotFC-3.js +0 -1302
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVCCpvS4.js +0 -51
- package/dist/IngredientGroupView-qrR9ksEn.js +0 -985
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-Zq81p_MF.js +0 -563
- package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BmfROiLM.js +0 -72
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-3e3kDsbN.js +0 -93
- package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-DX2MJqL4.js +0 -29
- package/dist/RecipeView-DvI6X-uN.js +0 -3625
- package/dist/SettingsView-sThYErMz.js +0 -698
- package/dist/StockView-Z9wGihT7.js +0 -2612
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
- package/dist/TransferTemplateView-DtsJzmUr.js +0 -2327
- package/dist/feature-Ckn5ra3z.js +0 -1136
- package/dist/number-y_W4pn_d.js +0 -138
- package/dist/random-CSbEbElR.js +0 -10
- package/dist/rules-CZTBvenw.js +0 -98
- package/dist/stock-XINW8JOM.js +0 -75
- package/dist/use-inventory-binding-dialog-DVIJO8Cl.js +0 -152
- package/dist/useNavigationMenu-CSinmNCY.js +0 -172
- package/dist/usePromise-CbVUCxhj.js +0 -29
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +0 -31
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +0 -10
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -21
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +0 -12
- package/dist/views/ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +0 -37
- package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +0 -24
- package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +0 -31
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +0 -77
- package/dist/views/integration/composables/use-integration-sync-log.d.ts +0 -45
- /package/dist/components/{FmFeatureFlagDialog.vue.d.ts → DeprecateSoonPill.vue.d.ts} +0 -0
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { components as ce, useDialogChild as Pe, useSnackbar as de, useDialog as Me, FmButtonVariant as te } from "@feedmepos/ui-library";
|
|
2
2
|
import { defineStore as pe } from "pinia";
|
|
3
3
|
import { F as xe } from "./form-mode.enum-BKiNVH6A.js";
|
|
4
|
-
import { u as fe } from "./purchase-order-template-
|
|
5
|
-
import { ref as I, h as oe, defineComponent as ye, resolveComponent as W, createElementBlock as F, openBlock as O, createElementVNode as
|
|
6
|
-
import { a as X, c as ve, r as L, u as ie,
|
|
7
|
-
import { useRouter as
|
|
8
|
-
import { a as
|
|
9
|
-
import { D as ne, R as U } from "./row-action.enum-
|
|
10
|
-
import { c as
|
|
11
|
-
import { f as
|
|
4
|
+
import { u as fe } from "./purchase-order-template-DfMmpsrJ.js";
|
|
5
|
+
import { ref as I, h as oe, defineComponent as ye, resolveComponent as W, createElementBlock as F, openBlock as O, createElementVNode as D, createCommentVNode as J, normalizeClass as Z, createTextVNode as Be, toDisplayString as q, unref as B, createVNode as z, withCtx as me, Fragment as Y, renderList as ae, onMounted as Le, computed as H, watch as Qe, createSlots as Ue, createBlock as re } from "vue";
|
|
6
|
+
import { a as X, c as ve, r as L, u as ie, s as qe, m as Ve, k as _e, t as He, R as we } from "./app-OztWApio.js";
|
|
7
|
+
import { useRouter as ze } from "vue-router";
|
|
8
|
+
import { a as je } from "./FmMultiselectDialog-DvaWLGY5.js";
|
|
9
|
+
import { D as ne, R as U } from "./row-action.enum-B2Y5YFbc.js";
|
|
10
|
+
import { c as Ye } from "./component-BmLAdDiY.js";
|
|
11
|
+
import { f as Ke } from "./format-time-from-id-DGLxhRFH.js";
|
|
12
12
|
import { useI18n as he, useCoreStore as Ie } from "@feedmepos/mf-common";
|
|
13
|
-
import { t as K, a as Ce, d as Oe, s as Ae, r as
|
|
14
|
-
import { F as
|
|
15
|
-
import { a as G,
|
|
16
|
-
import { f as
|
|
17
|
-
import { u as ge } from "./supplier-
|
|
18
|
-
import {
|
|
19
|
-
import { u as
|
|
20
|
-
import { u as
|
|
21
|
-
|
|
22
|
-
function De(n) {
|
|
13
|
+
import { t as K, a as Ce, d as Oe, s as Ae, r as Ge } from "./xlsx.util-CKx0NYTq.js";
|
|
14
|
+
import { F as We } from "./FmDroppableField-J0tG_U3w.js";
|
|
15
|
+
import { a as G, t as se, g as ue, c as Je, B as Ze } from "./rules-D01xYhgI.js";
|
|
16
|
+
import { f as Xe } from "./date2-BTzYzk-x.js";
|
|
17
|
+
import { u as ge } from "./supplier-DaidezrO.js";
|
|
18
|
+
import { u as be } from "./netsuite-DEhdSyBn.js";
|
|
19
|
+
import { u as et } from "./duplicate-template-BKVPhi40.js";
|
|
20
|
+
import { u as tt } from "./vue-i18n-mXrQUZTi.js";
|
|
21
|
+
function Ne(n) {
|
|
23
22
|
const e = X(), o = n.sku, d = e.skuById[o._id];
|
|
24
23
|
if (d.unit._id !== o.unit._id) return !0;
|
|
25
24
|
const u = n.measurement;
|
|
@@ -29,7 +28,7 @@ function ke(n) {
|
|
|
29
28
|
const { skuById: e } = X(), o = ve(n);
|
|
30
29
|
return o.purchaseOrder.items = n.purchaseOrder.items.filter((d) => e[d.sku._id]), o;
|
|
31
30
|
}
|
|
32
|
-
const
|
|
31
|
+
const Te = pe(
|
|
33
32
|
"transferTemplateTable",
|
|
34
33
|
function() {
|
|
35
34
|
const { t: e } = he(), o = At(), d = I(!1), u = I(new Array()), s = fe(), m = X();
|
|
@@ -80,7 +79,7 @@ const be = pe(
|
|
|
80
79
|
accessorKey: "_id",
|
|
81
80
|
header: () => e("inventory.transfer.table.createdAt"),
|
|
82
81
|
cell(l) {
|
|
83
|
-
return
|
|
82
|
+
return Ke(`${l.getValue()}`);
|
|
84
83
|
},
|
|
85
84
|
enableSorting: !0
|
|
86
85
|
},
|
|
@@ -108,7 +107,7 @@ const be = pe(
|
|
|
108
107
|
textAlign: "right"
|
|
109
108
|
},
|
|
110
109
|
cell(l) {
|
|
111
|
-
const c = Number(l.getValue()) || 0, h = l.row.original.purchaseOrder.items.some(
|
|
110
|
+
const c = Number(l.getValue()) || 0, h = l.row.original.purchaseOrder.items.some(Ne);
|
|
112
111
|
return c === 0 || h ? oe("div", { class: "flex justify-end gap-4 items-center" }, [
|
|
113
112
|
oe(
|
|
114
113
|
ce.FmTooltip,
|
|
@@ -161,7 +160,7 @@ const be = pe(
|
|
|
161
160
|
ne[U.Duplicate],
|
|
162
161
|
ne[U.Delete]
|
|
163
162
|
];
|
|
164
|
-
return
|
|
163
|
+
return Ye(h, (T) => i(T, c));
|
|
165
164
|
},
|
|
166
165
|
enableSorting: !1,
|
|
167
166
|
size: 40,
|
|
@@ -179,8 +178,8 @@ const be = pe(
|
|
|
179
178
|
}
|
|
180
179
|
);
|
|
181
180
|
var Se = /* @__PURE__ */ ((n) => (n.Source = "Source", n.Destination = "Destination", n.Ingredient = "Ingredient", n))(Se || {});
|
|
182
|
-
const Ee =
|
|
183
|
-
function
|
|
181
|
+
const Ee = qe.fromNumber(0);
|
|
182
|
+
function De(n) {
|
|
184
183
|
var d;
|
|
185
184
|
const e = n.sku;
|
|
186
185
|
return {
|
|
@@ -233,8 +232,8 @@ function Re() {
|
|
|
233
232
|
function rt(n) {
|
|
234
233
|
var a;
|
|
235
234
|
const o = Ie().currentBusiness.value, u = (a = n.map((r) => {
|
|
236
|
-
var
|
|
237
|
-
const i = r.purchaseOrder.items.map((t) =>
|
|
235
|
+
var T;
|
|
236
|
+
const i = r.purchaseOrder.items.map((t) => De(t)), p = Re(), l = [
|
|
238
237
|
["Template ID", r._id],
|
|
239
238
|
["Template name", r.name],
|
|
240
239
|
["Business name", o == null ? void 0 : o.name],
|
|
@@ -253,7 +252,7 @@ function rt(n) {
|
|
|
253
252
|
],
|
|
254
253
|
[
|
|
255
254
|
"Locations",
|
|
256
|
-
...(
|
|
255
|
+
...(T = r.locations) != null && T.length ? r.locations.map((t) => `${t.name} (${t.dbName})`) : ["All"]
|
|
257
256
|
],
|
|
258
257
|
["Reference", r.purchaseOrder.ref ?? ""],
|
|
259
258
|
["Remark", r.purchaseOrder.remark ?? ""],
|
|
@@ -272,11 +271,11 @@ function rt(n) {
|
|
|
272
271
|
sheets: {},
|
|
273
272
|
sheetOccurence: {}
|
|
274
273
|
}
|
|
275
|
-
)) == null ? void 0 : a.sheets, s = `${o == null ? void 0 : o.name} transfer templates (${
|
|
274
|
+
)) == null ? void 0 : a.sheets, s = `${o == null ? void 0 : o.name} transfer templates (${Xe(/* @__PURE__ */ new Date())}).xlsx`, m = Ce(u);
|
|
276
275
|
return Oe(m, s), s;
|
|
277
276
|
}
|
|
278
277
|
function nt() {
|
|
279
|
-
const n = Ie(), e = ge(), o = ie(), d = X(), u = n.currentBusiness.value, s =
|
|
278
|
+
const n = Ie(), e = ge(), o = ie(), d = X(), u = n.currentBusiness.value, s = De({
|
|
280
279
|
sku: {
|
|
281
280
|
unit: {
|
|
282
281
|
_id: "",
|
|
@@ -382,8 +381,8 @@ function nt() {
|
|
|
382
381
|
Source: p,
|
|
383
382
|
Destination: l,
|
|
384
383
|
Ingredient: c
|
|
385
|
-
}),
|
|
386
|
-
return Oe(h,
|
|
384
|
+
}), T = `${u == null ? void 0 : u.name} transfer templates import.xlsx`;
|
|
385
|
+
return Oe(h, T), T;
|
|
387
386
|
}
|
|
388
387
|
function ot(n, e) {
|
|
389
388
|
const o = new Array(), d = /(.*) \(((supplier_|warehouse_|restaurant_).{24,})\)/, s = ie().locationByDbName, a = ge().supplierById, r = n.trim(), i = d.exec(r);
|
|
@@ -487,7 +486,7 @@ function it(n) {
|
|
|
487
486
|
l,
|
|
488
487
|
c,
|
|
489
488
|
h,
|
|
490
|
-
...
|
|
489
|
+
...T
|
|
491
490
|
] = Ae(n);
|
|
492
491
|
if (!e || !e.length || e.some((f) => f.length && !f.startsWith("system:")))
|
|
493
492
|
throw new Error("Missing meta header. Excel file does not come from the template.");
|
|
@@ -504,7 +503,7 @@ function it(n) {
|
|
|
504
503
|
throw new Error(
|
|
505
504
|
`Missing meta headers (${E.join()}). Excel file does not come from the template.`
|
|
506
505
|
);
|
|
507
|
-
return
|
|
506
|
+
return T.map((f, v) => {
|
|
508
507
|
const _ = {};
|
|
509
508
|
for (const y in t) {
|
|
510
509
|
const x = t[y];
|
|
@@ -525,7 +524,7 @@ function lt(n, e, o) {
|
|
|
525
524
|
};
|
|
526
525
|
}
|
|
527
526
|
function ut(n, e, o) {
|
|
528
|
-
const d = X(), u =
|
|
527
|
+
const d = X(), u = be(), s = d.skuByCode[n.code], m = new Array();
|
|
529
528
|
if (!s)
|
|
530
529
|
return m.push(`Cannot find ingredient with code (${n.code}) ${n.name}.`), {
|
|
531
530
|
index: e,
|
|
@@ -565,18 +564,18 @@ function ut(n, e, o) {
|
|
|
565
564
|
ue(a, r)
|
|
566
565
|
);
|
|
567
566
|
(Number.isNaN(Number(n.quantityStep)) || Number(n.quantityStep) <= 0) && m.push("Amount step must be more than 0");
|
|
568
|
-
const p =
|
|
567
|
+
const p = Je(i), l = lt(
|
|
569
568
|
n.minimumQuantity,
|
|
570
569
|
n.maximumQuantity,
|
|
571
570
|
ue(a, r)
|
|
572
571
|
), c = l.min, h = l.max;
|
|
573
572
|
l.compareError && m.push(l.compareError);
|
|
574
|
-
const
|
|
573
|
+
const T = Ze(+n.minimumQuantity, +n.maximumQuantity), t = se(
|
|
575
574
|
n.defaultQuantity,
|
|
576
575
|
ue(a, r)
|
|
577
576
|
), S = p(t);
|
|
578
577
|
typeof S == "string" && m.push(`Default amount: ${S}`);
|
|
579
|
-
const E = l.min && l.max ?
|
|
578
|
+
const E = l.min && l.max ? T(`${n.defaultQuantity}`) : null;
|
|
580
579
|
typeof E == "string" && m.push(`Default amount: ${E}`);
|
|
581
580
|
const w = {
|
|
582
581
|
sku: s,
|
|
@@ -597,7 +596,7 @@ function ut(n, e, o) {
|
|
|
597
596
|
function ct(n) {
|
|
598
597
|
const e = n.SheetNames.filter(
|
|
599
598
|
(s) => !Object.values(Se).map(String).includes(s)
|
|
600
|
-
), d =
|
|
599
|
+
), d = Te().templates, u = Ve(d, "_id");
|
|
601
600
|
try {
|
|
602
601
|
return e.reduce(
|
|
603
602
|
(s, m) => {
|
|
@@ -606,8 +605,8 @@ function ct(n) {
|
|
|
606
605
|
a.push(...p.errors);
|
|
607
606
|
const l = p.from, c = at(i.locations), h = c.filter((v) => v.location).map((v) => v.location);
|
|
608
607
|
a.push(...c.flatMap((v) => v.errors));
|
|
609
|
-
const
|
|
610
|
-
(v, _) => ut(v.data, _,
|
|
608
|
+
const T = it(r).filter((v) => v.data.code), t = T.map(
|
|
609
|
+
(v, _) => ut(v.data, _, T)
|
|
611
610
|
);
|
|
612
611
|
a.push(
|
|
613
612
|
...t.flatMap(
|
|
@@ -724,22 +723,22 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
724
723
|
var s, m, a;
|
|
725
724
|
const d = W("FmIcon"), u = W("FmTooltip");
|
|
726
725
|
return O(), F("div", dt, [
|
|
727
|
-
o[0] || (o[0] =
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
726
|
+
o[0] || (o[0] = D("div", null, "•", -1)),
|
|
727
|
+
D("div", pt, [
|
|
728
|
+
D("div", ft, [
|
|
729
|
+
D("div", {
|
|
731
730
|
class: Z({
|
|
732
731
|
"text-fm-color-system-error-300": e.errors.length
|
|
733
732
|
})
|
|
734
733
|
}, [
|
|
735
734
|
Be(q(e.name) + " ", 1),
|
|
736
|
-
|
|
735
|
+
D("span", yt, " (" + q(B(He)(`${e.transferType}`)) + ") ", 1),
|
|
737
736
|
e.type === "create" ? (O(), F("span", vt, "(new)")) : J("", !0)
|
|
738
737
|
], 2),
|
|
739
738
|
e.errors.length ? (O(), F("div", ht, [
|
|
740
739
|
z(u, { "z-index": 50 }, {
|
|
741
740
|
content: me(() => [
|
|
742
|
-
|
|
741
|
+
D("ol", null, [
|
|
743
742
|
(O(!0), F(Y, null, ae(e.errors, (r, i) => (O(), F("li", { key: i }, q(r), 1))), 128))
|
|
744
743
|
])
|
|
745
744
|
]),
|
|
@@ -754,7 +753,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
754
753
|
})
|
|
755
754
|
])) : J("", !0)
|
|
756
755
|
]),
|
|
757
|
-
|
|
756
|
+
D("div", {
|
|
758
757
|
class: Z([
|
|
759
758
|
"fm-typo-en-body-sm-400",
|
|
760
759
|
{
|
|
@@ -767,10 +766,10 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
767
766
|
]);
|
|
768
767
|
};
|
|
769
768
|
}
|
|
770
|
-
}), gt = { class: "flex flex-col gap-24" },
|
|
769
|
+
}), gt = { class: "flex flex-col gap-24" }, bt = {
|
|
771
770
|
key: 0,
|
|
772
771
|
class: "flex items-center gap-8"
|
|
773
|
-
},
|
|
772
|
+
}, Tt = { class: "flex flex-col gap-8" }, St = { class: "line-clamp-2 text-ellipsis break-all" }, xt = {
|
|
774
773
|
key: 2,
|
|
775
774
|
class: "shrink-0"
|
|
776
775
|
}, _t = {
|
|
@@ -798,16 +797,16 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
798
797
|
}
|
|
799
798
|
});
|
|
800
799
|
const a = I(new Array()), r = I([]), i = I([]), p = H(
|
|
801
|
-
() => !!a.value.length || r.value.some((
|
|
800
|
+
() => !!a.value.length || r.value.some((T) => T.errors.length) || i.value.some((T) => T.errors.length)
|
|
802
801
|
), l = H(
|
|
803
802
|
() => !!r.value.length || !!i.value.length
|
|
804
803
|
), { t: c } = he();
|
|
805
|
-
async function h(
|
|
804
|
+
async function h(T) {
|
|
806
805
|
a.value = [], r.value = [], i.value = [];
|
|
807
806
|
try {
|
|
808
807
|
u.value = !0;
|
|
809
808
|
const [t] = await Promise.all([
|
|
810
|
-
|
|
809
|
+
Ge(T),
|
|
811
810
|
// fake buffer
|
|
812
811
|
new Promise((f) => setTimeout(f, 1e3))
|
|
813
812
|
]);
|
|
@@ -842,22 +841,22 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
842
841
|
}), u.value = !1;
|
|
843
842
|
}
|
|
844
843
|
}
|
|
845
|
-
return Qe(e, (
|
|
846
|
-
|
|
847
|
-
}), (
|
|
844
|
+
return Qe(e, (T) => {
|
|
845
|
+
T && h(T);
|
|
846
|
+
}), (T, t) => {
|
|
848
847
|
const S = W("FmCircularProgress"), E = W("FmIcon"), w = W("FmButton");
|
|
849
848
|
return O(), F("div", gt, [
|
|
850
|
-
t[2] || (t[2] =
|
|
851
|
-
s.value ? (O(), F("div",
|
|
852
|
-
|
|
849
|
+
t[2] || (t[2] = D("div", { class: "fm-typo-en-body-md-400" }, "Import transfer templates from excel sheets.", -1)),
|
|
850
|
+
s.value ? (O(), F("div", bt, [
|
|
851
|
+
D("div", null, [
|
|
853
852
|
z(S, {
|
|
854
853
|
size: "md",
|
|
855
854
|
color: "neutral-gray-200"
|
|
856
855
|
})
|
|
857
856
|
]),
|
|
858
|
-
t[1] || (t[1] =
|
|
857
|
+
t[1] || (t[1] = D("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "Loading...", -1))
|
|
859
858
|
])) : (O(), F(Y, { key: 1 }, [
|
|
860
|
-
z(
|
|
859
|
+
z(We, {
|
|
861
860
|
class: Z({
|
|
862
861
|
"w-full": !0,
|
|
863
862
|
"h-[200px]": !e.value
|
|
@@ -870,8 +869,8 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
870
869
|
e.value ? {
|
|
871
870
|
name: "default",
|
|
872
871
|
fn: me(({ openFileDialog: f }) => [
|
|
873
|
-
|
|
874
|
-
|
|
872
|
+
D("div", Tt, [
|
|
873
|
+
D("div", {
|
|
875
874
|
class: Z([
|
|
876
875
|
"fm-corner-radius-md p-16 flex items-center gap-16",
|
|
877
876
|
{
|
|
@@ -891,7 +890,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
891
890
|
outline: "",
|
|
892
891
|
color: p.value ? "system-error-300" : void 0
|
|
893
892
|
}, null, 8, ["name", "color"])),
|
|
894
|
-
|
|
893
|
+
D("div", {
|
|
895
894
|
class: Z([
|
|
896
895
|
"fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
|
|
897
896
|
{
|
|
@@ -900,7 +899,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
900
899
|
}
|
|
901
900
|
])
|
|
902
901
|
}, [
|
|
903
|
-
|
|
902
|
+
D("div", St, q(e.value.name), 1)
|
|
904
903
|
], 2),
|
|
905
904
|
u.value ? J("", !0) : (O(), F("div", xt, [
|
|
906
905
|
z(w, {
|
|
@@ -921,7 +920,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
921
920
|
size: "sm",
|
|
922
921
|
color: "system-error-300"
|
|
923
922
|
}),
|
|
924
|
-
|
|
923
|
+
D("div", wt, q(v), 1)
|
|
925
924
|
]))), 128))
|
|
926
925
|
])) : J("", !0)
|
|
927
926
|
])
|
|
@@ -930,7 +929,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
930
929
|
} : void 0
|
|
931
930
|
]), 1032, ["class", "label", "button-label"]),
|
|
932
931
|
l.value ? (O(), F("div", kt, [
|
|
933
|
-
|
|
932
|
+
D("div", Et, q(B(c)("inventory.ingredient.import.summary")), 1),
|
|
934
933
|
(O(!0), F(Y, null, ae(r.value, (f, v) => (O(), re($e, {
|
|
935
934
|
key: v,
|
|
936
935
|
name: f.template.name,
|
|
@@ -957,7 +956,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
957
956
|
});
|
|
958
957
|
function It(n) {
|
|
959
958
|
var s, m;
|
|
960
|
-
const e =
|
|
959
|
+
const e = be();
|
|
961
960
|
if (!e.isEnabled) return !0;
|
|
962
961
|
if (!n.internal) {
|
|
963
962
|
const a = e.getNetSuiteVendor(n._id), r = a == null ? void 0 : a.subsidiaryId, i = (s = e.currentVendorSubsidiary(n._id)) == null ? void 0 : s.id;
|
|
@@ -975,27 +974,27 @@ const Ct = {
|
|
|
975
974
|
}, Ot = pe(
|
|
976
975
|
"templateItemBulkEditor",
|
|
977
976
|
function() {
|
|
978
|
-
const { t: e } = tt(), o = de(), d =
|
|
977
|
+
const { t: e } = tt(), o = de(), d = Te(), u = fe(), s = I(!1), m = I(1), a = I(null), r = I([]), i = I({}), p = I(/* @__PURE__ */ new Set()), l = I([]), c = I(!1), h = I(/* @__PURE__ */ new Map()), T = I(/* @__PURE__ */ new Set()), t = H(() => {
|
|
979
978
|
if (!a.value) return [];
|
|
980
|
-
const
|
|
979
|
+
const b = a.value._id;
|
|
981
980
|
return d.templates.filter(
|
|
982
|
-
(C) => C.purchaseOrder.items.some(($) => $.sku._id ===
|
|
981
|
+
(C) => C.purchaseOrder.items.some(($) => $.sku._id === b)
|
|
983
982
|
);
|
|
984
983
|
}), S = H(
|
|
985
|
-
() => t.value.filter((
|
|
984
|
+
() => t.value.filter((b) => r.value.includes(b._id))
|
|
986
985
|
), E = H(
|
|
987
986
|
() => a.value !== null && t.value.length > 0 && r.value.length > 0
|
|
988
987
|
), w = H(() => {
|
|
989
988
|
if (p.value.size === 0) return !1;
|
|
990
|
-
const
|
|
991
|
-
return !(p.value.has("code") && (!
|
|
989
|
+
const b = i.value;
|
|
990
|
+
return !(p.value.has("code") && (!b.code || b.code.trim().length === 0) || p.value.has("name") && (!b.name || b.name.trim().length === 0) || p.value.has("defaultAmount") && b.quantity == null || p.value.has("step") && b.quantityStep == null);
|
|
992
991
|
}), f = H(() => {
|
|
993
992
|
if (!a.value) return [];
|
|
994
|
-
const
|
|
993
|
+
const b = a.value._id;
|
|
995
994
|
return S.value.map((C) => {
|
|
996
995
|
const $ = JSON.parse(JSON.stringify(C));
|
|
997
996
|
return $.purchaseOrder.items = $.purchaseOrder.items.map((k) => {
|
|
998
|
-
if (k.sku._id !==
|
|
997
|
+
if (k.sku._id !== b) return k;
|
|
999
998
|
const P = {};
|
|
1000
999
|
for (const j of p.value)
|
|
1001
1000
|
for (const ee of Ct[j])
|
|
@@ -1011,13 +1010,13 @@ const Ct = {
|
|
|
1011
1010
|
s.value = !1;
|
|
1012
1011
|
}
|
|
1013
1012
|
function y() {
|
|
1014
|
-
m.value = 1, a.value = null, r.value = [], i.value = {}, p.value = /* @__PURE__ */ new Set(), l.value = [], c.value = !1, h.value = /* @__PURE__ */ new Map(),
|
|
1013
|
+
m.value = 1, a.value = null, r.value = [], i.value = {}, p.value = /* @__PURE__ */ new Set(), l.value = [], c.value = !1, h.value = /* @__PURE__ */ new Map(), T.value = /* @__PURE__ */ new Set();
|
|
1015
1014
|
}
|
|
1016
1015
|
function x() {
|
|
1017
1016
|
if (!a.value) return;
|
|
1018
|
-
const
|
|
1017
|
+
const b = a.value._id, C = S.value[0] ?? t.value[0];
|
|
1019
1018
|
if (C) {
|
|
1020
|
-
const $ = C.purchaseOrder.items.find((k) => k.sku._id ===
|
|
1019
|
+
const $ = C.purchaseOrder.items.find((k) => k.sku._id === b);
|
|
1021
1020
|
$ && (i.value = { ...$ });
|
|
1022
1021
|
}
|
|
1023
1022
|
m.value = 2;
|
|
@@ -1028,21 +1027,21 @@ const Ct = {
|
|
|
1028
1027
|
function A() {
|
|
1029
1028
|
m.value === 3 ? (l.value = [], m.value = 2) : m.value === 2 && (m.value = 1);
|
|
1030
1029
|
}
|
|
1031
|
-
async function
|
|
1030
|
+
async function N() {
|
|
1032
1031
|
if (!c.value) {
|
|
1033
1032
|
c.value = !0, h.value = /* @__PURE__ */ new Map();
|
|
1034
1033
|
try {
|
|
1035
|
-
const
|
|
1036
|
-
(k) => !
|
|
1034
|
+
const b = l.value.filter(
|
|
1035
|
+
(k) => !T.value.has(k._id)
|
|
1037
1036
|
), C = await Promise.allSettled(
|
|
1038
|
-
|
|
1037
|
+
b.map((k) => u.updateTemplate(k))
|
|
1039
1038
|
), $ = /* @__PURE__ */ new Map();
|
|
1040
1039
|
C.forEach((k, P) => {
|
|
1041
1040
|
if (k.status === "rejected") {
|
|
1042
|
-
const j =
|
|
1041
|
+
const j = b[P], ee = k.reason instanceof Error ? k.reason.message : String(k.reason ?? "Unknown error");
|
|
1043
1042
|
$.set(j._id, ee);
|
|
1044
1043
|
} else
|
|
1045
|
-
|
|
1044
|
+
T.value = /* @__PURE__ */ new Set([...T.value, b[P]._id]);
|
|
1046
1045
|
}), $.size > 0 ? (h.value = $, await d.fetchTemplates(), l.value = l.value.map((k) => {
|
|
1047
1046
|
if (!$.has(k._id)) return k;
|
|
1048
1047
|
const P = d.templates.find((j) => j._id === k._id);
|
|
@@ -1061,31 +1060,31 @@ const Ct = {
|
|
|
1061
1060
|
}, l.value.length),
|
|
1062
1061
|
type: "success"
|
|
1063
1062
|
}), s.value = !1, y(), await d.fetchTemplates());
|
|
1064
|
-
} catch (
|
|
1063
|
+
} catch (b) {
|
|
1065
1064
|
o.open({
|
|
1066
1065
|
title: e("inventory.transfer.template.bulkEditor.save.errorTitle"),
|
|
1067
1066
|
message: e("inventory.transfer.template.bulkEditor.save.errorMessage"),
|
|
1068
1067
|
type: "error"
|
|
1069
|
-
}), console.error("templateItemBulkEditor.confirmAndApply failed",
|
|
1068
|
+
}), console.error("templateItemBulkEditor.confirmAndApply failed", b);
|
|
1070
1069
|
} finally {
|
|
1071
1070
|
c.value = !1;
|
|
1072
1071
|
}
|
|
1073
1072
|
}
|
|
1074
1073
|
}
|
|
1075
|
-
function g(
|
|
1074
|
+
function g(b) {
|
|
1076
1075
|
const C = new Set(p.value);
|
|
1077
|
-
C.has(
|
|
1076
|
+
C.has(b) ? C.delete(b) : C.add(b), p.value = C;
|
|
1078
1077
|
}
|
|
1079
|
-
function M(
|
|
1078
|
+
function M(b) {
|
|
1080
1079
|
const C = new Set(p.value);
|
|
1081
|
-
for (const $ of
|
|
1080
|
+
for (const $ of b) C.add($);
|
|
1082
1081
|
p.value = C;
|
|
1083
1082
|
}
|
|
1084
|
-
function Q(
|
|
1085
|
-
r.value.indexOf(
|
|
1083
|
+
function Q(b) {
|
|
1084
|
+
r.value.indexOf(b) === -1 ? r.value = [...r.value, b] : r.value = r.value.filter(($) => $ !== b);
|
|
1086
1085
|
}
|
|
1087
1086
|
function V() {
|
|
1088
|
-
r.value = t.value.map((
|
|
1087
|
+
r.value = t.value.map((b) => b._id);
|
|
1089
1088
|
}
|
|
1090
1089
|
function le() {
|
|
1091
1090
|
r.value = [];
|
|
@@ -1101,7 +1100,7 @@ const Ct = {
|
|
|
1101
1100
|
reviewPayloads: l,
|
|
1102
1101
|
isSaving: c,
|
|
1103
1102
|
applyErrors: h,
|
|
1104
|
-
succeededIds:
|
|
1103
|
+
succeededIds: T,
|
|
1105
1104
|
// computed
|
|
1106
1105
|
candidateTemplates: t,
|
|
1107
1106
|
selectedTemplates: S,
|
|
@@ -1115,7 +1114,7 @@ const Ct = {
|
|
|
1115
1114
|
goToStep2: x,
|
|
1116
1115
|
goToStep3: R,
|
|
1117
1116
|
back: A,
|
|
1118
|
-
confirmAndApply:
|
|
1117
|
+
confirmAndApply: N,
|
|
1119
1118
|
toggleField: g,
|
|
1120
1119
|
autoSelectFields: M,
|
|
1121
1120
|
toggleTemplate: Q,
|
|
@@ -1124,7 +1123,7 @@ const Ct = {
|
|
|
1124
1123
|
};
|
|
1125
1124
|
}
|
|
1126
1125
|
), At = pe("transferTemplateActions", () => {
|
|
1127
|
-
const n = Me(), e = de(), o = ie(), d =
|
|
1126
|
+
const n = Me(), e = de(), o = ie(), d = Te(), u = et(), s = fe(), m = be(), a = ze(), { t: r } = he(), i = I({}), p = Ot();
|
|
1128
1127
|
function l() {
|
|
1129
1128
|
p.openDialog();
|
|
1130
1129
|
}
|
|
@@ -1147,7 +1146,7 @@ const Ct = {
|
|
|
1147
1146
|
}
|
|
1148
1147
|
};
|
|
1149
1148
|
}
|
|
1150
|
-
function
|
|
1149
|
+
function T(y, x, R) {
|
|
1151
1150
|
n.open({
|
|
1152
1151
|
title: `Confirm deleting template ${y.name}?`,
|
|
1153
1152
|
message: "Deleted template can no longer be retrieved",
|
|
@@ -1170,7 +1169,7 @@ const Ct = {
|
|
|
1170
1169
|
x.value = !0;
|
|
1171
1170
|
const [A] = await Promise.allSettled([
|
|
1172
1171
|
s.deleteTemplate(y),
|
|
1173
|
-
new Promise((
|
|
1172
|
+
new Promise((N) => setTimeout(N, 1e3))
|
|
1174
1173
|
]);
|
|
1175
1174
|
if (A.status === "rejected") throw A.reason;
|
|
1176
1175
|
e.open({
|
|
@@ -1206,9 +1205,9 @@ const Ct = {
|
|
|
1206
1205
|
contentComponent: ye({
|
|
1207
1206
|
props: ["modelValue"],
|
|
1208
1207
|
emits: ["update:modelValue"],
|
|
1209
|
-
setup(
|
|
1208
|
+
setup(N) {
|
|
1210
1209
|
return () => oe(ce.FmTextField, {
|
|
1211
|
-
modelValue:
|
|
1210
|
+
modelValue: N.modelValue,
|
|
1212
1211
|
"onUpdate:modelValue": (g) => A = g,
|
|
1213
1212
|
label: "New Template Name",
|
|
1214
1213
|
size: "md",
|
|
@@ -1223,21 +1222,21 @@ const Ct = {
|
|
|
1223
1222
|
});
|
|
1224
1223
|
try {
|
|
1225
1224
|
x.value = !0;
|
|
1226
|
-
const [
|
|
1225
|
+
const [N] = await Promise.allSettled([
|
|
1227
1226
|
u.duplicatePurchaseOrderTemplate(y._id, A),
|
|
1228
1227
|
new Promise((g) => setTimeout(g, 1e3))
|
|
1229
1228
|
]);
|
|
1230
|
-
if (
|
|
1229
|
+
if (N.status === "rejected") throw N.reason;
|
|
1231
1230
|
e.open({
|
|
1232
1231
|
title: `Duplicated ${y.name}`,
|
|
1233
1232
|
type: "success"
|
|
1234
1233
|
});
|
|
1235
|
-
} catch (
|
|
1234
|
+
} catch (N) {
|
|
1236
1235
|
e.open({
|
|
1237
1236
|
title: `Unable to duplicate ${y.name}`,
|
|
1238
|
-
message: `See error from server: ${
|
|
1237
|
+
message: `See error from server: ${N}`,
|
|
1239
1238
|
type: "error"
|
|
1240
|
-
}), console.error("error on duplicating purchase order template",
|
|
1239
|
+
}), console.error("error on duplicating purchase order template", N);
|
|
1241
1240
|
} finally {
|
|
1242
1241
|
x.value = !1, R();
|
|
1243
1242
|
}
|
|
@@ -1278,24 +1277,24 @@ const Ct = {
|
|
|
1278
1277
|
}).onPrimary(() => {
|
|
1279
1278
|
a.push({ name: we.TRANSFER_TEMPLATE }), R(void 0);
|
|
1280
1279
|
}).onSecondary(() => R(void 0)).onClose(() => R(void 0)), y;
|
|
1281
|
-
const
|
|
1280
|
+
const N = A.map((g) => {
|
|
1282
1281
|
var P;
|
|
1283
|
-
const M = !g.purchaseOrder.items.length || g.purchaseOrder.items.some(
|
|
1282
|
+
const M = !g.purchaseOrder.items.length || g.purchaseOrder.items.some(Ne), Q = !It(g.purchaseOrder.supplier), V = g.purchaseOrder.supplier.internal ? m.getNetSuiteLocation(
|
|
1284
1283
|
`${g.purchaseOrder.supplier.internal}_${g.purchaseOrder.supplier._id}`
|
|
1285
1284
|
) : m.getNetSuiteVendor(g.purchaseOrder.supplier._id), le = Q ? `The subsidiary of the request
|
|
1286
|
-
location is ${(P = m.getLocationSubsidiary(V == null ? void 0 : V.netSuiteId)) == null ? void 0 : P.fullName}.` : void 0,
|
|
1285
|
+
location is ${(P = m.getLocationSubsidiary(V == null ? void 0 : V.netSuiteId)) == null ? void 0 : P.fullName}.` : void 0, b = M || Q, C = M ? "This template is invalid. Update this template." : Q ? le : void 0, $ = `${g.purchaseOrder.supplier.internal ? "Transfer" : "Purchase"} from ${g.purchaseOrder.supplier.name}`;
|
|
1287
1286
|
return {
|
|
1288
1287
|
label: g.name,
|
|
1289
1288
|
value: g._id,
|
|
1290
|
-
disabled:
|
|
1289
|
+
disabled: b,
|
|
1291
1290
|
sublabel: C ?? $
|
|
1292
1291
|
};
|
|
1293
1292
|
});
|
|
1294
|
-
return
|
|
1293
|
+
return N.sort((g, M) => +!!g.disabled - +!!M.disabled), n.open({
|
|
1295
1294
|
title: "Select one template",
|
|
1296
|
-
contentComponent:
|
|
1295
|
+
contentComponent: je,
|
|
1297
1296
|
contentComponentProps: {
|
|
1298
|
-
items:
|
|
1297
|
+
items: N,
|
|
1299
1298
|
singleSelect: !0
|
|
1300
1299
|
},
|
|
1301
1300
|
primaryActions: {
|
|
@@ -1371,7 +1370,7 @@ const Ct = {
|
|
|
1371
1370
|
)
|
|
1372
1371
|
], R = 100;
|
|
1373
1372
|
let A = 0;
|
|
1374
|
-
const
|
|
1373
|
+
const N = () => {
|
|
1375
1374
|
A += R, e.open({
|
|
1376
1375
|
title: r("inventory.ingredient.import.progress", [
|
|
1377
1376
|
Math.min(A, x.length),
|
|
@@ -1380,7 +1379,7 @@ const Ct = {
|
|
|
1380
1379
|
});
|
|
1381
1380
|
};
|
|
1382
1381
|
for (const g of x.chunk(100))
|
|
1383
|
-
|
|
1382
|
+
N(), await s.importTemplates(g);
|
|
1384
1383
|
e.open({
|
|
1385
1384
|
title: r("inventory.ingredient.import.success"),
|
|
1386
1385
|
type: "success"
|
|
@@ -1407,7 +1406,7 @@ const Ct = {
|
|
|
1407
1406
|
createTemplate: c,
|
|
1408
1407
|
viewTemplate: E,
|
|
1409
1408
|
updateTemplate: h,
|
|
1410
|
-
deleteTemplate:
|
|
1409
|
+
deleteTemplate: T,
|
|
1411
1410
|
duplicateTemplate: t,
|
|
1412
1411
|
getTemplateId: w,
|
|
1413
1412
|
importTemplates: f,
|
|
@@ -1417,15 +1416,15 @@ const Ct = {
|
|
|
1417
1416
|
templateDetailsProps: S
|
|
1418
1417
|
};
|
|
1419
1418
|
});
|
|
1420
|
-
function
|
|
1419
|
+
function Zt(n, e, o) {
|
|
1421
1420
|
const d = (o == null ? void 0 : o.abbrev) ?? (e == null ? void 0 : e.abbrev) ?? "";
|
|
1422
1421
|
return `${G(n, !1)} ${d}`.trimEnd();
|
|
1423
1422
|
}
|
|
1424
1423
|
export {
|
|
1425
1424
|
At as a,
|
|
1426
|
-
|
|
1427
|
-
|
|
1425
|
+
Te as b,
|
|
1426
|
+
Zt as f,
|
|
1428
1427
|
Re as g,
|
|
1429
|
-
|
|
1428
|
+
Ne as t,
|
|
1430
1429
|
Ot as u
|
|
1431
1430
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ModuleKey = 'item' | 'variant' | 'group' | 'catalog' | 'menu' | 'sku' | 'recipe'
|
|
1
|
+
export type ModuleKey = 'item' | 'variant' | 'group' | 'catalog' | 'menu' | 'sku' | 'recipe';
|
|
2
2
|
export declare function moduleFromPath(path: string): ModuleKey;
|
|
3
3
|
export type UsageChainSegment = {
|
|
4
4
|
itemName: string;
|
package/dist/helper/number.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export declare function adjustmentAmountMultiply(a: AdjustmentAmount, multiplier
|
|
|
12
12
|
export declare function adjustmentAmountMultiplyDecimal(left: AdjustmentAmount, right: AdjustmentAmount): AdjustmentAmount;
|
|
13
13
|
export declare function adjustmentAmountDivide(a: AdjustmentAmount, divisor: AdjustmentAmount): number;
|
|
14
14
|
export declare function adjustmentAmountDivideDecimal(a: AdjustmentAmount, divisor: AdjustmentAmount): AdjustmentAmount;
|
|
15
|
+
/**
|
|
16
|
+
* Validates an imported cell before its caller uses FfCalculator.fromNumber.
|
|
17
|
+
* Returns a row error for missing, non-numeric or unsupported values.
|
|
18
|
+
*/
|
|
19
|
+
export declare function validateImportNumber(raw: unknown): string | null;
|
|
15
20
|
export declare function upgradePrecision(a: FdoDecimal, minimumPrecision: number): {
|
|
16
21
|
amount: number;
|
|
17
22
|
precision: number;
|
|
@@ -26,7 +31,6 @@ export declare function numberFormatTrimPrecision(amount: number, precision?: nu
|
|
|
26
31
|
export declare function adjustmentCurrencyFormat(a: FdoDinero, asSuffix?: boolean, precision?: number): string;
|
|
27
32
|
export declare function adjustmentAmountAbs(a: AdjustmentAmount): AdjustmentAmount;
|
|
28
33
|
export declare function getPrecision(a: number): number;
|
|
29
|
-
export declare function toAdjustmentAmount(a: number): AdjustmentAmount;
|
|
30
34
|
export declare function toAdjustmentWithPrecision(amt: string | number, precision?: number, allowNegative?: boolean): {
|
|
31
35
|
amount: number;
|
|
32
36
|
precision: number;
|