@feedmepos/mf-inventory-portal 1.2.1 → 1.2.2-5.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 (147) hide show
  1. package/dist/App-DMkUg806.js +297 -0
  2. package/dist/{ApprovalView-DwRrbVDo.js → ApprovalView-DWJh2K6W.js} +65 -64
  3. package/dist/{BindingsDialog-DUVKv10-.js → BindingsDialog-EmHCvqJI.js} +2 -2
  4. package/dist/{BindingsPicker-Daib_iq4.js → BindingsPicker-h_9jm1s0.js} +3 -3
  5. package/dist/{BindingsTable-Bv9UmcJP.js → BindingsTable-BAVWGUoa.js} +1 -1
  6. package/dist/ClosingDraftView-Du4kOwIg.js +1899 -0
  7. package/dist/ClosingHistoryView-DuW2Vtrs.js +355 -0
  8. package/dist/ClosingTemplateView-CfPY8R5M.js +2001 -0
  9. package/dist/{DeliveryOrderPrintPreview-DZPcRAja.js → DeliveryOrderPrintPreview-C6Cj8mOp.js} +9 -9
  10. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-WWIrybw_.js +230 -0
  11. package/dist/{FmMultiselectDialog-CZmwOkrb.js → FmMultiselectDialog-BzWrQOS4.js} +1 -1
  12. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C-2V2bGc.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DwqVRUFz.js} +36 -36
  13. package/dist/ImportView-lKlYeLay.js +1291 -0
  14. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BGnoF1Zz.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-_2WZMZU2.js} +5 -5
  15. package/dist/{IngredientGroupView-CAVYpEj3.js → IngredientGroupView-CrmwR2Xt.js} +34 -35
  16. package/dist/IngredientsView-1bAsyz-b.js +2254 -0
  17. package/dist/{IntegrationView-DdLFyZ4H.js → IntegrationView-D16qeEc_.js} +1773 -1635
  18. package/dist/{InventoryBindingForm-C7BdEDtM.js → InventoryBindingForm-BRwOXV_P.js} +1 -1
  19. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B7DND2dQ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-NDbtbtqK.js} +28 -28
  20. package/dist/{InventoryBindingSummary-IZ7F-Lti.js → InventoryBindingSummary-DKM2gX8_.js} +1 -1
  21. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-sgqVSlUB.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdaiYTdf.js} +4 -4
  22. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DeF32bHu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B0OKeK5O.js} +7 -7
  23. package/dist/{PublishView-DkgfYneI.js → PublishView-D0NnU22l.js} +73 -63
  24. package/dist/{PurchaseOrderPrintPreview-CltLC4o4.js → PurchaseOrderPrintPreview-BmuwNbeL.js} +4 -4
  25. package/dist/{ReceiveRequestView-Dj7ji0DY.js → ReceiveRequestView-j79m7TKk.js} +343 -333
  26. package/dist/RecipeView-D_fNQQ-C.js +636 -0
  27. package/dist/StockView-DX_xeFBT.js +2385 -0
  28. package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bg49isUy.js +172 -0
  29. package/dist/{SupplierView-DE_M_9kd.js → SupplierView-DuFTqbOg.js} +1193 -1073
  30. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-c428GXwc.js +3233 -0
  31. package/dist/{TransferTemplateView-gWGBCF3u.js → TransferTemplateView-Ccsfcetz.js} +104 -103
  32. package/dist/UnitView-BklpNsFN.js +674 -0
  33. package/dist/WarehouseView-BrURbU67.js +1066 -0
  34. package/dist/api/adjustment-template.d.ts +1 -0
  35. package/dist/api/bill.d.ts +140 -2
  36. package/dist/api/closing-template.d.ts +1 -0
  37. package/dist/api/closing.d.ts +1 -0
  38. package/dist/api/inventory.d.ts +405 -0
  39. package/dist/api/netsuite.d.ts +5 -1
  40. package/dist/api/purchase-order-template.d.ts +1 -0
  41. package/dist/api/purchase-order.d.ts +3 -0
  42. package/dist/api/shipment.d.ts +11 -0
  43. package/dist/api/stock.d.ts +2 -44
  44. package/dist/api/warehouse.d.ts +3 -1
  45. package/dist/{app-CruHLH1e.js → app-a9r50k3U.js} +68551 -67573
  46. package/dist/app.d.ts +643 -15
  47. package/dist/app.js +6 -6
  48. package/dist/components/FmAdminBadge.vue.d.ts +1 -4
  49. package/dist/components/FmEnhancedSelect.vue.d.ts +30 -0
  50. package/dist/components/FmInventoryTableToolbar.vue.d.ts +16 -2
  51. package/dist/components/FmLockableField.vue.d.ts +3 -0
  52. package/dist/components/netsuite/ItemSubsidiaryTreeDialog.vue.d.ts +16 -0
  53. package/dist/components/netsuite/SubsidiaryTreeDialog.vue.d.ts +2 -0
  54. package/dist/composable/defineApi.d.ts +1 -1
  55. package/dist/composable/useIframe.d.ts +2 -2
  56. package/dist/{decimal-izbvCC1j.js → decimal-AusUnA1W.js} +1 -1
  57. package/dist/{format-unit-display-4SAdfyZB.js → format-unit-display-BqkHL-ph.js} +397 -429
  58. package/dist/helper/array.d.ts +1 -0
  59. package/dist/helper/core/country/utils.d.ts +3 -4
  60. package/dist/helper/country.d.ts +6 -255
  61. package/dist/helper/number.d.ts +1 -0
  62. package/dist/import-export.helper-PIyNeHfa.js +238 -0
  63. package/dist/{index-B6GGthLw.js → index-CjxirPvn.js} +283 -268
  64. package/dist/{index-CnQloOEo.js → index-Dj9-pdT9.js} +1 -1
  65. package/dist/layout/SingleColumnLayout.vue.d.ts +6 -3
  66. package/dist/purchase-order-template-CQikvY1p.js +41 -0
  67. package/dist/router/name.d.ts +2 -0
  68. package/dist/stock-CDZ2uWSF.js +83 -0
  69. package/dist/stock-Dw908dIC.js +74 -0
  70. package/dist/stores/feature.d.ts +12 -0
  71. package/dist/stores/integration/netsuite.d.ts +42 -0
  72. package/dist/stores/inventory.d.ts +28 -199
  73. package/dist/stores/location.d.ts +331 -1
  74. package/dist/stores/supplier.d.ts +96 -0
  75. package/dist/stores/warehouse.d.ts +4 -0
  76. package/dist/style.css +1 -1
  77. package/dist/{supplier-CTVE1lHO.js → supplier-BPPBUudN.js} +1 -1
  78. package/dist/tsconfig.app.tsbuildinfo +1 -1
  79. package/dist/{use-ingredient-select-dialog-CM80TfX0.js → use-ingredient-select-dialog-C_fSKN3_.js} +5 -5
  80. package/dist/{use-inventory-binding-dialog-D_omdhgn.js → use-inventory-binding-dialog-ClAkJ864.js} +8 -8
  81. package/dist/views/adjustment-template/wastage-template/actions.d.ts +60 -0
  82. package/dist/views/adjustment-template/wastage-template/table.d.ts +60 -0
  83. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +56 -0
  84. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +3 -3
  85. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +468 -0
  86. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +9 -2
  87. package/dist/views/closing-history/ClosingHistoryView.vue.d.ts +2 -0
  88. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +4 -1
  89. package/dist/views/closing-template/helpers/import-export.helper.d.ts +5 -0
  90. package/dist/views/import/ImportView.vue.d.ts +3 -0
  91. package/dist/views/import/components/ImportDialog.vue.d.ts +2 -0
  92. package/dist/views/import/helper/import-export.helper.d.ts +4 -0
  93. package/dist/views/ingredients/components/ingredient-dialog/IngredientDialogProps.d.ts +1 -1
  94. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +181 -12
  95. package/dist/views/ingredients/components/ingredient-form/IngredientFormProps.d.ts +6 -0
  96. package/dist/views/ingredients/helper/import-export.helper.d.ts +4 -1
  97. package/dist/views/integration/components/netsuite/business/BusinessNetSuiteSideSheet.vue.d.ts +2 -0
  98. package/dist/views/receive-request/components/delivery-order-form/CreateForm.vue.d.ts +16 -0
  99. package/dist/views/receive-request/components/delivery-order-form/CreateFormProps.d.ts +4 -0
  100. package/dist/views/receive-request/components/delivery-order-form/EditForm.vue.d.ts +16 -0
  101. package/dist/views/receive-request/components/delivery-order-form/EditFormProps.d.ts +4 -0
  102. package/dist/views/receive-request/components/delivery-order-form/SystemTrailDialog.vue.d.ts +21 -0
  103. package/dist/views/receive-request/components/netsuite/NetSuiteTransactionChangeLog.vue.d.ts +15 -0
  104. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
  105. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +420 -2
  106. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +99 -0
  107. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +644 -13
  108. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +711 -14
  109. package/dist/views/recipe/RecipeView.vue.d.ts +1 -0
  110. package/dist/views/recipe/components/import-recipes/ImportRecipeItem.vue.d.ts +16 -0
  111. package/dist/views/recipe/components/import-recipes/ImportRecipes.vue.d.ts +2 -0
  112. package/dist/views/recipe/helper/import-recipe.d.ts +48 -0
  113. package/dist/views/stock/components/StockRecordCard.vue.d.ts +70 -1
  114. package/dist/views/stock/components/dialog/RecalculationDialog.vue.d.ts +11 -0
  115. package/dist/views/stock/components/dialog/RecalculationDialogProps.d.ts +3 -0
  116. package/dist/views/stock/components/dialog/StockAdjustmentSideSheet.vue.d.ts +20 -0
  117. package/dist/views/supplier/components/SupplierForm.vue.d.ts +8 -0
  118. package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -0
  119. package/dist/views/supplier/composables/use-supplier-table.d.ts +4 -0
  120. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -0
  121. package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +2 -0
  122. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +16 -0
  123. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -0
  124. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -0
  125. package/dist/views/unit/UnitView.vue.d.ts +1 -0
  126. package/dist/views/unit/components/import-units/ImportUnitItem.vue.d.ts +12 -0
  127. package/dist/views/unit/components/import-units/ImportUnitItemProps.d.ts +6 -0
  128. package/dist/views/unit/components/import-units/ImportUnits.vue.d.ts +9 -0
  129. package/dist/views/unit/components/import-units/ImportUnitsProps.d.ts +5 -0
  130. package/dist/views/unit/helper/import-export.helper.d.ts +40 -0
  131. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -0
  132. package/package.json +3 -3
  133. package/dist/App-BqaRC0Sb.js +0 -276
  134. package/dist/ClosingDraftView-sJ_zRPeo.js +0 -1687
  135. package/dist/ClosingTemplateView-cNgXHq1r.js +0 -1908
  136. package/dist/FmAdminBadge-oCnz8SW6.js +0 -34
  137. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BKR8C4p_.js +0 -224
  138. package/dist/IngredientsView-CHHeAJH_.js +0 -1858
  139. package/dist/RecipeView-BukmKdVG.js +0 -621
  140. package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +0 -59
  141. package/dist/StockView-wxRCw_w-.js +0 -2087
  142. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-eqUOnJoM.js +0 -2336
  143. package/dist/UnitView-BgwDmGZo.js +0 -667
  144. package/dist/WarehouseView-BdccenhO.js +0 -1034
  145. package/dist/array-Ca8T3f_G.js +0 -44
  146. package/dist/helper/core/country/codes.d.ts +0 -255
  147. package/dist/stock-BJP5BB5b.js +0 -146
