@feedmepos/mf-inventory-portal 1.5.12 → 1.6.0-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.
Files changed (117) hide show
  1. package/dist/{App-DBEmTaMX.js → App-HlUs-LF4.js} +4 -4
  2. package/dist/{ApprovalView-BvzIwH1r.js → ApprovalView-qmRODLFE.js} +7 -7
  3. package/dist/{BindingsDialog-DnqHoU0Y.js → BindingsDialog-DhSose8-.js} +2 -2
  4. package/dist/{BindingsPicker-Bjpj0zdJ.js → BindingsPicker-JnvHyWiF.js} +2 -2
  5. package/dist/{BindingsTable-S5Nqq4Qv.js → BindingsTable-B8BSFIJ8.js} +3 -3
  6. package/dist/ClosingDraftView-XGq-b6Sj.js +4318 -0
  7. package/dist/{ClosingHistoryView-B2ccrB2K.js → ClosingHistoryView-DAo8MIT2.js} +5 -5
  8. package/dist/ClosingTemplateView-DSFABll0.js +2221 -0
  9. package/dist/{DefaultView-DQhLe6LE.js → DefaultView-B-HflwRG.js} +2 -2
  10. package/dist/{DeliveryOrderPrintPreview-Cup9mzpO.js → DeliveryOrderPrintPreview-Drn8FFa7.js} +2 -2
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DuZFuSbw.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CK8RpMEu.js} +2 -2
  12. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DoPyc0aE.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-P64wdK5z.js} +2 -2
  13. package/dist/{FmMultiselectDialog-Cwazmlw3.js → FmMultiselectDialog-CH126sIF.js} +2 -2
  14. package/dist/{FmMultiselectDialog-DnuUrW7h.js → FmMultiselectDialog-CRG145W_.js} +1 -1
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BMzzUsa4.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Dg0alt69.js} +5 -5
  16. package/dist/{ImportView-CXtrdABV.js → ImportView-Ca1QPSKV.js} +6 -6
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Cfp95IvX.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CoFavJB9.js} +1 -1
  18. package/dist/{IngredientGroupView-Bm-2yK8J.js → IngredientGroupView-BfBtqgnZ.js} +5 -5
  19. package/dist/{IngredientsView-Bo8w9LSr.js → IngredientsView-WzM4VxgZ.js} +15 -15
  20. package/dist/{IntegrationExplorerView-DUqQ64CE.js → IntegrationExplorerView-OwTTR-uV.js} +352 -352
  21. package/dist/{IntegrationView-CtkbKPzC.js → IntegrationView-DYAGDE0m.js} +13 -13
  22. package/dist/{InventoryBindingForm-DWJRCTf8.js → InventoryBindingForm-Cs-8ACDl.js} +1 -1
  23. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DH-xUQ5m.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dm9Nna0r.js} +5 -5
  24. package/dist/{InventoryBindingSummary-DSwCvTnu.js → InventoryBindingSummary-BbhIvkwv.js} +1 -1
  25. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-KDWRZCxm.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Ci0Wx2Gl.js} +1 -1
  26. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Wuv2teWn.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BLOC3W1b.js} +1 -1
  27. package/dist/{PublishView-BSahQbqy.js → PublishView-CUNDP20R.js} +3 -3
  28. package/dist/{PurchaseOrderPrintPreview-C8umjCEU.js → PurchaseOrderPrintPreview-oUPrrGvK.js} +2 -2
  29. package/dist/{ReceiveRequestView-Bf5dAcun.js → ReceiveRequestView-CxcE8Azw.js} +26 -26
  30. package/dist/{RecipeView-wU9u23Zp.js → RecipeView-CdN4CJal.js} +1104 -1117
  31. package/dist/{SettingsView-C5Uc6h0A.js → SettingsView-B5QKC4i7.js} +4 -4
  32. package/dist/{StockView-QF68mXtU.js → StockView-By0MuX62.js} +19 -19
  33. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Cgw8EDXb.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-C7Elh3p_.js} +1 -1
  34. package/dist/{SupplierView-xBONJSsg.js → SupplierView-apsm42Mq.js} +12 -12
  35. package/dist/{SurchargeView-BK8aNKZl.js → SurchargeView-B-G77ghZ.js} +6 -6
  36. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-tsuedeNl.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DlhMQg5r.js} +2 -2
  37. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BXVa7pt5.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CmYIHCe2.js} +1 -1
  38. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CVRD5iri.js → TransferDetails.vue_vue_type_script_setup_true_lang-24nRAago.js} +20 -20
  39. package/dist/TransferTemplateView-BBIIu12F.js +2327 -0
  40. package/dist/{UnitCostHistoryView-BS0nrbkD.js → UnitCostHistoryView-CG-6grmh.js} +4 -4
  41. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-CeD0qWRC.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DtmY7fLw.js} +5 -5
  42. package/dist/{UnitView-DsKX7DM0.js → UnitView-CIrL8HXK.js} +7 -7
  43. package/dist/{WarehouseView-DRZaGu80.js → WarehouseView-Bvd72APe.js} +5 -5
  44. package/dist/{WastageTemplateView-CtMSWKFj.js → WastageTemplateView-DHej2xrY.js} +14 -14
  45. package/dist/api/closing-draft.d.ts +6 -0
  46. package/dist/{app-DYMYQwvV.js → app-BCF9ZpO-.js} +16381 -14374
  47. package/dist/app.d.ts +268 -0
  48. package/dist/app.js +1 -1
  49. package/dist/{closing-template-Cxsa4j_W.js → closing-template-CIuRAYD3.js} +1 -1
  50. package/dist/{date2-BdXL0GG5.js → date2-DJVh7XJh.js} +1 -1
  51. package/dist/{dayjs.min-LoBFKjU2.js → dayjs.min-HcfNNaXG.js} +1 -1
  52. package/dist/{decimal-BFFta-yv.js → decimal-BZ-WtkK6.js} +2 -2
  53. package/dist/{defineDeepModel-CCZ3fqXQ.js → defineDeepModel-D06G28ot.js} +1 -1
  54. package/dist/{duplicate-template-C2Qho2Ig.js → duplicate-template-y-uKyjAx.js} +1 -1
  55. package/dist/{feature-Dt5ZFkZR.js → feature-DW0OW8Zl.js} +2 -2
  56. package/dist/{format-time-from-id-LqoWbcB4.js → format-time-from-id-CrGnGtJV.js} +1 -1
  57. package/dist/format-unit-display-DVEnGOV-.js +1432 -0
  58. package/dist/{import-export.helper-DogBd6aS.js → import-export.helper-CPoS7Xw2.js} +6 -6
  59. package/dist/{index-D0xsiYLO.js → index-BAI_qEVG.js} +1 -1
  60. package/dist/{index-2DNXazDV.js → index-BF_ER6cD.js} +3 -3
  61. package/dist/{index-IMHyRNdu.js → index-BSLoykmu.js} +1 -1
  62. package/dist/{inventory-core-dart.default-BkcD7c_a.js → inventory-core-dart.default-B8GRBHwH.js} +1 -1
  63. package/dist/{lz-string-CgecKowu.js → lz-string-DllDsJgA.js} +1 -1
  64. package/dist/{netsuite-9qEVrdMv.js → netsuite-BdXvv_AI.js} +2 -2
  65. package/dist/{number-DSMFbPf0.js → number-fWsZU3Us.js} +3 -3
  66. package/dist/{predefined-templates-OZoiOUoA.js → predefined-templates-C-9FNSkn.js} +1 -1
  67. package/dist/{purchase-order-template-CUee1L_x.js → purchase-order-template-DDMRkK1M.js} +1 -1
  68. package/dist/{recalculationUtils-CPcCUHIm.js → recalculationUtils-17E1-6g0.js} +1 -1
  69. package/dist/{rules-CMNaUkUU.js → rules-clVHbjpg.js} +2 -2
  70. package/dist/{stock-BOaUT0Y3.js → stock-ZvR0DmAv.js} +1 -1
  71. package/dist/{supplier-BAbQZL7x.js → supplier-BnYLExem.js} +2 -2
  72. package/dist/{surcharge-C5tQ0vs0.js → surcharge-CYjKFXbG.js} +1 -1
  73. package/dist/tsconfig.app.tsbuildinfo +1 -1
  74. package/dist/{uom-rules-CSmRb5Ds.js → uom-rules-C_eQhUkx.js} +1 -1
  75. package/dist/{use-ingredient-select-dialog-B9XYlxjA.js → use-ingredient-select-dialog-ClGmxwFU.js} +16 -16
  76. package/dist/{use-inventory-binding-dialog-BzIb4yxm.js → use-inventory-binding-dialog-CpKdIwMo.js} +2 -2
  77. package/dist/use-template-enabled-locations-deP7LXci.js +132 -0
  78. package/dist/{use-transfer-locations-Di5ozOgU.js → use-transfer-locations-D3nYdH_3.js} +2 -2
  79. package/dist/{useHrmPermission-N8GPw9P_.js → useHrmPermission-CMTlJ6AP.js} +1 -1
  80. package/dist/{useNavigationMenu-BLnGMLsm.js → useNavigationMenu-BxATo1IC.js} +2 -2
  81. package/dist/{useSseClient-BQtJfryY.js → useSseClient-CGJVJAXa.js} +3 -3
  82. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +800 -0
  83. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +40 -0
  84. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupAction.vue.d.ts +21 -0
  85. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupCard.vue.d.ts +20 -0
  86. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +823 -0
  87. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupGrid.vue.d.ts +20 -0
  88. package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +10 -0
  89. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1400 -133
  90. package/dist/views/closing-draft/helpers/closing-draft-summary.helper.d.ts +11 -0
  91. package/dist/views/closing-draft/helpers/closing-group-detail.helper.d.ts +68 -0
  92. package/dist/views/closing-draft/helpers/closing-group-status.helper.d.ts +6 -0
  93. package/dist/views/closing-draft/helpers/closing-groups.helper.d.ts +28 -0
  94. package/dist/views/closing-draft/helpers/merge-closing-draft-items.helper.d.ts +9 -0
  95. package/dist/views/closing-template/components/closing-template-form/components/ClosingTemplateGroupsEditor.vue.d.ts +31 -0
  96. package/dist/views/closing-template/components/closing-template-form/components/ClosingTemplateItem.vue.d.ts +164 -7
  97. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +24 -88
  98. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +108 -0
  99. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +108 -0
  100. package/dist/views/ingredients/composables/use-ingredient-select-dialog.d.ts +3 -3
  101. package/dist/views/recipe/composables/use-recipe-bulk-editor.d.ts +3 -3
  102. package/dist/views/transfer-template/components/template-item-bulk-editor/TemplateItemBulkEditorDialog.vue.d.ts +2 -0
  103. package/dist/views/transfer-template/components/template-item-bulk-editor/TemplateItemBulkEditorStep1.vue.d.ts +2 -0
  104. package/dist/views/transfer-template/components/template-item-bulk-editor/TemplateItemBulkEditorStep2.vue.d.ts +8 -0
  105. package/dist/views/transfer-template/components/template-item-bulk-editor/TemplateItemBulkEditorStep3.vue.d.ts +2 -0
  106. package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +3225 -0
  107. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +4 -1
  108. package/dist/views/transfer-template/helpers/template-item-bulk-editor-export.d.ts +9 -0
  109. package/dist/{vue-i18n-DR8I1LQH.js → vue-i18n-DCgzd-Rs.js} +498 -498
  110. package/dist/{xlsx-D5-Cqx-l.js → xlsx-Cy0iFCJQ.js} +398 -398
  111. package/dist/{xlsx.util-DEdsfN6W.js → xlsx.util-D8wvUM2Y.js} +3 -3
  112. package/package.json +5 -5
  113. package/dist/ClosingDraftView-Y074sSoz.js +0 -3343
  114. package/dist/ClosingTemplateView-BcvKBWVJ.js +0 -2077
  115. package/dist/TransferTemplateView-Cm4evaK3.js +0 -1564
  116. package/dist/format-unit-display-CWqmpVa_.js +0 -1268
  117. package/dist/use-template-enabled-locations-V5iE0ywc.js +0 -146
