@appcorp/stellar-solutions-modules 0.1.55 → 0.1.58

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 (67) hide show
  1. package/global-modules/bank/bank.d.ts +7 -1
  2. package/global-modules/bank/bank.js +5 -19
  3. package/global-modules/bank/constants.js +5 -5
  4. package/global-modules/bank/context.js +39 -41
  5. package/global-modules/bank/drawer.d.ts +0 -4
  6. package/global-modules/bank/drawer.js +8 -6
  7. package/global-modules/bank/form.d.ts +0 -3
  8. package/global-modules/bank/form.js +16 -13
  9. package/global-modules/bank/types.d.ts +2 -22
  10. package/global-modules/bank/validate.js +2 -2
  11. package/global-modules/branch/branch.d.ts +7 -1
  12. package/global-modules/branch/branch.js +6 -16
  13. package/global-modules/branch/constants.js +1 -1
  14. package/global-modules/branch/context.js +35 -21
  15. package/global-modules/branch/drawer.d.ts +0 -4
  16. package/global-modules/branch/drawer.js +8 -6
  17. package/global-modules/branch/form.d.ts +0 -3
  18. package/global-modules/branch/form.js +11 -12
  19. package/global-modules/branch/types.d.ts +9 -106
  20. package/global-modules/branch/validate.js +6 -6
  21. package/global-modules/currency/actions.d.ts +203 -0
  22. package/global-modules/currency/actions.js +153 -0
  23. package/global-modules/currency/constants.d.ts +33 -0
  24. package/global-modules/currency/constants.js +71 -0
  25. package/global-modules/currency/context.d.ts +41 -0
  26. package/global-modules/currency/context.js +422 -0
  27. package/global-modules/currency/currency.d.ts +8 -0
  28. package/global-modules/currency/currency.js +57 -0
  29. package/global-modules/currency/drawer.d.ts +27 -0
  30. package/global-modules/currency/drawer.js +76 -0
  31. package/global-modules/currency/form.d.ts +19 -0
  32. package/global-modules/currency/form.js +52 -0
  33. package/global-modules/currency/reducer.d.ts +25 -0
  34. package/global-modules/currency/reducer.js +153 -0
  35. package/global-modules/currency/types.d.ts +163 -0
  36. package/global-modules/currency/types.js +44 -0
  37. package/global-modules/currency/validate.d.ts +9 -0
  38. package/global-modules/currency/validate.js +18 -0
  39. package/global-modules/payment-mode/constants.js +1 -1
  40. package/global-modules/payment-mode/context.js +7 -9
  41. package/global-modules/payment-mode/drawer.d.ts +0 -4
  42. package/global-modules/payment-mode/drawer.js +8 -6
  43. package/global-modules/payment-mode/form.d.ts +0 -3
  44. package/global-modules/payment-mode/form.js +6 -7
  45. package/global-modules/payment-mode/payment-mode.d.ts +1 -1
  46. package/global-modules/payment-mode/payment-mode.js +38 -38
  47. package/global-modules/payment-mode/types.d.ts +12 -223
  48. package/global-modules/payment-mode/types.js +1 -9
  49. package/global-modules/payment-mode/validate.js +2 -2
  50. package/global-modules/preferences/constants.d.ts +0 -4
  51. package/global-modules/preferences/constants.js +14 -17
  52. package/global-modules/preferences/context.js +2 -1
  53. package/global-modules/preferences/preferences.js +2 -6
  54. package/global-modules/preferences/types.d.ts +14 -240
  55. package/global-modules/preferences/types.js +3 -6
  56. package/global-modules/tax/constants.js +1 -1
  57. package/global-modules/tax/context.js +8 -4
  58. package/global-modules/tax/drawer.d.ts +0 -4
  59. package/global-modules/tax/drawer.js +8 -6
  60. package/global-modules/tax/form.d.ts +0 -4
  61. package/global-modules/tax/form.js +6 -7
  62. package/global-modules/tax/tax.d.ts +1 -1
  63. package/global-modules/tax/tax.js +37 -37
  64. package/global-modules/tax/types.d.ts +9 -254
  65. package/global-modules/tax/types.js +1 -9
  66. package/i18n/routing.d.ts +1 -1
  67. package/package.json +3 -3
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.PaymentMode = void 0;
7
+ exports.PaymentModePage = void 0;
8
8
  var react_1 = __importDefault(require("react"));