@@ -231,6 +231,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
231
231
  };
232
232
  skuId: string;
233
233
  }[] | null | undefined;
234
+ preparationTime?: {
235
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
236
+ value: number;
237
+ } | null | undefined;
234
238
  _id: string;
235
239
  name: string;
236
240
  address: {
@@ -474,6 +478,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
474
478
  };
475
479
  skuId: string;
476
480
  }[] | null | undefined;
481
+ preparationTime?: {
482
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
483
+ value: number;
484
+ } | null | undefined;
477
485
  _id: string;
478
486
  name: string;
479
487
  address: {
@@ -716,6 +724,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
716
724
  };
717
725
  skuId: string;
718
726
  }[] | null | undefined;
727
+ preparationTime?: {
728
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
729
+ value: number;
730
+ } | null | undefined;
719
731
  _id: string;
720
732
  name: string;
721
733
  address: {
@@ -958,6 +970,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
958
970
  };
959
971
  skuId: string;
960
972
  }[] | null | undefined;
973
+ preparationTime?: {
974
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
975
+ value: number;
976
+ } | null | undefined;
961
977
  _id: string;
962
978
  name: string;
963
979
  address: {
@@ -1205,6 +1221,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
1205
1221
  };
1206
1222
  skuId: string;
1207
1223
  }[] | null | undefined;