@@ -0,0 +1,11 @@
1
+ export interface ClosingSummaryRow {
2
+ label: string;
3
+ value: string;
4
+ }
5
+ /** Builds the "Closing summary" field list shown in the closing-draft detail
6
+ * sheet. Shared by the parent draft and its sub-closing groups so both surface
7
+ * the same details. */
8
+ export declare function buildClosingDraftSummary(draft: FdoClosingDraft, opts: {
9
+ idDisplay?: string | null;
10
+ locationName?: string | null;
11
+ }): ClosingSummaryRow[];
@@ -0,0 +1,68 @@
1
+ import { type VNode } from 'vue';
2
+ import { type UomContext } from '@/helper/uom-rules';
3
+ /** A single physical-count chip: an amount in a given UOM, flagged when the UOM
4
+ * is NetSuite-inactive (purple) or not on the SKU (orphan, red). */
5
+ export interface AmountChip {
6
+ abbrev: string;
7
+ amount: number;
8
+ variant: 'normal' | 'inactive' | 'orphan';
9
+ }
10
+ /** Lean row for the subgroup 3-column table (Name / UOM base / Amounts) —
11
+ * derived straight from the group's items, no balance/adjustment data. */
12
+ export interface GroupRowItem {
13
+ id: string;
14
+ code: string;
15
+ name: string;
16
+ baseUnit: string;
17
+ baseUnitAmount: number;
18
+ isTemplateItem: boolean;
19
+ measurements: AmountChip[];
20
+ physicalBalance: number;
21
+ breakdown: BreakdownLine[];
22
+ }
23
+ /** One line of the stock-take-balance breakdown popover — mirrors the parent
24
+ * closing-draft dialog's BreakdownLine. */
25
+ export interface BreakdownLine {
26
+ label: string;
27
+ amount: number;
28
+ abbrev: string;
29
+ subtotal: number;
30
+ inactive: boolean;
31
+ orphan: boolean;
32
+ counted: boolean;
33
+ }
34
+ /** Per-item breakdown: base amount plus each counted measurement × conversion.
35
+ * Subtotals are decimal-safe so the popover total matches physicalBalance.
36
+ * Same logic as the parent closing-draft dialog's breakdown. */
37
+ export declare function buildItemBreakdown(item: FdoClosingDraftItem, ctx: UomContext): BreakdownLine[];
38
+ /** Renders the breakdown popover panel — same layout as the parent
39
+ * closing-draft dialog's breakdown panel. */
40
+ export declare function renderBreakdownPanel(breakdown: BreakdownLine[], total: number, baseUnit: string): VNode;
41
+ /** Base-unit amount + one chip per counted measurement for a single item. */
42
+ export declare function buildItemChips(item: FdoClosingDraftItem, ctx: UomContext): {
43
+ baseUnitAmount: number;
44
+ measurements: AmountChip[];
45
+ };
46
+ /** Template items come from `items`; non-template ones from `negativeStockItems`. */
47
+ export declare function buildGroupRowItems(group: FdoSubClosingDraft, ctx: UomContext): GroupRowItem[];
48
+ /** Renders the Amounts cell: a base-unit chip followed by one chip per counted
49
+ * measurement. Shared by the parent closing-draft table and the subgroup sheet. */
50
+ export declare function renderAmountChips(baseUnitAmount: number, baseUnit: string, measurements: AmountChip[]): VNode;
51
+ /** One contribution source for an item — the parent draft ("Main") or a sub. */
52
+ export interface ItemSource {
53
+ label: string;
54
+ isSub: boolean;
55
+ items: FdoClosingDraftItem[];
56
+ }
57
+ /** An item's chips attributed to a single contributing source. */
58
+ export interface ItemSourceBucket {
59
+ label: string;
60
+ isSub: boolean;
61
+ baseUnitAmount: number;
62
+ measurements: AmountChip[];
63
+ }
64
+ /** Splits an item's physical counts by the source that recorded them, dropping
65
+ * sources that contributed nothing. Used to show "which sub did this come from". */
66
+ export declare function buildItemSourceBuckets(skuId: string, sources: ItemSource[], ctx: UomContext): ItemSourceBucket[];
67
+ /** Renders source buckets stacked, each under an uppercase source-name header. */
68
+ export declare function renderSourceBuckets(buckets: ItemSourceBucket[], baseUnit: string): VNode;
@@ -0,0 +1,6 @@
1
+ import type { ClosingGroupCard } from './closing-groups.helper';
2
+ /** Maps a group status to the shared `fm-status-badge` look + label. */
3
+ export declare function closingGroupStatusToBadge(status: ClosingGroupCard['status']): {
4
+ label: string;
5
+ className: string;
6
+ };
@@ -0,0 +1,28 @@
1
+ export type ClosingGroupStatus = 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'REJECTED';
2
+ export interface ClosingGroupCard {
3
+ id: string;
4
+ name: string;
5
+ code: string;
6
+ color?: string;
7
+ status: ClosingGroupStatus;
8
+ itemCount: number;
9
+ totalAmount: number;
10
+ countedCount: number;
11
+ countedBy?: string;
12
+ verifiedBy?: string;
13
+ updatedBy?: string;
14
+ updatedAt?: string;
15
+ }
16
+ export interface ClosingGroupSummary {
17
+ groupCount: number;
18
+ totalItems: number;
19
+ totalAmount: number;
20
+ completed: number;
21
+ inProgress: number;
22
+ pending: number;
23
+ rejected: number;
24
+ }
25
+ export declare function getStockTakeValue(item: FdoClosingDraftItem): number;
26
+ export declare function getGroupName(group: FdoSubClosingDraft): string;
27
+ export declare function toClosingGroupCard(group: FdoSubClosingDraft): ClosingGroupCard;
28
+ export declare function summarizeClosingGroups(groups: ClosingGroupCard[]): ClosingGroupSummary;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Merge closing-draft items from multiple sources (the parent closing draft and
3
+ * its closing groups) into one item per SKU, summing the physical counts.
4
+ *
5
+ * Base amounts are summed; measurement amounts are summed per measurement id
6
+ * (not concatenated) because `getCalculatedTotal` reads only the first amount
7
+ * for each measurement id.
8
+ */
9
+ export declare function mergeClosingDraftItems(sources: FdoClosingDraftItem[][]): FdoClosingDraftItem[];
@@ -0,0 +1,31 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ items: FdoClosingTemplateItem[];
3
+ groups: FdoClosingTemplateGroup[] | null | undefined;
4
+ updateItem: (item: FdoClosingTemplateItem) => void;
5
+ deleteItem: (item: FdoClosingTemplateItem) => void;
6
+ updateGroups: (groups: FdoClosingTemplateGroup[]) => void;
7
+ disabled?: boolean | undefined;
8
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ reorderDefault: (orderedSkuIds: string[]) => void;
10
+ addItems: () => void;
11
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
+ items: FdoClosingTemplateItem[];
13
+ groups: FdoClosingTemplateGroup[] | null | undefined;
14
+ updateItem: (item: FdoClosingTemplateItem) => void;
15
+ deleteItem: (item: FdoClosingTemplateItem) => void;
16
+ updateGroups: (groups: FdoClosingTemplateGroup[]) => void;
17
+ disabled?: boolean | undefined;
18
+ }>>> & Readonly<{
19
+ onReorderDefault?: ((orderedSkuIds: string[]) => any) | undefined;
20
+ onAddItems?: (() => any) | undefined;
21
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
22
+ export default _default;
23
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
24
+ type __VLS_TypePropsToRuntimeProps<T> = {
25
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
26
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
27
+ } : {
28
+ type: import('vue').PropType<T[K]>;
29
+ required: true;
30
+ };
31
+ };
@@ -1,11 +1,168 @@
1
- import { type Cell, type Row } from '@tanstack/vue-table';
2
1
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
- cellByColId: Record<string, Cell<any, any>>;
4
- row: Row<unknown>;
5
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
- cellByColId: Record<string, Cell<any, any>>;
7
- row: Row<unknown>;
8
- }>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ item: FdoClosingTemplateItem;
3
+ index: number;
4
+ disabled?: boolean | undefined;
5
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ update: (item: {
7
+ disabledMeasurements?: string[] | null | undefined;
8
+ position?: number | null | undefined;
9
+ sku: {
10
+ trackingMeasurement?: string | null | undefined;
11
+ isInactive?: boolean | null | undefined;
12
+ convert?: {
13
+ measurement?: string | null | undefined;
14
+ inventoryBindings?: {
15
+ measurement?: {
16
+ name: string;
17
+ id: string;
18
+ abbrev: string;
19
+ conversion: {
20
+ amount: number;
21
+ precision: number;
22
+ };
23
+ } | null | undefined;
24
+ rules?: Record<string, any> | null | undefined;
25
+ alternatives?: {
26
+ default?: boolean | null | undefined;
27
+ trackingMeasurement?: string | null | undefined;
28
+ priority?: number | null | undefined;
29
+ _id: string;
30
+ }[] | null | undefined;
31
+ type: "RECIPE" | "SKU" | "SKU_GROUP";
32
+ amount: {
33
+ amount: number;
34
+ precision: number;
35
+ };
36
+ id: string;
37
+ }[] | null | undefined;
38
+ } | null | undefined;
39
+ valuation?: "FIFO" | "LIFO" | "FEFO" | "WAVG" | null | undefined;
40
+ defaultCost?: {
41
+ measurement?: {
42
+ name: string;
43
+ id: string;
44
+ abbrev: string;
45
+ conversion: {
46
+ amount: number;
47
+ precision: number;
48
+ };
49
+ } | null | undefined;
50
+ costPerUnit: {
51
+ currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
52
+ amount: number;
53
+ precision: number;
54
+ };
55
+ } | null | undefined;
56
+ operationalGroup?: string | null | undefined;
57
+ thresholds?: {
58
+ low: number;
59
+ mid: number;
60
+ } | null | undefined;
61
+ customAttributes?: Record<string, any> | null | undefined;
62
+ unit: {
63
+ _id: string;
64
+ name: string;
65
+ abbrev: string;
66
+ precision: number;
67
+ measurements: {
68
+ name: string;
69
+ id: string;
70
+ abbrev: string;
71
+ conversion: {
72
+ amount: number;
73
+ precision: number;
74
+ };
75
+ }[];
76
+ };
77
+ code: string;
78
+ _id: string;
79
+ name: string;
80
+ };
81
+ }) => void;
82
+ delete: () => void;
83
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
84
+ item: FdoClosingTemplateItem;
85
+ index: number;
86
+ disabled?: boolean | undefined;
87
+ }>>> & Readonly<{
88
+ onDelete?: (() => any) | undefined;
89
+ onUpdate?: ((item: {
90
+ disabledMeasurements?: string[] | null | undefined;
91
+ position?: number | null | undefined;
92
+ sku: {
93
+ trackingMeasurement?: string | null | undefined;
94
+ isInactive?: boolean | null | undefined;
95
+ convert?: {
96
+ measurement?: string | null | undefined;
97
+ inventoryBindings?: {
98
+ measurement?: {
99
+ name: string;
100
+ id: string;
101
+ abbrev: string;
102
+ conversion: {
103
+ amount: number;
104
+ precision: number;
105
+ };
106
+ } | null | undefined;
107
+ rules?: Record<string, any> | null | undefined;
108
+ alternatives?: {
109
+ default?: boolean | null | undefined;
110
+ trackingMeasurement?: string | null | undefined;
111
+ priority?: number | null | undefined;
112
+ _id: string;
113
+ }[] | null | undefined;
114
+ type: "RECIPE" | "SKU" | "SKU_GROUP";
115
+ amount: {
116
+ amount: number;
117
+ precision: number;
118
+ };
119
+ id: string;
120
+ }[] | null | undefined;
121
+ } | null | undefined;
122
+ valuation?: "FIFO" | "LIFO" | "FEFO" | "WAVG" | null | undefined;
123
+ defaultCost?: {
124
+ measurement?: {
125
+ name: string;
126
+ id: string;
127
+ abbrev: string;
128
+ conversion: {
129
+ amount: number;
130
+ precision: number;
131
+ };
132
+ } | null | undefined;
133
+ costPerUnit: {
134
+ currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
135
+ amount: number;
136
+ precision: number;
137
+ };
138
+ } | null | undefined;
139
+ operationalGroup?: string | null | undefined;
140
+ thresholds?: {
141
+ low: number;
142
+ mid: number;
143
+ } | null | undefined;
144
+ customAttributes?: Record<string, any> | null | undefined;
145
+ unit: {
146
+ _id: string;
147
+ name: string;
148
+ abbrev: string;
149
+ precision: number;
150
+ measurements: {
151
+ name: string;
152
+ id: string;
153
+ abbrev: string;
154
+ conversion: {
155
+ amount: number;
156
+ precision: number;
157
+ };
158
+ }[];
159
+ };
160
+ code: string;
161
+ _id: string;
162
+ name: string;
163
+ };
164
+ }) => any) | undefined;
165
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
9
166
  export default _default;
10
167
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
168
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1,89 +1,25 @@
1
- import type { ColumnDef } from '@tanstack/vue-table';
2
- export declare enum ItemColumn {
3
- Name = "Name",
4
- Unit = "Unit",
5
- Delete = "Delete"
1
+ /**
2
+ * Helpers for the closing-template item UOM editor (the Default group pills).
3
+ *
4
+ * `disabledMeasurements` holds the unit ids that are OFF — the base unit id
5
+ * and/or measurement ids; everything not listed is enabled. These helpers are
6
+ * the single source of truth for reading/toggling that state, reused by both
7
+ * the editable Default rows and the read-only named-group chips.
8
+ */
9
+ export interface UnitChip {
10
+ id: string;
11
+ label: string;
12
+ isBase: boolean;
13
+ factor: number;
14
+ enabled: boolean;
6
15
  }
7
- export declare function useClosingTemplateItems(controller: {
8
- updateItem: (item: FdoClosingTemplateItem) => void;
9
- deleteItem: (item: FdoClosingTemplateItem) => void;
10
- get items(): FdoClosingTemplateItem[];
11
- get disabled(): boolean;
12
- }): {
13
- columnDefs: import("vue").ComputedRef<ColumnDef<{
14
- disabledMeasurements?: string[] | null | undefined;
15
- position?: number | null | undefined;
16
- sku: {
17
- trackingMeasurement?: string | null | undefined;
18
- isInactive?: boolean | null | undefined;
19
- convert?: {
20
- measurement?: string | null | undefined;
21
- inventoryBindings?: {
22
- measurement?: {
23
- name: string;
24
- id: string;
25
- abbrev: string;
26
- conversion: {
27
- amount: number;
28
- precision: number;
29
- };
30
- } | null | undefined;
31
- rules?: Record<string, any> | null | undefined;
32
- alternatives?: {
33
- default?: boolean | null | undefined;
34
- trackingMeasurement?: string | null | undefined;
35
- priority?: number | null | undefined;
36
- _id: string;
37
- }[] | null | undefined;
38
- type: "RECIPE" | "SKU" | "SKU_GROUP";
39
- amount: {
40
- amount: number;
41
- precision: number;
42
- };
43
- id: string;
44
- }[] | null | undefined;
45
- } | null | undefined;
46
- valuation?: "FIFO" | "LIFO" | "FEFO" | "WAVG" | null | undefined;
47
- defaultCost?: {
48
- measurement?: {
49
- name: string;
50
- id: string;
51
- abbrev: string;
52
- conversion: {
53
- amount: number;
54
- precision: number;
55
- };
56
- } | null | undefined;
57
- costPerUnit: {
58
- currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
59
- amount: number;
60
- precision: number;
61
- };
62
- } | null | undefined;
63
- operationalGroup?: string | null | undefined;
64
- thresholds?: {
65
- low: number;
66
- mid: number;
67
- } | null | undefined;
68
- customAttributes?: Record<string, any> | null | undefined;
69
- unit: {
70
- _id: string;
71
- name: string;
72
- abbrev: string;
73
- precision: number;
74
- measurements: {
75
- name: string;
76
- id: string;
77
- abbrev: string;
78
- conversion: {
79
- amount: number;
80
- precision: number;
81
- };
82
- }[];
83
- };
84
- code: string;
85
- _id: string;
86
- name: string;
87
- };
88
- }>[]>;
89
- };
16
+ /** Base unit + measurements with their enabled state. */
17
+ export declare function templateItemUnits(item: FdoClosingTemplateItem): UnitChip[];
18
+ export declare function templateItemEnabledCount(item: FdoClosingTemplateItem): number;
19
+ /** Enabled UOM labels (base + measurements), read-only — e.g. ["PC", "BOX ×50"]. */
20
+ export declare function templateItemActiveLabels(item: FdoClosingTemplateItem): string[];
21
+ /**
22
+ * Toggle a unit on/off. Returns the updated item, or `null` when the change is
23
+ * not allowed (never disable the last enabled unit).
24
+ */
25
+ export declare function toggleTemplateItemUnit(item: FdoClosingTemplateItem, chip: UnitChip): FdoClosingTemplateItem | null;
@@ -121,6 +121,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
121
121
  name: string;
122
122
  id: string;
123
123
  } | null | undefined;
124
+ groups?: {
125
+ name: string;
126
+ id: string;
127
+ items: {
128
+ disabledMeasurements?: string[] | null | undefined;
129
+ position?: number | null | undefined;
130
+ skuId: string;
131
+ }[];
132
+ }[] | null | undefined;
124
133
  _id: string;
125
134
  name: string;
126
135
  items: {
@@ -304,6 +313,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
304
313
  name: string;
305
314
  id: string;
306
315
  } | null | undefined;
316
+ groups?: {
317
+ name: string;
318
+ id: string;
319
+ items: {
320
+ disabledMeasurements?: string[] | null | undefined;
321
+ position?: number | null | undefined;
322
+ skuId: string;
323
+ }[];
324
+ }[] | null | undefined;
307
325
  _id: string;
308
326
  name: string;
309
327
  items: {
@@ -487,6 +505,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
487
505
  name: string;
488
506
  id: string;
489
507
  } | null | undefined;
508
+ groups?: {
509
+ name: string;
510
+ id: string;
511
+ items: {
512
+ disabledMeasurements?: string[] | null | undefined;
513
+ position?: number | null | undefined;
514
+ skuId: string;
515
+ }[];
516
+ }[] | null | undefined;
490
517
  _id: string;
491
518
  name: string;
492
519
  items: {
@@ -669,6 +696,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
669
696
  name: string;
670
697
  id: string;
671
698
  } | null | undefined;
699
+ groups?: {
700
+ name: string;
701
+ id: string;
702
+ items: {
703
+ disabledMeasurements?: string[] | null | undefined;
704
+ position?: number | null | undefined;
705
+ skuId: string;
706
+ }[];
707
+ }[] | null | undefined;
672
708
  _id: string;
673
709
  name: string;
674
710
  items: {
@@ -862,6 +898,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
862
898
  name: string;
863
899
  id: string;
864
900
  } | null | undefined;
901
+ groups?: {
902
+ name: string;
903
+ id: string;
904
+ items: {
905
+ disabledMeasurements?: string[] | null | undefined;
906
+ position?: number | null | undefined;
907
+ skuId: string;
908
+ }[];
909
+ }[] | null | undefined;
865
910
  _id: string;
866
911
  name: string;
867
912
  items: {
@@ -1045,6 +1090,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
1045
1090
  name: string;
1046
1091
  id: string;
1047
1092
  } | null | undefined;
1093
+ groups?: {
1094
+ name: string;
1095
+ id: string;
1096
+ items: {
1097
+ disabledMeasurements?: string[] | null | undefined;
1098
+ position?: number | null | undefined;
1099
+ skuId: string;
1100
+ }[];
1101
+ }[] | null | undefined;
1048
1102
  _id: string;
1049
1103
  name: string;
1050
1104
  items: {
@@ -1228,6 +1282,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
1228
1282
  name: string;
1229
1283
  id: string;
1230
1284
  } | null | undefined;
1285
+ groups?: {
1286
+ name: string;
1287
+ id: string;
1288
+ items: {
1289
+ disabledMeasurements?: string[] | null | undefined;
1290
+ position?: number | null | undefined;
1291
+ skuId: string;
1292
+ }[];
1293
+ }[] | null | undefined;
1231
1294
  _id: string;
1232
1295
  name: string;
1233
1296
  items: {
@@ -1410,6 +1473,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
1410
1473
  name: string;
1411
1474
  id: string;
1412
1475
  } | null | undefined;
1476
+ groups?: {
1477
+ name: string;
1478
+ id: string;
1479
+ items: {
1480
+ disabledMeasurements?: string[] | null | undefined;
1481
+ position?: number | null | undefined;
1482
+ skuId: string;
1483
+ }[];
1484
+ }[] | null | undefined;
1413
1485
  _id: string;
1414
1486
  name: string;
1415
1487
  items: {
@@ -1603,6 +1675,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
1603
1675
  name: string;
1604
1676
  id: string;
1605
1677
  } | null | undefined;
1678
+ groups?: {
1679
+ name: string;
1680
+ id: string;
1681
+ items: {
1682
+ disabledMeasurements?: string[] | null | undefined;
1683
+ position?: number | null | undefined;
1684
+ skuId: string;
1685
+ }[];
1686
+ }[] | null | undefined;
1606
1687
  _id: string;
1607
1688
  name: string;
1608
1689
  items: {
@@ -1786,6 +1867,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
1786
1867
  name: string;
1787
1868
  id: string;
1788
1869
  } | null | undefined;
1870
+ groups?: {
1871
+ name: string;
1872
+ id: string;
1873
+ items: {
1874
+ disabledMeasurements?: string[] | null | undefined;
1875
+ position?: number | null | undefined;
1876
+ skuId: string;
1877
+ }[];
1878
+ }[] | null | undefined;
1789
1879
  _id: string;
1790
1880
  name: string;
1791
1881
  items: {
@@ -1969,6 +2059,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
1969
2059
  name: string;
1970
2060
  id: string;
1971
2061
  } | null | undefined;
2062
+ groups?: {
2063
+ name: string;
2064
+ id: string;
2065
+ items: {
2066
+ disabledMeasurements?: string[] | null | undefined;
2067
+ position?: number | null | undefined;
2068
+ skuId: string;
2069
+ }[];
2070
+ }[] | null | undefined;
1972
2071
  _id: string;
1973
2072
  name: string;
1974
2073
  items: {
@@ -2151,6 +2250,15 @@ export declare const useClosingTemplateActions: import("pinia").StoreDefinition<
2151
2250
  name: string;
2152
2251
  id: string;
2153
2252
  } | null | undefined;
2253
+ groups?: {
2254
+ name: string;
2255
+ id: string;
2256
+ items: {
2257
+ disabledMeasurements?: string[] | null | undefined;
2258
+ position?: number | null | undefined;
2259
+ skuId: string;
2260
+ }[];
2261
+ }[] | null | undefined;
2154
2262
  _id: string;
2155
2263
  name: string;
2156
2264
  items: {