@appcorp/fusion-storybook 0.3.71 → 0.3.72
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 +12 -16
- package/package.json +1 -1
- 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,
|
|
@@ -127,8 +125,6 @@ export const useStudentFeeModule = () => {
|
|
|
127
125
|
enabled: true,
|
|
128
126
|
familyId: "",
|
|
129
127
|
feeStructureId: "",
|
|
130
|
-
filterEnabled: undefined,
|
|
131
|
-
filterStatus: "",
|
|
132
128
|
id: "",
|
|
133
129
|
lastRemindedAt: null,
|
|
134
130
|
nextFollowUpAt: null,
|
|
@@ -201,11 +197,11 @@ export const useStudentFeeModule = () => {
|
|
|
201
197
|
payload: {
|
|
202
198
|
form: Object.assign(Object.assign({}, fee), { dueDate,
|
|
203
199
|
paidAt,
|
|
204
|
-
originalFee
|
|
200
|
+
originalFee }),
|
|
205
201
|
},
|
|
206
202
|
});
|
|
207
203
|
}
|
|
208
|
-
}, [dispatch, showToast, t
|
|
204
|
+
}, [dispatch, showToast, t]);
|
|
209
205
|
const deleteCallback = useCallback(({ data, error }) => {
|
|
210
206
|
var _a;
|
|
211
207
|
if (error) {
|
|
@@ -498,19 +494,21 @@ export const useStudentFeeModule = () => {
|
|
|
498
494
|
});
|
|
499
495
|
}, [dispatch]);
|
|
500
496
|
const applyFilters = useCallback(() => {
|
|
497
|
+
const currentEnabled = state.filterEnabled;
|
|
498
|
+
const currentStatus = state.filterStatus;
|
|
499
|
+
closeDrawer();
|
|
501
500
|
dispatch({
|
|
502
501
|
type: STUDENT_FEE_ACTION_TYPES.SET_INPUT_FIELD,
|
|
503
|
-
payload: { key: "
|
|
502
|
+
payload: { key: "filterEnabled", value: currentEnabled },
|
|
504
503
|
});
|
|
505
504
|
dispatch({
|
|
506
505
|
type: STUDENT_FEE_ACTION_TYPES.SET_INPUT_FIELD,
|
|
507
|
-
payload: { key: "
|
|
506
|
+
payload: { key: "filterStatus", value: currentStatus },
|
|
508
507
|
});
|
|
509
508
|
dispatch({
|
|
510
509
|
type: STUDENT_FEE_ACTION_TYPES.SET_CURRENT_PAGE,
|
|
511
510
|
payload: { currentPage: 1 },
|
|
512
511
|
});
|
|
513
|
-
closeDrawer();
|
|
514
512
|
}, [dispatch, closeDrawer, state.filterEnabled, state.filterStatus]);
|
|
515
513
|
const clearFilters = useCallback(() => {
|
|
516
514
|
dispatch({
|
|
@@ -519,8 +517,6 @@ export const useStudentFeeModule = () => {
|
|
|
519
517
|
filters: {
|
|
520
518
|
filterEnabled: undefined,
|
|
521
519
|
filterStatus: "",
|
|
522
|
-
appliedFilterEnabled: undefined,
|
|
523
|
-
appliedFilterStatus: "",
|
|
524
520
|
},
|
|
525
521
|
},
|
|
526
522
|
});
|