ubk.erp.webpack 1.3.0 → 1.3.2

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
@@ -52,6 +52,26 @@ The library determines the base URL for API calls and assets using the following
52
52
  1. **Manual Configuration**: Using the `setBaseUrl()` function in your code.
53
53
  2. **Environment Variable**: `VITE_ASSET_BASE_URL` in your `.env` file.
54
54
 
55
+ ### Sample File URL (Library Assets)
56
+
57
+ Some components include downloadable sample files (CSV, Excel). You can configure the base URL for these files:
58
+
59
+ **Priority (highest to lowest):**
60
+ 1. **Component Prop**: Pass `sampleFileUrl` directly to the component.
61
+ 2. **Environment Variable**: `VITE_LIBRARY_SAMPLE_FILE_URL` in your `.env` file.
62
+ 3. **Default fallback**: `/books.csv` (relative to your app's public assets).
63
+
64
+ Example:
65
+ ```jsx
66
+ import { AddBook } from "ubk.erp.webpack";
67
+
68
+ // Option 1: Pass via prop
69
+ <AddBook token={token} sampleFileUrl="https://your-cdn.com/sample/books.csv" />
70
+
71
+ // Option 2: Set via env var in your app's .env
72
+ // VITE_LIBRARY_SAMPLE_FILE_URL=https://your-cdn.com/sample/books.csv
73
+ ```
74
+
55
75
  ### 1. Manual Setup (Recommended for NPM Users)
56
76
 
57
77
  ```jsx
@@ -136,13 +156,46 @@ export default function AppRoutes({ token }) {
136
156
  ### Using the Transport Module
137
157
 
138
158
  ```jsx
139
- import { TransportRoutes } from "ubk.erp.webpack";
159
+ import {
160
+ TransportRoutes,
161
+ TransportVehicles,
162
+ AssignVehicles,
163
+ AssignStudentToTransport,
164
+ TransportBulkUpload,
165
+ } from "ubk.erp.webpack";
166
+
167
+ const TransportPage = ({ token }) => {
168
+ return (
169
+ <>
170
+ <TransportRoutes token={token} />
171
+ <TransportVehicles token={token} />
172
+ <AssignVehicles token={token} />
173
+ <AssignStudentToTransport token={token} />
174
+ <TransportBulkUpload token={token} />
175
+ </>
176
+ );
177
+ };
178
+ ```
179
+
180
+ ### Using the Transport Bulk Upload Module
181
+
182
+ The `TransportBulkUpload` component provides a multi-step wizard for bulk uploading transport assignments from Excel files:
183
+
184
+ ```jsx
185
+ import { TransportBulkUpload } from "ubk.erp.webpack";
140
186
 
141
- const TransportPage = () => {
142
- return <TransportRoutes token="YOUR_TOKEN" />;
187
+ const TransportBulkPage = ({ token }) => {
188
+ return <TransportBulkUpload token={token} />;
143
189
  };
144
190
  ```
145
191
 
192
+ **Features:**
193
+ 1. **Download Template** — Select Class and Section to download a pre-formatted Excel template
194
+ 2. **Upload & Validate** — Upload Excel file and preview validation results
195
+ 3. **Review** — View valid/invalid/duplicate rows with detailed status messages
196
+ 4. **Import** — Confirm import and download error reports for failed rows
197
+ ```
198
+
146
199
  ### Using the AttendanceDashboard Module
147
200
 
148
201
  ```jsx
@@ -343,6 +396,7 @@ const IncomePage = ({ token }) => {
343
396
  | `StudentLoginCredential` | View and manage student login credentials (username/password) by class and section. |
344
397
  | `MedicalReport` | Manage student medical reports and medicine history with add/view functionality. |
345
398
  | `AssignStudentSubject` | Assign and unassign subjects and extra-curricular activities to students. |
399
+ | `BulkUpload` | Bulk upload students from Excel file with class/section selection and sample file download. |
346
400
 
347
401
  ### Academics
348
402
 
@@ -373,6 +427,7 @@ const IncomePage = ({ token }) => {
373
427
  | `AddDriver` | Driver information and document management. |
374
428
  | `RouteTimeTable` | Schedule management for transport routes. |
375
429
  | `AssignStudentToTransport` | Assign students to transport routes. |
430
+ | `TransportBulkUpload` | Bulk upload transport assignments from Excel with validation wizard. |
376
431
  | `Stoppage` | Manage route stops and timings. |
377
432
 
378
433
  ### Library
@@ -493,7 +548,7 @@ const LibraryPage = ({ token }) => {
493
548
  | `StaffAttendanceReport` | Monthly attendance report. |
494
549
  | `Payroll` | Payroll list by role/month/year. |
495
550
  | `AprroveLeaveRequest` | Approve/decline leave requests. |
496
- | `ApplyLeave` | Apply for leave + requests table. |
551
+ | `ApplyLeave` | Apply for leave + requests table. |
497
552
  | `LeaveType` | Leave type master. |
498
553
  | `Department` | Department master. |
499
554
  | `Designation` | Designation master. |
@@ -501,6 +556,23 @@ const LibraryPage = ({ token }) => {
501
556
  | `StaffDailyAttendance` | Daily attendance report + print. |
502
557
  | `PayrollReceiptDetails` | Payroll receipt details (page/component). |
503
558
 
559
+ ### Using the Income Module
560
+
561
+ ```jsx
562
+ import { ApplyLeave } from "ubk.erp.webpack";
563
+
564
+
565
+
566
+ const ApplyLeavePage = ({ token }) => {
567
+ return (
568
+ <>
569
+ <ApplyLeave userType="staff" token={token} />
570
+
571
+ </>
572
+ );
573
+ };
574
+ ```
575
+
504
576
  ### Attendance Dashboard
505
577
 
506
578
  | Component | Description |
package/dist/Api/api.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  export function setBaseUrl(url: any): void;
2
2
  export function getAssetBaseUrl(): any;
3
+ export function setImageBaseUrl(url: any): void;
4
+ export function getImageBaseUrl(): any;
3
5
  export function addData(url: any, data: any, token: any): Promise<any>;
6
+ export function postData(url: any, data: any, token: any): Promise<any>;
4
7
  export function getNewData(url: any, token: any): Promise<any>;
5
8
  export function getMenuData(url: any, token: any): Promise<any>;
6
9
  export function addDataReturn(url: any, data: any, token: any): Promise<boolean>;
@@ -128,3 +131,14 @@ export const getStudentClassSubjectUrl: "/branchapi/academy/getstudentClasssubje
128
131
  export const removeAssignStudentSubjectUrl: "/branchapi/academy/removeAssignStudentSubject";
129
132
  export const extraCurricularActivitiesUrl: "/branchapi/feesCollection/extraCurricularActivitiesFess";
130
133
  export const unAssignStudentSubjectUrl: "/branchapi/academy/unAssigneStudentSubject";
134
+ export const bulkUploadStudentUrl: "/branchapi/student/uploadstudentbyCSV";
135
+ export const categoryTableUrl: "api/branchapi/academy/categorytableList";
136
+ export const studentSampleFileUrl: "/sample_student.xlsx";
137
+ export const transportBulkUploadDownloadTemplate: "api/branchapi/transport/downloadBulkTemplate";
138
+ export const transportBulkUploadValidate: "api/branchapi/transport/validateBulkUpload";
139
+ export const transportBulkUploadConfirm: "api/branchapi/transport/confirmBulkImport";
140
+ export const transportBulkUploadErrorReport: "api/branchapi/transport/downloadBulkErrorReport";
141
+ export function downloadBulkTemplate({ class_id, section_id }: {} | undefined, token: any): Promise<any>;
142
+ export function validateBulkUpload(file: any, token: any): Promise<any>;
143
+ export function confirmBulkImport(rows: any, token: any, duplicateAction?: string): Promise<any>;
144
+ export function downloadBulkErrorReport(rows: any, token: any): Promise<any>;
@@ -1,7 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
  export default SingleUpload;
3
- declare function SingleUpload({ token, value, onChange }: {
3
+ declare function SingleUpload({ token, value, onChange, action, filePath }: {
4
4
  token: any;
5
5
  value: any;
6
6
  onChange: any;
7
+ action: any;
8
+ filePath: any;
7
9
  }): React.JSX.Element;
@@ -113,6 +113,7 @@ export namespace endpoints {
113
113
  export { add_6 as add };
114
114
  let edit_5: any;
115
115
  export { edit_5 as edit };
116
+ export let uploadFile: any;
116
117
  }
117
118
  namespace transferCertificate {
118
119
  let studentList: any;
@@ -130,6 +131,7 @@ export namespace endpoints {
130
131
  }
131
132
  }
132
133
  export function getNotesUploadAction(): string;
134
+ export function getSyllabusUploadAction(): string;
133
135
  export function fetchPagedList({ baseUrl, page, perPage }: {
134
136
  baseUrl: any;
135
137
  page?: number | undefined;
@@ -2,4 +2,5 @@ export const syllabusEndpoints: {
2
2
  table: any;
3
3
  add: any;
4
4
  edit: any;
5
+ uploadFile: any;
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  export default ApplyLeave;
3
- declare function ApplyLeave({ token }: {
3
+ declare function ApplyLeave({ token, userType }: {
4
4
  token: any;
5
+ userType: any;
5
6
  }): React.JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  export default ApplyLeavePage;
3
- declare function ApplyLeavePage({ token }: {
3
+ declare function ApplyLeavePage({ token, userType }: {
4
4
  token: any;
5
+ userType: any;
5
6
  }): React.JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  export default AddBook;
3
- declare function AddBook({ token: tokenProp }: {
3
+ declare function AddBook({ token: tokenProp, sampleFileUrl: propSampleFileUrl }: {
4
4
  token: any;
5
+ sampleFileUrl: any;
5
6
  }): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export default BulkUpload;
3
+ declare function BulkUpload({ token }: {
4
+ token: any;
5
+ }): React.JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from './BulkUpload';
@@ -1,3 +1,4 @@
1
1
  export { default as StudentLoginCredential } from './StudentLoginCredential';
2
2
  export { default as MedicalReport } from './MedicalReport';
3
3
  export { default as AssignStudentSubject } from './AssignStudentSubject';
4
+ export { default as BulkUpload } from './BulkUpload';
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export default TransportBulkUpload;
3
+ declare function TransportBulkUpload({ token }: {
4
+ token: any;
5
+ }): React.JSX.Element;
package/dist/books.csv ADDED
@@ -0,0 +1,7 @@
1
+ title,author,publisher,quantity,price,fine,subject_id,barcode,class_id
2
+ Advanced Chemistry,Rahul Mondal,RM PUBLISHER,10,210,20,1,,1
3
+ Advanced Chemistry,Rahul Mondal,RM PUBLISHER,10,210,20,1,,1
4
+ Advanced Chemistry,Rahul Mondal,RM PUBLISHER,10,210,20,1,123321,1
5
+ Advanced Chemistry,Rahul Mondal,RM PUBLISHER,10,210,20,1,,1
6
+ Advanced Chemistry,Rahul Mondal,RM PUBLISHER,10,210,20,1,,1
7
+ Advanced Chemistry,Rahul Mondal,RM PUBLISHER,10,210,20,1,,1