@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.
- package/global-modules/bank/bank.d.ts +7 -1
- package/global-modules/bank/bank.js +5 -19
- package/global-modules/bank/constants.js +5 -5
- package/global-modules/bank/context.js +39 -41
- package/global-modules/bank/drawer.d.ts +0 -4
- package/global-modules/bank/drawer.js +8 -6
- package/global-modules/bank/form.d.ts +0 -3
- package/global-modules/bank/form.js +16 -13
- package/global-modules/bank/types.d.ts +2 -22
- package/global-modules/bank/validate.js +2 -2
- package/global-modules/branch/branch.d.ts +7 -1
- package/global-modules/branch/branch.js +6 -16
- package/global-modules/branch/constants.js +1 -1
- package/global-modules/branch/context.js +35 -21
- package/global-modules/branch/drawer.d.ts +0 -4
- package/global-modules/branch/drawer.js +8 -6
- package/global-modules/branch/form.d.ts +0 -3
- package/global-modules/branch/form.js +11 -12
- package/global-modules/branch/types.d.ts +9 -106
- package/global-modules/branch/validate.js +6 -6
- package/global-modules/currency/actions.d.ts +203 -0
- package/global-modules/currency/actions.js +153 -0
- package/global-modules/currency/constants.d.ts +33 -0
- package/global-modules/currency/constants.js +71 -0
- package/global-modules/currency/context.d.ts +41 -0
- package/global-modules/currency/context.js +422 -0
- package/global-modules/currency/currency.d.ts +8 -0
- package/global-modules/currency/currency.js +57 -0
- package/global-modules/currency/drawer.d.ts +27 -0
- package/global-modules/currency/drawer.js +76 -0
- package/global-modules/currency/form.d.ts +19 -0
- package/global-modules/currency/form.js +52 -0
- package/global-modules/currency/reducer.d.ts +25 -0
- package/global-modules/currency/reducer.js +153 -0
- package/global-modules/currency/types.d.ts +163 -0
- package/global-modules/currency/types.js +44 -0
- package/global-modules/currency/validate.d.ts +9 -0
- package/global-modules/currency/validate.js +18 -0
- package/global-modules/payment-mode/constants.js +1 -1
- package/global-modules/payment-mode/context.js +7 -9
- package/global-modules/payment-mode/drawer.d.ts +0 -4
- package/global-modules/payment-mode/drawer.js +8 -6
- package/global-modules/payment-mode/form.d.ts +0 -3
- package/global-modules/payment-mode/form.js +6 -7
- package/global-modules/payment-mode/payment-mode.d.ts +1 -1
- package/global-modules/payment-mode/payment-mode.js +38 -38
- package/global-modules/payment-mode/types.d.ts +12 -223
- package/global-modules/payment-mode/types.js +1 -9
- package/global-modules/payment-mode/validate.js +2 -2
- package/global-modules/preferences/constants.d.ts +0 -4
- package/global-modules/preferences/constants.js +14 -17
- package/global-modules/preferences/context.js +2 -1
- package/global-modules/preferences/preferences.js +2 -6
- package/global-modules/preferences/types.d.ts +14 -240
- package/global-modules/preferences/types.js +3 -6
- package/global-modules/tax/constants.js +1 -1
- package/global-modules/tax/context.js +8 -4
- package/global-modules/tax/drawer.d.ts +0 -4
- package/global-modules/tax/drawer.js +8 -6
- package/global-modules/tax/form.d.ts +0 -4
- package/global-modules/tax/form.js +6 -7
- package/global-modules/tax/tax.d.ts +1 -1
- package/global-modules/tax/tax.js +37 -37
- package/global-modules/tax/types.d.ts +9 -254
- package/global-modules/tax/types.js +1 -9
- package/i18n/routing.d.ts +1 -1
- package/package.json +3 -3
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
import { Dispatch } from "react";
|
|
26
26
|
import { RowAction, HeaderAction } from "@appcorp/shadcn/components/enhanced-table";
|
|
27
27
|
import { TaxActions } 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
|
* Tax Context Interface
|
|
30
31
|
*
|
|
@@ -58,35 +59,13 @@ export interface TaxContextType {
|
|
|
58
59
|
* Represents the complete tax data structure as received from the API.
|
|
59
60
|
* Includes all tax-specific fields and relationships.
|
|
60
61
|
*/
|
|
61
|
-
export
|
|
62
|
-
createdAt: string;
|
|
63
|
-
description?: string;
|
|
64
|
-
enabled: boolean;
|
|
65
|
-
id: string;
|
|
66
|
-
isDefault: boolean;
|
|
67
|
-
preference: PreferenceTypeBE;
|
|
68
|
-
preferenceId: string;
|
|
69
|
-
taxName: string;
|
|
70
|
-
taxRate: string;
|
|
71
|
-
updatedAt: string;
|
|
72
|
-
}
|
|
62
|
+
export type { TaxTypeBE };
|
|
73
63
|
/**
|
|
74
64
|
* Preference Backend Entity
|
|
75
65
|
*
|
|
76
66
|
* Represents preference data structure containing taxes.
|
|
77
67
|
*/
|
|
78
|
-
export
|
|
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
|
-
}
|
|
68
|
+
export type { PreferenceTypeBE };
|
|
90
69
|
/**
|
|
91
70
|
* Tax Component State
|
|
92
71
|
*
|
|
@@ -251,233 +230,9 @@ export declare const calculateTaxAmount: (amount: number, tax: TaxTypeBE) => num
|
|
|
251
230
|
* Format tax rate for display
|
|
252
231
|
*/
|
|
253
232
|
export declare const formatTaxRate: (tax: TaxTypeBE) => string;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
export
|
|
259
|
-
|
|
260
|
-
accountTitle: string;
|
|
261
|
-
bankAddress?: string;
|
|
262
|
-
bankName: string;
|
|
263
|
-
createdAt: string;
|
|
264
|
-
enabled: boolean;
|
|
265
|
-
iban?: string;
|
|
266
|
-
id: string;
|
|
267
|
-
isDefault: boolean;
|
|
268
|
-
preference: PreferenceTypeBE;
|
|
269
|
-
preferenceId: string;
|
|
270
|
-
swiftCode?: string;
|
|
271
|
-
updatedAt: string;
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Legacy Branch Type
|
|
275
|
-
* TODO: Move to branches module
|
|
276
|
-
*/
|
|
277
|
-
export interface BranchTypeBE {
|
|
278
|
-
branchAddress: string;
|
|
279
|
-
branchName: string;
|
|
280
|
-
createdAt: string;
|
|
281
|
-
enabled: boolean;
|
|
282
|
-
id: string;
|
|
283
|
-
isDefault: boolean;
|
|
284
|
-
personEmail: string;
|
|
285
|
-
personName: string;
|
|
286
|
-
personPhone: string;
|
|
287
|
-
preference: PreferenceTypeBE;
|
|
288
|
-
preferenceId: string;
|
|
289
|
-
updatedAt: string;
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Legacy Currency Type
|
|
293
|
-
* TODO: Move to currencies module
|
|
294
|
-
*/
|
|
295
|
-
export interface CurrencyTypeBE {
|
|
296
|
-
code: string;
|
|
297
|
-
createdAt: string;
|
|
298
|
-
enabled: boolean;
|
|
299
|
-
id: string;
|
|
300
|
-
isDefault: boolean;
|
|
301
|
-
label: string;
|
|
302
|
-
preference?: PreferenceTypeBE;
|
|
303
|
-
preferenceId: string;
|
|
304
|
-
updatedAt: string;
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* Legacy Menu Order Type
|
|
308
|
-
* TODO: Move to preferences module
|
|
309
|
-
*/
|
|
310
|
-
export interface MenuOrderTypeBE {
|
|
311
|
-
createdAt: string;
|
|
312
|
-
id: string;
|
|
313
|
-
label: string;
|
|
314
|
-
order: number;
|
|
315
|
-
preference: PreferenceTypeBE;
|
|
316
|
-
preferenceId: string;
|
|
317
|
-
updatedAt: string;
|
|
318
|
-
}
|
|
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;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Legacy Payment Type
|
|
336
|
-
* TODO: Move to payments module
|
|
337
|
-
*/
|
|
338
|
-
export interface PaymentTypeBE {
|
|
339
|
-
amount: string;
|
|
340
|
-
attachment?: string;
|
|
341
|
-
balance: string;
|
|
342
|
-
createdAt: string;
|
|
343
|
-
currency: string;
|
|
344
|
-
date: string;
|
|
345
|
-
description?: string;
|
|
346
|
-
id: string;
|
|
347
|
-
paymentMode?: PaymentModeTypeBE;
|
|
348
|
-
paymentModeId: string;
|
|
349
|
-
paymentType: PAYMENT_TYPE;
|
|
350
|
-
quoteInvoice?: undefined;
|
|
351
|
-
quoteInvoiceId: string;
|
|
352
|
-
ref: string;
|
|
353
|
-
updatedAt: string;
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* Legacy Tax Interface
|
|
357
|
-
* TODO: Move to taxes module (current module)
|
|
358
|
-
*/
|
|
359
|
-
export interface Tax {
|
|
360
|
-
taxName: string;
|
|
361
|
-
taxValue: string;
|
|
362
|
-
id: string;
|
|
363
|
-
description: string;
|
|
364
|
-
preferenceId: string;
|
|
365
|
-
enabled: boolean;
|
|
366
|
-
errors: {
|
|
367
|
-
[key: string]: string;
|
|
368
|
-
};
|
|
369
|
-
createdAt?: string;
|
|
370
|
-
updatedAt?: string;
|
|
371
|
-
loading: boolean;
|
|
372
|
-
isDefault: boolean;
|
|
373
|
-
btnDisableTax: boolean;
|
|
374
|
-
}
|
|
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;
|
|
383
|
-
id: string;
|
|
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
|
-
*/
|
|
401
|
-
export interface CreateBankDetailArg {
|
|
402
|
-
id: string;
|
|
403
|
-
accountNumber: string;
|
|
404
|
-
accountTitle: string;
|
|
405
|
-
bankAddress: string;
|
|
406
|
-
bankName: string;
|
|
407
|
-
enabled: boolean;
|
|
408
|
-
iban: string;
|
|
409
|
-
swiftCode: string;
|
|
410
|
-
preferenceId: string;
|
|
411
|
-
errors: {
|
|
412
|
-
[key: string]: string;
|
|
413
|
-
};
|
|
414
|
-
loading: boolean;
|
|
415
|
-
isDefault: boolean;
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
* Legacy Create Branches Args
|
|
419
|
-
* TODO: Move to branches module
|
|
420
|
-
*/
|
|
421
|
-
export interface createBranchesArgs {
|
|
422
|
-
personName: string;
|
|
423
|
-
personEmail: string;
|
|
424
|
-
id: string;
|
|
425
|
-
personPhone: string;
|
|
426
|
-
branchAddress: string;
|
|
427
|
-
branchName: string;
|
|
428
|
-
preferenceId: string;
|
|
429
|
-
enabled: boolean;
|
|
430
|
-
errors: {
|
|
431
|
-
[key: string]: string;
|
|
432
|
-
};
|
|
433
|
-
createdAt?: string;
|
|
434
|
-
updatedAt?: string;
|
|
435
|
-
loading: boolean;
|
|
436
|
-
isDefault: boolean;
|
|
437
|
-
}
|
|
438
|
-
/**
|
|
439
|
-
* Legacy Create Taxes Args
|
|
440
|
-
* TODO: Move to taxes module (current module)
|
|
441
|
-
*/
|
|
442
|
-
export interface createTaxesArgs {
|
|
443
|
-
taxName: string;
|
|
444
|
-
taxValue: string;
|
|
445
|
-
id: string;
|
|
446
|
-
description: string;
|
|
447
|
-
preferenceId: string;
|
|
448
|
-
enabled: boolean;
|
|
449
|
-
errors: {
|
|
450
|
-
[key: string]: string;
|
|
451
|
-
};
|
|
452
|
-
createdAt?: string;
|
|
453
|
-
updatedAt?: string;
|
|
454
|
-
loading: boolean;
|
|
455
|
-
isDefault: boolean;
|
|
456
|
-
}
|
|
457
|
-
/**
|
|
458
|
-
* Legacy Update Payment Mode Args
|
|
459
|
-
* TODO: Move to payment-modes module
|
|
460
|
-
*/
|
|
461
|
-
export interface updatePaymentModeArgs {
|
|
462
|
-
id: string;
|
|
463
|
-
enabled: boolean;
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* Legacy Update Currency Args
|
|
467
|
-
* TODO: Move to currencies module
|
|
468
|
-
*/
|
|
469
|
-
export interface updateCurrencyArgs {
|
|
470
|
-
id: string;
|
|
471
|
-
label: string;
|
|
472
|
-
enabled: boolean;
|
|
473
|
-
code: string;
|
|
474
|
-
isDefault: boolean;
|
|
475
|
-
preferenceId: string;
|
|
476
|
-
}
|
|
477
|
-
/**
|
|
478
|
-
* Legacy Preference Modal Enum
|
|
479
|
-
* TODO: Move to preferences module
|
|
480
|
-
*/
|
|
481
|
-
export declare enum PREFERENCE_MODAL {
|
|
482
|
-
DUMMY = "DUMMY"
|
|
483
|
-
}
|
|
233
|
+
export type { BankTypeBE };
|
|
234
|
+
export type { BranchTypeBE };
|
|
235
|
+
export type { CurrencyTypeBE };
|
|
236
|
+
export type { MenuOrderTypeBE };
|
|
237
|
+
export type { PaymentTypeBE };
|
|
238
|
+
export type { PaymentModeTypeBE };
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* - Types: PascalCase following interface conventions
|
|
25
25
|
*/
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.
|
|
27
|
+
exports.formatTaxRate = exports.calculateTaxAmount = exports.getTaxRateAsNumber = exports.getTaxDisplayName = exports.isTaxDefault = exports.isTaxEnabled = exports.isFetchTaxesArgs = exports.isPaymentType = exports.isTaxDrawer = exports.isTaxTypeBE = exports.PAYMENT_TYPE = exports.TAX_DRAWER = void 0;
|
|
28
28
|
// ============================================================================
|
|
29
29
|
// UI ENUMS (Component State Definitions)
|
|
30
30
|
// ============================================================================
|
|
@@ -133,14 +133,6 @@ var formatTaxRate = function (tax) {
|
|
|
133
133
|
return "".concat(tax.taxRate, "%");
|
|
134
134
|
};
|
|
135
135
|
exports.formatTaxRate = formatTaxRate;
|
|
136
|
-
/**
|
|
137
|
-
* Legacy Preference Modal Enum
|
|
138
|
-
* TODO: Move to preferences module
|
|
139
|
-
*/
|
|
140
|
-
var PREFERENCE_MODAL;
|
|
141
|
-
(function (PREFERENCE_MODAL) {
|
|
142
|
-
PREFERENCE_MODAL["DUMMY"] = "DUMMY";
|
|
143
|
-
})(PREFERENCE_MODAL || (exports.PREFERENCE_MODAL = PREFERENCE_MODAL = {}));
|
|
144
136
|
// ============================================================================
|
|
145
137
|
// OPTIMIZATION SUMMARY
|
|
146
138
|
// ============================================================================
|
package/i18n/routing.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export declare const routing: {
|
|
|
4
4
|
localePrefix?: import("next-intl/routing").LocalePrefix<readonly ["en", "ur"], "as-needed"> | undefined;
|
|
5
5
|
domains?: undefined;
|
|
6
6
|
localeCookie?: boolean | {
|
|
7
|
-
path?: string | undefined | undefined;
|
|
8
7
|
name?: string | undefined;
|
|
8
|
+
path?: string | undefined | undefined;
|
|
9
9
|
maxAge?: number | undefined | undefined;
|
|
10
10
|
priority?: "low" | "medium" | "high" | undefined | undefined;
|
|
11
11
|
domain?: string | undefined | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appcorp/stellar-solutions-modules",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.58",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"automate": "./automate.sh",
|
|
6
6
|
"build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib && cp yarn.lock lib",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@appcorp/app-corp-vista": "^0.3.47",
|
|
23
|
-
"@appcorp/shadcn": "^1.0.
|
|
23
|
+
"@appcorp/shadcn": "^1.0.23",
|
|
24
24
|
"@dnd-kit/core": "^6.3.1",
|
|
25
25
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
26
26
|
"@eslint/eslintrc": "^3",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@radix-ui/react-separator": "^1.1.7",
|
|
35
35
|
"@radix-ui/react-slot": "^1.2.3",
|
|
36
36
|
"@radix-ui/react-switch": "^1.2.6",
|
|
37
|
-
"@react-pakistan/util-functions": "^1.24.
|
|
37
|
+
"@react-pakistan/util-functions": "^1.24.64",
|
|
38
38
|
"@supabase/supabase-js": "^2",
|
|
39
39
|
"@tailwindcss/forms": "^0",
|
|
40
40
|
"@tailwindcss/postcss": "^4",
|