1224
+ preparationTime?: {
1225
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
1226
+ value: number;
1227
+ } | null | undefined;
1208
1228
  _id: string;
1209
1229
  name: string;
1210
1230
  address: {
@@ -1448,6 +1468,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
1448
1468
  };
1449
1469
  skuId: string;
1450
1470
  }[] | null | undefined;
1471
+ preparationTime?: {
1472
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
1473
+ value: number;
1474
+ } | null | undefined;
1451
1475
  _id: string;
1452
1476
  name: string;
1453
1477
  address: {
@@ -1690,6 +1714,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
1690
1714
  };
1691
1715
  skuId: string;
1692
1716
  }[] | null | undefined;
1717
+ preparationTime?: {
1718
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
1719
+ value: number;
1720
+ } | null | undefined;
1693
1721
  _id: string;
1694
1722
  name: string;
1695
1723
  address: {
@@ -1932,6 +1960,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
1932
1960
  };
1933
1961
  skuId: string;
1934
1962
  }[] | null | undefined;
1963
+ preparationTime?: {
1964
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
1965
+ value: number;
1966
+ } | null | undefined;
1935
1967
  _id: string;
1936
1968
  name: string;
1937
1969
  address: {
@@ -2179,6 +2211,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
2179
2211
  };
2180
2212
  skuId: string;
