@appcorp/stellar-solutions-modules 0.1.34 → 0.1.35

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 (157) hide show
  1. package/README.md +128 -19
  2. package/components/theme-switcher.d.ts +4 -0
  3. package/components/theme-switcher.js +60 -0
  4. package/components/ui/badge.d.ts +9 -0
  5. package/components/ui/badge.js +82 -0
  6. package/components/ui/button.d.ts +10 -0
  7. package/components/ui/button.js +91 -0
  8. package/components/ui/checkbox.d.ts +9 -0
  9. package/components/ui/checkbox.js +87 -0
  10. package/components/ui/drawer.d.ts +13 -0
  11. package/components/ui/drawer.js +115 -0
  12. package/components/ui/dropdown-menu.d.ts +25 -0
  13. package/components/ui/dropdown-menu.js +148 -0
  14. package/components/ui/enhanced-table-footer-action.d.ts +34 -0
  15. package/components/ui/enhanced-table-footer-action.js +117 -0
  16. package/components/ui/enhanced-table-footer-page.d.ts +32 -0
  17. package/components/ui/enhanced-table-footer-page.js +140 -0
  18. package/components/ui/enhanced-table-footer-pagination.d.ts +38 -0
  19. package/components/ui/enhanced-table-footer-pagination.js +122 -0
  20. package/components/ui/enhanced-table-header-action.d.ts +7 -0
  21. package/components/ui/enhanced-table-header-action.js +21 -0
  22. package/components/ui/enhanced-table-header-search.d.ts +12 -0
  23. package/components/ui/enhanced-table-header-search.js +17 -0
  24. package/components/ui/enhanced-table.d.ts +65 -0
  25. package/components/ui/enhanced-table.js +87 -0
  26. package/components/ui/input.d.ts +8 -0
  27. package/components/ui/input.js +86 -0
  28. package/components/ui/label.d.ts +7 -0
  29. package/components/ui/label.js +68 -0
  30. package/components/ui/popover.d.ts +7 -0
  31. package/components/ui/popover.js +82 -0
  32. package/components/ui/select.d.ts +15 -0
  33. package/components/ui/select.js +127 -0
  34. package/components/ui/sonner.d.ts +4 -0
  35. package/components/ui/sonner.js +54 -0
  36. package/components/ui/switch.d.ts +9 -0
  37. package/components/ui/switch.js +89 -0
  38. package/components/ui/table.d.ts +10 -0
  39. package/components/ui/table.js +101 -0
  40. package/global-modules/bank/actions.d.ts +200 -0
  41. package/global-modules/bank/actions.js +124 -0
  42. package/global-modules/bank/bank.d.ts +2 -0
  43. package/global-modules/bank/bank.js +87 -0
  44. package/global-modules/bank/constants.d.ts +45 -0
  45. package/global-modules/bank/constants.js +98 -0
  46. package/global-modules/bank/context.d.ts +41 -0
  47. package/global-modules/bank/context.js +419 -0
  48. package/global-modules/bank/drawer.d.ts +31 -0
  49. package/global-modules/bank/drawer.js +114 -0
  50. package/global-modules/bank/form.d.ts +22 -0
  51. package/global-modules/bank/form.js +68 -0
  52. package/global-modules/bank/reducer.d.ts +25 -0
  53. package/global-modules/bank/reducer.js +161 -0
  54. package/global-modules/bank/types.d.ts +217 -0
  55. package/global-modules/bank/types.js +81 -0
  56. package/global-modules/bank/validate.d.ts +13 -0
  57. package/global-modules/bank/validate.js +22 -0
  58. package/global-modules/branch/actions.d.ts +154 -37
  59. package/global-modules/branch/actions.js +148 -6
  60. package/global-modules/branch/branch.d.ts +2 -2
  61. package/global-modules/branch/branch.js +46 -32
  62. package/global-modules/branch/constants.d.ts +34 -24
  63. package/global-modules/branch/constants.js +101 -122
  64. package/global-modules/branch/context.d.ts +33 -2
  65. package/global-modules/branch/context.js +195 -164
  66. package/global-modules/branch/drawer.d.ts +26 -3
  67. package/global-modules/branch/drawer.js +101 -6
  68. package/global-modules/branch/form.d.ts +15 -1
  69. package/global-modules/branch/form.js +54 -71
  70. package/global-modules/branch/reducer.d.ts +23 -2
  71. package/global-modules/branch/reducer.js +148 -118
  72. package/global-modules/branch/types.d.ts +196 -69
  73. package/global-modules/branch/types.js +66 -7
  74. package/global-modules/branch/validate.d.ts +1 -1
  75. package/global-modules/branch/validate.js +15 -11
  76. package/global-modules/payment-mode/actions.d.ts +154 -37
  77. package/global-modules/payment-mode/actions.js +148 -6
  78. package/global-modules/payment-mode/constants.d.ts +34 -17
  79. package/global-modules/payment-mode/constants.js +90 -66
  80. package/global-modules/payment-mode/context.d.ts +33 -2
  81. package/global-modules/payment-mode/context.js +185 -163
  82. package/global-modules/payment-mode/drawer.d.ts +26 -3
  83. package/global-modules/payment-mode/drawer.js +104 -9
  84. package/global-modules/payment-mode/form.d.ts +16 -2
  85. package/global-modules/payment-mode/form.js +45 -74
  86. package/global-modules/payment-mode/payment-mode.d.ts +25 -2
  87. package/global-modules/payment-mode/payment-mode.js +90 -23
  88. package/global-modules/payment-mode/reducer.d.ts +23 -2
  89. package/global-modules/payment-mode/reducer.js +140 -114
  90. package/global-modules/payment-mode/types.d.ts +327 -112
  91. package/global-modules/payment-mode/types.js +162 -11
  92. package/global-modules/payment-mode/validate.d.ts +1 -1
  93. package/global-modules/payment-mode/validate.js +7 -5
  94. package/global-modules/preferences/actions.d.ts +126 -27
  95. package/global-modules/preferences/actions.js +128 -4
  96. package/global-modules/preferences/constants.d.ts +46 -31
  97. package/global-modules/preferences/constants.js +129 -66
  98. package/global-modules/preferences/context.d.ts +2 -2
  99. package/global-modules/preferences/context.js +43 -43
  100. package/global-modules/preferences/currency.js +15 -10
  101. package/global-modules/preferences/preferences.d.ts +2 -2
  102. package/global-modules/preferences/preferences.js +3 -5
  103. package/global-modules/preferences/validate.d.ts +1 -1
  104. package/global-modules/preferences/validate.js +7 -7
  105. package/global-modules/tax/actions.d.ts +155 -38
  106. package/global-modules/tax/actions.js +149 -7
  107. package/global-modules/tax/constants.d.ts +31 -39
  108. package/global-modules/tax/constants.js +83 -114
  109. package/global-modules/tax/context.d.ts +33 -2
  110. package/global-modules/tax/context.js +146 -132
  111. package/global-modules/tax/drawer.d.ts +26 -3
  112. package/global-modules/tax/drawer.js +101 -6
  113. package/global-modules/tax/form.d.ts +20 -3
  114. package/global-modules/tax/form.js +101 -74
  115. package/global-modules/tax/reducer.d.ts +23 -2
  116. package/global-modules/tax/reducer.js +143 -24
  117. package/global-modules/tax/tax.d.ts +25 -2
  118. package/global-modules/tax/tax.js +92 -28
  119. package/global-modules/tax/types.d.ts +332 -102
  120. package/global-modules/tax/types.js +179 -11
  121. package/global-modules/tax/validate.d.ts +1 -1
  122. package/global-modules/tax/validate.js +9 -8
  123. package/hooks/use-rtl.d.ts +44 -0
  124. package/hooks/use-rtl.js +75 -0
  125. package/lib/themes.d.ts +147 -0
  126. package/lib/themes.js +150 -0
  127. package/lib/toast-utils.d.ts +44 -0
  128. package/lib/toast-utils.js +212 -0
  129. package/lib/utils.d.ts +2 -0
  130. package/lib/utils.js +12 -0
  131. package/package.json +21 -4
  132. package/supabase/supabase.d.ts +80 -1
  133. package/supabase/supabase.js +281 -6
  134. package/global-modules/branch/form-elements.d.ts +0 -3
  135. package/global-modules/branch/form-elements.js +0 -41
  136. package/global-modules/payment-mode/form-elements.d.ts +0 -3
  137. package/global-modules/payment-mode/form-elements.js +0 -41
  138. package/global-modules/preferences/bank.d.ts +0 -2
  139. package/global-modules/preferences/bank.js +0 -11
  140. package/global-modules/preferences/branch-drawer.js +0 -36
  141. package/global-modules/preferences/branch-form-elements.js +0 -30
  142. package/global-modules/preferences/branch-form.d.ts +0 -0
  143. package/global-modules/preferences/branch-form.js +0 -33
  144. package/global-modules/preferences/branch.d.ts +0 -0
  145. package/global-modules/preferences/branch.js +0 -106
  146. package/global-modules/preferences/payment-mode-drawer.d.ts +0 -0
  147. package/global-modules/preferences/payment-mode-drawer.js +0 -36
  148. package/global-modules/preferences/payment-mode-form-elements.d.ts +0 -0
  149. package/global-modules/preferences/payment-mode-form-elements.js +0 -30
  150. package/global-modules/preferences/payment-mode-form.d.ts +0 -0
  151. package/global-modules/preferences/payment-mode-form.js +0 -33
  152. package/global-modules/preferences/payment-mode.d.ts +0 -0
  153. package/global-modules/preferences/payment-mode.js +0 -94
  154. package/global-modules/tax/form-elements.d.ts +0 -3
  155. package/global-modules/tax/form-elements.js +0 -41
  156. /package/{global-modules/preferences/branch-drawer.d.ts → constants.d.ts} +0 -0
  157. /package/{global-modules/preferences/branch-form-elements.d.ts → constants.js} +0 -0
