@ubkinfotech/tecaher-erp 0.1.0 → 0.1.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 +143 -67
- package/lib/commonjs/core/api/endpoints.js +1 -1
- package/lib/commonjs/core/auth/authContext.js +1 -2
- package/lib/commonjs/core/provider/ERPProvider.js +1 -2
- package/lib/commonjs/modules/assignment/screens/AssignmentScreen.js +295 -80
- package/lib/commonjs/modules/assignment/services/assignmentService.js +2 -2
- package/lib/commonjs/modules/attendance/screens/AttendanceScreen.js +1 -2
- package/lib/commonjs/modules/leaveRequest/screens/LeaveRequestScreen.js +7 -7
- package/lib/commonjs/modules/leaveRequest/services/leaveRequestService.js +10 -2
- package/lib/commonjs/modules/marks/screens/MarksScreen.js +1 -2
- package/lib/commonjs/modules/myAttendance/screens/MyAttendanceScreen.js +1 -2
- package/lib/commonjs/modules/notes/screens/NotesScreen.js +410 -97
- package/lib/commonjs/modules/notes/services/notesService.js +10 -2
- package/lib/commonjs/modules/noticeboard/screens/NoticeBoardScreen.js +1 -2
- package/lib/commonjs/modules/notification/screens/NotificationScreen.js +1 -2
- package/lib/commonjs/modules/promoteStudent/screens/PromoteStudentScreen.js +1 -2
- package/lib/commonjs/modules/timetable/screens/TimeTableScreen.js +1 -2
- package/lib/module/core/api/endpoints.js +1 -1
- package/lib/module/modules/assignment/screens/AssignmentScreen.js +295 -79
- package/lib/module/modules/assignment/services/assignmentService.js +2 -2
- package/lib/module/modules/leaveRequest/screens/LeaveRequestScreen.js +6 -5
- package/lib/module/modules/leaveRequest/services/leaveRequestService.js +10 -2
- package/lib/module/modules/notes/screens/NotesScreen.js +410 -96
- package/lib/module/modules/notes/services/notesService.js +10 -2
- package/lib/typescript/modules/assignment/services/assignmentService.d.ts +1 -1
- package/lib/typescript/modules/leaveRequest/services/leaveRequestService.d.ts +1 -1
- package/lib/typescript/modules/notes/services/notesService.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Professional React Native Teacher ERP module package with a centralized `ERPProvider`.
|
|
4
4
|
|
|
5
|
-
It
|
|
5
|
+
It provides reusable teacher ERP screens with internal API handling, production-style UI flows, and a single place to configure authentication and base URLs.
|
|
6
|
+
|
|
7
|
+
## Included Modules
|
|
6
8
|
|
|
7
9
|
- `AssignmentScreen`
|
|
8
10
|
- `AttendanceScreen`
|
|
@@ -19,10 +21,10 @@ It lets you configure your API once and reuse production-ready teacher flows suc
|
|
|
19
21
|
|
|
20
22
|
- Centralized API configuration with `ERPProvider`
|
|
21
23
|
- Supports `authToken` or async `getAuthToken()`
|
|
22
|
-
- Automatic `Authorization` header
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- Optional support for image
|
|
24
|
+
- Automatic `Authorization` header handling through the internal API client
|
|
25
|
+
- Real teacher ERP flows instead of JSON placeholder screens
|
|
26
|
+
- Internal pagination, refresh, and list management where applicable
|
|
27
|
+
- Optional support for calendar, image picker, document picker, PDF preview, and local file viewing
|
|
26
28
|
|
|
27
29
|
## Installation
|
|
28
30
|
|
|
@@ -38,14 +40,14 @@ Install the required peer dependencies:
|
|
|
38
40
|
npm i @tanstack/react-query react-native-safe-area-context
|
|
39
41
|
```
|
|
40
42
|
|
|
41
|
-
Your app
|
|
43
|
+
Your app should already use compatible versions of:
|
|
42
44
|
|
|
43
45
|
- `react >= 18`
|
|
44
46
|
- `react-native >= 0.75`
|
|
45
47
|
|
|
46
48
|
## Optional Native Prerequisites
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
Install these only if your selected modules need them:
|
|
49
51
|
|
|
50
52
|
```bash
|
|
51
53
|
npm i react-native-calendars
|
|
@@ -57,20 +59,22 @@ npm i react-native-file-viewer
|
|
|
57
59
|
npm i react-native-pdf
|
|
58
60
|
```
|
|
59
61
|
|
|
60
|
-
## Module
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
62
|
+
## Module Requirements
|
|
63
|
+
|
|
64
|
+
The current recommended usage is based on the live integration in `src/screens/TestNpm/Testnpm.jsx`.
|
|
65
|
+
|
|
66
|
+
| Module | Current Usage | Notes | Optional Native Packages |
|
|
67
|
+
| --- | --- | --- | --- |
|
|
68
|
+
| `AssignmentScreen` | `sessionId` | Required in current integration | `react-native-document-picker`, `react-native-image-picker`, `react-native-image-viewing`, `react-native-fs`, `react-native-file-viewer`, `react-native-pdf` |
|
|
69
|
+
| `AttendanceScreen` | `sessionId` | Class and section are managed internally in the screen | `react-native-calendars` |
|
|
70
|
+
| `LeaveRequestScreen` | none | Fully managed internally | `react-native-document-picker`, `react-native-image-picker` |
|
|
71
|
+
| `MarksScreen` | `sessionId` | Required in current integration | none |
|
|
72
|
+
| `MyAttendanceScreen` | `staffId`, `sessionId` | Required in current integration | none |
|
|
73
|
+
| `NotesScreen` | `sessionId` | Required in current integration | `react-native-document-picker`, `react-native-image-picker`, `react-native-image-viewing`, `react-native-fs`, `react-native-file-viewer`, `react-native-pdf` |
|
|
74
|
+
| `NoticeBoardScreen` | none | Fully managed internally | none |
|
|
75
|
+
| `NotificationScreen` | none | Fully managed internally | none |
|
|
76
|
+
| `PromoteStudentScreen` | none | Source class and section are selected inside the screen | none |
|
|
77
|
+
| `TimeTableScreen` | `staffId`, `sessionId` | Teacher mode in current integration | none |
|
|
74
78
|
|
|
75
79
|
## Provider Setup
|
|
76
80
|
|
|
@@ -140,25 +144,74 @@ export function ERPApp({children}: {children: React.ReactNode}) {
|
|
|
140
144
|
| `onError` | `(error) => void` | no | Global API error callback |
|
|
141
145
|
| `onUnauthorized` | `(error) => void` | no | Callback for unauthorized responses |
|
|
142
146
|
|
|
143
|
-
##
|
|
147
|
+
## Recommended App Integration
|
|
148
|
+
|
|
149
|
+
This example matches the current `Testnpm.jsx` usage pattern.
|
|
144
150
|
|
|
145
151
|
```tsx
|
|
146
|
-
import React from 'react';
|
|
147
|
-
import
|
|
152
|
+
import React, {useContext, useMemo, useState} from 'react';
|
|
153
|
+
import {View, Text} from 'react-native';
|
|
154
|
+
import {AuthContext} from '../context/AuthContext';
|
|
155
|
+
import {UserContext} from '../context/UserContext';
|
|
148
156
|
import {
|
|
149
157
|
ERPProvider,
|
|
158
|
+
AssignmentScreen,
|
|
150
159
|
AttendanceScreen,
|
|
160
|
+
LeaveRequestScreen,
|
|
161
|
+
MarksScreen,
|
|
162
|
+
MyAttendanceScreen,
|
|
163
|
+
NotesScreen,
|
|
164
|
+
NoticeBoardScreen,
|
|
165
|
+
NotificationScreen,
|
|
166
|
+
PromoteStudentScreen,
|
|
167
|
+
TimeTableScreen,
|
|
151
168
|
} from '@ubkinfotech/tecaher-erp';
|
|
152
169
|
|
|
153
170
|
const API_BASE_URL = 'https://example.com/';
|
|
171
|
+
const API_DOWNLOAD_URL = 'https://example.com/uploads/';
|
|
172
|
+
|
|
173
|
+
export function TeacherErpHost() {
|
|
174
|
+
const {authToken} = useContext(AuthContext);
|
|
175
|
+
const {user} = useContext(UserContext);
|
|
176
|
+
const [selected, setSelected] = useState('Attendance');
|
|
177
|
+
|
|
178
|
+
const sessionId = user?.session_id ?? 1;
|
|
179
|
+
const staffId = user?.id ?? 1;
|
|
180
|
+
|
|
181
|
+
const content = useMemo(() => {
|
|
182
|
+
switch (selected) {
|
|
183
|
+
case 'Assignment':
|
|
184
|
+
return <AssignmentScreen sessionId={sessionId} />;
|
|
185
|
+
case 'Attendance':
|
|
186
|
+
return <AttendanceScreen sessionId={sessionId} />;
|
|
187
|
+
case 'LeaveRequest':
|
|
188
|
+
return <LeaveRequestScreen />;
|
|
189
|
+
case 'Marks':
|
|
190
|
+
return <MarksScreen sessionId={sessionId} />;
|
|
191
|
+
case 'MyAttendance':
|
|
192
|
+
return <MyAttendanceScreen staffId={staffId} sessionId={sessionId} />;
|
|
193
|
+
case 'Notes':
|
|
194
|
+
return <NotesScreen sessionId={sessionId} />;
|
|
195
|
+
case 'Notice':
|
|
196
|
+
return <NoticeBoardScreen />;
|
|
197
|
+
case 'Notification':
|
|
198
|
+
return <NotificationScreen />;
|
|
199
|
+
case 'PromoteStudent':
|
|
200
|
+
return <PromoteStudentScreen />;
|
|
201
|
+
case 'TimeTable':
|
|
202
|
+
return <TimeTableScreen staffId={staffId} sessionId={sessionId} />;
|
|
203
|
+
default:
|
|
204
|
+
return <Text>Pick a module</Text>;
|
|
205
|
+
}
|
|
206
|
+
}, [selected, sessionId, staffId]);
|
|
154
207
|
|
|
155
|
-
export function AppRoot() {
|
|
156
208
|
return (
|
|
157
209
|
<ERPProvider
|
|
158
210
|
baseUrl={API_BASE_URL}
|
|
159
|
-
|
|
211
|
+
fileBaseUrl={API_DOWNLOAD_URL}
|
|
212
|
+
authToken={authToken}
|
|
160
213
|
>
|
|
161
|
-
<
|
|
214
|
+
<View style={{flex: 1}}>{content}</View>
|
|
162
215
|
</ERPProvider>
|
|
163
216
|
);
|
|
164
217
|
}
|
|
@@ -195,14 +248,20 @@ import {ERPProvider, AssignmentScreen} from '@ubkinfotech/tecaher-erp';
|
|
|
195
248
|
const API_BASE_URL = 'https://example.com/';
|
|
196
249
|
const API_DOWNLOAD_URL = 'https://example.com/uploads/';
|
|
197
250
|
|
|
198
|
-
export function AssignmentExample({
|
|
251
|
+
export function AssignmentExample({
|
|
252
|
+
authToken,
|
|
253
|
+
sessionId,
|
|
254
|
+
}: {
|
|
255
|
+
authToken: string;
|
|
256
|
+
sessionId: number;
|
|
257
|
+
}) {
|
|
199
258
|
return (
|
|
200
259
|
<ERPProvider
|
|
201
260
|
baseUrl={API_BASE_URL}
|
|
202
261
|
fileBaseUrl={API_DOWNLOAD_URL}
|
|
203
262
|
authToken={authToken}
|
|
204
263
|
>
|
|
205
|
-
<AssignmentScreen sessionId={
|
|
264
|
+
<AssignmentScreen sessionId={sessionId} />
|
|
206
265
|
</ERPProvider>
|
|
207
266
|
);
|
|
208
267
|
}
|
|
@@ -210,7 +269,7 @@ export function AssignmentExample({authToken}: {authToken: string}) {
|
|
|
210
269
|
|
|
211
270
|
### AttendanceScreen
|
|
212
271
|
|
|
213
|
-
Use this for teacher attendance take
|
|
272
|
+
Use this for teacher attendance take and view flow. In the current setup, only `sessionId` is passed from the host app.
|
|
214
273
|
|
|
215
274
|
```tsx
|
|
216
275
|
import React from 'react';
|
|
@@ -218,10 +277,16 @@ import {ERPProvider, AttendanceScreen} from '@ubkinfotech/tecaher-erp';
|
|
|
218
277
|
|
|
219
278
|
const API_BASE_URL = 'https://example.com/';
|
|
220
279
|
|
|
221
|
-
export function AttendanceExample({
|
|
280
|
+
export function AttendanceExample({
|
|
281
|
+
authToken,
|
|
282
|
+
sessionId,
|
|
283
|
+
}: {
|
|
284
|
+
authToken: string;
|
|
285
|
+
sessionId: number;
|
|
286
|
+
}) {
|
|
222
287
|
return (
|
|
223
288
|
<ERPProvider baseUrl={API_BASE_URL} authToken={authToken}>
|
|
224
|
-
<AttendanceScreen
|
|
289
|
+
<AttendanceScreen sessionId={sessionId} />
|
|
225
290
|
</ERPProvider>
|
|
226
291
|
);
|
|
227
292
|
}
|
|
@@ -256,10 +321,16 @@ import {ERPProvider, MarksScreen} from '@ubkinfotech/tecaher-erp';
|
|
|
256
321
|
|
|
257
322
|
const API_BASE_URL = 'https://example.com/';
|
|
258
323
|
|
|
259
|
-
export function MarksExample({
|
|
324
|
+
export function MarksExample({
|
|
325
|
+
authToken,
|
|
326
|
+
sessionId,
|
|
327
|
+
}: {
|
|
328
|
+
authToken: string;
|
|
329
|
+
sessionId: number;
|
|
330
|
+
}) {
|
|
260
331
|
return (
|
|
261
332
|
<ERPProvider baseUrl={API_BASE_URL} authToken={authToken}>
|
|
262
|
-
<MarksScreen sessionId={
|
|
333
|
+
<MarksScreen sessionId={sessionId} />
|
|
263
334
|
</ERPProvider>
|
|
264
335
|
);
|
|
265
336
|
}
|
|
@@ -267,7 +338,7 @@ export function MarksExample({authToken}: {authToken: string}) {
|
|
|
267
338
|
|
|
268
339
|
### MyAttendanceScreen
|
|
269
340
|
|
|
270
|
-
Use this for teacher attendance summary and daily report.
|
|
341
|
+
Use this for teacher attendance filters, summary cards, and daily report.
|
|
271
342
|
|
|
272
343
|
```tsx
|
|
273
344
|
import React from 'react';
|
|
@@ -275,10 +346,18 @@ import {ERPProvider, MyAttendanceScreen} from '@ubkinfotech/tecaher-erp';
|
|
|
275
346
|
|
|
276
347
|
const API_BASE_URL = 'https://example.com/';
|
|
277
348
|
|
|
278
|
-
export function MyAttendanceExample({
|
|
349
|
+
export function MyAttendanceExample({
|
|
350
|
+
authToken,
|
|
351
|
+
staffId,
|
|
352
|
+
sessionId,
|
|
353
|
+
}: {
|
|
354
|
+
authToken: string;
|
|
355
|
+
staffId: number;
|
|
356
|
+
sessionId: number;
|
|
357
|
+
}) {
|
|
279
358
|
return (
|
|
280
359
|
<ERPProvider baseUrl={API_BASE_URL} authToken={authToken}>
|
|
281
|
-
<MyAttendanceScreen staffId={
|
|
360
|
+
<MyAttendanceScreen staffId={staffId} sessionId={sessionId} />
|
|
282
361
|
</ERPProvider>
|
|
283
362
|
);
|
|
284
363
|
}
|
|
@@ -286,7 +365,7 @@ export function MyAttendanceExample({authToken}: {authToken: string}) {
|
|
|
286
365
|
|
|
287
366
|
### NotesScreen
|
|
288
367
|
|
|
289
|
-
Use this for note listing,
|
|
368
|
+
Use this for note listing, details, create, edit, upload, image preview, and PDF/document preview flows.
|
|
290
369
|
|
|
291
370
|
```tsx
|
|
292
371
|
import React from 'react';
|
|
@@ -295,14 +374,20 @@ import {ERPProvider, NotesScreen} from '@ubkinfotech/tecaher-erp';
|
|
|
295
374
|
const API_BASE_URL = 'https://example.com/';
|
|
296
375
|
const API_DOWNLOAD_URL = 'https://example.com/uploads/';
|
|
297
376
|
|
|
298
|
-
export function NotesExample({
|
|
377
|
+
export function NotesExample({
|
|
378
|
+
authToken,
|
|
379
|
+
sessionId,
|
|
380
|
+
}: {
|
|
381
|
+
authToken: string;
|
|
382
|
+
sessionId: number;
|
|
383
|
+
}) {
|
|
299
384
|
return (
|
|
300
385
|
<ERPProvider
|
|
301
386
|
baseUrl={API_BASE_URL}
|
|
302
387
|
fileBaseUrl={API_DOWNLOAD_URL}
|
|
303
388
|
authToken={authToken}
|
|
304
389
|
>
|
|
305
|
-
<NotesScreen sessionId={
|
|
390
|
+
<NotesScreen sessionId={sessionId} />
|
|
306
391
|
</ERPProvider>
|
|
307
392
|
);
|
|
308
393
|
}
|
|
@@ -310,7 +395,7 @@ export function NotesExample({authToken}: {authToken: string}) {
|
|
|
310
395
|
|
|
311
396
|
### NoticeBoardScreen
|
|
312
397
|
|
|
313
|
-
Use this for notice board list and notice
|
|
398
|
+
Use this for notice board list and notice details.
|
|
314
399
|
|
|
315
400
|
```tsx
|
|
316
401
|
import React from 'react';
|
|
@@ -329,7 +414,7 @@ export function NoticeBoardExample({authToken}: {authToken: string}) {
|
|
|
329
414
|
|
|
330
415
|
### NotificationScreen
|
|
331
416
|
|
|
332
|
-
Use this for notification
|
|
417
|
+
Use this for notification listing with built-in pagination and refresh.
|
|
333
418
|
|
|
334
419
|
```tsx
|
|
335
420
|
import React from 'react';
|
|
@@ -348,7 +433,7 @@ export function NotificationExample({authToken}: {authToken: string}) {
|
|
|
348
433
|
|
|
349
434
|
### PromoteStudentScreen
|
|
350
435
|
|
|
351
|
-
Use this for search, destination selection, and
|
|
436
|
+
Use this for student search, destination selection, and promotion submission. In the current setup, class and section are selected inside the screen.
|
|
352
437
|
|
|
353
438
|
```tsx
|
|
354
439
|
import React from 'react';
|
|
@@ -359,7 +444,7 @@ const API_BASE_URL = 'https://example.com/';
|
|
|
359
444
|
export function PromoteStudentExample({authToken}: {authToken: string}) {
|
|
360
445
|
return (
|
|
361
446
|
<ERPProvider baseUrl={API_BASE_URL} authToken={authToken}>
|
|
362
|
-
<PromoteStudentScreen
|
|
447
|
+
<PromoteStudentScreen />
|
|
363
448
|
</ERPProvider>
|
|
364
449
|
);
|
|
365
450
|
}
|
|
@@ -367,7 +452,7 @@ export function PromoteStudentExample({authToken}: {authToken: string}) {
|
|
|
367
452
|
|
|
368
453
|
### TimeTableScreen
|
|
369
454
|
|
|
370
|
-
|
|
455
|
+
The current host integration uses teacher mode with `staffId` and `sessionId`.
|
|
371
456
|
|
|
372
457
|
```tsx
|
|
373
458
|
import React from 'react';
|
|
@@ -375,27 +460,18 @@ import {ERPProvider, TimeTableScreen} from '@ubkinfotech/tecaher-erp';
|
|
|
375
460
|
|
|
376
461
|
const API_BASE_URL = 'https://example.com/';
|
|
377
462
|
|
|
378
|
-
export function TeacherTimeTableExample({
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
Class mode:
|
|
388
|
-
|
|
389
|
-
```tsx
|
|
390
|
-
import React from 'react';
|
|
391
|
-
import {ERPProvider, TimeTableScreen} from '@ubkinfotech/tecaher-erp';
|
|
392
|
-
|
|
393
|
-
const API_BASE_URL = 'https://example.com/';
|
|
394
|
-
|
|
395
|
-
export function ClassTimeTableExample({authToken}: {authToken: string}) {
|
|
463
|
+
export function TeacherTimeTableExample({
|
|
464
|
+
authToken,
|
|
465
|
+
staffId,
|
|
466
|
+
sessionId,
|
|
467
|
+
}: {
|
|
468
|
+
authToken: string;
|
|
469
|
+
staffId: number;
|
|
470
|
+
sessionId: number;
|
|
471
|
+
}) {
|
|
396
472
|
return (
|
|
397
473
|
<ERPProvider baseUrl={API_BASE_URL} authToken={authToken}>
|
|
398
|
-
<TimeTableScreen
|
|
474
|
+
<TimeTableScreen staffId={staffId} sessionId={sessionId} />
|
|
399
475
|
</ERPProvider>
|
|
400
476
|
);
|
|
401
477
|
}
|
|
@@ -404,9 +480,9 @@ export function ClassTimeTableExample({authToken}: {authToken: string}) {
|
|
|
404
480
|
## Notes
|
|
405
481
|
|
|
406
482
|
- The published package name is intentionally `@ubkinfotech/tecaher-erp`.
|
|
407
|
-
- `fileBaseUrl` is strongly recommended for modules that render attachments,
|
|
408
|
-
-
|
|
409
|
-
-
|
|
483
|
+
- `fileBaseUrl` is strongly recommended for modules that render attachments, images, and documents.
|
|
484
|
+
- `NoticeBoardScreen`, `NotificationScreen`, `LeaveRequestScreen`, and `PromoteStudentScreen` are currently used without extra module props in the host app.
|
|
485
|
+
- `AssignmentScreen`, `AttendanceScreen`, `MarksScreen`, `MyAttendanceScreen`, `NotesScreen`, and `TimeTableScreen` still use authenticated session or staff values in the current integration.
|
|
410
486
|
|
|
411
487
|
## License
|
|
412
488
|
|
|
@@ -95,7 +95,7 @@ const endpoints = exports.endpoints = {
|
|
|
95
95
|
return `staff/teacherAPP/attendenceSection/getsectionDropdownforTeacher?class_id=${args.classId}`;
|
|
96
96
|
},
|
|
97
97
|
teacherSubjectsByClass: args => {
|
|
98
|
-
return `staff/teacherAPP/
|
|
98
|
+
return `staff/teacherAPP/teacherbasicDetails/getteacherSubjectsaccordingtoClass?session_id=${args.sessionId}&class_id=${args.classId}`;
|
|
99
99
|
},
|
|
100
100
|
details: args => {
|
|
101
101
|
return `staff/teacherAPP/Notes/getNotedatabyID?id=${args.noteId}`;
|
|
@@ -7,8 +7,7 @@ exports.AuthContext = void 0;
|
|
|
7
7
|
exports.AuthProvider = AuthProvider;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
function
|
|
11
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
11
|
const AuthContext = exports.AuthContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
13
12
|
function AuthProvider({
|
|
14
13
|
children
|
|
@@ -9,8 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _reactQuery = require("@tanstack/react-query");
|
|
10
10
|
var _apiClient = require("../api/apiClient");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
function
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
13
|
const ERPContext = exports.ERPContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
15
14
|
function ERPProvider(props) {
|
|
16
15
|
const queryClient = (0, _react.useMemo)(() => {
|