2181
2213
  }[] | null | undefined;
2214
+ preparationTime?: {
2215
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
2216
+ value: number;
2217
+ } | null | undefined;
2182
2218
  _id: string;
2183
2219
  name: string;
2184
2220
  address: {
@@ -2422,6 +2458,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
2422
2458
  };
2423
2459
  skuId: string;
2424
2460
  }[] | null | undefined;
2461
+ preparationTime?: {
2462
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
2463
+ value: number;
2464
+ } | null | undefined;
2425
2465
  _id: string;
2426
2466
  name: string;
2427
2467
  address: {
@@ -2664,6 +2704,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
2664
2704
  };
2665
2705
  skuId: string;
2666
2706
  }[] | null | undefined;
2707
+ preparationTime?: {
2708
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
2709
+ value: number;
2710
+ } | null | undefined;
2667
2711
  _id: string;
2668
2712
  name: string;
2669
2713
  address: {
@@ -2906,6 +2950,10 @@ export declare const useTransferTemplateTable: import("pinia").StoreDefinition<"
2906
2950
  };
2907
2951
  skuId: string;
2908
2952
  }[] | null | undefined;
2953
+ preparationTime?: {
2954
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
2955
+ value: number;
2956
+ } | null | undefined;
2909
2957
  _id: string;
