ubk.erp.webpack 1.4.2 → 1.4.3

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 CHANGED
@@ -787,6 +787,84 @@ const CommunicatePage = ({ token }) => {
787
787
  };
788
788
  ```
789
789
 
790
+ ### Exam
791
+
792
+ | Component | Description |
793
+ | :--- | :--- |
794
+ |
795
+ | `Exam` | Create an exam schedule. |
796
+ | `ExamList` | Exam schedule list. |
797
+ | `ExamEdit` | Edit an exam schedule. |
798
+ | `ExamDetails` | Exam schedule details. |
799
+ | `ExamLink` | Exam links. |
800
+ | `ExamType` | Exam type list. |
801
+ | `Grade` | Grade master — add, edit and delete grades with a mark range (Mark From / Mark To) and remark. |
802
+ | `CoScholasticAreaGrade` | Co-scholastic grade master — add, edit and delete grades with a remark (no mark range). |
803
+ | `ExamSetting` | Per exam/class report card settings: class-teacher signature per section, Exam I/C signature, report card title, marksheet issue date, promoted-to and abbreviations. |
804
+ | `ExamInstruction` | Pick an exam and edit its instructions in a rich-text editor (bold, italic, underline, lists). Saved as HTML and printed on the admit card. |
805
+ | `Assessment` | Assessment management. |
806
+ | `AssignMarks` | Enter exam marks for students. |
807
+ | `CoScholasticAreaMarks` | Search by Class / Section / Exam / Co-Scholastic Category, then enter a grade per student per skill and save. |
808
+ | `StudentResult` | Search by Class / Section / Exam to see each student's marks, percentage, marks-entry progress, meetings and attendance. Edit remarks, meeting dates, attendance and result per student. |
809
+ | `MarksReport` | Marks report. |
810
+ | `AdmitCardSetting` | Admit card settings (photo, room no, subject list, exam time, invigilator and Exam I/C signature toggles). |
811
+ | `AdmitPrint` | Search by Class / Section / Exam and print admit cards using one of three templates. The class's assigned template is preselected. |
812
+ | `RoomManagment` | Add/delete exam rooms, and assign rooms with roll-number ranges per section for a class and exam. |
813
+
814
+ ### Using the Exam Module
815
+
816
+ ```jsx
817
+ import {
818
+ Grade,
819
+ CoScholasticAreaGrade,
820
+ ExamSetting,
821
+ ExamInstruction,
822
+ CoScholasticAreaMarks,
823
+ StudentResult,
824
+ AdmitPrint,
825
+ RoomManagment,
826
+ } from "ubk.erp.webpack";
827
+
828
+ const ExamPage = ({ token }) => {
829
+ return (
830
+ <>
831
+ <Grade token={token} />
832
+ <CoScholasticAreaGrade token={token} />
833
+ <ExamSetting token={token} />
834
+ <ExamInstruction token={token} />
835
+ <CoScholasticAreaMarks token={token} />
836
+ <StudentResult token={token} />
837
+ <AdmitPrint token={token} />
838
+ <RoomManagment token={token} />
839
+ </>
840
+ );
841
+ };
842
+ ```
843
+
844
+ **Notes:**
845
+ - `AdmitPrint` reads the session name from `localStorage.academy_session` (templates 2 and 3). Set it in the host app, otherwise the session shows as blank / `-`.
846
+ - `AdmitPrint` requests `per_page=10` students per search.
847
+ - The **View Result** button in `StudentResult` navigates to `/ExamDashboard/SingleResult?id=…&exam_id=…`, which is not part of this library yet.
848
+ - `RoomManagment` is spelled as in the original project (no "e" after "g").
849
+
850
+ **Endpoint overrides** — each Exam endpoint has a built-in default and can be overridden with a `VITE_*` variable in `.env`, for example:
851
+
852
+ | Variable | Default |
853
+ | :--- | :--- |
854
+ | `VITE_GRADE_TABLE_URL` / `_ADD_URL` / `_EDIT_URL` / `_DELETE_URL` | `/api/exam/exam/getgradeTable`, `addGrade`, `editGradec`, `deleteGrade` |
855
+ | `VITE_COSCHOLASTIC_GRADE_TABLE_URL` / `_ADD_URL` / `_EDIT_URL` / `_DELETE_URL` | `/api/exam/exam/getgradeTableCoScholastic`, `addGradeCoScholastic`, `editGradeCoScholastic`, `deleteGradeCoScholastic` |
856
+ | `VITE_COSCHOLASTIC_GRADE_DROPDOWN_URL` | `/api/exam/exam/gradeDropdownCoScholastic` |
857
+ | `VITE_COSCHOLASTIC_ASSIGN_MARKS_URL` | `/api/exam/exam/assignCoscholasticMarks` |
858
+ | `VITE_COSCHOLASTIC_CATEGORY_DROPDOWN_URL` | `/api/branchapi/academy/getscholasticCategoryByClassId` |
859
+ | `VITE_EXAM_SETTING_UPLOAD_FILE_URL` | `api/SuperAdmin/uploadFile` (signature uploads, saved to `schoolFile`) |
860
+ | `VITE_EXAM_ROOM_LIST_URL` / `_DELETE_URL` | `/api/exam/Exam/listClassRoom`, `/api/exam/Exam/removeClassRoom` |
861
+ | `VITE_EXAM_ROOM_ADD_URL` | `/api/exam/exam/addClassRoom` |
862
+ | `VITE_EXAM_ROOM_ASSIGNED_LIST_URL` | `/api/exam/Exam/getClassRoomdata` |
863
+ | `VITE_EXAM_ROOM_ASSIGN_URL` / `_REMOVE_URL` | `/api/exam/exam/assignClassRoom`, `/api/exam/exam/remove_exam_class_room` |
864
+ | `VITE_EXAM_ROOM_DROPDOWN_URL` / `_EXAM_DROPDOWN_URL` | `/api/exam/exam/roomDropdown`, `examdropdown_new` |
865
+
866
+ See `src/Layout/Exam/Services/examsService.js` for the full list.
867
+
790
868
 
791
869
 
792
870
  ## 🛠️ Development
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export default AdmitPrint;
3
+ declare function AdmitPrint({ token }: {
4
+ token: any;
5
+ }): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export default CoScholasticAreaGrade;
3
+ declare function CoScholasticAreaGrade({ token }: {
4
+ token: any;
5
+ }): React.JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ export function templateOptionAdmit(): {
3
+ label: string;
4
+ value: string;
5
+ }[];
6
+ export function buildTemplateContext(data: any): {
7
+ academy_session: any;
8
+ exam_details: any;
9
+ receipt_info: any;
10
+ general_setting: any;
11
+ students: any;
12
+ settings: any;
13
+ };
14
+ export default AdmitCardTemplate;
15
+ declare function AdmitCardTemplate({ templateId, data }: {
16
+ templateId: any;
17
+ data: any;
18
+ }): React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ export default AssignClassRoomEditor;
3
+ /**
4
+ * Add mode (no rowData): pick class + exam, then fill roll ranges per section.
5
+ * Update mode (rowData = an assigned-room record): locked to that record's class, exam and section.
6
+ * Calls onSubmit(formData) with class_id, exam_id, the row arrays and added/updated/deleted JSON.
7
+ */
8
+ declare function AssignClassRoomEditor({ token, rowData, onSubmit }: {
9
+ token: any;
10
+ rowData: any;
11
+ onSubmit: any;
12
+ }): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export default Grade;
3
+ declare function Grade({ token }: {
4
+ token: any;
5
+ }): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export default AdmitPrintPage;
3
+ declare function AdmitPrintPage({ token }: {
4
+ token: any;
5
+ }): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export default CoScholasticAreaGradePage;
3
+ declare function CoScholasticAreaGradePage({ token }: {
4
+ token: any;
5
+ }): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export default GradePage;
3
+ declare function GradePage({ token }: {
4
+ token: any;
5
+ }): React.JSX.Element;
@@ -6,11 +6,31 @@ export namespace endpoints {
6
6
  let edit: any;
7
7
  let remove: any;
8
8
  }
9
- export namespace examSchedule {
9
+ export namespace grade {
10
+ let table_1: any;
11
+ export { table_1 as table };
10
12
  let add_1: any;
11
13
  export { add_1 as add };
12
14
  let edit_1: any;
13
15
  export { edit_1 as edit };
16
+ let remove_1: any;
17
+ export { remove_1 as remove };
18
+ }
19
+ export namespace coScholasticGrade {
20
+ let table_2: any;
21
+ export { table_2 as table };
22
+ let add_2: any;
23
+ export { add_2 as add };
24
+ let edit_2: any;
25
+ export { edit_2 as edit };
26
+ let remove_2: any;
27
+ export { remove_2 as remove };
28
+ }
29
+ export namespace examSchedule {
30
+ let add_3: any;
31
+ export { add_3 as add };
32
+ let edit_3: any;
33
+ export { edit_3 as edit };
14
34
  export let getById: any;
15
35
  export let list: any;
16
36
  let dropdown_1: any;
@@ -29,17 +49,17 @@ export namespace endpoints {
29
49
  export let update: any;
30
50
  }
31
51
  export namespace examSetting {
32
- let table_1: any;
33
- export { table_1 as table };
34
- let add_2: any;
35
- export { add_2 as add };
52
+ let table_3: any;
53
+ export { table_3 as table };
54
+ let add_4: any;
55
+ export { add_4 as add };
36
56
  export let uploadSignature: any;
37
57
  export let typeByExamId: any;
38
58
  export let assignMarksheetClass: any;
39
59
  }
40
60
  export namespace assessment {
41
- let table_2: any;
42
- export { table_2 as table };
61
+ let table_4: any;
62
+ export { table_4 as table };
43
63
  let dropdown_3: any;
44
64
  export { dropdown_3 as dropdown };
45
65
  let _delete: any;
@@ -62,6 +82,7 @@ export namespace endpoints {
62
82
  let getGradeTable: any;
63
83
  let getGradeTableCoScholastic: any;
64
84
  let getAdmitCard: any;
85
+ let subjectDropdown: any;
65
86
  }
66
87
  export namespace admitCardSetting {
67
88
  let get_1: any;
@@ -72,14 +93,18 @@ export namespace endpoints {
72
93
  export namespace roomManagement {
73
94
  let list_1: any;
74
95
  export { list_1 as list };
75
- let remove_1: any;
76
- export { remove_1 as remove };
96
+ export let removeRoom: any;
97
+ export let assignedList: any;
98
+ export let examDropdown: any;
99
+ let remove_3: any;
100
+ export { remove_3 as remove };
77
101
  export let assign: any;
78
- let add_3: any;
79
- export { add_3 as add };
102
+ let add_5: any;
103
+ export { add_5 as add };
80
104
  export let roomDropdown: any;
81
105
  }
82
- export let examDropdown: any;
106
+ let examDropdown_1: any;
107
+ export { examDropdown_1 as examDropdown };
83
108
  export let examDropdownInstruction: any;
84
109
  export namespace observation {
85
110
  let dropdown_4: any;
@@ -89,19 +114,24 @@ export namespace endpoints {
89
114
  export let deleteType: any;
90
115
  export let editType: any;
91
116
  export let addType: any;
92
- let add_4: any;
93
- export { add_4 as add };
117
+ let add_6: any;
118
+ export { add_6 as add };
94
119
  }
95
120
  export let coscholasticCategoryDropdown: any;
121
+ export namespace coScholasticMarks {
122
+ export let gradeDropdown: any;
123
+ let assign_1: any;
124
+ export { assign_1 as assign };
125
+ }
96
126
  export namespace templateType {
97
127
  let get_2: any;
98
128
  export { get_2 as get };
99
129
  export let assignClassDropdown: any;
100
130
  export let assignTable: any;
101
- let assign_1: any;
102
- export { assign_1 as assign };
103
- let remove_2: any;
104
- export { remove_2 as remove };
131
+ let assign_2: any;
132
+ export { assign_2 as assign };
133
+ let remove_4: any;
134
+ export { remove_4 as remove };
105
135
  }
106
136
  export let classSubjectDropdown: any;
107
137
  export let sectionDropdown: any;
@@ -1,35 +1,10 @@
1
- export function useExamTypeDropdown(token: any): {
2
- isLoading: boolean;
3
- error: any;
4
- examTypeOptions: any;
5
- };
6
- export function useExamDropdown(classId: any, token: any): {
7
- isLoading: boolean;
8
- error: any;
9
- examList: any;
10
- mutate: import('swr').KeyedMutator<any>;
11
- };
12
- export function useExamSchedule(token: any): {
13
- isLoading: boolean;
14
- error: any;
15
- examSchedule: any;
16
- mutate: import('swr').KeyedMutator<any>;
17
- };
18
- export function useAssessmentTable(token: any): {
19
- isLoading: boolean;
20
- error: any;
21
- assessmentData: any;
22
- mutate: import('swr').KeyedMutator<any>;
23
- };
24
- export function useExamSettingTable(page: any, perPage: any, token: any): {
25
- isLoading: boolean;
26
- error: any;
27
- examSettingData: any;
28
- mutate: import('swr').KeyedMutator<any>;
29
- };
30
- export function useStudentResult(token: any): {
31
- isLoading: boolean;
32
- error: any;
33
- studentResultData: any;
34
- mutate: import('swr').KeyedMutator<any>;
35
- };
1
+ export function useSubmit(handler: any): (boolean | ((...args: any[]) => Promise<any>))[];
2
+ export function usePaginatedFetcher(): {
3
+ fetchAllPagesWithProgress: (tableData: any, exam_id: any, onProgress: any, token: any) => Promise<any[]>;
4
+ isMutating: boolean;
5
+ };
6
+ declare namespace _default {
7
+ export { useSubmit };
8
+ export { usePaginatedFetcher };
9
+ }
10
+ export default _default;
@@ -2,6 +2,9 @@ export { default as StudentResult } from './StudentResult';
2
2
  export { default as Exam } from './Exam';
3
3
  export { default as ExamList } from './ExamList';
4
4
  export { default as ExamType } from './ExamType';
5
+ export { default as Grade } from './Grade';
6
+ export { default as AdmitPrint } from './AdmitPrint';
7
+ export { default as CoScholasticAreaGrade } from './CoScholasticAreaGrade';
5
8
  export { default as ExamSetting } from './ExamSetting';
6
9
  export { default as Assessment } from './Assessment';
7
10
  export { default as ExamInstruction } from './ExamInstruction';