@@ -1,50 +1,260 @@
1
- import { VistaTableHeaderActionItem } from '@appcorp/app-corp-vista/type/vista-table-type';
2
- import { RowActionItem } from '@appcorp/app-corp-vista/type/vista-dropdown-menu-type';
3
- import { TaxActions } from './actions';
4
- import { Dispatch } from 'react';
5
- import { VistaFormElements } from '@appcorp/app-corp-vista/type/vista-form-elements';
6
- export interface MenuItem {
7
- preferenceId: string;
8
- label: string;
9
- order: number;
10
- id: string;
1
+ /**
2
+ * Tax Module Types
3
+ *
4
+ * This module defines all TypeScript interfaces, types, and enums for the Tax feature.
5
+ * Provides type safety and clear contracts for all tax-related operations.
6
+ *
7
+ * Type Categories:
8
+ * - Context Types (React context and state management)
9
+ * - Entity Types (Backend data structures)
10
+ * - State Types (Frontend component state)
11
+ * - API Types (Request/response interfaces)
12
+ * - UI Types (Drawer and component enums)
13
+ * - Utility Types (Helper and computed types)
14
+ *
15
+ * Advanced Features:
16
+ * - Tax management with rate calculations
17
+ * - CRUD operations support
18
+ * - Enhanced search and pagination
19
+ *
20
+ * Naming Conventions:
21
+ * - Interfaces: PascalCase with descriptive suffixes (Type, State, Args)
22
+ * - Enums: UPPER_SNAKE_CASE for values, PascalCase for enum names
23
+ * - Types: PascalCase following interface conventions
24
+ */
25
+ import { Dispatch } from "react";
26
+ import { RowAction, HeaderAction } from "@/components/ui/enhanced-table";
27
+ import { TaxActions } from "./actions";
28
+ /**
29
+ * Tax Context Interface
30
+ *
31
+ * Defines the complete context API for tax state management.
32
+ * Includes all handlers, state getters, and utility functions.
33
+ */
34
+ export interface TaxContextType {
35
+ byIdError?: Error;
36
+ byIdLoading: boolean;
37
+ deleteError?: Error;
38
+ deleteLoading: boolean;
39
+ listError?: Error;
40
+ listLoading: boolean;
41
+ updateError?: Error;
42
+ updateLoading: boolean;
43
+ dispatch: Dispatch<TaxActions>;
44
+ handleInputChange: (key: string, value: string | boolean) => void;
45
+ handleNextClick: () => void;
46
+ handlePageLimit: (k: string, v: object) => void;
47
+ handlePreviousClick: () => void;
48
+ handleSubmit: () => void;
49
+ clearSearch: () => void;
50
+ closeDrawer: () => void;
51
+ searchOnChange: (k: string, v: string) => void;
52
+ headerActions: HeaderAction[];
53
+ rowActions: RowAction[];
11
54
  }
12
- export interface Tax {
13
- taxName: string;
14
- taxValue: string;
15
- id: string;
16
- description: string;
17
- preferenceId: string;
55
+ /**
56
+ * Tax Backend Entity
57
+ *
58
+ * Represents the complete tax data structure as received from the API.
59
+ * Includes all tax-specific fields and relationships.
60
+ */
61
+ export interface TaxTypeBE {
62
+ createdAt: string;
63
+ description?: string;
18
64
  enabled: boolean;
19
- errors: {
20
- [key: string]: string;
21
- };
22
- createdAt?: string;
23
- updatedAt?: string;
24
- loading: boolean;
65
+ id: string;
25
66
  isDefault: boolean;
26
- btnDisableTax: boolean;
67
+ preference: PreferenceTypeBE;
68
+ preferenceId: string;
69
+ taxName: string;
70
+ taxRate: string;
71
+ updatedAt: string;
27
72
  }
28
- export type TaxForm = Omit<TaxTypeBE, 'createdAt' | 'updatedAt' | 'preference'>;
73
+ /**
74
+ * Preference Backend Entity
75
+ *
76
+ * Represents preference data structure containing taxes.
77
+ */
78
+ export interface PreferenceTypeBE {
79
+ bankingDetails: BankingDetailTypeBE[];
80
+ branches: BranchTypeBE[];
81
+ createdAt: string;
82
+ currencies: CurrencyTypeBE[];
83
+ id: string;
84
+ menuOrder: MenuOrderTypeBE[];
85
+ onboarding: boolean;
86
+ paymentModes: PaymentModeTypeBE[];
87
+ taxes: TaxTypeBE[];
88
+ updatedAt: string;
89
+ }
90
+ /**
91
+ * Tax Component State
92
+ *
93
+ * Complete state interface for the tax module components.
94
+ * Extends entity data with UI state, form state, and search capabilities.
95
+ */
29
96
  export interface TaxState {
30
- count: number;
31
- currentPage: number;
32
97
  description: string;
33
- disableSaveButton: boolean;
34
- drawer: null | TAX_DRAWER;
35
98
  enabled: boolean;
36
- errors: {
37
- [key: string]: string;
38
- };
39
99
  id: string;
40
100
  isDefault: boolean;
41
- pageLimit: number;
42
101
  preferenceId: string;
43
- searchQuery: string;
44
102
  taxName: string;
45
103
  taxRate: string;
104
+ count: number;
46
105
  taxes: TaxTypeBE[];
106
+ currentPage: number;
107
+ pageLimit: number;
108
+ searchQuery: string;
109
+ disableSaveButton: boolean;
110
+ drawer: null | TAX_DRAWER;
111
+ errors: Record<string, string>;
112
+ }
113
+ /**
114
+ * Fetch Taxes API Arguments
115
+ *
116
+ * Parameters for tax list API requests.
117
+ * Supports pagination and search functionality.
118
+ */
119
+ export interface FetchTaxesArgs {
120
+ currentPage: number;
121
+ pageLimit: number;
122
+ searchQuery?: string;
123
+ }
124
+ /**
125
+ * Tax API Response
126
+ *
127
+ * Standard API response format for tax operations.
128
+ */
129
+ export interface TaxApiResponse {
130
+ data?: TaxTypeBE[];
131
+ count?: number;
132
+ error?: string;
133
+ success: boolean;
134
+ }
135
+ /**
136
+ * Single Tax API Response
137
+ *
138
+ * API response format for individual tax operations.
139
+ */
140
+ export interface SingleTaxApiResponse {
141
+ data?: TaxTypeBE;
142
+ error?: string;
143
+ success: boolean;
144
+ }
145
+ /**
146
+ * Update Tax Arguments
147
+ *
148
+ * Parameters for tax update operations.
149
+ */
150
+ export interface UpdateTaxArgs {
151
+ id: string;
152
+ enabled: boolean;
153
+ }
154
+ /**
155
+ * Tax Drawer Types
156
+ *
157
+ * Enumeration of all available drawer states for tax UI.
158
+ */
159
+ export declare enum TAX_DRAWER {
160
+ FORM_DRAWER = "FORM_DRAWER"
47
161
  }
162
+ /**
163
+ * Payment Types
164
+ *
165
+ * Enumeration of payment type classifications.
166
+ */
167
+ export declare enum PAYMENT_TYPE {
168
+ FULL_PAYMENT = "FULL_PAYMENT",
169
+ PARTIAL_PAYMENT = "PARTIAL_PAYMENT"
170
+ }
171
+ /**
172
+ * Tax Form Fields
173
+ *
174
+ * Utility type for tax form field keys.
175
+ * Useful for form validation and dynamic field handling.
176
+ */
177
+ export type TaxFormFields = keyof Omit<TaxTypeBE, "id" | "createdAt" | "updatedAt" | "preference">;
178
+ /**
179
+ * Tax Required Fields
180
+ *
181
+ * Fields that are mandatory for tax creation.
182
+ */
183
+ export type TaxRequiredFields = "taxName" | "taxRate" | "preferenceId";
184
+ /**
185
+ * Tax Optional Fields
186
+ *
187
+ * Fields that are optional for tax creation.
188
+ */
189
+ export type TaxOptionalFields = "description" | "enabled" | "isDefault";
190
+ /**
191
+ * Tax Search Fields
192
+ *
193
+ * Fields that can be used for searching taxes.
194
+ */
195
+ export type TaxSearchFields = "taxName" | "description";
196
+ /**
197
+ * Tax Sort Fields
198
+ *
199
+ * Fields that can be used for sorting tax lists.
200
+ */
201
+ export type TaxSortFields = "taxName" | "taxRate" | "createdAt" | "enabled" | "isDefault";
202
+ /**
203
+ * Partial Tax Update
204
+ *
205
+ * Type for partial tax updates (PATCH operations).
206
+ */
207
+ export type PartialTaxUpdate = Partial<Omit<TaxTypeBE, "id" | "createdAt" | "updatedAt">>;
208
+ /**
209
+ * Tax Form Data
210
+ *
211
+ * Type for tax form data (excludes backend-only fields).
212
+ */
213
+ export type TaxForm = Omit<TaxTypeBE, "createdAt" | "updatedAt" | "preference">;
214
+ /**
215
+ * Type guard to check if object is a valid TaxTypeBE
216
+ */
217
+ export declare const isTaxTypeBE: (obj: unknown) => obj is TaxTypeBE;
218
+ /**
219
+ * Type guard to check if string is a valid tax drawer type
220
+ */
221
+ export declare const isTaxDrawer: (value: string) => value is TAX_DRAWER;
222
+ /**
223
+ * Type guard to check if string is a valid payment type
224
+ */
225
+ export declare const isPaymentType: (value: string) => value is PAYMENT_TYPE;
226
+ /**
227
+ * Type guard to check if object has valid tax filter structure
228
+ */
229
+ export declare const isFetchTaxesArgs: (obj: unknown) => obj is FetchTaxesArgs;
230
+ /**
231
+ * Check if tax is enabled
232
+ */
233
+ export declare const isTaxEnabled: (tax: TaxTypeBE) => boolean;
234
+ /**
235
+ * Check if tax is default
236
+ */
237
+ export declare const isTaxDefault: (tax: TaxTypeBE) => boolean;
238
+ /**
239
+ * Get tax display name
240
+ */
241
+ export declare const getTaxDisplayName: (tax: TaxTypeBE) => string;
242
+ /**
243
+ * Get tax rate as number
244
+ */
245
+ export declare const getTaxRateAsNumber: (tax: TaxTypeBE) => number;
246
+ /**
247
+ * Calculate tax amount
248
+ */
249
+ export declare const calculateTaxAmount: (amount: number, tax: TaxTypeBE) => number;
250
+ /**
251
+ * Format tax rate for display
252
+ */
253
+ export declare const formatTaxRate: (tax: TaxTypeBE) => string;
254
+ /**
255
+ * Legacy Banking Detail Type
256
+ * TODO: Move to banking-details module
257
+ */
48
258
  export interface BankingDetailTypeBE {
49
259
  accountNumber: string;
50
260
  accountTitle: string;
@@ -60,6 +270,10 @@ export interface BankingDetailTypeBE {
60
270
  swiftCode?: string;
61
271
  updatedAt: string;
62
272
  }
273
+ /**
274
+ * Legacy Branch Type
275
+ * TODO: Move to branches module
276
+ */
63
277
  export interface BranchTypeBE {
64
278
  branchAddress: string;
65
279
  branchName: string;
@@ -74,6 +288,10 @@ export interface BranchTypeBE {
74
288
  preferenceId: string;
75
289
  updatedAt: string;
76
290
  }
291
+ /**
292
+ * Legacy Currency Type
293
+ * TODO: Move to currencies module
294
+ */
77
295
  export interface CurrencyTypeBE {
78
296
  code: string;
79
297
  createdAt: string;
@@ -85,6 +303,10 @@ export interface CurrencyTypeBE {
85
303
  preferenceId: string;
86
304
  updatedAt: string;
87
305
  }
306
+ /**
307
+ * Legacy Menu Order Type
308
+ * TODO: Move to preferences module
309
+ */
88
310
  export interface MenuOrderTypeBE {
89
311
  createdAt: string;
90
312
  id: string;
@@ -94,10 +316,25 @@ export interface MenuOrderTypeBE {
94
316
  preferenceId: string;
95
317
  updatedAt: string;
96
318
  }
97
- export declare enum PAYMENT_TYPE {
98
- FULL_PAYMENT = "FULL_PAYMENT",
99
- PARTIAL_PAYMENT = "PARTIAL_PAYMENT"
319
+ /**
320
+ * Legacy Payment Mode Type
321
+ * TODO: Move to payment-modes module
322
+ */
323
+ export interface PaymentModeTypeBE {
324
+ createdAt: string;
325
+ enabled: boolean;
326
+ id: string;
327
+ isDefault: boolean;
328
+ label: string;
329
+ payments?: PaymentTypeBE[];
330
+ preference?: PreferenceTypeBE;
331
+ preferenceId: string;
332
+ updatedAt: string;
100
333
  }
334
+ /**
335
+ * Legacy Payment Type
336
+ * TODO: Move to payments module
337
+ */
101
338
  export interface PaymentTypeBE {
102
339
  amount: string;
103
340
  attachment?: string;
@@ -115,62 +352,52 @@ export interface PaymentTypeBE {
115
352
  ref: string;
116
353
  updatedAt: string;
117
354
  }
118
- export interface PaymentModeTypeBE {
119
- createdAt: string;
120
- enabled: boolean;
355
+ /**
356
+ * Legacy Tax Interface
357
+ * TODO: Move to taxes module (current module)
358
+ */
359
+ export interface Tax {
360
+ taxName: string;
361
+ taxValue: string;
121
362
  id: string;
122
- isDefault: boolean;
123
- label: string;
124
- payments?: PaymentTypeBE[];
125
- preference?: PreferenceTypeBE;
363
+ description: string;
126
364
  preferenceId: string;
127
- updatedAt: string;
128
- }
129
- export interface TaxTypeBE {
130
- createdAt: string;
131
- description?: string;
132
365
  enabled: boolean;
133
- id: string;
366
+ errors: {
367
+ [key: string]: string;
368
+ };
369
+ createdAt?: string;
370
+ updatedAt?: string;
371
+ loading: boolean;
134
372
  isDefault: boolean;
135
- preference: PreferenceTypeBE;
136
- preferenceId: string;
137
- taxName: string;
138
- taxRate: string;
139
- updatedAt: string;
373
+ btnDisableTax: boolean;
140
374
  }
141
- export interface PreferenceTypeBE {
142
- bankingDetails: BankingDetailTypeBE[];
143
- branches: BranchTypeBE[];
144
- createdAt: string;
145
- currencies: CurrencyTypeBE[];
375
+ /**
376
+ * Legacy Menu Item Interface
377
+ * TODO: Move to preferences module
378
+ */
379
+ export interface MenuItem {
380
+ preferenceId: string;
381
+ label: string;
382
+ order: number;
146
383
  id: string;
147
- menuOrder: MenuOrderTypeBE[];
148
- onboarding: boolean;
149
- paymentModes: PaymentModeTypeBE[];
150
- taxes: TaxTypeBE[];
151
- updatedAt: string;
152
- }
153
- export interface TaxContextType {
154
- byIdError?: Error;
155
- byIdLoading: boolean;
156
- clearSearch: () => void;
157
- closeDrawer: () => void;
158
- deleteError?: Error;
159
- deleteLoading: boolean;
160
- dispatch: Dispatch<TaxActions>;
161
- dynamicFormElements: VistaFormElements;
162
- handleNextClick: () => void;
163
- handlePageLimit: (k: string, v: object) => void;
164
- handlePreviousClick: () => void;
165
- handleSubmit: () => void;
166
- headerActions: VistaTableHeaderActionItem[];
167
- listError?: Error;
168
- listLoading: boolean;
169
- rowActions: RowActionItem[];
170
- searchOnChange: (k: string, v: string) => void;
171
- updateError?: Error;
172
- updateLoading: boolean;
173
384
  }
385
+ /**
386
+ * Legacy Currency Args
387
+ * TODO: Move to currencies module
388
+ */
389
+ export type CurrencyArgs = {
390
+ id: string;
391
+ label: string;
392
+ enabled: boolean;
393
+ code: string;
394
+ isDefault: boolean;
395
+ preferenceId: string;
396
+ };
397
+ /**
398
+ * Legacy Create Bank Detail Args
399
+ * TODO: Move to banking-details module
400
+ */
174
401
  export interface CreateBankDetailArg {
175
402
  id: string;
176
403
  accountNumber: string;
@@ -187,6 +414,10 @@ export interface CreateBankDetailArg {
187
414
  loading: boolean;
188
415
  isDefault: boolean;
189
416
  }
417
+ /**
418
+ * Legacy Create Branches Args
419
+ * TODO: Move to branches module
420
+ */
190
421
  export interface createBranchesArgs {
191
422
  personName: string;
192
423
  personEmail: string;
@@ -204,6 +435,10 @@ export interface createBranchesArgs {
204
435
  loading: boolean;
205
436
  isDefault: boolean;
206
437
  }
438
+ /**
439
+ * Legacy Create Taxes Args
440
+ * TODO: Move to taxes module (current module)
441
+ */
207
442
  export interface createTaxesArgs {
208
443
  taxName: string;
209
444
  taxValue: string;
@@ -219,24 +454,18 @@ export interface createTaxesArgs {
219
454
  loading: boolean;
220
455
  isDefault: boolean;
221
456
  }
457
+ /**
458
+ * Legacy Update Payment Mode Args
459
+ * TODO: Move to payment-modes module
460
+ */
222
461
  export interface updatePaymentModeArgs {
223
462
  id: string;
224
463
  enabled: boolean;
225
464
  }
226
- export interface MenuItem {
227
- preferenceId: string;
228
- label: string;
229
- order: number;
230
- id: string;
231
- }
232
- export type CurrencyArgs = {
233
- id: string;
234
- label: string;
235
- enabled: boolean;
236
- code: string;
237
- isDefault: boolean;
238
- preferenceId: string;
239
- };
465
+ /**
466
+ * Legacy Update Currency Args
467
+ * TODO: Move to currencies module
468
+ */
240
469
  export interface updateCurrencyArgs {
241
470
  id: string;
242
471
  label: string;
@@ -245,9 +474,10 @@ export interface updateCurrencyArgs {
245
474
  isDefault: boolean;
246
475
  preferenceId: string;
247
476
  }
248
- export declare enum TAX_DRAWER {
249
- FORM_DRAWER = "FORM_DRAWER"
250
- }
477
+ /**
478
+ * Legacy Preference Modal Enum
479
+ * TODO: Move to preferences module
480
+ */
251
481
  export declare enum PREFERENCE_MODAL {
252
482
  DUMMY = "DUMMY"
253
483
  }