2910
2958
  name: string;
2911
2959
  address: {
@@ -1,2 +1,3 @@
1
+ import '@/extensions/array';
1
2
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
3
  export default _default;
@@ -0,0 +1,12 @@
1
+ import type { ImportUnitItemProps } from './ImportUnitItemProps';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ImportUnitItemProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ImportUnitItemProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3
+ export default _default;
4
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
5
+ type __VLS_TypePropsToRuntimeProps<T> = {
6
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
7
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
8
+ } : {
9
+ type: import('vue').PropType<T[K]>;
10
+ required: true;
11
+ };
12
+ };
@@ -0,0 +1,6 @@
1
+ export interface ImportUnitItemProps {
2
+ type: 'create' | 'update';
3
+ symbol: string;
4
+ name: string;
5
+ errors: string[];
6
+ }
@@ -0,0 +1,9 @@
1
+ import { type ImportUnitCreateResult, type ImportUnitUpdateResult } from '../../helper/import-export.helper';
2
+ export interface UnitImportResult {
3
+ invalidExcel: boolean;
4
+ invalidExcelMessage?: string;
5
+ importCreateResult: ImportUnitCreateResult[];
6
+ importUpdateResult: ImportUnitUpdateResult[];
7
+ }
8
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
9
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export interface ImportUnitsResult {
2
+ success: boolean;
3
+ errors: string[];
4
+ units: FdoInventoryUnit[];
5
+ }
@@ -0,0 +1,40 @@
1
+ import type { WorkSheet } from 'xlsx';
2
+ export declare function newUnitId(): string;
3
+ export interface UnitRow {
4
+ name: string;
5
+ symbol: string;
6
+ precision: number;
7
+ measurement_name: string;
8
+ measurement_symbol: string;
9
+ measurement_conversion: number;
10
+ }
11
+ export type ObjectWithIndex<T> = {
12
+ index: number;
13
+ data: T;
14
+ };
15
+ export type ColIdHeader<T> = {
16
+ id: keyof T;
17
+ name: string;
18
+ };
19
+ export interface ImportUnitCreateResult {
20
+ type: 'create';
21
+ unit: FdoInventoryUnit;
22
+ excelRowNumber: number;
23
+ errors: string[];
24
+ }
25
+ export interface ImportUnitUpdateResult {
26
+ type: 'update';
27
+ original: FdoInventoryUnit;
28
+ unit: FdoInventoryUnit;
29
+ excelRowNumber: number;
30
+ errors: string[];
31
+ }
32
+ export type ImportUnitResult = {
33
+ invalidExcel: boolean;
34
+ invalidExcelMessage?: string;
35
+ importCreateResult: ImportUnitCreateResult[];
36
+ importUpdateResult: ImportUnitUpdateResult[];
37
+ };
38
+ export declare function worksheetToUnitRow(sheet: WorkSheet): ObjectWithIndex<UnitRow>[];
39
+ export declare function getUnitsToCreateUpdate(sheet: WorkSheet): ImportUnitResult;
40
+ export declare function exportUnits(): string;
@@ -73,6 +73,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
73
73
  menuVersion: string;
74
74
  } | null | undefined;
75
75
  customAttributes?: Record<string, any> | null | undefined;
76
+ preparationTime?: {
77
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
78
+ value: number;
79
+ } | null | undefined;
76
80
  _id: string;
77
81
  businessId: string;
78
82
  profile: {
@@ -162,6 +166,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
162
166
  menuVersion: string;
163
167
  } | null | undefined;
164
168
  customAttributes?: Record<string, any> | null | undefined;
