@appcorp/fusion-storybook 0.2.54 → 0.2.55
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/context/use-admission-module.js +1 -1
- package/base-modules/admission/filter.js +1 -1
- package/base-modules/admission/form.js +1 -1
- package/base-modules/attendance/context.js +1 -1
- package/base-modules/attendance/form.js +1 -1
- package/base-modules/attendance/more-actions.js +1 -1
- package/base-modules/campus/context.js +1 -1
- package/base-modules/class/cache.js +1 -2
- package/base-modules/class/context.js +1 -1
- package/base-modules/class/more-actions.js +1 -1
- package/base-modules/course/context.js +1 -1
- package/base-modules/course/form.js +1 -1
- package/base-modules/discount-code/cache.js +1 -1
- package/base-modules/discount-code/context.js +1 -1
- package/base-modules/discount-code/form.js +1 -1
- package/base-modules/enrollment/context.js +1 -1
- package/base-modules/enrollment/form.js +1 -1
- package/base-modules/enrollment/more-actions.js +1 -1
- package/base-modules/expense/context.js +1 -1
- package/base-modules/expense/filter.js +2 -2
- package/base-modules/expense/form.js +1 -1
- package/base-modules/expense/more-actions.js +1 -1
- package/base-modules/family/context.js +1 -1
- package/base-modules/family-member/context.js +1 -1
- package/base-modules/fee-structure/cache.js +1 -1
- package/base-modules/fee-structure/context.js +1 -1
- package/base-modules/fee-structure/form.js +2 -2
- package/base-modules/fee-structure/more-actions.js +1 -1
- package/base-modules/rbac/context.js +1 -1
- package/base-modules/school/cache.js +1 -1
- package/base-modules/school/context.js +1 -1
- package/base-modules/school/form.js +1 -1
- package/base-modules/section/cache.js +1 -2
- package/base-modules/section/context.js +1 -1
- package/base-modules/section/form.js +1 -1
- package/base-modules/section/more-actions.js +1 -1
- package/base-modules/student-fee/context/use-student-fee-module.js +1 -1
- package/base-modules/student-fee/filter.js +1 -1
- package/base-modules/student-fee/form.js +1 -1
- package/base-modules/student-fee/more-actions.js +1 -1
- package/base-modules/student-profile/cache.js +1 -2
- package/base-modules/student-profile/context/use-student-profile-module.js +1 -1
- package/base-modules/student-profile/filter.js +1 -1
- package/base-modules/student-profile/form.js +2 -2
- package/base-modules/subject/cache.js +1 -2
- package/base-modules/subject/context.js +1 -1
- package/base-modules/subject/more-actions.js +1 -1
- package/base-modules/teacher/cache.js +1 -1
- package/base-modules/teacher/context.js +1 -1
- package/base-modules/teacher/form.js +1 -1
- package/base-modules/teacher/more-actions.js +1 -1
- package/base-modules/user/cache.js +1 -2
- package/base-modules/user/context/use-user-module.js +1 -1
- package/base-modules/user/form.js +1 -1
- package/base-modules/workspace/cache.js +1 -1
- package/base-modules/workspace/context.js +1 -1
- package/base-modules/workspace/form.js +1 -1
- package/base-modules/workspace-user/context.js +1 -1
- package/package.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -7,7 +7,7 @@ import { useModuleEntityV2, } from "@react-pakistan/util-functions/hooks/use-mod
|
|
|
7
7
|
import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
8
8
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
9
9
|
import { ADMISSION_STATUS, GENDER, } from "../../../type";
|
|
10
|
-
import { ADMISSION_API_ROUTES } from "
|
|
10
|
+
import { ADMISSION_API_ROUTES } from "../../../constants";
|
|
11
11
|
import { admissionFormValidation } from "../validate";
|
|
12
12
|
import { getCachedWorkspaceSync } from "../../workspace/cache";
|
|
13
13
|
import { generateAdmissionReceiptPDF, } from "../../../utils/admission-pdf";
|
|
@@ -10,7 +10,7 @@ import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox
|
|
|
10
10
|
import { EnhancedRadio } from "@appcorp/shadcn/components/enhanced-radio";
|
|
11
11
|
import { useTranslations } from "next-intl";
|
|
12
12
|
import { ADMISSION_STATUS_OPTIONS } from "./constants";
|
|
13
|
-
import { ADMISSION_API_ROUTES } from "
|
|
13
|
+
import { ADMISSION_API_ROUTES } from "../../constants";
|
|
14
14
|
import { useAdmissionModule } from "./context";
|
|
15
15
|
export const AdmissionFilter = () => {
|
|
16
16
|
const { state, handleChange, handleSetStartDate, handleSetEndDate } = useAdmissionModule();
|
|
@@ -20,7 +20,7 @@ import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
|
20
20
|
import { API_METHODS, getDialCode, VALUE_DELIMITER, } from "@react-pakistan/util-functions";
|
|
21
21
|
import { v4 as uuidv4 } from "uuid";
|
|
22
22
|
import { GENDER_OPTIONS } from "./constants";
|
|
23
|
-
import { ADMISSION_API_ROUTES, DISCOUNT_CODE_API_ROUTES } from "
|
|
23
|
+
import { ADMISSION_API_ROUTES, DISCOUNT_CODE_API_ROUTES, } from "../../constants";
|
|
24
24
|
import { useTranslations } from "next-intl";
|
|
25
25
|
import { useFetch } from "@react-pakistan/util-functions/hooks/use-fetch";
|
|
26
26
|
export const AdmissionForm = () => {
|
|
@@ -25,7 +25,7 @@ import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
|
25
25
|
import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
|
|
26
26
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
27
27
|
import { pageLimit } from "./constants";
|
|
28
|
-
import { ATTENDANCE_API_ROUTES } from "
|
|
28
|
+
import { ATTENDANCE_API_ROUTES } from "../../constants";
|
|
29
29
|
import { attendanceFormValidation } from "./validate";
|
|
30
30
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
31
31
|
import { ATTENDANCE_STATUS, } from "../../type";
|
|
@@ -6,7 +6,7 @@ import { EnhancedInput } from "@appcorp/shadcn/components/enhanced-input";
|
|
|
6
6
|
import { EnhancedTextarea } from "@appcorp/shadcn/components/enhanced-textarea";
|
|
7
7
|
import { useAttendanceModule } from "./context";
|
|
8
8
|
import { ATTENDANCE_STATUS_OPTIONS } from "./constants";
|
|
9
|
-
import { ATTENDANCE_API_ROUTES, STUDENT_PROFILE_API_ROUTES } from "
|
|
9
|
+
import { ATTENDANCE_API_ROUTES, STUDENT_PROFILE_API_ROUTES, } from "../../constants";
|
|
10
10
|
import { useTranslations } from "next-intl";
|
|
11
11
|
import { useFetch } from "@react-pakistan/util-functions/hooks/use-fetch";
|
|
12
12
|
import { API_METHODS } from "@react-pakistan/util-functions";
|
|
@@ -4,7 +4,7 @@ import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox
|
|
|
4
4
|
import { EnhancedRadio } from "@appcorp/shadcn/components/enhanced-radio";
|
|
5
5
|
import { EnhancedTextarea } from "@appcorp/shadcn/components/enhanced-textarea";
|
|
6
6
|
import { useState } from "react";
|
|
7
|
-
import { ATTENDANCE_API_ROUTES } from "
|
|
7
|
+
import { ATTENDANCE_API_ROUTES } from "../../constants";
|
|
8
8
|
export const AttendanceMoreActions = ({ labelAttendanceStatus, labelCourse, labelCourseInfo, labelCoursePlaceholder, labelNoCourseFound, labelRemarks, labelRemarksInfo, labelRemarksPlaceholder, labelSearchCourses, labelStatusAbsent, labelStatusExcused, labelStatusHalfDay, labelStatusLate, labelStatusPresent, }) => {
|
|
9
9
|
// const enrollment = getCachedEnrollmentsSync().items;
|
|
10
10
|
// const studentProfiles = getCachedStudentProfilesSync().items;
|
|
@@ -24,7 +24,7 @@ import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-ut
|
|
|
24
24
|
import { formatNumber } from "@react-pakistan/util-functions/general/format-number";
|
|
25
25
|
import { formatPhoneDisplay } from "@react-pakistan/util-functions/general/format-phone-display";
|
|
26
26
|
import { pageLimit } from "./constants";
|
|
27
|
-
import { CAMPUS_API_ROUTES } from "
|
|
27
|
+
import { CAMPUS_API_ROUTES } from "../../constants";
|
|
28
28
|
import { campusFormValidation } from "./validate";
|
|
29
29
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
30
30
|
// ============================================================================
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides localStorage-based caching for classes using generic cache system.
|
|
5
5
|
*/
|
|
6
|
-
import { LS_KEYS } from "../../constants";
|
|
7
|
-
import { CLASS_API_ROUTES } from "@/constants";
|
|
6
|
+
import { LS_KEYS, CLASS_API_ROUTES } from "../../constants";
|
|
8
7
|
import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
|
|
9
8
|
// ============================================================================
|
|
10
9
|
// CACHE CONFIGURATION
|
|
@@ -27,7 +27,7 @@ import { createGenericModule } from "@react-pakistan/util-functions/factory/gene
|
|
|
27
27
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
28
28
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
29
29
|
import { pageLimit } from "./constants";
|
|
30
|
-
import { CLASS_API_ROUTES } from "
|
|
30
|
+
import { CLASS_API_ROUTES } from "../../constants";
|
|
31
31
|
import { classFormValidation } from "./validate";
|
|
32
32
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
33
33
|
// ============================================================================
|
|
@@ -7,7 +7,7 @@ import converter from "json-2-csv";
|
|
|
7
7
|
import { Timeline } from "../../components/timeline";
|
|
8
8
|
import { useTranslations } from "next-intl";
|
|
9
9
|
import { pageLimit } from "./constants";
|
|
10
|
-
import { CLASS_API_ROUTES } from "
|
|
10
|
+
import { CLASS_API_ROUTES } from "../../constants";
|
|
11
11
|
import { CLASS_ACTION_TYPES, useClassContext } from "./context";
|
|
12
12
|
import { useRef, useEffect, useCallback } from "react";
|
|
13
13
|
const workspace = getCachedWorkspaceSync();
|
|
@@ -25,7 +25,7 @@ import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
|
25
25
|
import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
|
|
26
26
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
27
27
|
import { pageLimit } from "./constants";
|
|
28
|
-
import { COURSE_API_ROUTES } from "
|
|
28
|
+
import { COURSE_API_ROUTES } from "../../constants";
|
|
29
29
|
import { courseFormValidation } from "./validate";
|
|
30
30
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
31
31
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
@@ -10,7 +10,7 @@ import { EnhancedInput } from "@appcorp/shadcn/components/enhanced-input";
|
|
|
10
10
|
import { EnhancedCheckbox } from "@appcorp/shadcn/components/enhanced-checkbox";
|
|
11
11
|
import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox";
|
|
12
12
|
import { useCourseModule } from "./context";
|
|
13
|
-
import { COURSE_API_ROUTES } from "
|
|
13
|
+
import { COURSE_API_ROUTES } from "../../constants";
|
|
14
14
|
import { useTranslations } from "next-intl";
|
|
15
15
|
import { useFetch } from "@react-pakistan/util-functions/hooks/use-fetch";
|
|
16
16
|
import { API_METHODS } from "@react-pakistan/util-functions";
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* - `invalidateDiscountCodeCache()` after a successful create/update/delete
|
|
12
12
|
*/
|
|
13
13
|
import { LS_KEYS } from "../../constants";
|
|
14
|
-
import { DISCOUNT_CODE_API_ROUTES } from "
|
|
14
|
+
import { DISCOUNT_CODE_API_ROUTES } from "../../constants";
|
|
15
15
|
import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
|
|
16
16
|
// ============================================================================
|
|
17
17
|
// CACHE CONFIGURATION
|
|
@@ -27,7 +27,7 @@ import { createGenericModule } from "@react-pakistan/util-functions/factory/gene
|
|
|
27
27
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
28
28
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
29
29
|
import { pageLimit } from "./constants";
|
|
30
|
-
import { DISCOUNT_CODE_API_ROUTES } from "
|
|
30
|
+
import { DISCOUNT_CODE_API_ROUTES } from "../../constants";
|
|
31
31
|
import { accountDiscountCodeFormValidation } from "./validate";
|
|
32
32
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
33
33
|
// ============================================================================
|
|
@@ -20,7 +20,7 @@ import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox
|
|
|
20
20
|
import { EnhancedCheckbox } from "@appcorp/shadcn/components/enhanced-checkbox";
|
|
21
21
|
import { DISCOUNT_TYPE } from "../../type";
|
|
22
22
|
import { DISCOUNT_TYPE_OPTIONS } from "./constants";
|
|
23
|
-
import { DISCOUNT_CODE_API_ROUTES } from "
|
|
23
|
+
import { DISCOUNT_CODE_API_ROUTES } from "../../constants";
|
|
24
24
|
export const DiscountCodeForm = () => {
|
|
25
25
|
const { state, handleChange } = useDiscountCodeModule();
|
|
26
26
|
const t = useTranslations("discountCode");
|
|
@@ -25,7 +25,7 @@ import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
|
25
25
|
import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
|
|
26
26
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
27
27
|
import { pageLimit } from "./constants";
|
|
28
|
-
import { ENROLLMENT_API_ROUTES } from "
|
|
28
|
+
import { ENROLLMENT_API_ROUTES } from "../../constants";
|
|
29
29
|
import { enrollmentFormValidation } from "./validate";
|
|
30
30
|
import { TOAST_VARIANT, generateThemeToast, } from "@appcorp/shadcn/lib/toast-utils";
|
|
31
31
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
@@ -17,7 +17,7 @@ import { DATE_FORMATS, formatDate } from "@react-pakistan/util-functions";
|
|
|
17
17
|
import { useEnrollmentModule } from "./context";
|
|
18
18
|
import { getCachedStudentProfilesSync } from "../student-profile/cache";
|
|
19
19
|
import { getCachedSectionsSync } from "../section/cache";
|
|
20
|
-
import { ENROLLMENT_API_ROUTES } from "
|
|
20
|
+
import { ENROLLMENT_API_ROUTES } from "../../constants";
|
|
21
21
|
import { useTranslations } from "next-intl";
|
|
22
22
|
// ============================================================================
|
|
23
23
|
// COMPONENT
|
|
@@ -7,7 +7,7 @@ import converter from "json-2-csv";
|
|
|
7
7
|
import { Timeline } from "../../components/timeline";
|
|
8
8
|
import { useTranslations } from "next-intl";
|
|
9
9
|
import { pageLimit } from "./constants";
|
|
10
|
-
import { ENROLLMENT_API_ROUTES } from "
|
|
10
|
+
import { ENROLLMENT_API_ROUTES } from "../../constants";
|
|
11
11
|
import { ENROLLMENT_ACTION_TYPES, useEnrollmentContext } from "./context";
|
|
12
12
|
import { useRef, useEffect, useCallback } from "react";
|
|
13
13
|
const workspace = getCachedWorkspaceSync();
|
|
@@ -29,7 +29,7 @@ import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-com
|
|
|
29
29
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
30
30
|
import { PAYMENT_METHOD, } from "../../type";
|
|
31
31
|
import { pageLimit } from "./constants";
|
|
32
|
-
import { EXPENSE_API_ROUTES } from "
|
|
32
|
+
import { EXPENSE_API_ROUTES } from "../../constants";
|
|
33
33
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
34
34
|
import { expenseFormValidation } from "./validate";
|
|
35
35
|
// ============================================================================
|
|
@@ -9,8 +9,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
import { EnhancedRadio } from "@appcorp/shadcn/components/enhanced-radio";
|
|
10
10
|
import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox";
|
|
11
11
|
import { useExpenseModule } from "./context";
|
|
12
|
-
import { EXPENSE_CATEGORY_OPTIONS, EXPENSE_STATUS_OPTIONS
|
|
13
|
-
import { EXPENSE_API_ROUTES } from "
|
|
12
|
+
import { EXPENSE_CATEGORY_OPTIONS, EXPENSE_STATUS_OPTIONS } from "./constants";
|
|
13
|
+
import { EXPENSE_API_ROUTES } from "../../constants";
|
|
14
14
|
import { useTranslations } from "next-intl";
|
|
15
15
|
export const ExpenseFilter = () => {
|
|
16
16
|
const { state, handleChange } = useExpenseModule();
|
|
@@ -12,7 +12,7 @@ import { EnhancedTextarea } from "@appcorp/shadcn/components/enhanced-textarea";
|
|
|
12
12
|
import { EnhancedDropzone } from "@appcorp/shadcn/components/enhanced-dropzone";
|
|
13
13
|
import { useExpenseModule } from "./context";
|
|
14
14
|
import { EXPENSE_CATEGORY_OPTIONS, EXPENSE_STATUS_OPTIONS, PAYMENT_METHOD_OPTIONS, } from "./constants";
|
|
15
|
-
import { EXPENSE_API_ROUTES } from "
|
|
15
|
+
import { EXPENSE_API_ROUTES } from "../../constants";
|
|
16
16
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
17
17
|
import { useTranslations } from "next-intl";
|
|
18
18
|
export const ExpenseForm = () => {
|
|
@@ -10,7 +10,7 @@ import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
|
10
10
|
import converter from "json-2-csv";
|
|
11
11
|
import { Timeline } from "../../components/timeline";
|
|
12
12
|
import { useTranslations } from "next-intl";
|
|
13
|
-
import { EXPENSE_API_ROUTES } from "
|
|
13
|
+
import { EXPENSE_API_ROUTES } from "../../constants";
|
|
14
14
|
const handleGetAllRecords = async (schoolId) => {
|
|
15
15
|
const response = await fetch(`${EXPENSE_API_ROUTES.UNIT}?pageLimit=1000¤tPage=1&schoolId=${schoolId}`, { method: API_METHODS.GET });
|
|
16
16
|
const result = await response.json();
|
|
@@ -25,7 +25,7 @@ import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
|
25
25
|
import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
|
|
26
26
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
27
27
|
import { pageLimit } from "./constants";
|
|
28
|
-
import { FAMILY_API_ROUTES } from "
|
|
28
|
+
import { FAMILY_API_ROUTES } from "../../constants";
|
|
29
29
|
import { familyFormValidation } from "./validate";
|
|
30
30
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
31
31
|
import { useTranslations } from "next-intl";
|
|
@@ -26,7 +26,7 @@ import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
|
26
26
|
import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
|
|
27
27
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
28
28
|
import { pageLimit } from "./constants";
|
|
29
|
-
import { FAMILY_MEMBER_API_ROUTES } from "
|
|
29
|
+
import { FAMILY_MEMBER_API_ROUTES } from "../../constants";
|
|
30
30
|
import { familyMemberFormValidation } from "./validate";
|
|
31
31
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
32
32
|
import { formatNumber } from "@react-pakistan/util-functions/general/format-number";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides localStorage-based caching for fee structures using generic cache system.
|
|
5
5
|
*/
|
|
6
6
|
import { LS_KEYS } from "../../constants";
|
|
7
|
-
import { FEE_STRUCTURE_API_ROUTES } from "
|
|
7
|
+
import { FEE_STRUCTURE_API_ROUTES } from "../../constants";
|
|
8
8
|
import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
|
|
9
9
|
// ============================================================================
|
|
10
10
|
// CACHE CONFIGURATION
|
|
@@ -25,7 +25,7 @@ import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
|
25
25
|
import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
|
|
26
26
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
27
27
|
import { pageLimit } from "./constants";
|
|
28
|
-
import { FEE_STRUCTURE_API_ROUTES } from "
|
|
28
|
+
import { FEE_STRUCTURE_API_ROUTES } from "../../constants";
|
|
29
29
|
import { feeStructureFormValidation } from "./validate";
|
|
30
30
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
31
31
|
import { FEE_TYPE } from "../../type";
|
|
@@ -10,8 +10,8 @@ import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox
|
|
|
10
10
|
import { EnhancedInput } from "@appcorp/shadcn/components/enhanced-input";
|
|
11
11
|
import { EnhancedTextarea } from "@appcorp/shadcn/components/enhanced-textarea";
|
|
12
12
|
import { useFeeStructureModule } from "./context";
|
|
13
|
-
import { FEE_TYPE_OPTIONS, FREQUENCY_OPTIONS
|
|
14
|
-
import { FEE_STRUCTURE_API_ROUTES } from "
|
|
13
|
+
import { FEE_TYPE_OPTIONS, FREQUENCY_OPTIONS } from "./constants";
|
|
14
|
+
import { FEE_STRUCTURE_API_ROUTES } from "../../constants";
|
|
15
15
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
16
16
|
import { useTranslations } from "next-intl";
|
|
17
17
|
import { useFetch } from "@react-pakistan/util-functions/hooks/use-fetch";
|
|
@@ -8,7 +8,7 @@ import { Timeline } from "../../components/timeline";
|
|
|
8
8
|
import { useTranslations } from "next-intl";
|
|
9
9
|
import { feeStructureFormValidation } from "./validate";
|
|
10
10
|
import { pageLimit } from "./constants";
|
|
11
|
-
import { FEE_STRUCTURE_API_ROUTES } from "
|
|
11
|
+
import { FEE_STRUCTURE_API_ROUTES } from "../../constants";
|
|
12
12
|
import { FEE_STRUCTURE_ACTION_TYPES, useFeeStructureContext } from "./context";
|
|
13
13
|
import { useRef, useEffect, useCallback } from "react";
|
|
14
14
|
const workspace = getCachedWorkspaceSync();
|
|
@@ -28,7 +28,7 @@ import { createGenericModule } from "@react-pakistan/util-functions/factory/gene
|
|
|
28
28
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
29
29
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
30
30
|
import { pageLimit } from "./constants";
|
|
31
|
-
import { RBAC_API_ROUTES } from "
|
|
31
|
+
import { RBAC_API_ROUTES } from "../../constants";
|
|
32
32
|
import { roleFormValidation } from "./validate";
|
|
33
33
|
// ============================================================================
|
|
34
34
|
// 1.1 DRAWER TYPES
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Cache utilities for account-school data using generic cache system.
|
|
5
5
|
*/
|
|
6
6
|
import { getCachedSingleItem, getCachedSingleItemSync, invalidateCache, } from "@react-pakistan/util-functions";
|
|
7
|
-
import { SCHOOL_API_ROUTES } from "
|
|
7
|
+
import { SCHOOL_API_ROUTES } from "../../constants";
|
|
8
8
|
import { LS_KEYS } from "../../constants";
|
|
9
9
|
// ============================================================================
|
|
10
10
|
// CACHE CONFIGURATION
|
|
@@ -25,7 +25,7 @@ import { useModuleEntityV2, } from "@react-pakistan/util-functions/hooks/use-mod
|
|
|
25
25
|
import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
|
|
26
26
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
27
27
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
28
|
-
import { SCHOOL_API_ROUTES } from "
|
|
28
|
+
import { SCHOOL_API_ROUTES } from "../../constants";
|
|
29
29
|
import { invalidateSchoolCache } from "./cache";
|
|
30
30
|
import { schoolFormValidation } from "./validate";
|
|
31
31
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
@@ -10,7 +10,7 @@ import { EnhancedCheckbox } from "@appcorp/shadcn/components/enhanced-checkbox";
|
|
|
10
10
|
import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox";
|
|
11
11
|
import { useSchoolModule } from "./context";
|
|
12
12
|
import { CURRENCY } from "../../type";
|
|
13
|
-
import { SCHOOL_API_ROUTES } from "
|
|
13
|
+
import { SCHOOL_API_ROUTES } from "../../constants";
|
|
14
14
|
import { useTranslations } from "next-intl";
|
|
15
15
|
export const SchoolForm = () => {
|
|
16
16
|
const t = useTranslations("school");
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides localStorage-based caching for sections using generic cache system.
|
|
5
5
|
*/
|
|
6
|
-
import { LS_KEYS } from "../../constants";
|
|
7
|
-
import { SECTION_API_ROUTES } from "@/constants";
|
|
6
|
+
import { LS_KEYS, SECTION_API_ROUTES } from "../../constants";
|
|
8
7
|
import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
|
|
9
8
|
// ============================================================================
|
|
10
9
|
// CACHE CONFIGURATION
|
|
@@ -27,7 +27,7 @@ import { createGenericModule } from "@react-pakistan/util-functions/factory/gene
|
|
|
27
27
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
28
28
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
29
29
|
import { pageLimit } from "./constants";
|
|
30
|
-
import { SECTION_API_ROUTES } from "
|
|
30
|
+
import { SECTION_API_ROUTES } from "../../constants";
|
|
31
31
|
import { sectionFormValidation } from "./validate";
|
|
32
32
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
33
33
|
// ============================================================================
|
|
@@ -12,7 +12,7 @@ import { EnhancedCheckbox } from "@appcorp/shadcn/components/enhanced-checkbox";
|
|
|
12
12
|
import { useSectionModule } from "./context";
|
|
13
13
|
import { useTranslations } from "next-intl";
|
|
14
14
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
15
|
-
import { SECTION_API_ROUTES } from "
|
|
15
|
+
import { SECTION_API_ROUTES } from "../../constants";
|
|
16
16
|
import { useFetch } from "@react-pakistan/util-functions/hooks/use-fetch";
|
|
17
17
|
import { API_METHODS } from "@react-pakistan/util-functions";
|
|
18
18
|
export const SectionForm = () => {
|
|
@@ -7,7 +7,7 @@ import converter from "json-2-csv";
|
|
|
7
7
|
import { Timeline } from "../../components/timeline";
|
|
8
8
|
import { useTranslations } from "next-intl";
|
|
9
9
|
import { pageLimit } from "./constants";
|
|
10
|
-
import { SECTION_API_ROUTES } from "
|
|
10
|
+
import { SECTION_API_ROUTES } from "../../constants";
|
|
11
11
|
import { SECTION_ACTION_TYPES, useSectionContext } from "./context";
|
|
12
12
|
import { useRef, useEffect, useCallback } from "react";
|
|
13
13
|
const workspace = getCachedWorkspaceSync();
|
|
@@ -7,7 +7,7 @@ import { useModuleEntityV2, } from "@react-pakistan/util-functions/hooks/use-mod
|
|
|
7
7
|
import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
8
8
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
9
9
|
import { PAYMENT_STATUS, DISCOUNT_TYPE, } from "../../../type";
|
|
10
|
-
import { STUDENT_FEE_API_ROUTES } from "
|
|
10
|
+
import { STUDENT_FEE_API_ROUTES } from "../../../constants";
|
|
11
11
|
import { studentFeeFormValidation } from "../validate";
|
|
12
12
|
import { getCachedWorkspaceSync } from "../../workspace/cache";
|
|
13
13
|
import { getCachedFeeStructureById } from "../../fee-structure/cache";
|
|
@@ -10,7 +10,7 @@ import { EnhancedRadio } from "@appcorp/shadcn/components/enhanced-radio";
|
|
|
10
10
|
import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox";
|
|
11
11
|
import { useStudentFeeModule } from "./context";
|
|
12
12
|
import { PAYMENT_STATUS_OPTIONS } from "./constants";
|
|
13
|
-
import { STUDENT_FEE_API_ROUTES } from "
|
|
13
|
+
import { STUDENT_FEE_API_ROUTES } from "../../constants";
|
|
14
14
|
import { useTranslations } from "next-intl";
|
|
15
15
|
export const StudentFeeFilter = () => {
|
|
16
16
|
const { state, handleChange } = useStudentFeeModule();
|
|
@@ -13,7 +13,7 @@ import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox
|
|
|
13
13
|
import { useMemo } from "react";
|
|
14
14
|
import { useStudentFeeModule } from "./context";
|
|
15
15
|
import { PAYMENT_STATUS_OPTIONS } from "./constants";
|
|
16
|
-
import { STUDENT_FEE_API_ROUTES, DISCOUNT_CODE_API_ROUTES, FEE_STRUCTURE_API_ROUTES } from "
|
|
16
|
+
import { STUDENT_FEE_API_ROUTES, DISCOUNT_CODE_API_ROUTES, FEE_STRUCTURE_API_ROUTES, } from "../../constants";
|
|
17
17
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
18
18
|
import { API_METHODS, DATE_FORMATS, formatDate, } from "@react-pakistan/util-functions";
|
|
19
19
|
import { DISCOUNT_TYPE, } from "../../type";
|
|
@@ -10,7 +10,7 @@ import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
|
10
10
|
import converter from "json-2-csv";
|
|
11
11
|
import { Timeline } from "../../components/timeline";
|
|
12
12
|
import { useTranslations } from "next-intl";
|
|
13
|
-
import { STUDENT_FEE_API_ROUTES } from "
|
|
13
|
+
import { STUDENT_FEE_API_ROUTES } from "../../constants";
|
|
14
14
|
const handleGetAllRecords = async (schoolId) => {
|
|
15
15
|
const response = await fetch(`${STUDENT_FEE_API_ROUTES.UNIT}?pageLimit=1000¤tPage=1&schoolId=${schoolId}`, { method: API_METHODS.GET });
|
|
16
16
|
const result = await response.json();
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides localStorage-based caching for student profiles using generic cache system.
|
|
5
5
|
*/
|
|
6
|
-
import { LS_KEYS } from "../../constants";
|
|
7
|
-
import { STUDENT_PROFILE_API_ROUTES } from "@/constants";
|
|
6
|
+
import { LS_KEYS, STUDENT_PROFILE_API_ROUTES } from "../../constants";
|
|
8
7
|
import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
|
|
9
8
|
// ============================================================================
|
|
10
9
|
// CACHE CONFIGURATION
|
|
@@ -8,7 +8,7 @@ import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-ut
|
|
|
8
8
|
import { STUDENT_STATUS } from "../../../type";
|
|
9
9
|
import { formatNumber } from "@react-pakistan/util-functions/general/format-number";
|
|
10
10
|
import { formatPhoneDisplay } from "@react-pakistan/util-functions/general/format-phone-display";
|
|
11
|
-
import { STUDENT_PROFILE_API_ROUTES } from "
|
|
11
|
+
import { STUDENT_PROFILE_API_ROUTES } from "../../../constants";
|
|
12
12
|
import { studentProfileFormValidation } from "../validate";
|
|
13
13
|
import { getCachedWorkspaceSync } from "../../workspace/cache";
|
|
14
14
|
import { useStudentProfileContext, STUDENT_PROFILE_ACTION_TYPES, STUDENT_PROFILE_DRAWER, } from "./module-base";
|
|
@@ -5,7 +5,7 @@ import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox
|
|
|
5
5
|
import { useTranslations } from "next-intl";
|
|
6
6
|
import { useStudentProfileModule } from "./context";
|
|
7
7
|
import { STATUS_OPTIONS } from "./constants";
|
|
8
|
-
import { STUDENT_PROFILE_API_ROUTES } from "
|
|
8
|
+
import { STUDENT_PROFILE_API_ROUTES } from "../../constants";
|
|
9
9
|
export const StudentProfileFilter = () => {
|
|
10
10
|
const t = useTranslations("studentProfile");
|
|
11
11
|
const context = useStudentProfileModule();
|
|
@@ -6,8 +6,8 @@ import { EnhancedTextarea } from "@appcorp/shadcn/components/enhanced-textarea";
|
|
|
6
6
|
import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox";
|
|
7
7
|
import { useTranslations } from "next-intl";
|
|
8
8
|
import { useStudentProfileModule } from "./context";
|
|
9
|
-
import { STATUS_OPTIONS, GENDER_OPTIONS
|
|
10
|
-
import { STUDENT_PROFILE_API_ROUTES } from "
|
|
9
|
+
import { STATUS_OPTIONS, GENDER_OPTIONS } from "./constants";
|
|
10
|
+
import { STUDENT_PROFILE_API_ROUTES } from "../../constants";
|
|
11
11
|
export const StudentProfileForm = () => {
|
|
12
12
|
const t = useTranslations("studentProfile");
|
|
13
13
|
const genderLabelMap = {
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides localStorage-based caching for subjects using generic cache system.
|
|
5
5
|
*/
|
|
6
|
-
import { LS_KEYS } from "../../constants";
|
|
7
|
-
import { SUBJECT_API_ROUTES } from "@/constants";
|
|
6
|
+
import { LS_KEYS, SUBJECT_API_ROUTES } from "../../constants";
|
|
8
7
|
import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
|
|
9
8
|
// ============================================================================
|
|
10
9
|
// CACHE CONFIGURATION
|
|
@@ -25,7 +25,7 @@ import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
|
25
25
|
import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
|
|
26
26
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
27
27
|
import { pageLimit } from "./constants";
|
|
28
|
-
import { SUBJECT_API_ROUTES } from "
|
|
28
|
+
import { SUBJECT_API_ROUTES } from "../../constants";
|
|
29
29
|
import { subjectFormValidation } from "./validate";
|
|
30
30
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
31
31
|
import { useTheme } from "next-themes";
|
|
@@ -7,7 +7,7 @@ import converter from "json-2-csv";
|
|
|
7
7
|
import { Timeline } from "../../components/timeline";
|
|
8
8
|
import { useTranslations } from "next-intl";
|
|
9
9
|
import { pageLimit } from "./constants";
|
|
10
|
-
import { SUBJECT_API_ROUTES } from "
|
|
10
|
+
import { SUBJECT_API_ROUTES } from "../../constants";
|
|
11
11
|
import { SUBJECT_ACTION_TYPES, useSubjectContext } from "./context";
|
|
12
12
|
import { useRef, useEffect, useCallback } from "react";
|
|
13
13
|
const workspace = getCachedWorkspaceSync();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides localStorage-based caching for teachers using generic cache system.
|
|
5
5
|
*/
|
|
6
6
|
import { LS_KEYS } from "../../constants";
|
|
7
|
-
import { TEACHER_API_ROUTES } from "
|
|
7
|
+
import { TEACHER_API_ROUTES } from "../../constants";
|
|
8
8
|
import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
|
|
9
9
|
// ============================================================================
|
|
10
10
|
// CACHE CONFIGURATION
|
|
@@ -28,7 +28,7 @@ import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-com
|
|
|
28
28
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
29
29
|
import { GENDER } from "../../type";
|
|
30
30
|
import { pageLimit } from "./constants";
|
|
31
|
-
import { TEACHER_API_ROUTES } from "
|
|
31
|
+
import { TEACHER_API_ROUTES } from "../../constants";
|
|
32
32
|
import { teacherFormValidation } from "./validate";
|
|
33
33
|
import { getCachedWorkspaceSync } from "../workspace/cache";
|
|
34
34
|
import { processAvatarFile } from "./avatar-upload";
|
|
@@ -8,7 +8,7 @@ import { EnhancedTextarea } from "@appcorp/shadcn/components/enhanced-textarea";
|
|
|
8
8
|
import { useTranslations } from "next-intl";
|
|
9
9
|
import { useTeacherModule } from "./context";
|
|
10
10
|
import { GENDER_OPTIONS } from "./constants";
|
|
11
|
-
import { TEACHER_API_ROUTES } from "
|
|
11
|
+
import { TEACHER_API_ROUTES } from "../../constants";
|
|
12
12
|
export const TeacherForm = () => {
|
|
13
13
|
const t = useTranslations("teacher");
|
|
14
14
|
const genderLabelMap = {
|
|
@@ -8,7 +8,7 @@ import { Timeline } from "../../components/timeline";
|
|
|
8
8
|
import { useTranslations } from "next-intl";
|
|
9
9
|
import { teacherFormValidation } from "./validate";
|
|
10
10
|
import { pageLimit } from "./constants";
|
|
11
|
-
import { TEACHER_API_ROUTES } from "
|
|
11
|
+
import { TEACHER_API_ROUTES } from "../../constants";
|
|
12
12
|
import { TEACHER_ACTION_TYPES, useTeacherContext } from "./context";
|
|
13
13
|
import { useRef, useEffect, useCallback } from "react";
|
|
14
14
|
const workspace = getCachedWorkspaceSync();
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides localStorage-based caching for users using generic cache system.
|
|
5
5
|
*/
|
|
6
|
-
import { LS_KEYS } from "../../constants";
|
|
7
|
-
import { USER_API_ROUTES } from "@/constants";
|
|
6
|
+
import { LS_KEYS, USER_API_ROUTES } from "../../constants";
|
|
8
7
|
import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
|
|
9
8
|
// ============================================================================
|
|
10
9
|
// CACHE CONFIGURATION
|
|
@@ -6,7 +6,7 @@ import { isCreatedOrUpdated, validateForm, API_METHODS, fetchData, } from "@reac
|
|
|
6
6
|
import { useModuleEntityV2, } from "@react-pakistan/util-functions/hooks/use-module-entity-v2";
|
|
7
7
|
import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
8
8
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
9
|
-
import { USER_API_ROUTES } from "
|
|
9
|
+
import { USER_API_ROUTES } from "../../../constants";
|
|
10
10
|
import { userFormValidation } from "../validate";
|
|
11
11
|
import { getCachedWorkspaceSync } from "../../workspace/cache";
|
|
12
12
|
import { blobToWebP } from "webp-converter-browser";
|
|
@@ -7,7 +7,7 @@ import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox
|
|
|
7
7
|
import { EnhancedDropzone } from "@appcorp/shadcn/components/enhanced-dropzone";
|
|
8
8
|
import { useUserModule } from "./context";
|
|
9
9
|
import { USER_ROLE } from "../../type";
|
|
10
|
-
import { USER_API_ROUTES } from "
|
|
10
|
+
import { USER_API_ROUTES } from "../../constants";
|
|
11
11
|
import { formatPhone } from "@react-pakistan/util-functions/general/format-phone";
|
|
12
12
|
import { useState } from "react";
|
|
13
13
|
import { Eye, EyeOff } from "lucide-react";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Cache utilities for workspace data using generic cache system.
|
|
5
5
|
*/
|
|
6
6
|
import { getCachedSingleItem, getCachedSingleItemSync, invalidateCache, ONE_YEAR_IN_MS, } from "@react-pakistan/util-functions";
|
|
7
|
-
import { WORKSPACE_API_ROUTES } from "
|
|
7
|
+
import { WORKSPACE_API_ROUTES } from "../../constants";
|
|
8
8
|
import { LS_KEYS } from "../../constants";
|
|
9
9
|
// ============================================================================
|
|
10
10
|
// CACHE CONFIGURATION
|
|
@@ -26,7 +26,7 @@ import { useModuleEntityV2, } from "@react-pakistan/util-functions/hooks/use-mod
|
|
|
26
26
|
import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
|
|
27
27
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
28
28
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
29
|
-
import { WORKSPACE_API_ROUTES } from "
|
|
29
|
+
import { WORKSPACE_API_ROUTES } from "../../constants";
|
|
30
30
|
import { getCachedWorkspaceSync, invalidateWorkspaceCache } from "./cache";
|
|
31
31
|
import { workspaceFormValidation } from "./validate";
|
|
32
32
|
import { AUTH_API_ROUTES } from "../../constants";
|