@appcorp/fusion-storybook 0.2.27 → 0.2.28
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/admission/cache.js +1 -1
- package/base-modules/admission/context/use-admission-module.js +4 -4
- package/base-modules/attendance/cache.js +1 -1
- package/base-modules/attendance/context.js +1 -1
- package/base-modules/campus/cache.js +1 -1
- package/base-modules/campus/context.js +1 -1
- package/base-modules/class/cache.js +1 -1
- package/base-modules/class/context.js +1 -1
- package/base-modules/course/cache.js +1 -1
- package/base-modules/course/context.js +1 -1
- package/base-modules/discount-code/cache.js +1 -1
- package/base-modules/discount-code/context.js +1 -1
- package/base-modules/enrollment/cache.js +1 -1
- package/base-modules/enrollment/context.js +1 -1
- package/base-modules/expense/cache.js +1 -1
- package/base-modules/expense/context.js +1 -1
- package/base-modules/family/cache.js +1 -1
- package/base-modules/family/context.js +1 -1
- package/base-modules/family-member/cache.js +1 -1
- package/base-modules/fee-structure/cache.js +1 -1
- package/base-modules/fee-structure/context.js +1 -1
- package/base-modules/rbac/cache.js +1 -1
- package/base-modules/rbac/context.js +3 -3
- package/base-modules/school/context.js +1 -1
- package/base-modules/section/cache.js +1 -1
- package/base-modules/section/context.js +1 -1
- package/base-modules/student-fee/cache.js +1 -1
- package/base-modules/student-fee/context/use-student-fee-module.js +1 -1
- package/base-modules/student-profile/cache.js +1 -1
- package/base-modules/student-profile/context/use-student-profile-module.js +2 -2
- package/base-modules/subject/cache.js +1 -1
- package/base-modules/subject/context.js +1 -1
- package/base-modules/teacher/cache.js +1 -1
- package/base-modules/teacher/context.js +2 -2
- package/base-modules/teacher/more-actions.js +9 -11
- package/base-modules/user/cache.js +1 -1
- package/base-modules/user/context/use-user-module.js +2 -2
- package/base-modules/workspace/context.js +1 -1
- package/base-modules/workspace-user/cache.js +1 -1
- package/base-modules/workspace-user/context.js +1 -1
- package/package.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -22,7 +22,7 @@ export const getCachedAdmissions = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedAdmissionById = (admissionId) => getCachedItemById(LS_KEYS.ADMISSIONS, admissionId);
|
|
@@ -298,7 +298,7 @@ export const useAdmissionModule = () => {
|
|
|
298
298
|
updateParams,
|
|
299
299
|
headers: {
|
|
300
300
|
"Content-Type": "application/json",
|
|
301
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
301
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
302
302
|
},
|
|
303
303
|
});
|
|
304
304
|
// ============================================================================
|
|
@@ -417,7 +417,7 @@ export const useAdmissionModule = () => {
|
|
|
417
417
|
body: JSON.stringify({ url: (_a = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _a === void 0 ? void 0 : _a.logo }),
|
|
418
418
|
headers: {
|
|
419
419
|
"Content-Type": "application/json",
|
|
420
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
420
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
421
421
|
},
|
|
422
422
|
});
|
|
423
423
|
const logoBase64 = await logoBase64Res.json();
|
|
@@ -479,7 +479,7 @@ export const useAdmissionModule = () => {
|
|
|
479
479
|
method: API_METHODS.POST,
|
|
480
480
|
headers: {
|
|
481
481
|
"Content-Type": "application/json",
|
|
482
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
482
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
483
483
|
},
|
|
484
484
|
body: JSON.stringify({ admissionId: tableRow === null || tableRow === void 0 ? void 0 : tableRow.id }),
|
|
485
485
|
});
|
|
@@ -525,7 +525,7 @@ export const useAdmissionModule = () => {
|
|
|
525
525
|
method: API_METHODS.POST,
|
|
526
526
|
headers: {
|
|
527
527
|
"Content-Type": "application/json",
|
|
528
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
528
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
529
529
|
},
|
|
530
530
|
body: JSON.stringify({ id: tableRow.id, schoolId }),
|
|
531
531
|
});
|
|
@@ -22,7 +22,7 @@ export const getCachedAttendances = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedAttendanceById = (attendanceId) => getCachedItemById(LS_KEYS.ATTENDANCES, attendanceId);
|
|
@@ -215,7 +215,7 @@ export const useAttendanceModule = () => {
|
|
|
215
215
|
updateParams,
|
|
216
216
|
headers: {
|
|
217
217
|
"Content-Type": "application/json",
|
|
218
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
218
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
219
219
|
},
|
|
220
220
|
});
|
|
221
221
|
// ==========================================================================
|
|
@@ -22,7 +22,7 @@ export const getCachedCampuses = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedCampusById = (campusId) => getCachedItemById(LS_KEYS.CAMPUSES, campusId);
|
|
@@ -243,7 +243,7 @@ export const useCampusModule = () => {
|
|
|
243
243
|
updateParams,
|
|
244
244
|
headers: {
|
|
245
245
|
"Content-Type": "application/json",
|
|
246
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
246
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
247
247
|
},
|
|
248
248
|
});
|
|
249
249
|
// ============================================================================
|
|
@@ -22,7 +22,7 @@ export const getCachedClasses = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedClassById = (classId) => getCachedItemById(LS_KEYS.CLASSES, classId);
|
|
@@ -207,7 +207,7 @@ export const useClassModule = () => {
|
|
|
207
207
|
updateParams,
|
|
208
208
|
headers: {
|
|
209
209
|
"Content-Type": "application/json",
|
|
210
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
210
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
211
211
|
},
|
|
212
212
|
});
|
|
213
213
|
// ============================================================================
|
|
@@ -22,7 +22,7 @@ export const getCachedCourses = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedCourseById = (courseId) => getCachedItemById(LS_KEYS.COURSES, courseId);
|
|
@@ -269,7 +269,7 @@ export const useCourseModule = () => {
|
|
|
269
269
|
updateParams,
|
|
270
270
|
headers: {
|
|
271
271
|
"Content-Type": "application/json",
|
|
272
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
272
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
273
273
|
},
|
|
274
274
|
});
|
|
275
275
|
// ==========================================================================
|
|
@@ -31,7 +31,7 @@ export const getCachedDiscountCodes = ({ params, }) => getCachedData({
|
|
|
31
31
|
params,
|
|
32
32
|
headers: {
|
|
33
33
|
"Content-Type": "application/json",
|
|
34
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
34
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
35
35
|
},
|
|
36
36
|
});
|
|
37
37
|
/** Get a single discount code from the cache by id */
|
|
@@ -219,7 +219,7 @@ export const useDiscountCodeModule = () => {
|
|
|
219
219
|
updateParams,
|
|
220
220
|
headers: {
|
|
221
221
|
"Content-Type": "application/json",
|
|
222
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
222
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
223
223
|
},
|
|
224
224
|
});
|
|
225
225
|
// ============================================================================
|
|
@@ -22,7 +22,7 @@ export const getCachedEnrollments = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedEnrollmentById = (enrollmentId) => getCachedItemById(LS_KEYS.ENROLLMENTS, enrollmentId);
|
|
@@ -211,7 +211,7 @@ export const useEnrollmentModule = () => {
|
|
|
211
211
|
updateParams,
|
|
212
212
|
headers: {
|
|
213
213
|
"Content-Type": "application/json",
|
|
214
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
214
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
215
215
|
},
|
|
216
216
|
});
|
|
217
217
|
// ==========================================================================
|
|
@@ -22,7 +22,7 @@ export const getCachedExpenses = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedExpenseById = (expenseId) => getCachedItemById(LS_KEYS.EXPENSES, expenseId);
|
|
@@ -256,7 +256,7 @@ export const useExpenseModule = () => {
|
|
|
256
256
|
deleteParams,
|
|
257
257
|
headers: {
|
|
258
258
|
"Content-Type": "application/json",
|
|
259
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
259
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
260
260
|
},
|
|
261
261
|
listCallback,
|
|
262
262
|
listParams,
|
|
@@ -22,7 +22,7 @@ export const getCachedFamilies = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedFamilyById = (familyId) => getCachedItemById(LS_KEYS.FAMILIES, familyId);
|
|
@@ -252,7 +252,7 @@ export const useFamilyModule = () => {
|
|
|
252
252
|
updateParams,
|
|
253
253
|
headers: {
|
|
254
254
|
"Content-Type": "application/json",
|
|
255
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
255
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
256
256
|
},
|
|
257
257
|
});
|
|
258
258
|
// ==========================================================================
|
|
@@ -22,7 +22,7 @@ export const getCachedFamilyMembers = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedFamilyMemberById = (familyMemberId) => getCachedItemById(LS_KEYS.FAMILY_MEMBERS, familyMemberId);
|
|
@@ -22,7 +22,7 @@ export const getCachedFeeStructures = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedFeeStructureById = (feeStructureId) => getCachedItemById(LS_KEYS.FEE_STRUCTURES, feeStructureId);
|
|
@@ -208,7 +208,7 @@ export const useFeeStructureModule = () => {
|
|
|
208
208
|
updateParams,
|
|
209
209
|
headers: {
|
|
210
210
|
"Content-Type": "application/json",
|
|
211
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
211
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
212
212
|
},
|
|
213
213
|
});
|
|
214
214
|
// ============================================================================
|
|
@@ -31,7 +31,7 @@ export const getCachedRoles = ({ params, }) => getCachedData({
|
|
|
31
31
|
params,
|
|
32
32
|
headers: {
|
|
33
33
|
"Content-Type": "application/json",
|
|
34
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
34
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
35
35
|
},
|
|
36
36
|
});
|
|
37
37
|
/** Get a single role from the cache by id */
|
|
@@ -202,7 +202,7 @@ export const useRbacModule = () => {
|
|
|
202
202
|
updateParams,
|
|
203
203
|
headers: {
|
|
204
204
|
"Content-Type": "application/json",
|
|
205
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
205
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
206
206
|
},
|
|
207
207
|
});
|
|
208
208
|
// ============================================================================
|
|
@@ -393,7 +393,7 @@ export const useRbacModule = () => {
|
|
|
393
393
|
method: "DELETE",
|
|
394
394
|
headers: {
|
|
395
395
|
"Content-Type": "application/json",
|
|
396
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
396
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
397
397
|
},
|
|
398
398
|
body: JSON.stringify({ id: existing.id }),
|
|
399
399
|
});
|
|
@@ -403,7 +403,7 @@ export const useRbacModule = () => {
|
|
|
403
403
|
method: "PUT",
|
|
404
404
|
headers: {
|
|
405
405
|
"Content-Type": "application/json",
|
|
406
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
406
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
407
407
|
},
|
|
408
408
|
body: JSON.stringify({ roleId: state.id, permissionId }),
|
|
409
409
|
});
|
|
@@ -188,7 +188,7 @@ export const useSchoolModule = () => {
|
|
|
188
188
|
updateParams,
|
|
189
189
|
headers: {
|
|
190
190
|
"Content-Type": "application/json",
|
|
191
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
191
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
192
192
|
},
|
|
193
193
|
});
|
|
194
194
|
// ============================================================================
|
|
@@ -22,7 +22,7 @@ export const getCachedSections = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedSectionById = (sectionId) => getCachedItemById(LS_KEYS.SECTIONS, sectionId);
|
|
@@ -209,7 +209,7 @@ export const useSectionModule = () => {
|
|
|
209
209
|
updateParams,
|
|
210
210
|
headers: {
|
|
211
211
|
"Content-Type": "application/json",
|
|
212
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
212
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
213
213
|
},
|
|
214
214
|
});
|
|
215
215
|
// ============================================================================
|
|
@@ -12,7 +12,7 @@ export const getCachedStudentFees = ({ params, }) => getCachedData({
|
|
|
12
12
|
params,
|
|
13
13
|
headers: {
|
|
14
14
|
"Content-Type": "application/json",
|
|
15
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
15
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
16
16
|
},
|
|
17
17
|
});
|
|
18
18
|
export const getCachedStudentFeeById = (studentFeeId) => getCachedItemById(LS_KEYS.STUDENT_FEES, studentFeeId);
|
|
@@ -185,7 +185,7 @@ export const useStudentFeeModule = () => {
|
|
|
185
185
|
updateParams,
|
|
186
186
|
headers: {
|
|
187
187
|
"Content-Type": "application/json",
|
|
188
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
188
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
189
189
|
},
|
|
190
190
|
});
|
|
191
191
|
// ============================================================================
|
|
@@ -22,7 +22,7 @@ export const getCachedStudentProfiles = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedStudentProfileById = (studentProfileId) => getCachedItemById(LS_KEYS.STUDENT_PROFILES, studentProfileId);
|
|
@@ -196,7 +196,7 @@ export const useStudentProfileModule = () => {
|
|
|
196
196
|
updateParams,
|
|
197
197
|
headers: {
|
|
198
198
|
"Content-Type": "application/json",
|
|
199
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
199
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
200
200
|
},
|
|
201
201
|
});
|
|
202
202
|
const handleChange = useCallback((field, value) => {
|
|
@@ -349,7 +349,7 @@ export const useStudentProfileModule = () => {
|
|
|
349
349
|
method: API_METHODS.POST,
|
|
350
350
|
headers: {
|
|
351
351
|
"Content-Type": "application/json",
|
|
352
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
352
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
353
353
|
},
|
|
354
354
|
body: JSON.stringify({ studentProfileId: row === null || row === void 0 ? void 0 : row.id }),
|
|
355
355
|
});
|
|
@@ -22,7 +22,7 @@ export const getCachedSubjects = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedSubjectById = (subjectId) => getCachedItemById(LS_KEYS.SUBJECTS, subjectId);
|
|
@@ -215,7 +215,7 @@ export const useSubjectModule = () => {
|
|
|
215
215
|
updateParams,
|
|
216
216
|
headers: {
|
|
217
217
|
"Content-Type": "application/json",
|
|
218
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
218
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
219
219
|
},
|
|
220
220
|
});
|
|
221
221
|
// ============================================================================
|
|
@@ -22,7 +22,7 @@ export const getCachedTeachers = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedTeacherById = (teacherId) => getCachedItemById(LS_KEYS.TEACHERS, teacherId);
|
|
@@ -251,7 +251,7 @@ export const useTeacherModule = () => {
|
|
|
251
251
|
updateParams,
|
|
252
252
|
headers: {
|
|
253
253
|
"Content-Type": "application/json",
|
|
254
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
254
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
255
255
|
},
|
|
256
256
|
});
|
|
257
257
|
// ============================================================================
|
|
@@ -387,7 +387,7 @@ export const useTeacherModule = () => {
|
|
|
387
387
|
method: "POST",
|
|
388
388
|
headers: {
|
|
389
389
|
"Content-Type": "application/json",
|
|
390
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
390
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
391
391
|
},
|
|
392
392
|
body: JSON.stringify({
|
|
393
393
|
teacherId,
|
|
@@ -17,9 +17,9 @@ const POLL_INTERVAL_MS = 2000;
|
|
|
17
17
|
const POLL_TIMEOUT_MS = 300000;
|
|
18
18
|
const handleGetAllRecords = async (schoolId) => {
|
|
19
19
|
const response = await fetch(`${TEACHER_API_ROUTES.UNIT}?pageLimit=1000¤tPage=1&schoolId=${schoolId}`, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
// headers: {
|
|
21
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
22
|
+
// },
|
|
23
23
|
});
|
|
24
24
|
const result = await response.json();
|
|
25
25
|
const csv = await converter.json2csv(result.items || [], {});
|
|
@@ -31,14 +31,13 @@ async function submitBulkJob(csvData, method, signal) {
|
|
|
31
31
|
const schoolId = ((_a = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _a === void 0 ? void 0 : _a.id) || "";
|
|
32
32
|
if (!schoolId)
|
|
33
33
|
throw new Error("School ID not found");
|
|
34
|
-
const apiKey = process.env.NEXT_PUBLIC_API_KEY;
|
|
35
|
-
if (!apiKey)
|
|
36
|
-
throw new Error("API key not configured");
|
|
34
|
+
// const apiKey = process.env.NEXT_PUBLIC_API_KEY;
|
|
35
|
+
// if (!apiKey) throw new Error("API key not configured");
|
|
37
36
|
const res = await fetch(TEACHER_API_ROUTES.BULK, {
|
|
38
37
|
method,
|
|
39
38
|
headers: {
|
|
40
39
|
"Content-Type": "application/json",
|
|
41
|
-
"x-api-token": apiKey,
|
|
40
|
+
// "x-api-token": apiKey,
|
|
42
41
|
},
|
|
43
42
|
body: JSON.stringify({ schoolId, csvData }),
|
|
44
43
|
signal,
|
|
@@ -62,12 +61,11 @@ async function pollBulkJob(jobId, signal, onProgress) {
|
|
|
62
61
|
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
63
62
|
if (signal.aborted)
|
|
64
63
|
throw new Error("Polling cancelled");
|
|
65
|
-
const apiKey = process.env.NEXT_PUBLIC_API_KEY;
|
|
66
|
-
if (!apiKey)
|
|
67
|
-
throw new Error("API key not configured");
|
|
64
|
+
// const apiKey = process.env.NEXT_PUBLIC_API_KEY;
|
|
65
|
+
// if (!apiKey) throw new Error("API key not configured");
|
|
68
66
|
const res = await fetch(TEACHER_API_ROUTES.BULK_STATUS(jobId), {
|
|
69
67
|
headers: {
|
|
70
|
-
|
|
68
|
+
// "x-api-token": apiKey,
|
|
71
69
|
},
|
|
72
70
|
signal,
|
|
73
71
|
});
|
|
@@ -22,7 +22,7 @@ export const getCachedUsers = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedUserById = (userId) => getCachedItemById(LS_KEYS.USERS, userId);
|
|
@@ -187,7 +187,7 @@ export const useUserModule = () => {
|
|
|
187
187
|
updateParams,
|
|
188
188
|
headers: {
|
|
189
189
|
"Content-Type": "application/json",
|
|
190
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
190
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
191
191
|
},
|
|
192
192
|
});
|
|
193
193
|
// ============================================================================
|
|
@@ -375,7 +375,7 @@ export const useUserModule = () => {
|
|
|
375
375
|
url: `${USER_API_ROUTES.UNIT_BY_EMAIL}?email=${encodeURIComponent(String(targetEmail))}`,
|
|
376
376
|
method: API_METHODS.GET,
|
|
377
377
|
headers: {
|
|
378
|
-
|
|
378
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
379
379
|
},
|
|
380
380
|
});
|
|
381
381
|
return (_a = result === null || result === void 0 ? void 0 : result.data) !== null && _a !== void 0 ? _a : null;
|
|
@@ -91,7 +91,7 @@ export const WorkspaceStateContextProvider = ({ children, }) => {
|
|
|
91
91
|
method: "GET",
|
|
92
92
|
headers: {
|
|
93
93
|
"Content-Type": "application/json",
|
|
94
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
94
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
95
95
|
},
|
|
96
96
|
});
|
|
97
97
|
if (response.ok) {
|
|
@@ -22,7 +22,7 @@ export const getCachedWorkspaceUsers = ({ params, }) => getCachedData({
|
|
|
22
22
|
params,
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
25
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
25
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
export const getCachedWorkspaceUserById = (workspaceUserId) => getCachedItemById(LS_KEYS.WORKSPACE_USERS, workspaceUserId);
|
|
@@ -214,7 +214,7 @@ export const useWorkspaceUserModule = () => {
|
|
|
214
214
|
updateParams,
|
|
215
215
|
headers: {
|
|
216
216
|
"Content-Type": "application/json",
|
|
217
|
-
"x-api-token": process.env.NEXT_PUBLIC_API_KEY
|
|
217
|
+
// "x-api-token": process.env.NEXT_PUBLIC_API_KEY!,
|
|
218
218
|
},
|
|
219
219
|
});
|
|
220
220
|
useEffect(() => {
|