169
+ preparationTime?: {
170
+ unit: "day" | "year" | "month" | "week" | "hour" | "minute" | "second" | "millisecond";
171
+ value: number;
172
+ } | null | undefined;
165
173
  _id: string;
166
174
  businessId: string;
167
175
  profile: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-inventory-portal",
3
- "version": "1.2.1",
3
+ "version": "1.2.25.dev-1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -14,11 +14,11 @@
14
14
  "./style": "./dist/style.css"
15
15
  },
16
16
  "dependencies": {
17
- "@feedmepos/core": "2.14.11",
17
+ "@feedmepos/core": "2.14.40",
18
18
  "@feedmepos/custom-attributes": "0.0.1-rc.3",
19
19
  "@feedmepos/feature-flag": "^0.0.15",
20
20
  "@feedmepos/menu": "1.5.22",
21
- "@feedmepos/mf-common": "1.26.12",
21
+ "@feedmepos/mf-common": "1.27.2",
22
22
  "@feedmepos/ui-library": "1.6.9",
23
23
  "@tanstack/vue-table": "^8.17.3",
24
24
  "@types/dinero.js": "^1.9.4",
@@ -1,276 +0,0 @@
1
- import { ref as U, onUnmounted as F, defineComponent as h, watch as P, onMounted as w, computed as R, resolveComponent as b, openBlock as S, createElementBlock as I, unref as v, createVNode as _, createElementVNode as d, toDisplayString as G, createBlock as x, createCommentVNode as k } from "vue";
2
- import { u as M, a as D, b as H, R as e, c as B, g as s, d as W } from "./app-CruHLH1e.js";
3
- import { useCoreStore as A, useI18n as O } from "@feedmepos/mf-common";
4
- import { useRouter as L, useRoute as K } from "vue-router";
5
- import { u as $ } from "./useTabStorage-BkIVScW_.js";
6
- import { u as Q } from "./googlemap-Dm8ERVai.js";
7
- import "./array-Ca8T3f_G.js";
8
- function j() {
9
- return {
10
- loadingHookInstalled: !1,
11
- isLoading: !1
12
- };
13
- }
14
- const E = U(j());
15
- function z() {
16
- const l = L();
17
- if (!E.value.loadingHookInstalled) {
18
- E.value.loadingHookInstalled = !0;
19
- const n = l.beforeEach(() => {
20
- E.value.isLoading = !0;
21
- }), i = l.afterEach(() => {
22
- E.value.isLoading = !1;
23
- });
24
- F(() => {
25
- E.value.loadingHookInstalled = !1, n(), i();
26
- });
27
- }
28
- return {
29
- get isLoading() {
30
- return E.value.isLoading;
31
- }
32
- };
33
- }
34
- const q = {
35
- key: 0,
36
- class: "flex flex-col items-center w-full h-full gap-24"
37
- }, J = {
38
- key: 1,
39
- class: "flex flex-col pt-[200px] gap-32 items-center"
40
- }, X = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Y = { class: "fm-typo-en-title-lg-600" }, Z = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, ee = { class: "flex gap-16" }, te = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, oe = { href: "https://feedme.ai/form" }, ne = /* @__PURE__ */ h({
41
- __name: "InventoryView",
42
- setup(l) {
43
- const n = M(), i = D(), u = H(), r = A(), c = L(), o = z(), T = B(), { t: p } = O();
44
- P(
45
- [() => r.sessionUser.value, () => r.currentBusiness.value],
46
- ([t, a]) => {
47
- f(t, a);
48
- }
49
- ), w(async () => {
50
- await T.init(), await r.readBusinesses();
51
- const t = r.sessionUser.value, a = r.currentBusiness.value;
52
- f(t, a);
53
- });
54
- function f(t, a) {
55
- !t || !a || g();
56
- }
57
- async function g() {
58
- return await n.init(), await u.readSetting().catch((t) => {
59
- console.error("[all] error on reading netsuite store", t);
60
- }), await i.init();
61
- }
62
- const y = R(() => c.currentRoute.value.name === e.TRANSFER_TEMPLATE ? T.enablePoTemplate : c.currentRoute.value.name === e.INGREDIENT_GROUP ? T.enableIngredientGroup : !0);
63
- return (t, a) => {
64
- const m = b("FmSpacer"), N = b("FmCircularProgress"), C = b("FmButton"), V = b("RouterView");
65
- return S(), I("div", null, [
66
- v(o).isLoading ? (S(), I("div", q, [
67
- _(m),
68
- d("div", null, [
69
- _(N, { size: "xl" })
70
- ]),
71
- a[0] || (a[0] = d("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
72
- _(m)
73
- ])) : y.value ? v(r).sessionUser.value ? (S(), x(V, { key: 2 })) : k("", !0) : (S(), I("div", J, [
74
- d("div", X, [
75
- d("div", Y, G(v(p)("inventory.common.proPlan.title")), 1),
76
- d("div", Z, G(v(p)("inventory.common.proPlan.subtitle")), 1)
77
- ]),
78
- d("div", ee, [
79
- d("a", te, [
80
- _(C, {
81
- label: v(p)("inventory.common.proPlan.comparePlans"),
82
- variant: "secondary"
83
- }, null, 8, ["label"])
84
- ]),
85
- d("a", oe, [
86
- _(C, {
87
- label: v(p)("inventory.common.proPlan.callUs"),
88
- "prepend-icon": "call"
89
- }, null, 8, ["label"])
90
- ])
91
- ])
92
- ]))
93
- ]);
94
- };
95
- }
96
- }), ae = { class: "h-full flex flex-col overflow-auto py-16" }, re = /* @__PURE__ */ h({
97
- __name: "NavigationTab",
98
- setup(l) {
99
- const n = K(), i = L(), u = A(), r = B(), c = $(), { t: o } = O();
100
- P([() => u.currentBusiness.value, () => n.name], ([t, a]) => {
101
- (t == null ? void 0 : t.menuVersion) === "v3" && (a === e.INGREDIENTS || a === e.RECIPE || a === e.UNIT) && i.push({ name: e.STOCK });
102
- });
103
- const T = R(() => {
104
- var a;
105
- const t = [
106
- {
107
- label: s(e.STOCK, o),
108
- // icon: 'inventory_2',
109
- children: [
110
- {
111
- label: o("inventory.stock.stock_balance.title"),
112
- value: e.STOCK
113
- },
114
- ...r.enableWastageTemplate ? [
115
- {
116
- label: s(e.WASTAGE_TEMPLATE, o),
117
- value: e.WASTAGE_TEMPLATE
118
- }
119
- ] : []
120
- ]
121
- },
122
- ...r.enableClosingTemplate ? [
123
- {
124
- label: "Closing",
125
- children: [
126
- {
127
- label: s(e.CLOSING_TEMPLATE, o),
128
- value: e.CLOSING_TEMPLATE
129
- },
130
- {
131
- label: s(e.CLOSING_DRAFT, o),
132
- value: e.CLOSING_DRAFT
133
- }
134
- ]
135
- }
136
- ] : [],
137
- {
138
- label: s(e.INGREDIENTS, o),
139
- // icon: 'grocery',
140
- value: e.INGREDIENTS
141
- },
142
- ...r.enableIngredientGroup ? [
143
- {
144
- label: s(e.INGREDIENT_GROUP, o),
145
- // icon: 'grocery',
146
- value: e.INGREDIENT_GROUP
147
- }
148
- ] : [],
149
- {
150
- label: s(e.RECIPE, o),
151
- // icon: 'weight',
152
- value: e.RECIPE
153
- },
154
- {
155
- label: s(e.UNIT, o),
156
- // icon: 'fastfood',
157
- value: e.UNIT
158
- },
159
- {
160
- label: o("inventory.transfer.title"),
161
- // icon: 'swap_horiz',
162
- children: [
163
- {
164
- label: s(e.RECEIVE_REQUEST, o),
165
- value: e.RECEIVE_REQUEST
166
- },
167
- {
168
- label: s(e.APPROVAL, o),
169
- value: e.APPROVAL
170
- },
171
- ...r.enablePoTemplate ? [
172
- {
173
- label: s(e.TRANSFER_TEMPLATE, o),
174
- value: e.TRANSFER_TEMPLATE
175
- }
176
- ] : []
177
- ]
178
- },
179
- {
180
- label: s(e.SUPPLIER, o),
181
- // icon: 'group',
182
- value: e.SUPPLIER
183
- },
184
- {
185
- label: s(e.WAREHOUSE, o),
186
- // icon: 'warehouse',
187
- value: e.WAREHOUSE
188
- },
189
- {
190
- label: s(e.PUBLISH, o),
191
- value: e.PUBLISH
192
- },
193
- {
194
- label: s(e.INTEGRATION, o),
195
- // icon: 'integration_instructions',
196
- value: e.INTEGRATION
197
- }
198
- ];
199
- return ((a = u.currentBusiness.value) == null ? void 0 : a.menuVersion) === "v3" ? t.filter(
200
- (m) => m.value !== e.INGREDIENTS && m.value !== e.RECIPE && m.value !== e.UNIT && m.value !== e.PUBLISH
201
- ) : t;
202
- }), p = R({
203
- get() {
204
- if (n.name)
205
- return String(n.name);
206
- },
207
- set(t) {
208
- t && i.push({ name: t });
209
- }
210
- }), f = R(
211
- () => {
212
- var t;
213
- return `NavigationTab.${(t = u.currentBusiness.value) == null ? void 0 : t._id}`;
214
- }
215
- ), g = U(!1), y = R({
216
- get() {
217
- return g.value;
218
- },
219
- set(t) {
220
- g.value = t, t || c.setItem(f.value, "true");
221
- }
222
- });
223
- return P([() => f.value], () => {
224
- g.value = !1, setTimeout(() => {
225
- y.value = !c.getItem(f.value);
226
- }, 2e3);
227
- }), (t, a) => {
228
- const m = b("FmCollapsibleTabs");
229
- return S(), I("div", ae, [
230
- _(m, {
231
- modelValue: p.value,
232
- "onUpdate:modelValue": a[0] || (a[0] = (N) => p.value = N),
233
- items: T.value
234
- }, null, 8, ["modelValue", "items"])
235
- ]);
236
- };
237
- }
238
- });
239
- typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
240
- let l, n;
241
- return { promise: new Promise((u, r) => {
242
- l = u, n = r;
243
- }), resolve: l, reject: n };
244
- });
245
- typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(l) {
246
- return await new Promise((n) => setTimeout(n, l)), Promise.resolve(this);
247
- });
248
- const pe = /* @__PURE__ */ h({
249
- __name: "App",
250
- setup(l) {
251
- const n = A(), i = Q(), u = W();
252
- w(() => {
253
- if (window.location.href.includes("print-preview")) {
254
- n.setEmbedded(!0), document.body.classList.add("print-mode");
255
- return;
256
- }
257
- n.registerSidebarComponent(re), i.initGoogleMap(u.appApi.googleMap).catch(() => {
258
- console.error("Google map cannot be loaded");
259
- });
260
- }), P([() => n.currentCountry.value], () => {
261
- r();
262
- });
263
- async function r() {
264
- var c;
265
- try {
266
- await n.readBusinesses(), n.currentBusiness.value = (c = n.businesses.value) == null ? void 0 : c.find((o) => o);
267
- } catch (o) {
268
- console.error("error when trying to reset businesses:", o);
269
- }
270
- }
271
- return (c, o) => (S(), x(ne));
272
- }
273
- });
274
- export {
275
- pe as default
276
- };