9
9
  var next_intl_1 = require("next-intl");
10
10
  var util_functions_1 = require("@react-pakistan/util-functions");
@@ -31,47 +31,47 @@ var drawer_1 = require("./drawer");
31
31
  *
32
32
  * @param params - Route parameters containing locale information
33
33
  */
34
- var PaymentMode = function () {
34
+ var PaymentModePage = function () {
35
35
  var _a = (0, context_1.usePaymentModeStateContext)(), count = _a.count, currentPage = _a.currentPage, handleNextClick = _a.handleNextClick, handlePageLimit = _a.handlePageLimit, handlePreviousClick = _a.handlePreviousClick, headerActions = _a.headerActions, listLoading = _a.listLoading, pageLimit = _a.pageLimit, paymentModes = _a.paymentModes, rowActions = _a.rowActions, searchOnChange = _a.searchOnChange, searchQuery = _a.searchQuery;
36
36
  var t = (0, next_intl_1.useTranslations)("paymentMode");
37
37
  var isRTL = (0, use_rtl_1.useRTL)();
38
38
  // ============================================================================
39
39
  // TRANSLATION MAPPING
40
40
  // ============================================================================
41
- var translationMap = {
42
- // Form Labels
43
- formLabelLabel: t("formLabelLabel"),
44
- // Drawer
45
- drawerTitleCreate: t("drawerTitleCreate"),
46
- headingFormCreate: t("headingFormCreate"),
47
- srCloseDrawer: t("srCloseDrawer"),
48
- cancelBtn: t("cancelBtn"),
49
- saveBtn: t("saveBtn"),
50
- // Actions
51
- addItem: t("addItem"),
52
- edit: t("edit"),
53
- delete: t("delete"),
54
- // Form Settings
55
- settings: t("settings"),
56
- enabled: t("enabled"),
57
- isDefault: t("isDefault"),
58
- setAsDefault: t("setAsDefault"),
59
- enableDescription: t("enableDescription"),
60
- defaultDescription: t("defaultDescription"),
61
- // Messages
62
- messagesRecordCreated: t("messagesRecordCreated"),
63
- messagesRecordUpdated: t("messagesRecordUpdated"),
64
- messagePaymentModeDeleted: t("messagesPaymentModeDeleted"),
65
- messagesRecordDeleted: t("messagesRecordDeleted"),
66
- messageDeletingPaymentMode: t("messagesDeletingPaymentMode"),
67
- messageLoadingPaymentModes: t("messagesLoadingPaymentModes"),
68
- messageSuccess: t("messagesSuccess"),
69
- messageError: t("messagesError"),
70
- // Validation
71
- validationLabelRequired: t("validationLabelRequired"),
72
- validationPreferenceIdRequired: t("validationPreferenceIdRequired"),
73
- validationFormGeneralError: t("validationFormGeneralError"),
74
- };
41
+ // const translationMap = {
42
+ // // Form Labels
43
+ // formLabelLabel: t("formLabelLabel"),
44
+ // // Drawer
45
+ // drawerTitleCreate: t("drawerTitleCreate"),
46
+ // headingFormCreate: t("headingFormCreate"),
47
+ // srCloseDrawer: t("srCloseDrawer"),
48
+ // cancelBtn: t("cancelBtn"),
49
+ // saveBtn: t("saveBtn"),
50
+ // // Actions
51
+ // addItem: t("addItem"),
52
+ // edit: t("edit"),
53
+ // delete: t("delete"),
54
+ // // Form Settings
55
+ // settings: t("settings"),
56
+ // enabled: t("enabled"),
57
+ // isDefault: t("isDefault"),
58
+ // setAsDefault: t("setAsDefault"),
59
+ // enableDescription: t("enableDescription"),
60
+ // defaultDescription: t("defaultDescription"),
61
+ // // Messages
62
+ // messagesRecordCreated: t("messagesRecordCreated"),
63
+ // messagesRecordUpdated: t("messagesRecordUpdated"),
64
+ // messagePaymentModeDeleted: t("messagesPaymentModeDeleted"),
65
+ // messagesRecordDeleted: t("messagesRecordDeleted"),
66
+ // messageDeletingPaymentMode: t("messagesDeletingPaymentMode"),
67
+ // messageLoadingPaymentModes: t("messagesLoadingPaymentModes"),
68
+ // messageSuccess: t("messagesSuccess"),
69
+ // messageError: t("messagesError"),
70
+ // // Validation
71
+ // validationLabelRequired: t("validationLabelRequired"),
72
+ // validationPreferenceIdRequired: t("validationPreferenceIdRequired"),
73
+ // validationFormGeneralError: t("validationFormGeneralError"),
74
+ // };
75
75
  // ============================================================================
76
76
  // TABLE CONFIGURATION
77
77
  // ============================================================================
@@ -110,7 +110,7 @@ var PaymentMode = function () {
110
110
  // ============================================================================
111
111
  return (react_1.default.createElement("div", { className: "space-y-4 ".concat(isRTL ? "rtl" : "ltr"), dir: isRTL ? "rtl" : "ltr" },
112
112
  react_1.default.createElement(enhanced_table_1.EnhancedTable, { currentPage: Number(currentPage), handleNextOnClick: handleNextClick, handleOnSelect: handlePageLimit, handlePreviousOnClick: handlePreviousClick, handleSearchInput: searchOnChange, headerActions: headerActions, isNextDisabled: (0, util_functions_1.isNextButtonDisabled)(currentPage, totalPages), isPreviousDisabled: (0, util_functions_1.isPreviousButtonDisabled)(currentPage), listOptions: (0, util_functions_1.getAvailablePageLimits)(count), loading: listLoading, nodeSelectKey: "pageLimit", pageLimit: pageLimit, rowActions: rowActions, searchDisabled: false, searchEnabled: true, searchId: "payment-mode-search", searchPlaceholder: t("tableSearchPlaceholder"), searchValue: searchQuery, tableBodyCols: constants_1.tableBodyCols, tableBodyRows: paymentModes, tableDescription: t("tableDescription"), tableHeadItems: tableHeadItems, tableHeading: t("tableTitle"), totalPages: Number(totalPages) }),
113
- react_1.default.createElement(drawer_1.PaymentModeDrawer, { isRTL: isRTL, translationMap: translationMap }),
113
+ react_1.default.createElement(drawer_1.PaymentModeDrawer, { isRTL: isRTL }),
114
114
  react_1.default.createElement(sonner_1.Toaster, null)));
115
115
  };
116
- exports.PaymentMode = PaymentMode;
116
+ exports.PaymentModePage = PaymentModePage;
@@ -25,6 +25,7 @@
25
25
  import { Dispatch } from "react";
26
26
  import { RowAction, HeaderAction } from "@appcorp/shadcn/components/enhanced-table";
27
27
  import { PaymentModeActions } from "./actions";
28
+ import { BankBE as BankTypeBE, BranchBE as BranchTypeBE, CurrencyBE as CurrencyTypeBE, MenuOrderBE as MenuOrderTypeBE, PaymentBE as PaymentTypeBE, PaymentModeBE as PaymentModeTypeBE, PreferenceBE as PreferenceTypeBE, TaxBE as TaxTypeBE } from "@react-pakistan/util-functions/api/stellar-solutions/type";
28
29
  /**
29
30
  * Payment Mode Context Interface
30
31
  *
@@ -58,56 +59,19 @@ export interface PaymentModeContextType {
58
59
  * Represents the complete payment mode data structure as received from the API.
59
60
  * Includes all payment mode-specific fields and relationships.
60
61
  */
61
- export interface PaymentModeTypeBE {
62
- createdAt: string;
63
- enabled: boolean;
64
- id: string;
65
- isDefault: boolean;
66
- label: string;
67
- payments?: PaymentTypeBE[];
68
- preference?: PreferenceTypeBE;
69
- preferenceId: string;
70
- updatedAt: string;
71
- }
62
+ export type { PaymentModeTypeBE };
72
63
  /**
73
64
  * Payment Backend Entity
74
65
  *
75
66
  * Represents payment data structure with payment mode relationship.
76
67
  */
77
- export interface PaymentTypeBE {
78
- amount: string;
79
- attachment?: string;
80
- balance: string;
81
- createdAt: string;
82
- currency: string;
83
- date: string;
84
- description?: string;
85
- id: string;
86
- paymentMode?: PaymentModeTypeBE;
87
- paymentModeId: string;
88
- paymentType: PAYMENT_TYPE;
89
- quoteInvoice?: undefined;
90
- quoteInvoiceId: string;
91
- ref: string;
92
- updatedAt: string;
93
- }
68
+ export type { PaymentTypeBE };
94
69
  /**
95
70
  * Preference Backend Entity
96
71
  *
97
72
  * Represents preference data structure containing payment modes.
98
73
  */
99
- export interface PreferenceTypeBE {
100
- bankingDetails: BankingDetailTypeBE[];
101
- branches: BranchTypeBE[];
102
- createdAt: string;
103
- currencies: CurrencyTypeBE[];
104
- id: string;
105
- menuOrder: MenuOrderTypeBE[];
106
- onboarding: boolean;
107
- paymentModes: PaymentModeTypeBE[];
108
- taxes: TaxTypeBE[];
109
- updatedAt: string;
110
- }
74
+ export type { PreferenceTypeBE };
111
75
  /**
112
76
  * Payment Mode Component State
113
77
  *
@@ -261,206 +225,31 @@ export declare const getPaymentModeDisplayLabel: (paymentMode: PaymentModeTypeBE
261
225
  /**
262
226
  * Check if payment mode has payments associated
263
227
  */
264
- export declare const hasPayments: (paymentMode: PaymentModeTypeBE) => boolean;
228
+ export declare const hasPayments: (paymentMode: PaymentModeTypeBE & {
229
+ payments?: PaymentTypeBE[];
230
+ }) => boolean;
265
231
  /**
266
232
  * Legacy Banking Detail Type
267
233
  * TODO: Move to banking-details module
268
234
  */
269
- export interface BankingDetailTypeBE {
270
- accountNumber: string;
271
- accountTitle: string;
272
- bankAddress?: string;
273
- bankName: string;
274
- createdAt: string;
275
- enabled: boolean;
276
- iban?: string;
277
- id: string;
278
- isDefault: boolean;
279
- preference: PreferenceTypeBE;
280
- preferenceId: string;
281
- swiftCode?: string;
282
- updatedAt: string;
283
- }
235
+ export type { BankTypeBE };
284
236
  /**
285
237
  * Legacy Branch Type
286
238
  * TODO: Move to branches module
287
239
  */
288
- export interface BranchTypeBE {
289
- branchAddress: string;
290
- branchName: string;
291
- createdAt: string;
292
- enabled: boolean;
293
- id: string;
294
- isDefault: boolean;
295
- personEmail: string;
296
- personName: string;
297
- personPhone: string;
298
- preference: PreferenceTypeBE;
299
- preferenceId: string;
300
- updatedAt: string;
301
- }
240
+ export type { BranchTypeBE };
302
241
  /**
303
242
  * Legacy Currency Type
304
243
  * TODO: Move to currencies module
305
244
  */
306
- export interface CurrencyTypeBE {
307
- code: string;
308
- createdAt: string;
309
- enabled: boolean;
310
- id: string;
311
- isDefault: boolean;
312
- label: string;
313
- preference?: PreferenceTypeBE;
314
- preferenceId: string;
315
- updatedAt: string;
316
- }
245
+ export type { CurrencyTypeBE };
317
246
  /**
318
247
  * Legacy Menu Order Type
319
248
  * TODO: Move to preferences module
320
249
  */
321
- export interface MenuOrderTypeBE {
322
- createdAt: string;
323
- id: string;
324
- label: string;
325
- order: number;
326
- preference: PreferenceTypeBE;
327
- preferenceId: string;
328
- updatedAt: string;
329
- }
250
+ export type { MenuOrderTypeBE };
330
251
  /**
331
252
  * Legacy Tax Type
332
253
  * TODO: Move to taxes module
333
254
  */
334
- export interface TaxTypeBE {
335
- createdAt: string;
336
- description?: string;
337
- enabled: boolean;
338
- id: string;
339
- isDefault: boolean;
340
- preference: PreferenceTypeBE;
341
- preferenceId: string;
342
- taxName: string;
343
- taxRate: string;
344
- updatedAt: string;
345
- }
346
- /**
347
- * Legacy Tax Interface
348
- * TODO: Move to taxes module
349
- */
350
- export interface Tax {
351
- taxName: string;
352
- taxValue: string;
353
- id: string;
354
- description: string;
355
- preferenceId: string;
356
- enabled: boolean;
357
- errors: {
358
- [key: string]: string;
359
- };
360
- createdAt?: string;
361
- updatedAt?: string;
362
- loading: boolean;
363
- isDefault: boolean;
364
- btnDisableTax: boolean;
365
- }
366
- /**
367
- * Legacy Menu Item Interface
368
- * TODO: Move to preferences module
369
- */
370
- export interface MenuItem {
371
- preferenceId: string;
372
- label: string;
373
- order: number;
374
- id: string;
375
- }
376
- /**
377
- * Legacy Currency Args
378
- * TODO: Move to currencies module
379
- */
380
- export type CurrencyArgs = {
381
- id: string;
382
- label: string;
383
- enabled: boolean;
384
- code: string;
385
- isDefault: boolean;
386
- preferenceId: string;
387
- };
388
- /**
389
- * Legacy Create Bank Detail Args
390
- * TODO: Move to banking-details module
391
- */
392
- export interface CreateBankDetailArg {
393
- id: string;
394
- accountNumber: string;
395
- accountTitle: string;
396
- bankAddress: string;
397
- bankName: string;
398
- enabled: boolean;
399
- iban: string;
400
- swiftCode: string;
401
- preferenceId: string;
402
- errors: {
403
- [key: string]: string;
404
- };
405
- loading: boolean;
406
- isDefault: boolean;
407
- }
408
- /**
409
- * Legacy Create Branches Args
410
- * TODO: Move to branches module
411
- */
412
- export interface createBranchesArgs {
413
- personName: string;
414
- personEmail: string;
415
- id: string;
416
- personPhone: string;
417
- branchAddress: string;
418
- branchName: string;
419
- preferenceId: string;
420
- enabled: boolean;
421
- errors: {
422
- [key: string]: string;
423
- };
424
- createdAt?: string;
425
- updatedAt?: string;
426
- loading: boolean;
427
- isDefault: boolean;
428
- }
429
- /**
430
- * Legacy Create Taxes Args
431
- * TODO: Move to taxes module
432
- */
433
- export interface createTaxesArgs {
434
- taxName: string;
435
- taxValue: string;
436
- id: string;
437
- description: string;
438
- preferenceId: string;
439
- enabled: boolean;
440
- errors: {
441
- [key: string]: string;
442
- };
443
- createdAt?: string;
444
- updatedAt?: string;
445
- loading: boolean;
446
- isDefault: boolean;
447
- }
448
- /**
449
- * Legacy Update Currency Args
450
- * TODO: Move to currencies module
451
- */
452
- export interface updateCurrencyArgs {
453
- id: string;
454
- label: string;
455
- enabled: boolean;
456
- code: string;
457
- isDefault: boolean;
458
- preferenceId: string;
459
- }
460
- /**
461
- * Legacy Branch Modal Enum
462
- * TODO: Move to branches module
463
- */
464
- export declare enum BRANCH_MODAL {
465
- DUMMY = "DUMMY"
466
- }
255
+ export type { TaxTypeBE };
@@ -24,7 +24,7 @@
24
24
  * - Types: PascalCase following interface conventions
25
25
  */
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.BRANCH_MODAL = exports.hasPayments = exports.getPaymentModeDisplayLabel = exports.isPaymentModeDefault = exports.isPaymentModeEnabled = exports.isFetchPaymentModesArgs = exports.isPaymentType = exports.isPaymentModeDrawer = exports.isPaymentModeTypeBE = exports.PAYMENT_TYPE = exports.PAYMENT_MODE_DRAWER = void 0;
27
+ exports.hasPayments = exports.getPaymentModeDisplayLabel = exports.isPaymentModeDefault = exports.isPaymentModeEnabled = exports.isFetchPaymentModesArgs = exports.isPaymentType = exports.isPaymentModeDrawer = exports.isPaymentModeTypeBE = exports.PAYMENT_TYPE = exports.PAYMENT_MODE_DRAWER = void 0;
28
28
  // ============================================================================
29
29
  // UI ENUMS (Component State Definitions)
30
30
  // ============================================================================
@@ -117,14 +117,6 @@ var hasPayments = function (paymentMode) {
117
117
  return Boolean(paymentMode.payments && paymentMode.payments.length > 0);
118
118
  };
119
119
  exports.hasPayments = hasPayments;
120
- /**
121
- * Legacy Branch Modal Enum
122
- * TODO: Move to branches module
123
- */
124
- var BRANCH_MODAL;
125
- (function (BRANCH_MODAL) {
126
- BRANCH_MODAL["DUMMY"] = "DUMMY";
127
- })(BRANCH_MODAL || (exports.BRANCH_MODAL = BRANCH_MODAL = {}));
128
120
  // ============================================================================
129
121
  // OPTIMIZATION SUMMARY
130
122
  // ============================================================================
@@ -4,8 +4,8 @@ exports.formValidation = void 0;
4
4
  var zod_1 = require("zod");
5
5
  // Validation error keys for i18n translation
6
6
  var VALIDATION_KEYS = {
7
- labelRequired: "paymentModePageValidationLabelRequired",
8
- preferenceIdRequired: "paymentModePageValidationPreferenceIdRequired",
7
+ labelRequired: "validationLabelRequired",
8
+ preferenceIdRequired: "validationPreferenceIdRequired",
9
9
  };
10
10
  exports.formValidation = zod_1.z.object({
11
11
  label: zod_1.z.string().nonempty(VALIDATION_KEYS.labelRequired),
@@ -12,7 +12,6 @@
12
12
  *
13
13
  * Naming Convention: Descriptive names with clear purpose
14
14
  */
15
- import { ReactNode } from "react";
16
15
  /**
17
16
  * Default page limit for pagination
18
17
  */
@@ -51,6 +50,3 @@ export declare const initialMenuItems: {
51
50
  * Mapping of dashboard tab names to their corresponding React components
52
51
  * Used for dynamic rendering of preference management sections
53
52
  */
54
- export declare const dashboardTabsMap: {
55
- [key: string]: ReactNode;
56
- };
@@ -13,17 +13,14 @@
13
13
  *
14
14
  * Naming Convention: Descriptive names with clear purpose
15
15
  */
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
16
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.dashboardTabsMap = exports.initialMenuItems = exports.PREFERENCE_API_ROUTES = exports.pageLimit = void 0;
21
- var react_1 = __importDefault(require("react"));
22
- var currency_1 = require("./currency");
23
- var payment_mode_1 = require("../payment-mode/payment-mode");
24
- var branch_1 = require("../branch/branch");
25
- var tax_1 = require("../tax/tax");
26
- var bank_1 = require("../bank/bank");
17
+ exports.initialMenuItems = exports.PREFERENCE_API_ROUTES = exports.pageLimit = void 0;
18
+ // import React, { ReactNode } from "react";
19
+ // import { Currency } from "./currency";
20
+ // import { PaymentModePage } from "../payment-mode/payment-mode";
21
+ // import { BranchPage } from "../branch/branch";
22
+ // import { TaxPage } from "../tax/tax";
23
+ // import { BankPage } from "../bank/bank";
27
24
  // ============================================================================
28
25
  // PAGE CONFIGURATION
29
26
  // ============================================================================
@@ -117,13 +114,13 @@ exports.initialMenuItems = [
117
114
  * Mapping of dashboard tab names to their corresponding React components
118
115
  * Used for dynamic rendering of preference management sections
119
116
  */
120
- exports.dashboardTabsMap = {
121
- Currency: react_1.default.createElement(currency_1.Currency, null),
122
- "Payment Mode": react_1.default.createElement(payment_mode_1.PaymentMode, null),
123
- Branch: react_1.default.createElement(branch_1.Branch, null),
124
- Tax: react_1.default.createElement(tax_1.Tax, null),
125
- Bank: react_1.default.createElement(bank_1.Bank, null),
126
- };
117
+ // export const dashboardTabsMap: { [key: string]: ReactNode } = {
118
+ // Currency: <Currency />,
119
+ // "Payment Mode": <PaymentModePage />,
120
+ // Branch: <BranchPage params={{}} />,
121
+ // Tax: <TaxPage params={{}} />,
122
+ // Bank: <BankPage params={{}} />,
123
+ // };
127
124
  // ============================================================================
128
125
  // OPTIMIZATION SUMMARY
129
126
  // ============================================================================
@@ -82,9 +82,10 @@ var usePreferenceState = function () {
82
82
  }
83
83
  };
84
84
  var updateParams = (0, react_1.useMemo)(function () { return ({
85
- currencies: [],
85
+ banks: [],
86
86
  bankingDetails: [],
87
87
  branches: [],
88
+ currencies: [],
88
89
  id: "",
89
90
  menuOrder: [],
90
91
  onboarding: false,
@@ -6,15 +6,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.PreferencesPage = void 0;
8
8
  var react_1 = __importDefault(require("react"));
9
- var context_1 = require("./context");
9
+ // import { usePreferenceStateContext } from "./context";
10
10
  var generate_toast_1 = require("@appcorp/app-corp-vista/utils/generate-toast");
11
- var vista_dashboard_tabs_v1_1 = require("@appcorp/app-corp-vista/molecules/vista-dashboard-tabs-v1/vista-dashboard-tabs-v1");
12
- var constants_1 = require("./constants");
13
11
  var PreferencesPage = function () {
14
- var _a = (0, context_1.usePreferenceStateContext)(), headerTabs = _a.headerTabs, activeTab = _a.activeTab;
12
+ // const { headerTabs, activeTab } = usePreferenceStateContext();
15
13
  return (react_1.default.createElement(react_1.default.Fragment, null,
16
- react_1.default.createElement(vista_dashboard_tabs_v1_1.VistaDashboardTabsV1, { headerTabs: headerTabs, heading: "Heading" },
17
- react_1.default.createElement("div", { className: "pt-4" }, constants_1.dashboardTabsMap[activeTab])),
18
14
  react_1.default.createElement(generate_toast_1.VistaToaster, null)));
19
15
  };
20
16
  exports.PreferencesPage = PreferencesPage;