ubk.erp.webpack 1.3.1 → 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
@@ -528,7 +548,7 @@ const LibraryPage = ({ token }) => {
528
548
  | `StaffAttendanceReport` | Monthly attendance report. |
529
549
  | `Payroll` | Payroll list by role/month/year. |
530
550
  | `AprroveLeaveRequest` | Approve/decline leave requests. |
531
- | `ApplyLeave` | Apply for leave + requests table. |
551
+ | `ApplyLeave` | Apply for leave + requests table. |
532
552
  | `LeaveType` | Leave type master. |
533
553
  | `Department` | Department master. |
534
554
  | `Designation` | Designation master. |
@@ -536,6 +556,23 @@ const LibraryPage = ({ token }) => {
536
556
  | `StaffDailyAttendance` | Daily attendance report + print. |
537
557
  | `PayrollReceiptDetails` | Payroll receipt details (page/component). |
538
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
+
539
576
  ### Attendance Dashboard
540
577
 
541
578
  | Component | Description |
package/dist/Api/api.d.ts CHANGED
@@ -1,5 +1,7 @@
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>;
4
6
  export function postData(url: any, data: any, token: any): Promise<any>;
5
7
  export function getNewData(url: 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;
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