@appcorp/fusion-storybook 0.1.4
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/README.md +147 -0
- package/base-modules/admission/cache.d.ts +14 -0
- package/base-modules/admission/cache.js +31 -0
- package/base-modules/admission/constants.d.ts +32 -0
- package/base-modules/admission/constants.js +37 -0
- package/base-modules/admission/context.d.ts +369 -0
- package/base-modules/admission/context.js +755 -0
- package/base-modules/admission/filter.d.ts +1 -0
- package/base-modules/admission/filter.js +31 -0
- package/base-modules/admission/form.d.ts +1 -0
- package/base-modules/admission/form.js +86 -0
- package/base-modules/admission/more-actions.d.ts +1 -0
- package/base-modules/admission/more-actions.js +5 -0
- package/base-modules/admission/page.d.ts +16 -0
- package/base-modules/admission/page.js +128 -0
- package/base-modules/admission/validate.d.ts +38 -0
- package/base-modules/admission/validate.js +70 -0
- package/base-modules/admission/view.d.ts +1 -0
- package/base-modules/admission/view.js +40 -0
- package/base-modules/discount-code/cache.d.ts +27 -0
- package/base-modules/discount-code/cache.js +46 -0
- package/base-modules/discount-code/constants.d.ts +19 -0
- package/base-modules/discount-code/constants.js +26 -0
- package/base-modules/discount-code/context.d.ts +154 -0
- package/base-modules/discount-code/context.js +416 -0
- package/base-modules/discount-code/filter.d.ts +9 -0
- package/base-modules/discount-code/filter.js +14 -0
- package/base-modules/discount-code/form.d.ts +1 -0
- package/base-modules/discount-code/form.js +44 -0
- package/base-modules/discount-code/more-actions.d.ts +9 -0
- package/base-modules/discount-code/more-actions.js +13 -0
- package/base-modules/discount-code/page.d.ts +16 -0
- package/base-modules/discount-code/page.js +120 -0
- package/base-modules/discount-code/validate.d.ts +19 -0
- package/base-modules/discount-code/validate.js +38 -0
- package/base-modules/discount-code/view.d.ts +1 -0
- package/base-modules/discount-code/view.js +26 -0
- package/base-modules/family/cache.d.ts +14 -0
- package/base-modules/family/cache.js +31 -0
- package/base-modules/family/constants.d.ts +22 -0
- package/base-modules/family/constants.js +26 -0
- package/base-modules/family/context.d.ts +173 -0
- package/base-modules/family/context.js +441 -0
- package/base-modules/family/filter.d.ts +1 -0
- package/base-modules/family/filter.js +28 -0
- package/base-modules/family/form.d.ts +1 -0
- package/base-modules/family/form.js +12 -0
- package/base-modules/family/more-actions.d.ts +1 -0
- package/base-modules/family/more-actions.js +5 -0
- package/base-modules/family/page.d.ts +16 -0
- package/base-modules/family/page.js +120 -0
- package/base-modules/family/validate.d.ts +15 -0
- package/base-modules/family/validate.js +18 -0
- package/base-modules/family/view.d.ts +1 -0
- package/base-modules/family/view.js +18 -0
- package/base-modules/family-member/cache.d.ts +14 -0
- package/base-modules/family-member/cache.js +31 -0
- package/base-modules/family-member/constants.d.ts +22 -0
- package/base-modules/family-member/constants.js +26 -0
- package/base-modules/family-member/context.d.ts +215 -0
- package/base-modules/family-member/context.js +486 -0
- package/base-modules/family-member/filter.d.ts +1 -0
- package/base-modules/family-member/filter.js +28 -0
- package/base-modules/family-member/form.d.ts +1 -0
- package/base-modules/family-member/form.js +17 -0
- package/base-modules/family-member/more-actions.d.ts +1 -0
- package/base-modules/family-member/more-actions.js +5 -0
- package/base-modules/family-member/page.d.ts +16 -0
- package/base-modules/family-member/page.js +122 -0
- package/base-modules/family-member/validate.d.ts +24 -0
- package/base-modules/family-member/validate.js +27 -0
- package/base-modules/family-member/view.d.ts +1 -0
- package/base-modules/family-member/view.js +40 -0
- package/base-modules/student-profile/cache.d.ts +14 -0
- package/base-modules/student-profile/cache.js +31 -0
- package/base-modules/student-profile/constants.d.ts +105 -0
- package/base-modules/student-profile/constants.js +132 -0
- package/base-modules/student-profile/context.d.ts +290 -0
- package/base-modules/student-profile/context.js +583 -0
- package/base-modules/student-profile/filter.d.ts +1 -0
- package/base-modules/student-profile/filter.js +26 -0
- package/base-modules/student-profile/form.d.ts +1 -0
- package/base-modules/student-profile/form.js +19 -0
- package/base-modules/student-profile/more-actions.d.ts +1 -0
- package/base-modules/student-profile/more-actions.js +5 -0
- package/base-modules/student-profile/page.d.ts +9 -0
- package/base-modules/student-profile/page.js +86 -0
- package/base-modules/student-profile/validate.d.ts +23 -0
- package/base-modules/student-profile/validate.js +34 -0
- package/base-modules/student-profile/view.d.ts +1 -0
- package/base-modules/student-profile/view.js +29 -0
- package/base-modules/workspace/cache.d.ts +9 -0
- package/base-modules/workspace/cache.js +28 -0
- package/base-modules/workspace/constants.d.ts +10 -0
- package/base-modules/workspace/constants.js +18 -0
- package/base-modules/workspace/context.d.ts +187 -0
- package/base-modules/workspace/context.js +293 -0
- package/base-modules/workspace/drawer.d.ts +1 -0
- package/base-modules/workspace/drawer.js +24 -0
- package/base-modules/workspace/filter.d.ts +1 -0
- package/base-modules/workspace/filter.js +13 -0
- package/base-modules/workspace/form.d.ts +1 -0
- package/base-modules/workspace/form.js +40 -0
- package/base-modules/workspace/more-actions.d.ts +1 -0
- package/base-modules/workspace/more-actions.js +13 -0
- package/base-modules/workspace/page.d.ts +1 -0
- package/base-modules/workspace/page.js +31 -0
- package/base-modules/workspace/validate.d.ts +9 -0
- package/base-modules/workspace/validate.js +8 -0
- package/base-modules/workspace/view.d.ts +1 -0
- package/base-modules/workspace/view.js +52 -0
- package/components/rbac-no-access.d.ts +6 -0
- package/components/rbac-no-access.js +4 -0
- package/constants.d.ts +81 -0
- package/constants.js +81 -0
- package/lib/utils.d.ts +2 -0
- package/lib/utils.js +5 -0
- package/package.json +104 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/type.d.ts +1141 -0
- package/type.js +427 -0
- package/utils/admission-pdf.d.ts +78 -0
- package/utils/admission-pdf.js +73 -0
- package/utils/clear-cache.d.ts +1 -0
- package/utils/clear-cache.js +8 -0
- package/utils/format-value.d.ts +1 -0
- package/utils/format-value.js +1 -0
- package/utils/pdf-generator.d.ts +41 -0
- package/utils/pdf-generator.js +107 -0
- package/utils/resolve-rbac-permissions.d.ts +11 -0
- package/utils/resolve-rbac-permissions.js +251 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { StudentProfileBE } from "@/type";
|
|
2
|
+
import { type RowAction } from "@appcorp/shadcn/components/enhanced-table";
|
|
3
|
+
export declare const STUDENT_PROFILE_DRAWER: {
|
|
4
|
+
readonly FILTER_DRAWER: string;
|
|
5
|
+
readonly FORM_DRAWER: string;
|
|
6
|
+
readonly MORE_ACTIONS_DRAWER: string;
|
|
7
|
+
readonly VIEW_DRAWER: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const STUDENT_PROFILE_ACTION_TYPES: {
|
|
10
|
+
readonly RESET_FORM: "RESET_FORM";
|
|
11
|
+
readonly SET_CURRENT_PAGE: "SET_CURRENT_PAGE";
|
|
12
|
+
readonly SET_PAGE_LIMIT: "SET_PAGE_LIMIT";
|
|
13
|
+
readonly SET_SEARCH_QUERY: "SET_SEARCH_QUERY";
|
|
14
|
+
readonly SET_DRAWER: "SET_DRAWER";
|
|
15
|
+
readonly SET_ITEMS: "SET_ITEMS";
|
|
16
|
+
readonly SET_FORM_DATA: "SET_FORM_DATA";
|
|
17
|
+
readonly SET_DISABLE_SAVE_BUTTON: "SET_DISABLE_SAVE_BUTTON";
|
|
18
|
+
readonly SET_INPUT_FIELD: "SET_INPUT_FIELD";
|
|
19
|
+
readonly SET_ERRORS: "SET_ERRORS";
|
|
20
|
+
readonly SET_FILTERS: "SET_FILTERS";
|
|
21
|
+
}, studentProfileModuleConfig: import("@react-pakistan/util-functions/factory/generic-module-factory").ModuleConfig<{
|
|
22
|
+
items: StudentProfileBE[];
|
|
23
|
+
count: number;
|
|
24
|
+
currentPage: number;
|
|
25
|
+
pageLimit: number;
|
|
26
|
+
searchQuery: string;
|
|
27
|
+
filterStatus: undefined;
|
|
28
|
+
filterGender: undefined;
|
|
29
|
+
filterEnabled: boolean | undefined;
|
|
30
|
+
disableSaveButton: boolean;
|
|
31
|
+
drawer: string | null;
|
|
32
|
+
id: string;
|
|
33
|
+
familyMemberId: string;
|
|
34
|
+
studentCode: string;
|
|
35
|
+
status: string;
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
remarks: string | null;
|
|
38
|
+
firstName: string;
|
|
39
|
+
lastName: string;
|
|
40
|
+
dateOfBirth: string | Date | null;
|
|
41
|
+
gender: string | null;
|
|
42
|
+
bloodGroup: string | null;
|
|
43
|
+
phone: string | null;
|
|
44
|
+
email: string | null;
|
|
45
|
+
emergencyPhone: string | null;
|
|
46
|
+
avatar: string | null;
|
|
47
|
+
familyId: string;
|
|
48
|
+
address: string | null;
|
|
49
|
+
city: string | null;
|
|
50
|
+
state: string | null;
|
|
51
|
+
country: string | null;
|
|
52
|
+
postalCode: string | null;
|
|
53
|
+
errors: Record<string, string>;
|
|
54
|
+
}>, initialStudentProfileState: {
|
|
55
|
+
items: StudentProfileBE[];
|
|
56
|
+
count: number;
|
|
57
|
+
currentPage: number;
|
|
58
|
+
pageLimit: number;
|
|
59
|
+
searchQuery: string;
|
|
60
|
+
filterStatus: undefined;
|
|
61
|
+
filterGender: undefined;
|
|
62
|
+
filterEnabled: boolean | undefined;
|
|
63
|
+
disableSaveButton: boolean;
|
|
64
|
+
drawer: string | null;
|
|
65
|
+
id: string;
|
|
66
|
+
familyMemberId: string;
|
|
67
|
+
studentCode: string;
|
|
68
|
+
status: string;
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
remarks: string | null;
|
|
71
|
+
firstName: string;
|
|
72
|
+
lastName: string;
|
|
73
|
+
dateOfBirth: string | Date | null;
|
|
74
|
+
gender: string | null;
|
|
75
|
+
bloodGroup: string | null;
|
|
76
|
+
phone: string | null;
|
|
77
|
+
email: string | null;
|
|
78
|
+
emergencyPhone: string | null;
|
|
79
|
+
avatar: string | null;
|
|
80
|
+
familyId: string;
|
|
81
|
+
address: string | null;
|
|
82
|
+
city: string | null;
|
|
83
|
+
state: string | null;
|
|
84
|
+
country: string | null;
|
|
85
|
+
postalCode: string | null;
|
|
86
|
+
errors: Record<string, string>;
|
|
87
|
+
}, StudentProfileProvider: import("react").FC<{
|
|
88
|
+
children: React.ReactNode;
|
|
89
|
+
}>, studentProfileReducer: (state: {
|
|
90
|
+
items: StudentProfileBE[];
|
|
91
|
+
count: number;
|
|
92
|
+
currentPage: number;
|
|
93
|
+
pageLimit: number;
|
|
94
|
+
searchQuery: string;
|
|
95
|
+
filterStatus: undefined;
|
|
96
|
+
filterGender: undefined;
|
|
97
|
+
filterEnabled: boolean | undefined;
|
|
98
|
+
disableSaveButton: boolean;
|
|
99
|
+
drawer: string | null;
|
|
100
|
+
id: string;
|
|
101
|
+
familyMemberId: string;
|
|
102
|
+
studentCode: string;
|
|
103
|
+
status: string;
|
|
104
|
+
enabled: boolean;
|
|
105
|
+
remarks: string | null;
|
|
106
|
+
firstName: string;
|
|
107
|
+
lastName: string;
|
|
108
|
+
dateOfBirth: string | Date | null;
|
|
109
|
+
gender: string | null;
|
|
110
|
+
bloodGroup: string | null;
|
|
111
|
+
phone: string | null;
|
|
112
|
+
email: string | null;
|
|
113
|
+
emergencyPhone: string | null;
|
|
114
|
+
avatar: string | null;
|
|
115
|
+
familyId: string;
|
|
116
|
+
address: string | null;
|
|
117
|
+
city: string | null;
|
|
118
|
+
state: string | null;
|
|
119
|
+
country: string | null;
|
|
120
|
+
postalCode: string | null;
|
|
121
|
+
errors: Record<string, string>;
|
|
122
|
+
}, action: any) => {
|
|
123
|
+
items: StudentProfileBE[];
|
|
124
|
+
count: number;
|
|
125
|
+
currentPage: number;
|
|
126
|
+
pageLimit: number;
|
|
127
|
+
searchQuery: string;
|
|
128
|
+
filterStatus: undefined;
|
|
129
|
+
filterGender: undefined;
|
|
130
|
+
filterEnabled: boolean | undefined;
|
|
131
|
+
disableSaveButton: boolean;
|
|
132
|
+
drawer: string | null;
|
|
133
|
+
id: string;
|
|
134
|
+
familyMemberId: string;
|
|
135
|
+
studentCode: string;
|
|
136
|
+
status: string;
|
|
137
|
+
enabled: boolean;
|
|
138
|
+
remarks: string | null;
|
|
139
|
+
firstName: string;
|
|
140
|
+
lastName: string;
|
|
141
|
+
dateOfBirth: string | Date | null;
|
|
142
|
+
gender: string | null;
|
|
143
|
+
bloodGroup: string | null;
|
|
144
|
+
phone: string | null;
|
|
145
|
+
email: string | null;
|
|
146
|
+
emergencyPhone: string | null;
|
|
147
|
+
avatar: string | null;
|
|
148
|
+
familyId: string;
|
|
149
|
+
address: string | null;
|
|
150
|
+
city: string | null;
|
|
151
|
+
state: string | null;
|
|
152
|
+
country: string | null;
|
|
153
|
+
postalCode: string | null;
|
|
154
|
+
errors: Record<string, string>;
|
|
155
|
+
}, useStudentProfileContext: () => import("@react-pakistan/util-functions/factory/generic-module-factory").GenericModuleContext<{
|
|
156
|
+
items: StudentProfileBE[];
|
|
157
|
+
count: number;
|
|
158
|
+
currentPage: number;
|
|
159
|
+
pageLimit: number;
|
|
160
|
+
searchQuery: string;
|
|
161
|
+
filterStatus: undefined;
|
|
162
|
+
filterGender: undefined;
|
|
163
|
+
filterEnabled: boolean | undefined;
|
|
164
|
+
disableSaveButton: boolean;
|
|
165
|
+
drawer: string | null;
|
|
166
|
+
id: string;
|
|
167
|
+
familyMemberId: string;
|
|
168
|
+
studentCode: string;
|
|
169
|
+
status: string;
|
|
170
|
+
enabled: boolean;
|
|
171
|
+
remarks: string | null;
|
|
172
|
+
firstName: string;
|
|
173
|
+
lastName: string;
|
|
174
|
+
dateOfBirth: string | Date | null;
|
|
175
|
+
gender: string | null;
|
|
176
|
+
bloodGroup: string | null;
|
|
177
|
+
phone: string | null;
|
|
178
|
+
email: string | null;
|
|
179
|
+
emergencyPhone: string | null;
|
|
180
|
+
avatar: string | null;
|
|
181
|
+
familyId: string;
|
|
182
|
+
address: string | null;
|
|
183
|
+
city: string | null;
|
|
184
|
+
state: string | null;
|
|
185
|
+
country: string | null;
|
|
186
|
+
postalCode: string | null;
|
|
187
|
+
errors: Record<string, string>;
|
|
188
|
+
}>;
|
|
189
|
+
export declare const StudentProfileStateContextProvider: import("react").FC<{
|
|
190
|
+
children: React.ReactNode;
|
|
191
|
+
}>;
|
|
192
|
+
export declare const useStudentProfileStateContext: () => import("@react-pakistan/util-functions/factory/generic-module-factory").GenericModuleContext<{
|
|
193
|
+
items: StudentProfileBE[];
|
|
194
|
+
count: number;
|
|
195
|
+
currentPage: number;
|
|
196
|
+
pageLimit: number;
|
|
197
|
+
searchQuery: string;
|
|
198
|
+
filterStatus: undefined;
|
|
199
|
+
filterGender: undefined;
|
|
200
|
+
filterEnabled: boolean | undefined;
|
|
201
|
+
disableSaveButton: boolean;
|
|
202
|
+
drawer: string | null;
|
|
203
|
+
id: string;
|
|
204
|
+
familyMemberId: string;
|
|
205
|
+
studentCode: string;
|
|
206
|
+
status: string;
|
|
207
|
+
enabled: boolean;
|
|
208
|
+
remarks: string | null;
|
|
209
|
+
firstName: string;
|
|
210
|
+
lastName: string;
|
|
211
|
+
dateOfBirth: string | Date | null;
|
|
212
|
+
gender: string | null;
|
|
213
|
+
bloodGroup: string | null;
|
|
214
|
+
phone: string | null;
|
|
215
|
+
email: string | null;
|
|
216
|
+
emergencyPhone: string | null;
|
|
217
|
+
avatar: string | null;
|
|
218
|
+
familyId: string;
|
|
219
|
+
address: string | null;
|
|
220
|
+
city: string | null;
|
|
221
|
+
state: string | null;
|
|
222
|
+
country: string | null;
|
|
223
|
+
postalCode: string | null;
|
|
224
|
+
errors: Record<string, string>;
|
|
225
|
+
}>;
|
|
226
|
+
export declare const useStudentProfileModule: () => {
|
|
227
|
+
applyFilters: () => void;
|
|
228
|
+
byIdLoading: boolean;
|
|
229
|
+
clearFilters: () => void;
|
|
230
|
+
deleteLoading: boolean;
|
|
231
|
+
handleChange: (field: string, value: string | number | boolean | undefined | null) => void;
|
|
232
|
+
handleCloseDrawer: () => void;
|
|
233
|
+
handleCreate: () => void;
|
|
234
|
+
handleDelete: (row?: unknown) => void;
|
|
235
|
+
handleEdit: (row?: unknown) => void;
|
|
236
|
+
handleFilters: () => void;
|
|
237
|
+
handleMoreActions: () => void;
|
|
238
|
+
handlePageChange: (page: number) => void;
|
|
239
|
+
handlePageLimitChange: (limit: number) => void;
|
|
240
|
+
handleReAdmitStudent: (row?: unknown) => Promise<void>;
|
|
241
|
+
handleSearch: (query: string) => void;
|
|
242
|
+
handleSubmit: () => void;
|
|
243
|
+
handleView: (row?: unknown) => void;
|
|
244
|
+
handleWithdrawStudent: (row?: unknown) => Promise<void>;
|
|
245
|
+
headerActions: {
|
|
246
|
+
enabled: boolean;
|
|
247
|
+
handleOnClick: () => void;
|
|
248
|
+
label: string;
|
|
249
|
+
order: number;
|
|
250
|
+
icon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
251
|
+
}[];
|
|
252
|
+
listLoading: boolean;
|
|
253
|
+
rowActions: RowAction[];
|
|
254
|
+
updateLoading: boolean;
|
|
255
|
+
state: {
|
|
256
|
+
items: StudentProfileBE[];
|
|
257
|
+
count: number;
|
|
258
|
+
currentPage: number;
|
|
259
|
+
pageLimit: number;
|
|
260
|
+
searchQuery: string;
|
|
261
|
+
filterStatus: undefined;
|
|
262
|
+
filterGender: undefined;
|
|
263
|
+
filterEnabled: boolean | undefined;
|
|
264
|
+
disableSaveButton: boolean;
|
|
265
|
+
drawer: string | null;
|
|
266
|
+
id: string;
|
|
267
|
+
familyMemberId: string;
|
|
268
|
+
studentCode: string;
|
|
269
|
+
status: string;
|
|
270
|
+
enabled: boolean;
|
|
271
|
+
remarks: string | null;
|
|
272
|
+
firstName: string;
|
|
273
|
+
lastName: string;
|
|
274
|
+
dateOfBirth: string | Date | null;
|
|
275
|
+
gender: string | null;
|
|
276
|
+
bloodGroup: string | null;
|
|
277
|
+
phone: string | null;
|
|
278
|
+
email: string | null;
|
|
279
|
+
emergencyPhone: string | null;
|
|
280
|
+
avatar: string | null;
|
|
281
|
+
familyId: string;
|
|
282
|
+
address: string | null;
|
|
283
|
+
city: string | null;
|
|
284
|
+
state: string | null;
|
|
285
|
+
country: string | null;
|
|
286
|
+
postalCode: string | null;
|
|
287
|
+
errors: Record<string, string>;
|
|
288
|
+
};
|
|
289
|
+
dispatch: React.Dispatch<any>;
|
|
290
|
+
};
|