@appcorp/fusion-storybook 0.3.71 → 0.3.73
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/base-modules/student-fee/context/shared.d.ts +0 -10
- package/base-modules/student-fee/context/shared.js +1 -4
- package/base-modules/student-fee/context/use-student-fee-module.d.ts +0 -2
- package/base-modules/student-fee/context/use-student-fee-module.js +29 -17
- package/package.json +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -56,8 +56,6 @@ export declare const STUDENT_FEE_ACTION_TYPES: {
|
|
|
56
56
|
studentProfileId: string;
|
|
57
57
|
filterEnabled: boolean | undefined;
|
|
58
58
|
filterStatus: PAYMENT_STATUS | "";
|
|
59
|
-
appliedFilterEnabled: boolean | undefined;
|
|
60
|
-
appliedFilterStatus: PAYMENT_STATUS | "";
|
|
61
59
|
}>, initialStudentFeeState: {
|
|
62
60
|
items: StudentFeeBE[];
|
|
63
61
|
count: number;
|
|
@@ -89,8 +87,6 @@ export declare const STUDENT_FEE_ACTION_TYPES: {
|
|
|
89
87
|
studentProfileId: string;
|
|
90
88
|
filterEnabled: boolean | undefined;
|
|
91
89
|
filterStatus: PAYMENT_STATUS | "";
|
|
92
|
-
appliedFilterEnabled: boolean | undefined;
|
|
93
|
-
appliedFilterStatus: PAYMENT_STATUS | "";
|
|
94
90
|
}, StudentFeeProvider: import("react").FC<{
|
|
95
91
|
children: React.ReactNode;
|
|
96
92
|
}>, studentFeeReducer: (state: {
|
|
@@ -124,8 +120,6 @@ export declare const STUDENT_FEE_ACTION_TYPES: {
|
|
|
124
120
|
studentProfileId: string;
|
|
125
121
|
filterEnabled: boolean | undefined;
|
|
126
122
|
filterStatus: PAYMENT_STATUS | "";
|
|
127
|
-
appliedFilterEnabled: boolean | undefined;
|
|
128
|
-
appliedFilterStatus: PAYMENT_STATUS | "";
|
|
129
123
|
}, action: any) => {
|
|
130
124
|
items: StudentFeeBE[];
|
|
131
125
|
count: number;
|
|
@@ -157,8 +151,6 @@ export declare const STUDENT_FEE_ACTION_TYPES: {
|
|
|
157
151
|
studentProfileId: string;
|
|
158
152
|
filterEnabled: boolean | undefined;
|
|
159
153
|
filterStatus: PAYMENT_STATUS | "";
|
|
160
|
-
appliedFilterEnabled: boolean | undefined;
|
|
161
|
-
appliedFilterStatus: PAYMENT_STATUS | "";
|
|
162
154
|
}, useStudentFeeContext: () => import("@react-pakistan/util-functions/factory/generic-module-factory").GenericModuleContextWithHandlers<{
|
|
163
155
|
items: StudentFeeBE[];
|
|
164
156
|
count: number;
|
|
@@ -190,6 +182,4 @@ export declare const STUDENT_FEE_ACTION_TYPES: {
|
|
|
190
182
|
studentProfileId: string;
|
|
191
183
|
filterEnabled: boolean | undefined;
|
|
192
184
|
filterStatus: PAYMENT_STATUS | "";
|
|
193
|
-
appliedFilterEnabled: boolean | undefined;
|
|
194
|
-
appliedFilterStatus: PAYMENT_STATUS | "";
|
|
195
185
|
}>;
|
|
@@ -57,12 +57,9 @@ const studentFeeConfig = {
|
|
|
57
57
|
schoolId: "",
|
|
58
58
|
status: PAYMENT_STATUS.PENDING,
|
|
59
59
|
studentProfileId: "",
|
|
60
|
-
// Filters
|
|
60
|
+
// Filters
|
|
61
61
|
filterEnabled: undefined,
|
|
62
62
|
filterStatus: "",
|
|
63
|
-
// Applied filters (only updated on "Apply" / "Clear")
|
|
64
|
-
appliedFilterEnabled: undefined,
|
|
65
|
-
appliedFilterStatus: "",
|
|
66
63
|
},
|
|
67
64
|
};
|
|
68
65
|
// ============================================================================
|
|
@@ -68,8 +68,6 @@ export declare const useStudentFeeModule: () => {
|
|
|
68
68
|
studentProfileId: string;
|
|
69
69
|
filterEnabled: boolean | undefined;
|
|
70
70
|
filterStatus: PAYMENT_STATUS | "";
|
|
71
|
-
appliedFilterEnabled: boolean | undefined;
|
|
72
|
-
appliedFilterStatus: PAYMENT_STATUS | "";
|
|
73
71
|
};
|
|
74
72
|
dispatch: React.Dispatch<any>;
|
|
75
73
|
};
|
|
@@ -44,14 +44,12 @@ export const useStudentFeeModule = () => {
|
|
|
44
44
|
// ============================================================================
|
|
45
45
|
// 1.4.2 API PARAMETERS
|
|
46
46
|
// ============================================================================
|
|
47
|
-
const listParams = useMemo(() => (Object.assign(Object.assign(Object.assign({ currentPage: state.currentPage, pageLimit: state.pageLimit, schoolId }, (debouncedQuery ? { searchQuery: debouncedQuery } : {})), (state.
|
|
48
|
-
? { filterEnabled: String(state.
|
|
49
|
-
: {})), (state.
|
|
50
|
-
? { status: state.appliedFilterStatus }
|
|
51
|
-
: {}))), [
|
|
52
|
-
state.appliedFilterEnabled,
|
|
53
|
-
state.appliedFilterStatus,
|
|
47
|
+
const listParams = useMemo(() => (Object.assign(Object.assign(Object.assign({ currentPage: state.currentPage, pageLimit: state.pageLimit, schoolId }, (debouncedQuery ? { searchQuery: debouncedQuery } : {})), (state.filterEnabled !== undefined
|
|
48
|
+
? { filterEnabled: String(state.filterEnabled) }
|
|
49
|
+
: {})), (state.filterStatus ? { status: state.filterStatus } : {}))), [
|
|
54
50
|
state.currentPage,
|
|
51
|
+
state.filterEnabled,
|
|
52
|
+
state.filterStatus,
|
|
55
53
|
state.pageLimit,
|
|
56
54
|
debouncedQuery,
|
|
57
55
|
schoolId,
|
|
@@ -72,7 +70,23 @@ export const useStudentFeeModule = () => {
|
|
|
72
70
|
schoolId,
|
|
73
71
|
status: state.status,
|
|
74
72
|
studentProfileId: state.studentProfileId,
|
|
75
|
-
}), [
|
|
73
|
+
}), [
|
|
74
|
+
state.amount,
|
|
75
|
+
state.amountDue,
|
|
76
|
+
state.amountPaid,
|
|
77
|
+
state.discountAmount,
|
|
78
|
+
state.discountCodeId,
|
|
79
|
+
state.dueDate,
|
|
80
|
+
state.enabled,
|
|
81
|
+
state.familyId,
|
|
82
|
+
state.feeStructureId,
|
|
83
|
+
state.id,
|
|
84
|
+
state.paidAt,
|
|
85
|
+
state.remarks,
|
|
86
|
+
state.status,
|
|
87
|
+
state.studentProfileId,
|
|
88
|
+
schoolId,
|
|
89
|
+
]);
|
|
76
90
|
const byIdParams = useMemo(() => ({ id: state.id }), [state.id]);
|
|
77
91
|
const deleteParams = useMemo(() => ({ id: state.id }), [state.id]);
|
|
78
92
|
// ============================================================================
|
|
@@ -127,8 +141,6 @@ export const useStudentFeeModule = () => {
|
|
|
127
141
|
enabled: true,
|
|
128
142
|
familyId: "",
|
|
129
143
|
feeStructureId: "",
|
|
130
|
-
filterEnabled: undefined,
|
|
131
|
-
filterStatus: "",
|
|
132
144
|
id: "",
|
|
133
145
|
lastRemindedAt: null,
|
|
134
146
|
nextFollowUpAt: null,
|
|
@@ -201,11 +213,11 @@ export const useStudentFeeModule = () => {
|
|
|
201
213
|
payload: {
|
|
202
214
|
form: Object.assign(Object.assign({}, fee), { dueDate,
|
|
203
215
|
paidAt,
|
|
204
|
-
originalFee
|
|
216
|
+
originalFee }),
|
|
205
217
|
},
|
|
206
218
|
});
|
|
207
219
|
}
|
|
208
|
-
}, [dispatch, showToast, t
|
|
220
|
+
}, [dispatch, showToast, t]);
|
|
209
221
|
const deleteCallback = useCallback(({ data, error }) => {
|
|
210
222
|
var _a;
|
|
211
223
|
if (error) {
|
|
@@ -498,19 +510,21 @@ export const useStudentFeeModule = () => {
|
|
|
498
510
|
});
|
|
499
511
|
}, [dispatch]);
|
|
500
512
|
const applyFilters = useCallback(() => {
|
|
513
|
+
const currentEnabled = state.filterEnabled;
|
|
514
|
+
const currentStatus = state.filterStatus;
|
|
515
|
+
closeDrawer();
|
|
501
516
|
dispatch({
|
|
502
517
|
type: STUDENT_FEE_ACTION_TYPES.SET_INPUT_FIELD,
|
|
503
|
-
payload: { key: "
|
|
518
|
+
payload: { key: "filterEnabled", value: currentEnabled },
|
|
504
519
|
});
|
|
505
520
|
dispatch({
|
|
506
521
|
type: STUDENT_FEE_ACTION_TYPES.SET_INPUT_FIELD,
|
|
507
|
-
payload: { key: "
|
|
522
|
+
payload: { key: "filterStatus", value: currentStatus },
|
|
508
523
|
});
|
|
509
524
|
dispatch({
|
|
510
525
|
type: STUDENT_FEE_ACTION_TYPES.SET_CURRENT_PAGE,
|
|
511
526
|
payload: { currentPage: 1 },
|
|
512
527
|
});
|
|
513
|
-
closeDrawer();
|
|
514
528
|
}, [dispatch, closeDrawer, state.filterEnabled, state.filterStatus]);
|
|
515
529
|
const clearFilters = useCallback(() => {
|
|
516
530
|
dispatch({
|
|
@@ -519,8 +533,6 @@ export const useStudentFeeModule = () => {
|
|
|
519
533
|
filters: {
|
|
520
534
|
filterEnabled: undefined,
|
|
521
535
|
filterStatus: "",
|
|
522
|
-
appliedFilterEnabled: undefined,
|
|
523
|
-
appliedFilterStatus: "",
|
|
524
536
|
},
|
|
525
537
|
},
|
|
526
538
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appcorp/fusion-storybook",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.73",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build-storybook": "storybook build",
|
|
6
6
|
"build:next": "next build",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
]
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@appcorp/shadcn": "^2.0.
|
|
40
|
+
"@appcorp/shadcn": "^2.0.7",
|
|
41
41
|
"@chromatic-com/storybook": "^5.1.2",
|
|
42
42
|
"@commitlint/cli": "^20.5.0",
|
|
43
43
|
"@commitlint/config-conventional": "^20.5.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@radix-ui/react-slider": "^1",
|
|
56
56
|
"@radix-ui/react-slot": "^1",
|
|
57
57
|
"@radix-ui/react-toast": "^1",
|
|
58
|
-
"@react-pakistan/util-functions": "^3.0.
|
|
58
|
+
"@react-pakistan/util-functions": "^3.0.4",
|
|
59
59
|
"@storybook/addon-a11y": "^10.3.4",
|
|
60
60
|
"@storybook/addon-docs": "^10.3.4",
|
|
61
61
|
"@storybook/addon-onboarding": "^10.3.4",
|