@appcorp/stellar-solutions-modules 0.1.56 → 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/types.d.ts +2 -22
- package/global-modules/branch/types.d.ts +9 -106
- 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/types.d.ts +12 -223
- package/global-modules/payment-mode/types.js +1 -9
- package/global-modules/preferences/context.js +2 -1
- package/global-modules/preferences/types.d.ts +14 -240
- package/global-modules/preferences/types.js +3 -6
- package/global-modules/tax/context.js +3 -2
- 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 +2 -2
|
@@ -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.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
|
// ============================================================================
|
|
@@ -82,9 +82,10 @@ var usePreferenceState = function () {
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
var updateParams = (0, react_1.useMemo)(function () { return ({
|
|
85
|
-
|
|
85
|
+
banks: [],
|
|
86
86
|
bankingDetails: [],
|
|
87
87
|
branches: [],
|
|
88
|
+
currencies: [],
|
|
88
89
|
id: "",
|
|
89
90
|
menuOrder: [],
|
|
90
91
|
onboarding: false,
|
|
@@ -1,67 +1,8 @@
|
|
|
1
|
-
import { PreferenceActions } from
|
|
2
|
-
import { Dispatch } from
|
|
3
|
-
import { VistaDashboardTabNavigatorListItem } from
|
|
4
|
-
import { Currency } from
|
|
5
|
-
|
|
6
|
-
preferenceId: string;
|
|
7
|
-
label: string;
|
|
8
|
-
order: number;
|
|
9
|
-
id: string;
|
|
10
|
-
}
|
|
11
|
-
export interface BankDetails {
|
|
12
|
-
accountTitle: string;
|
|
13
|
-
accountNumber: string;
|
|
14
|
-
iban: string;
|
|
15
|
-
id: string;
|
|
16
|
-
swiftCode: string;
|
|
17
|
-
bankAddress: string;
|
|
18
|
-
bankName: string;
|
|
19
|
-
preferenceId: string;
|
|
20
|
-
enabled: boolean;
|
|
21
|
-
errors: {
|
|
22
|
-
[key: string]: string;
|
|
23
|
-
};
|
|
24
|
-
createdAt?: string;
|
|
25
|
-
updatedAt?: string;
|
|
26
|
-
loading: boolean;
|
|
27
|
-
isDefault: boolean;
|
|
28
|
-
btnDisableBankDetail: boolean;
|
|
29
|
-
}
|
|
30
|
-
export interface Branches {
|
|
31
|
-
personName: string;
|
|
32
|
-
personEmail: string;
|
|
33
|
-
id: string;
|
|
34
|
-
personPhone: string;
|
|
35
|
-
branchAddress: string;
|
|
36
|
-
branchName: string;
|
|
37
|
-
preferenceId: string;
|
|
38
|
-
enabled: boolean;
|
|
39
|
-
errors: {
|
|
40
|
-
[key: string]: string;
|
|
41
|
-
};
|
|
42
|
-
createdAt?: string;
|
|
43
|
-
updatedAt?: string;
|
|
44
|
-
loading: boolean;
|
|
45
|
-
isDefault: boolean;
|
|
46
|
-
btnDisableBranches: boolean;
|
|
47
|
-
}
|
|
48
|
-
export interface Tax {
|
|
49
|
-
taxName: string;
|
|
50
|
-
taxValue: string;
|
|
51
|
-
id: string;
|
|
52
|
-
description: string;
|
|
53
|
-
preferenceId: string;
|
|
54
|
-
enabled: boolean;
|
|
55
|
-
errors: {
|
|
56
|
-
[key: string]: string;
|
|
57
|
-
};
|
|
58
|
-
createdAt?: string;
|
|
59
|
-
updatedAt?: string;
|
|
60
|
-
loading: boolean;
|
|
61
|
-
isDefault: boolean;
|
|
62
|
-
btnDisableTax: boolean;
|
|
63
|
-
}
|
|
64
|
-
export type TaxForm = Omit<TaxTypeBE, 'createdAt' | 'updatedAt' | 'preference'>;
|
|
1
|
+
import { PreferenceActions } from "./actions";
|
|
2
|
+
import { Dispatch } from "react";
|
|
3
|
+
import { VistaDashboardTabNavigatorListItem } from "@appcorp/app-corp-vista/type/vista-dashboard-tab-navigator-type";
|
|
4
|
+
import { Currency } from "@react-pakistan/util-functions";
|
|
5
|
+
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";
|
|
65
6
|
export interface PreferenceState {
|
|
66
7
|
activeTab: string;
|
|
67
8
|
currencies: CurrencyTypeBE[];
|
|
@@ -73,111 +14,18 @@ export interface PreferenceState {
|
|
|
73
14
|
};
|
|
74
15
|
preferences: PreferenceTypeBE[];
|
|
75
16
|
}
|
|
76
|
-
export
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
id: string;
|
|
85
|
-
isDefault: boolean;
|
|
86
|
-
preference: PreferenceTypeBE;
|
|
87
|
-
preferenceId: string;
|
|
88
|
-
swiftCode?: string;
|
|
89
|
-
updatedAt: string;
|
|
90
|
-
}
|
|
91
|
-
export interface BranchTypeBE {
|
|
92
|
-
branchAddress: string;
|
|
93
|
-
branchName: string;
|
|
94
|
-
createdAt: string;
|
|
95
|
-
enabled: boolean;
|
|
96
|
-
id: string;
|
|
97
|
-
isDefault: boolean;
|
|
98
|
-
personEmail: string;
|
|
99
|
-
personName: string;
|
|
100
|
-
personPhone: string;
|
|
101
|
-
preference: PreferenceTypeBE;
|
|
102
|
-
preferenceId: string;
|
|
103
|
-
updatedAt: string;
|
|
104
|
-
}
|
|
105
|
-
export interface CurrencyTypeBE {
|
|
106
|
-
code: string;
|
|
107
|
-
createdAt: string;
|
|
108
|
-
enabled: boolean;
|
|
109
|
-
id: string;
|
|
110
|
-
isDefault: boolean;
|
|
111
|
-
label: string;
|
|
112
|
-
preference?: PreferenceTypeBE;
|
|
113
|
-
preferenceId: string;
|
|
114
|
-
updatedAt: string;
|
|
115
|
-
}
|
|
116
|
-
export interface MenuOrderTypeBE {
|
|
117
|
-
createdAt: string;
|
|
118
|
-
id: string;
|
|
119
|
-
label: string;
|
|
120
|
-
order: number;
|
|
121
|
-
preference: PreferenceTypeBE;
|
|
122
|
-
preferenceId: string;
|
|
123
|
-
updatedAt: string;
|
|
124
|
-
}
|
|
17
|
+
export type { BankTypeBE };
|
|
18
|
+
export type { BranchTypeBE };
|
|
19
|
+
export type { CurrencyTypeBE };
|
|
20
|
+
export type { MenuOrderTypeBE };
|
|
21
|
+
export type { PaymentTypeBE };
|
|
22
|
+
export type { PaymentModeTypeBE };
|
|
23
|
+
export type { TaxTypeBE };
|
|
24
|
+
export type { PreferenceTypeBE };
|
|
125
25
|
export declare enum PAYMENT_TYPE {
|
|
126
26
|
FULL_PAYMENT = "FULL_PAYMENT",
|
|
127
27
|
PARTIAL_PAYMENT = "PARTIAL_PAYMENT"
|
|
128
28
|
}
|
|
129
|
-
export interface PaymentTypeBE {
|
|
130
|
-
amount: string;
|
|
131
|
-
attachment?: string;
|
|
132
|
-
balance: string;
|
|
133
|
-
createdAt: string;
|
|
134
|
-
currency: string;
|
|
135
|
-
date: string;
|
|
136
|
-
description?: string;
|
|
137
|
-
id: string;
|
|
138
|
-
paymentMode?: PaymentModeTypeBE;
|
|
139
|
-
paymentModeId: string;
|
|
140
|
-
paymentType: PAYMENT_TYPE;
|
|
141
|
-
quoteInvoice?: undefined;
|
|
142
|
-
quoteInvoiceId: string;
|
|
143
|
-
ref: string;
|
|
144
|
-
updatedAt: string;
|
|
145
|
-
}
|
|
146
|
-
export interface PaymentModeTypeBE {
|
|
147
|
-
createdAt: string;
|
|
148
|
-
enabled: boolean;
|
|
149
|
-
id: string;
|
|
150
|
-
isDefault: boolean;
|
|
151
|
-
label: string;
|
|
152
|
-
payments?: PaymentTypeBE[];
|
|
153
|
-
preference?: PreferenceTypeBE;
|
|
154
|
-
preferenceId: string;
|
|
155
|
-
updatedAt: string;
|
|
156
|
-
}
|
|
157
|
-
export interface TaxTypeBE {
|
|
158
|
-
createdAt: string;
|
|
159
|
-
description?: string;
|
|
160
|
-
enabled: boolean;
|
|
161
|
-
id: string;
|
|
162
|
-
isDefault: boolean;
|
|
163
|
-
preference: PreferenceTypeBE;
|
|
164
|
-
preferenceId: string;
|
|
165
|
-
taxName: string;
|
|
166
|
-
taxRate: string;
|
|
167
|
-
updatedAt: string;
|
|
168
|
-
}
|
|
169
|
-
export interface PreferenceTypeBE {
|
|
170
|
-
bankingDetails: BankingDetailTypeBE[];
|
|
171
|
-
branches: BranchTypeBE[];
|
|
172
|
-
createdAt: string;
|
|
173
|
-
currencies: CurrencyTypeBE[];
|
|
174
|
-
id: string;
|
|
175
|
-
menuOrder: MenuOrderTypeBE[];
|
|
176
|
-
onboarding: boolean;
|
|
177
|
-
paymentModes: PaymentModeTypeBE[];
|
|
178
|
-
taxes: TaxTypeBE[];
|
|
179
|
-
updatedAt: string;
|
|
180
|
-
}
|
|
181
29
|
export interface PreferenceContextType {
|
|
182
30
|
byIdError?: Error;
|
|
183
31
|
byIdLoading: boolean;
|
|
@@ -201,83 +49,9 @@ export interface PreferenceContextType {
|
|
|
201
49
|
currencyListLoading: boolean;
|
|
202
50
|
currencyUpdateError?: Error;
|
|
203
51
|
currencyUpdateLoading: boolean;
|
|
204
|
-
handleUpdateCurrency: (id: string, route:
|
|
52
|
+
handleUpdateCurrency: (id: string, route: "enabled" | "isDefault") => void;
|
|
205
53
|
handleCreateCurrency: (currency: Currency) => void;
|
|
206
54
|
}
|
|
207
|
-
export interface CreateBankDetailArg {
|
|
208
|
-
id: string;
|
|
209
|
-
accountNumber: string;
|
|
210
|
-
accountTitle: string;
|
|
211
|
-
bankAddress: string;
|
|
212
|
-
bankName: string;
|
|
213
|
-
enabled: boolean;
|
|
214
|
-
iban: string;
|
|
215
|
-
swiftCode: string;
|
|
216
|
-
preferenceId: string;
|
|
217
|
-
errors: {
|
|
218
|
-
[key: string]: string;
|
|
219
|
-
};
|
|
220
|
-
loading: boolean;
|
|
221
|
-
isDefault: boolean;
|
|
222
|
-
}
|
|
223
|
-
export interface createBranchesArgs {
|
|
224
|
-
personName: string;
|
|
225
|
-
personEmail: string;
|
|
226
|
-
id: string;
|
|
227
|
-
personPhone: string;
|
|
228
|
-
branchAddress: string;
|
|
229
|
-
branchName: string;
|
|
230
|
-
preferenceId: string;
|
|
231
|
-
enabled: boolean;
|
|
232
|
-
errors: {
|
|
233
|
-
[key: string]: string;
|
|
234
|
-
};
|
|
235
|
-
createdAt?: string;
|
|
236
|
-
updatedAt?: string;
|
|
237
|
-
loading: boolean;
|
|
238
|
-
isDefault: boolean;
|
|
239
|
-
}
|
|
240
|
-
export interface createTaxesArgs {
|
|
241
|
-
taxName: string;
|
|
242
|
-
taxValue: string;
|
|
243
|
-
id: string;
|
|
244
|
-
description: string;
|
|
245
|
-
preferenceId: string;
|
|
246
|
-
enabled: boolean;
|
|
247
|
-
errors: {
|
|
248
|
-
[key: string]: string;
|
|
249
|
-
};
|
|
250
|
-
createdAt?: string;
|
|
251
|
-
updatedAt?: string;
|
|
252
|
-
loading: boolean;
|
|
253
|
-
isDefault: boolean;
|
|
254
|
-
}
|
|
255
|
-
export interface updatePaymentModeArgs {
|
|
256
|
-
id: string;
|
|
257
|
-
enabled: boolean;
|
|
258
|
-
}
|
|
259
|
-
export interface MenuItem {
|
|
260
|
-
preferenceId: string;
|
|
261
|
-
label: string;
|
|
262
|
-
order: number;
|
|
263
|
-
id: string;
|
|
264
|
-
}
|
|
265
|
-
export type CurrencyArgs = {
|
|
266
|
-
id: string;
|
|
267
|
-
label: string;
|
|
268
|
-
enabled: boolean;
|
|
269
|
-
code: string;
|
|
270
|
-
isDefault: boolean;
|
|
271
|
-
preferenceId: string;
|
|
272
|
-
};
|
|
273
|
-
export interface updateCurrencyArgs {
|
|
274
|
-
id: string;
|
|
275
|
-
label: string;
|
|
276
|
-
enabled: boolean;
|
|
277
|
-
code: string;
|
|
278
|
-
isDefault: boolean;
|
|
279
|
-
preferenceId: string;
|
|
280
|
-
}
|
|
281
55
|
export declare enum PREFERENCE_DRAWER {
|
|
282
56
|
PAYMENT_MODE_FORM_DRAWER = "PAYMENT_MODE_FORM_DRAWER",
|
|
283
57
|
TAX_MODE_FORM_DRAWER = "TAX_MODE_FORM_DRAWER"
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PREFERENCE_MODAL = exports.PREFERENCE_DRAWER = exports.PAYMENT_TYPE = void 0;
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// CHEQUE = 'CHEQUE',
|
|
8
|
-
// OTHER = 'OTHER',
|
|
9
|
-
// }
|
|
4
|
+
// ============================================================================
|
|
5
|
+
// MODULE-SPECIFIC ENUMS
|
|
6
|
+
// ============================================================================
|
|
10
7
|
var PAYMENT_TYPE;
|
|
11
8
|
(function (PAYMENT_TYPE) {
|
|
12
9
|
PAYMENT_TYPE["FULL_PAYMENT"] = "FULL_PAYMENT";
|
|
@@ -130,12 +130,13 @@ var useTaxState = function () {
|
|
|
130
130
|
searchQuery: state.searchQuery,
|
|
131
131
|
}); }, [state.currentPage, state.pageLimit, state.searchQuery]);
|
|
132
132
|
var updateParams = (0, react_1.useMemo)(function () {
|
|
133
|
-
var _a;
|
|
133
|
+
var _a, _b;
|
|
134
134
|
return ({
|
|
135
|
+
description: ((_a = state.description) === null || _a === void 0 ? void 0 : _a.trim()) || "",
|
|
135
136
|
enabled: state.enabled,
|
|
136
137
|
id: state.id,
|
|
137
138
|
isDefault: state.isDefault,
|
|
138
|
-
preferenceId: (
|
|
139
|
+
preferenceId: (_b = preferences[0]) === null || _b === void 0 ? void 0 : _b.id,
|
|
139
140
|
taxName: state.taxName.trim(),
|
|
140
141
|
taxRate: state.taxRate.trim(),
|
|
141
142
|
});
|
|
@@ -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",
|
|
@@ -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",
|