@appcorp/fusion-storybook 0.4.14 → 0.4.16

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.
@@ -16,6 +16,7 @@ export declare const useAdmissionModule: () => {
16
16
  handlePageChange: (page: number | unknown) => void;
17
17
  handlePageLimitChange: (k: string, value: object) => void;
18
18
  handlePrint: (row?: TableRow) => Promise<void>;
19
+ handleRemoveDocument: (url: string) => Promise<void>;
19
20
  handleSearch: (query: string) => void;
20
21
  handleSetEndDate: (endDate: string) => void;
21
22
  handleSetStartDate: (startDate: string) => void;
@@ -31,6 +32,7 @@ export declare const useAdmissionModule: () => {
31
32
  listLoading: boolean;
32
33
  rowActions: RowAction[];
33
34
  updateLoading: boolean;
35
+ uploadAdmissionDocuments: (files: File[], registrationCode: string) => Promise<string[]>;
34
36
  state: {
35
37
  items: AdmissionBE[];
36
38
  count: number;
@@ -69,6 +71,8 @@ export declare const useAdmissionModule: () => {
69
71
  classForAdmission: string;
70
72
  previousSchool: string;
71
73
  siblings: string;
74
+ documents: string[];
75
+ documentsFiles: File[];
72
76
  admissionNotes: string;
73
77
  notes: string;
74
78
  enabled: boolean;
@@ -11,17 +11,20 @@ import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
11
11
  import { useFetch } from "@react-pakistan/util-functions/hooks/use-fetch";
12
12
  import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
13
13
  import { ADMISSION_STATUS, GENDER, } from "../../../type";
14
- import { ADMISSION_API_ROUTES, DISCOUNT_CODE_API_ROUTES, } from "../../../constants";
14
+ import { ADMISSION_API_ROUTES, DISCOUNT_CODE_API_ROUTES, DOCUMENT_UPLOAD_API_ROUTES, } from "../../../constants";
15
15
  import { admissionFormValidation } from "../validate";
16
16
  import { getCachedWorkspaceSync } from "../../workspace/cache";
17
17
  import { downloadAdmissionFormPDF, } from "../../../utils/admission-pdf";
18
+ import { fileToBase64 } from "../../../utils/file-to-base64";
19
+ import { compressPdf, DocumentTooLargeError, isPdfFile, MAX_DOCUMENT_SIZE_BYTES, } from "../../../utils/compress-pdf";
20
+ import { wakeStorageServer } from "../../../utils/wake-storage";
18
21
  import { normalizeIdNumber } from "../../../utils/id-number";
19
22
  import { toE164Phone } from "../../../utils/to-e164-phone";
20
23
  import { formatPhoneDisplay } from "@react-pakistan/util-functions/general/format-phone-display";
21
24
  import { Filter, Plus } from "lucide-react";
22
25
  import { ADMISSION_DRAWER, ADMISSION_ACTION_TYPES, useAdmissionContext, } from "../context";
23
26
  export const useAdmissionModule = () => {
24
- var _a, _b, _c, _d, _e, _f, _g;
27
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
25
28
  // ============================================================================
26
29
  // 1.4.1 STATE & CORE HOOKS
27
30
  // ============================================================================
@@ -76,6 +79,7 @@ export const useAdmissionModule = () => {
76
79
  country: state.country || "",
77
80
  discountCodeId: state.discountCodeId || "",
78
81
  dob: state.dob || null,
82
+ documents: state.documents || [],
79
83
  emergencyContact: state.emergencyContact || "",
80
84
  enabled: (_a = state.enabled) !== null && _a !== void 0 ? _a : true,
81
85
  fatherIdNumber: state.fatherIdNumber || "",
@@ -110,6 +114,7 @@ export const useAdmissionModule = () => {
110
114
  state.country,
111
115
  state.discountCodeId,
112
116
  state.dob,
117
+ state.documents,
113
118
  state.emergencyContact,
114
119
  state.enabled,
115
120
  state.fatherFirstName,
@@ -209,7 +214,7 @@ export const useAdmissionModule = () => {
209
214
  }
210
215
  }, [resetFormAndCloseDrawer, showToast, t]);
211
216
  const byIdCallback = useCallback(({ data, error }) => {
212
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12;
217
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14;
213
218
  if (error) {
214
219
  showToast(t("messagesDetailsFetchFailed"), TOAST_VARIANT.ERROR);
215
220
  return;
@@ -260,12 +265,19 @@ export const useAdmissionModule = () => {
260
265
  setField("admissionNotes", (_7 = admission.officeUse) === null || _7 === void 0 ? void 0 : _7.admissionNotes);
261
266
  setField("previousSchool", (_8 = admission.admissionDetails) === null || _8 === void 0 ? void 0 : _8.previousSchool);
262
267
  setField("siblings", (_9 = admission.admissionDetails) === null || _9 === void 0 ? void 0 : _9.siblings);
263
- setField("classForAdmission", (_10 = admission.admissionDetails) === null || _10 === void 0 ? void 0 : _10.classForAdmission);
268
+ dispatch({
269
+ type: ADMISSION_ACTION_TYPES.SET_INPUT_FIELD,
270
+ payload: {
271
+ key: "documents",
272
+ value: (_11 = (_10 = admission.admissionDetails) === null || _10 === void 0 ? void 0 : _10.documents) !== null && _11 !== void 0 ? _11 : [],
273
+ },
274
+ });
275
+ setField("classForAdmission", (_12 = admission.admissionDetails) === null || _12 === void 0 ? void 0 : _12.classForAdmission);
264
276
  setField("status", admission.status || ADMISSION_STATUS.PENDING);
265
- setField("enabled", (_11 = admission.enabled) !== null && _11 !== void 0 ? _11 : true);
277
+ setField("enabled", (_13 = admission.enabled) !== null && _13 !== void 0 ? _13 : true);
266
278
  // Populate AI analysis if present
267
- const aiAnalysis = (_12 = admission
268
- .aiAnalysis) !== null && _12 !== void 0 ? _12 : null;
279
+ const aiAnalysis = (_14 = admission
280
+ .aiAnalysis) !== null && _14 !== void 0 ? _14 : null;
269
281
  dispatch({
270
282
  type: ADMISSION_ACTION_TYPES.SET_FORM_DATA,
271
283
  payload: { form: { aiAnalysis } },
@@ -283,6 +295,36 @@ export const useAdmissionModule = () => {
283
295
  (_a = listFetchNowRef.current) === null || _a === void 0 ? void 0 : _a.call(listFetchNowRef);
284
296
  }
285
297
  }, [showToast, t]);
298
+ const uploadAdmissionDocuments = useCallback(async (files, registrationCode) => {
299
+ var _a;
300
+ const schoolId = (_a = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _a === void 0 ? void 0 : _a.id;
301
+ if (!schoolId) {
302
+ throw new Error("School context is not available");
303
+ }
304
+ const prepared = await Promise.all(files.map(async (file) => isPdfFile(file) ? await compressPdf(file) : file));
305
+ for (const file of prepared) {
306
+ if (file.size > MAX_DOCUMENT_SIZE_BYTES) {
307
+ throw new DocumentTooLargeError(file.name, file.size);
308
+ }
309
+ }
310
+ const payload = await Promise.all(prepared.map(async (file) => ({
311
+ fileName: file.name,
312
+ contentType: file.type || "application/octet-stream",
313
+ fileBase64: await fileToBase64(file),
314
+ })));
315
+ const { data, error } = await fetchData({
316
+ url: DOCUMENT_UPLOAD_API_ROUTES.UNIT,
317
+ method: API_METHODS.POST,
318
+ headers: {
319
+ "Content-Type": "application/json",
320
+ },
321
+ body: JSON.stringify({ schoolId, registrationCode, files: payload }),
322
+ });
323
+ if (error || !(data === null || data === void 0 ? void 0 : data.urls)) {
324
+ throw new Error("Upload failed");
325
+ }
326
+ return data.urls;
327
+ }, [(_d = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _d === void 0 ? void 0 : _d.id]);
286
328
  // ============================================================================
287
329
  // 1.4.5 API HOOKS
288
330
  // ============================================================================
@@ -321,11 +363,12 @@ export const useAdmissionModule = () => {
321
363
  resetFormAndCloseDrawer();
322
364
  }, [resetFormAndCloseDrawer]);
323
365
  const handleCreate = useCallback(() => {
366
+ wakeStorageServer();
324
367
  dispatch({
325
368
  type: ADMISSION_ACTION_TYPES.SET_DRAWER,
326
369
  payload: { drawer: ADMISSION_DRAWER.FORM_DRAWER },
327
370
  });
328
- }, [dispatch]);
371
+ }, [dispatch, wakeStorageServer]);
329
372
  const handleView = useCallback((row) => {
330
373
  byIdFetchNow === null || byIdFetchNow === void 0 ? void 0 : byIdFetchNow(undefined, { params: { id: row === null || row === void 0 ? void 0 : row.id } });
331
374
  dispatch({
@@ -334,12 +377,13 @@ export const useAdmissionModule = () => {
334
377
  });
335
378
  }, [dispatch, byIdFetchNow]);
336
379
  const handleEdit = useCallback((row) => {
380
+ wakeStorageServer();
337
381
  byIdFetchNow === null || byIdFetchNow === void 0 ? void 0 : byIdFetchNow(undefined, { params: { id: row === null || row === void 0 ? void 0 : row.id } });
338
382
  dispatch({
339
383
  type: ADMISSION_ACTION_TYPES.SET_DRAWER,
340
384
  payload: { drawer: ADMISSION_DRAWER.FORM_DRAWER },
341
385
  });
342
- }, [dispatch, byIdFetchNow]);
386
+ }, [dispatch, byIdFetchNow, wakeStorageServer]);
343
387
  const handleDelete = useCallback((row) => {
344
388
  if (!confirm(t("messagesDeleteConfirmation")))
345
389
  return;
@@ -347,6 +391,42 @@ export const useAdmissionModule = () => {
347
391
  body: JSON.stringify({ id: row === null || row === void 0 ? void 0 : row.id }),
348
392
  });
349
393
  }, [t, deleteFetchNow]);
394
+ const handleRemoveDocument = useCallback(async (url) => {
395
+ var _a;
396
+ const next = (state.documents || []).filter((d) => d !== url);
397
+ dispatch({
398
+ type: ADMISSION_ACTION_TYPES.SET_INPUT_FIELD,
399
+ payload: { key: "documents", value: next },
400
+ });
401
+ const { data, error } = await fetchData({
402
+ url: ADMISSION_API_ROUTES.UNIT,
403
+ method: API_METHODS.PUT,
404
+ headers: {
405
+ "Content-Type": "application/json",
406
+ },
407
+ body: JSON.stringify({
408
+ id: state.id,
409
+ schoolId: (_a = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _a === void 0 ? void 0 : _a.id,
410
+ admissionDetails: {
411
+ classForAdmission: state.classForAdmission || "",
412
+ previousSchool: state.previousSchool || "",
413
+ siblings: state.siblings || "",
414
+ documents: next,
415
+ },
416
+ }),
417
+ });
418
+ if (error || !data) {
419
+ throw new Error("Document removal failed");
420
+ }
421
+ }, [
422
+ dispatch,
423
+ (_e = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _e === void 0 ? void 0 : _e.id,
424
+ state.documents,
425
+ state.id,
426
+ state.classForAdmission,
427
+ state.previousSchool,
428
+ state.siblings,
429
+ ]);
350
430
  const handleFilters = useCallback(() => {
351
431
  dispatch({
352
432
  type: ADMISSION_ACTION_TYPES.SET_DRAWER,
@@ -553,7 +633,7 @@ export const useAdmissionModule = () => {
553
633
  description: `${t("messagesAnalyzeSuccess")} ${(_c = result === null || result === void 0 ? void 0 : result.score) !== null && _c !== void 0 ? _c : "N/A"} — ${(_d = result === null || result === void 0 ? void 0 : result.status) !== null && _d !== void 0 ? _d : ""}`,
554
634
  variant: TOAST_VARIANT.SUCCESS,
555
635
  });
556
- }, [(_d = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _d === void 0 ? void 0 : _d.id, t, showToast, byIdFetchNow, dispatch]);
636
+ }, [(_f = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _f === void 0 ? void 0 : _f.id, t, showToast, byIdFetchNow, dispatch]);
557
637
  const handleSubmit = useCallback(() => {
558
638
  dispatch({
559
639
  type: ADMISSION_ACTION_TYPES.SET_DISABLE_SAVE_BUTTON,
@@ -562,56 +642,82 @@ export const useAdmissionModule = () => {
562
642
  validateForm({
563
643
  params: updateParams,
564
644
  schema: admissionFormValidation,
565
- successCallback: () => {
645
+ successCallback: async () => {
566
646
  var _a;
567
- updateFetchNow(undefined, {
568
- body: JSON.stringify({
569
- schoolId: (_a = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _a === void 0 ? void 0 : _a.id,
570
- admissionDetails: {
571
- classForAdmission: updateParams.classForAdmission,
572
- previousSchool: updateParams.previousSchool,
573
- siblings: updateParams.siblings,
574
- },
575
- fatherDetails: {
576
- fatherIdNumber: normalizeIdNumber(updateParams.fatherIdNumber),
577
- fatherFirstName: updateParams.fatherFirstName,
578
- fatherLastName: updateParams.fatherLastName,
579
- fatherMobile: updateParams.fatherMobile,
580
- fatherOccupation: updateParams.fatherOccupation,
581
- fatherOrganization: updateParams.fatherOrganization,
582
- emergencyContact: updateParams.emergencyContact === "Father",
583
- },
584
- motherDetails: {
585
- motherIdNumber: normalizeIdNumber(updateParams.motherIdNumber || ""),
586
- motherFirstName: updateParams.motherFirstName || "N/A",
587
- motherLastName: updateParams.motherLastName || "N/A",
588
- motherMobile: updateParams.motherMobile,
589
- emergencyContact: updateParams.emergencyContact === "Mother",
590
- },
591
- homeDetails: {
592
- address: updateParams.address,
593
- city: updateParams.city,
594
- country: updateParams.country,
595
- postalCode: updateParams.postalCode,
596
- state: updateParams.state,
597
- },
598
- officeUse: {
599
- notes: updateParams.notes,
600
- admissionNotes: updateParams.admissionNotes,
601
- },
602
- studentDetails: {
603
- studentIdNumber: normalizeIdNumber(updateParams.studentIdNumber),
604
- discountCodeId: updateParams.discountCodeId,
605
- dob: updateParams.dob,
606
- firstName: updateParams.firstName,
607
- gender: updateParams.gender,
608
- hafiz: updateParams.hafiz,
609
- lastName: updateParams.lastName,
610
- orphan: updateParams.orphan,
611
- registrationCode: updateParams.registrationCode,
612
- },
613
- }),
614
- });
647
+ try {
648
+ const merged = state.documentsFiles.length
649
+ ? [
650
+ ...(state.documents || []),
651
+ ...(await uploadAdmissionDocuments(state.documentsFiles, updateParams.registrationCode)),
652
+ ]
653
+ : state.documents || [];
654
+ dispatch({
655
+ type: ADMISSION_ACTION_TYPES.SET_INPUT_FIELD,
656
+ payload: { key: "documents", value: merged },
657
+ });
658
+ dispatch({
659
+ type: ADMISSION_ACTION_TYPES.SET_INPUT_FIELD,
660
+ payload: { key: "documentsFiles", value: [] },
661
+ });
662
+ updateFetchNow(undefined, {
663
+ body: JSON.stringify({
664
+ schoolId: (_a = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _a === void 0 ? void 0 : _a.id,
665
+ admissionDetails: {
666
+ classForAdmission: updateParams.classForAdmission,
667
+ previousSchool: updateParams.previousSchool,
668
+ siblings: updateParams.siblings,
669
+ documents: merged,
670
+ },
671
+ fatherDetails: {
672
+ fatherIdNumber: normalizeIdNumber(updateParams.fatherIdNumber),
673
+ fatherFirstName: updateParams.fatherFirstName,
674
+ fatherLastName: updateParams.fatherLastName,
675
+ fatherMobile: updateParams.fatherMobile,
676
+ fatherOccupation: updateParams.fatherOccupation,
677
+ fatherOrganization: updateParams.fatherOrganization,
678
+ emergencyContact: updateParams.emergencyContact === "Father",
679
+ },
680
+ motherDetails: {
681
+ motherIdNumber: normalizeIdNumber(updateParams.motherIdNumber || ""),
682
+ motherFirstName: updateParams.motherFirstName || "N/A",
683
+ motherLastName: updateParams.motherLastName || "N/A",
684
+ motherMobile: updateParams.motherMobile,
685
+ emergencyContact: updateParams.emergencyContact === "Mother",
686
+ },
687
+ homeDetails: {
688
+ address: updateParams.address,
689
+ city: updateParams.city,
690
+ country: updateParams.country,
691
+ postalCode: updateParams.postalCode,
692
+ state: updateParams.state,
693
+ },
694
+ officeUse: {
695
+ notes: updateParams.notes,
696
+ admissionNotes: updateParams.admissionNotes,
697
+ },
698
+ studentDetails: {
699
+ studentIdNumber: normalizeIdNumber(updateParams.studentIdNumber),
700
+ discountCodeId: updateParams.discountCodeId,
701
+ dob: updateParams.dob,
702
+ firstName: updateParams.firstName,
703
+ gender: updateParams.gender,
704
+ hafiz: updateParams.hafiz,
705
+ lastName: updateParams.lastName,
706
+ orphan: updateParams.orphan,
707
+ registrationCode: updateParams.registrationCode,
708
+ },
709
+ }),
710
+ });
711
+ }
712
+ catch (error) {
713
+ dispatch({
714
+ type: ADMISSION_ACTION_TYPES.SET_DISABLE_SAVE_BUTTON,
715
+ payload: { disabled: false },
716
+ });
717
+ showToast(t(error instanceof DocumentTooLargeError
718
+ ? "messagesDocumentTooLarge"
719
+ : "messagesDocumentsUploadFailed"), TOAST_VARIANT.ERROR);
720
+ }
615
721
  },
616
722
  errorCallback: (errors) => {
617
723
  dispatch({
@@ -631,12 +737,15 @@ export const useAdmissionModule = () => {
631
737
  t,
632
738
  showToast,
633
739
  updateFetchNow,
634
- (_e = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _e === void 0 ? void 0 : _e.id,
740
+ state.documents,
741
+ state.documentsFiles,
742
+ uploadAdmissionDocuments,
743
+ (_g = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _g === void 0 ? void 0 : _g.id,
635
744
  ]);
636
745
  // ============================================================================
637
746
  // 1.4.8 HEADER & ROW ACTIONS
638
747
  // ============================================================================
639
- const hasGeminiSecrets = Boolean(((_f = workspace === null || workspace === void 0 ? void 0 : workspace.secrets) === null || _f === void 0 ? void 0 : _f.GEMINI_API_KEY) && ((_g = workspace === null || workspace === void 0 ? void 0 : workspace.secrets) === null || _g === void 0 ? void 0 : _g.GEMINI_MODEL));
748
+ const hasGeminiSecrets = Boolean(((_h = workspace === null || workspace === void 0 ? void 0 : workspace.secrets) === null || _h === void 0 ? void 0 : _h.GEMINI_API_KEY) && ((_j = workspace === null || workspace === void 0 ? void 0 : workspace.secrets) === null || _j === void 0 ? void 0 : _j.GEMINI_MODEL));
640
749
  const headerActions = useMemo(() => [
641
750
  {
642
751
  enabled: true,
@@ -739,6 +848,7 @@ export const useAdmissionModule = () => {
739
848
  handlePageChange,
740
849
  handlePageLimitChange,
741
850
  handlePrint,
851
+ handleRemoveDocument,
742
852
  handleSearch,
743
853
  handleSetEndDate,
744
854
  handleSetStartDate,
@@ -747,5 +857,6 @@ export const useAdmissionModule = () => {
747
857
  headerActions,
748
858
  listLoading,
749
859
  rowActions,
750
- updateLoading });
860
+ updateLoading,
861
+ uploadAdmissionDocuments });
751
862
  };
@@ -55,6 +55,8 @@ export declare const ADMISSION_ACTION_TYPES: {
55
55
  classForAdmission: string;
56
56
  previousSchool: string;
57
57
  siblings: string;
58
+ documents: string[];
59
+ documentsFiles: File[];
58
60
  admissionNotes: string;
59
61
  notes: string;
60
62
  enabled: boolean;
@@ -107,6 +109,8 @@ export declare const ADMISSION_ACTION_TYPES: {
107
109
  classForAdmission: string;
108
110
  previousSchool: string;
109
111
  siblings: string;
112
+ documents: string[];
113
+ documentsFiles: File[];
110
114
  admissionNotes: string;
111
115
  notes: string;
112
116
  enabled: boolean;
@@ -161,6 +165,8 @@ export declare const ADMISSION_ACTION_TYPES: {
161
165
  classForAdmission: string;
162
166
  previousSchool: string;
163
167
  siblings: string;
168
+ documents: string[];
169
+ documentsFiles: File[];
164
170
  admissionNotes: string;
165
171
  notes: string;
166
172
  enabled: boolean;
@@ -213,6 +219,8 @@ export declare const ADMISSION_ACTION_TYPES: {
213
219
  classForAdmission: string;
214
220
  previousSchool: string;
215
221
  siblings: string;
222
+ documents: string[];
223
+ documentsFiles: File[];
216
224
  admissionNotes: string;
217
225
  notes: string;
218
226
  enabled: boolean;
@@ -265,6 +273,8 @@ export declare const ADMISSION_ACTION_TYPES: {
265
273
  classForAdmission: string;
266
274
  previousSchool: string;
267
275
  siblings: string;
276
+ documents: string[];
277
+ documentsFiles: File[];
268
278
  admissionNotes: string;
269
279
  notes: string;
270
280
  enabled: boolean;
@@ -83,6 +83,9 @@ const admissionConfig = {
83
83
  classForAdmission: "",
84
84
  previousSchool: "",
85
85
  siblings: "",
86
+ // Form — documents
87
+ documents: [],
88
+ documentsFiles: [],
86
89
  // Form — office use
87
90
  admissionNotes: "",
88
91
  notes: "",
@@ -9,12 +9,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  * Note: the `state` field in `moduleState` (province/state) is aliased
10
10
  * to `provinceState` to avoid a name collision with the hook's `state` object.
11
11
  */
12
+ import { EnhancedCheckbox } from "@appcorp/shadcn/components/enhanced-checkbox";
13
+ import { EnhancedDropzone } from "@appcorp/shadcn/components/enhanced-dropzone";
12
14
  import { EnhancedInput } from "@appcorp/shadcn/components/enhanced-input";
13
15
  import { EnhancedTextarea } from "@appcorp/shadcn/components/enhanced-textarea";
14
- import { EnhancedCheckbox } from "@appcorp/shadcn/components/enhanced-checkbox";
15
16
  import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox";
16
- import { useAdmissionModule, ADMISSION_ACTION_TYPES } from "./context";
17
17
  import { Separator } from "@appcorp/shadcn/components/ui/separator";
18
+ import { useAdmissionModule, ADMISSION_ACTION_TYPES } from "./context";
18
19
  import { useEffect } from "react";
19
20
  import { getCachedWorkspaceSync } from "../workspace/cache";
20
21
  import { getDialCode } from "@react-pakistan/util-functions/general/get-dial-code";
@@ -27,7 +28,7 @@ import { useTranslations } from "next-intl";
27
28
  import { useFetch } from "@react-pakistan/util-functions/hooks/use-fetch";
28
29
  export const AdmissionForm = () => {
29
30
  const { state, handleChange, dispatch } = useAdmissionModule();
30
- const { address, admissionNotes, studentIdNumber, city, classForAdmission, country, discountCodeId, dob, emergencyContact, errors, fatherIdNumber, fatherFirstName, fatherLastName, fatherMobile, fatherOccupation, fatherOrganization, firstName, gender, id, lastName, motherIdNumber, motherFirstName, motherLastName, motherMobile, notes, previousSchool, registrationCode, siblings, state: provinceState, } = state;
31
+ const { address, admissionNotes, studentIdNumber, city, classForAdmission, country, discountCodeId, dob, documents, emergencyContact, errors, fatherIdNumber, fatherFirstName, fatherLastName, fatherMobile, fatherOccupation, fatherOrganization, firstName, gender, id, lastName, motherIdNumber, motherFirstName, motherLastName, motherMobile, notes, previousSchool, registrationCode, siblings, state: provinceState, } = state;
31
32
  const t = useTranslations("admission");
32
33
  const genderLabelMap = {
33
34
  MALE: t("formOptionMale"),
@@ -131,5 +132,15 @@ export const AdmissionForm = () => {
131
132
  }
132
133
  // eslint-disable-next-line react-hooks/exhaustive-deps
133
134
  }, [id, dispatch]);
134
- return (_jsxs("div", { className: "grid grid-cols-1 gap-2 space-y-2", children: [_jsx("h4", { className: "m-0 p-0", children: t("formSectionStudentInformation") }), _jsxs("div", { className: "grid grid-cols-5 gap-4", children: [_jsx(EnhancedInput, { error: errors.firstName, id: "firstName", info: t("formFirstNameInfo"), label: t("formFirstNameLabel"), onChange: (e) => handleChange("firstName", e.target.value), placeholder: t("formFirstNamePlaceholder"), required: true, type: "text", value: firstName || "" }), _jsx(EnhancedInput, { error: errors.lastName, id: "lastName", info: t("formLastNameInfo"), label: t("formLastNameLabel"), onChange: (e) => handleChange("lastName", e.target.value), placeholder: t("formLastNamePlaceholder"), required: true, type: "text", value: lastName || "" }), _jsx(EnhancedInput, { error: errors.studentIdNumber, id: "studentIdNumber", info: t("formStudentIdNumberInfo"), label: t("formStudentIdNumberLabel"), onChange: (e) => handleChange("studentIdNumber", e.target.value), placeholder: t("formStudentIdNumberPlaceholder"), required: true, type: "text", value: studentIdNumber || "" }), genderCombo, _jsx(EnhancedInput, { error: errors.dob, id: "dob", info: t("formDobInfo"), label: t("formDobLabel"), onChange: (e) => handleChange("dob", e.target.value), onClick: (e) => { var _a, _b; return (_b = (_a = e.currentTarget).showPicker) === null || _b === void 0 ? void 0 : _b.call(_a); }, placeholder: t("formDobPlaceholder"), required: true, type: "date", value: dob || "" }), _jsx(EnhancedInput, { error: errors.registrationCode, id: "registrationCode", info: t("formRegistrationCodeInfo"), label: t("formRegistrationCodeLabel"), onChange: (e) => handleChange("registrationCode", e.target.value), placeholder: t("formRegistrationCodePlaceholder"), required: true, type: "text", value: registrationCode || "", disabled: true }), discountCodeCombo, _jsx(EnhancedCheckbox, { label: t("formHafizLabel"), id: "hafiz", info: t("formHafizInfo"), onCheckedChange: (checked) => handleChange("hafiz", checked) }), _jsx(EnhancedCheckbox, { label: t("formOrphanLabel"), id: "orphan", info: t("formOrphanInfo"), onCheckedChange: (checked) => handleChange("orphan", checked) })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("formSectionFatherInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedInput, { error: errors.fatherFirstName, id: "fatherFirstName", info: t("formFatherFirstNameInfo"), label: t("formFirstNameLabel"), onChange: (e) => handleChange("fatherFirstName", e.target.value), placeholder: t("formFirstNamePlaceholder"), required: true, type: "text", value: fatherFirstName || "" }), _jsx(EnhancedInput, { error: errors.fatherLastName, id: "fatherLastName", info: t("formFatherLastNameInfo"), label: t("formLastNameLabel"), onChange: (e) => handleChange("fatherLastName", e.target.value), placeholder: t("formLastNamePlaceholder"), required: true, type: "text", value: fatherLastName || "" }), _jsx(EnhancedInput, { error: errors.fatherIdNumber, id: "fatherIdNumber", info: t("formFatherIdNumberInfo"), label: t("formIdNumberLabel"), onChange: (e) => handleChange("fatherIdNumber", e.target.value), placeholder: t("formIdNumberPlaceholder"), required: true, type: "text", value: fatherIdNumber || "" }), _jsx(EnhancedInput, { error: errors.fatherMobile, id: "fatherMobile", info: t("formFatherMobileInfo"), label: t("formMobileLabel"), onChange: (e) => handleChange("fatherMobile", e.target.value), placeholder: "+923001234567", required: true, type: "text", value: fatherMobile || "" }), _jsx(EnhancedInput, { error: errors.fatherOccupation, id: "fatherOccupation", info: t("formFatherOccupationInfo"), label: t("formOccupationLabel"), onChange: (e) => handleChange("fatherOccupation", e.target.value), placeholder: t("formOccupationPlaceholder"), required: false, type: "text", value: fatherOccupation || "" }), _jsx(EnhancedInput, { error: errors.fatherOrganization, id: "fatherOrganization", info: t("formFatherOrganizationInfo"), label: t("formOrganizationLabel"), onChange: (e) => handleChange("fatherOrganization", e.target.value), placeholder: t("formOrganizationPlaceholder"), required: false, type: "text", value: fatherOrganization || "" }), _jsx(EnhancedCheckbox, { label: t("formEmergencyContactLabel"), id: "emergencyContactFather", info: t("formFatherEmergencyContactInfo"), checked: emergencyContact === "Father", onCheckedChange: (checked) => handleChange("emergencyContact", checked ? "Father" : "") })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("formSectionMotherInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedInput, { error: errors.motherFirstName, id: "motherFirstName", info: t("formMotherFirstNameInfo"), label: t("formFirstNameLabel"), onChange: (e) => handleChange("motherFirstName", e.target.value), placeholder: t("formFirstNamePlaceholder"), required: true, type: "text", value: motherFirstName || "" }), _jsx(EnhancedInput, { error: errors.motherLastName, id: "motherLastName", info: t("formMotherLastNameInfo"), label: t("formLastNameLabel"), onChange: (e) => handleChange("motherLastName", e.target.value), placeholder: t("formLastNamePlaceholder"), required: true, type: "text", value: motherLastName || "" }), _jsx(EnhancedInput, { error: errors.motherIdNumber, id: "motherIdNumber", info: t("formMotherIdNumberInfo"), label: t("formIdNumberLabel"), onChange: (e) => handleChange("motherIdNumber", e.target.value), placeholder: t("formIdNumberPlaceholder"), required: true, type: "text", value: motherIdNumber || "" }), _jsx(EnhancedInput, { error: errors.motherMobile, id: "motherMobile", info: t("formMotherMobileInfo"), label: t("formMobileLabel"), onChange: (e) => handleChange("motherMobile", e.target.value), placeholder: "+923001234567", required: true, type: "text", value: motherMobile || "" }), _jsx(EnhancedCheckbox, { label: t("formEmergencyContactLabel"), id: "emergencyContactMother", info: t("formMotherEmergencyContactInfo"), checked: emergencyContact === "Mother", onCheckedChange: (checked) => handleChange("emergencyContact", checked ? "Mother" : "") })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("formSectionHomeInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedTextarea, { error: errors.address, id: "homeAddress", info: t("formHomeAddressInfo"), label: t("formHomeAddressLabel"), onChange: (e) => handleChange("address", e.target.value), placeholder: t("formHomeAddressPlaceholder"), required: true, rows: 2, value: address || "" }), _jsx(EnhancedInput, { error: errors.city, id: "city", info: t("formCityInfo"), label: t("formCityLabel"), onChange: (e) => handleChange("city", e.target.value), placeholder: t("formCityPlaceholder"), required: true, type: "text", value: city || "" }), _jsx(EnhancedInput, { error: errors.state, id: "state", info: t("formStateInfo"), label: t("formStateLabel"), onChange: (e) => handleChange("state", e.target.value), placeholder: t("formStatePlaceholder"), required: true, type: "text", value: provinceState || "" }), _jsx(EnhancedInput, { error: errors.country, id: "country", info: t("formCountryInfo"), label: t("formCountryLabel"), onChange: (e) => handleChange("country", e.target.value), placeholder: t("formCountryPlaceholder"), required: true, type: "text", value: country || "" })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("formSectionAdmissionInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedInput, { error: errors.classForAdmission, id: "classForAdmission", info: t("formClassForAdmissionInfo"), label: t("formClassForAdmissionLabel"), onChange: (e) => handleChange("classForAdmission", e.target.value), placeholder: t("formClassForAdmissionPlaceholder"), required: true, type: "text", value: classForAdmission || "" }), _jsx(EnhancedInput, { error: errors.previousSchool, id: "previousSchool", info: t("formPreviousSchoolInfo"), label: t("formPreviousSchoolLabel"), onChange: (e) => handleChange("previousSchool", e.target.value), placeholder: t("formPreviousSchoolPlaceholder"), type: "text", value: previousSchool || "" }), _jsx(EnhancedTextarea, { error: errors.siblings, id: "siblings", info: t("formSiblingsInfo"), label: t("formSiblingsLabel"), onChange: (e) => handleChange("siblings", e.target.value), placeholder: t("formSiblingsPlaceholder"), rows: 3, value: siblings || "" })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("formSectionOfficeUse") }), _jsxs("div", { className: "grid grid-cols-4 gap-4", children: [_jsx(EnhancedTextarea, { error: errors.notes, id: "notes", info: t("formNotesInfo"), label: t("formNotesLabel"), onChange: (e) => handleChange("notes", e.target.value), placeholder: t("formNotesPlaceholder"), rows: 3, value: notes || "" }), _jsx(EnhancedTextarea, { error: errors.admissionNotes, id: "admissionNotes", info: t("formAdmissionNotesInfo"), label: t("formAdmissionNotesLabel"), onChange: (e) => handleChange("admissionNotes", e.target.value), placeholder: t("formAdmissionNotesPlaceholder"), rows: 3, value: admissionNotes || "" })] })] }));
135
+ return (_jsxs("div", { className: "grid grid-cols-1 gap-2 space-y-2", children: [_jsx("h4", { className: "m-0 p-0", children: t("formSectionStudentInformation") }), _jsxs("div", { className: "grid grid-cols-5 gap-4", children: [_jsx(EnhancedInput, { error: errors.firstName, id: "firstName", info: t("formFirstNameInfo"), label: t("formFirstNameLabel"), onChange: (e) => handleChange("firstName", e.target.value), placeholder: t("formFirstNamePlaceholder"), required: true, type: "text", value: firstName || "" }), _jsx(EnhancedInput, { error: errors.lastName, id: "lastName", info: t("formLastNameInfo"), label: t("formLastNameLabel"), onChange: (e) => handleChange("lastName", e.target.value), placeholder: t("formLastNamePlaceholder"), required: true, type: "text", value: lastName || "" }), _jsx(EnhancedInput, { error: errors.studentIdNumber, id: "studentIdNumber", info: t("formStudentIdNumberInfo"), label: t("formStudentIdNumberLabel"), onChange: (e) => handleChange("studentIdNumber", e.target.value), placeholder: t("formStudentIdNumberPlaceholder"), required: true, type: "text", value: studentIdNumber || "" }), genderCombo, _jsx(EnhancedInput, { error: errors.dob, id: "dob", info: t("formDobInfo"), label: t("formDobLabel"), onChange: (e) => handleChange("dob", e.target.value), onClick: (e) => { var _a, _b; return (_b = (_a = e.currentTarget).showPicker) === null || _b === void 0 ? void 0 : _b.call(_a); }, placeholder: t("formDobPlaceholder"), required: true, type: "date", value: dob || "" }), _jsx(EnhancedInput, { error: errors.registrationCode, id: "registrationCode", info: t("formRegistrationCodeInfo"), label: t("formRegistrationCodeLabel"), onChange: (e) => handleChange("registrationCode", e.target.value), placeholder: t("formRegistrationCodePlaceholder"), required: true, type: "text", value: registrationCode || "", disabled: true }), discountCodeCombo, _jsx(EnhancedCheckbox, { label: t("formHafizLabel"), id: "hafiz", info: t("formHafizInfo"), onCheckedChange: (checked) => handleChange("hafiz", checked) }), _jsx(EnhancedCheckbox, { label: t("formOrphanLabel"), id: "orphan", info: t("formOrphanInfo"), onCheckedChange: (checked) => handleChange("orphan", checked) })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("formSectionFatherInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedInput, { error: errors.fatherFirstName, id: "fatherFirstName", info: t("formFatherFirstNameInfo"), label: t("formFirstNameLabel"), onChange: (e) => handleChange("fatherFirstName", e.target.value), placeholder: t("formFirstNamePlaceholder"), required: true, type: "text", value: fatherFirstName || "" }), _jsx(EnhancedInput, { error: errors.fatherLastName, id: "fatherLastName", info: t("formFatherLastNameInfo"), label: t("formLastNameLabel"), onChange: (e) => handleChange("fatherLastName", e.target.value), placeholder: t("formLastNamePlaceholder"), required: true, type: "text", value: fatherLastName || "" }), _jsx(EnhancedInput, { error: errors.fatherIdNumber, id: "fatherIdNumber", info: t("formFatherIdNumberInfo"), label: t("formIdNumberLabel"), onChange: (e) => handleChange("fatherIdNumber", e.target.value), placeholder: t("formIdNumberPlaceholder"), required: true, type: "text", value: fatherIdNumber || "" }), _jsx(EnhancedInput, { error: errors.fatherMobile, id: "fatherMobile", info: t("formFatherMobileInfo"), label: t("formMobileLabel"), onChange: (e) => handleChange("fatherMobile", e.target.value), placeholder: "+923001234567", required: true, type: "text", value: fatherMobile || "" }), _jsx(EnhancedInput, { error: errors.fatherOccupation, id: "fatherOccupation", info: t("formFatherOccupationInfo"), label: t("formOccupationLabel"), onChange: (e) => handleChange("fatherOccupation", e.target.value), placeholder: t("formOccupationPlaceholder"), required: false, type: "text", value: fatherOccupation || "" }), _jsx(EnhancedInput, { error: errors.fatherOrganization, id: "fatherOrganization", info: t("formFatherOrganizationInfo"), label: t("formOrganizationLabel"), onChange: (e) => handleChange("fatherOrganization", e.target.value), placeholder: t("formOrganizationPlaceholder"), required: false, type: "text", value: fatherOrganization || "" }), _jsx(EnhancedCheckbox, { label: t("formEmergencyContactLabel"), id: "emergencyContactFather", info: t("formFatherEmergencyContactInfo"), checked: emergencyContact === "Father", onCheckedChange: (checked) => handleChange("emergencyContact", checked ? "Father" : "") })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("formSectionMotherInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedInput, { error: errors.motherFirstName, id: "motherFirstName", info: t("formMotherFirstNameInfo"), label: t("formFirstNameLabel"), onChange: (e) => handleChange("motherFirstName", e.target.value), placeholder: t("formFirstNamePlaceholder"), required: true, type: "text", value: motherFirstName || "" }), _jsx(EnhancedInput, { error: errors.motherLastName, id: "motherLastName", info: t("formMotherLastNameInfo"), label: t("formLastNameLabel"), onChange: (e) => handleChange("motherLastName", e.target.value), placeholder: t("formLastNamePlaceholder"), required: true, type: "text", value: motherLastName || "" }), _jsx(EnhancedInput, { error: errors.motherIdNumber, id: "motherIdNumber", info: t("formMotherIdNumberInfo"), label: t("formIdNumberLabel"), onChange: (e) => handleChange("motherIdNumber", e.target.value), placeholder: t("formIdNumberPlaceholder"), required: true, type: "text", value: motherIdNumber || "" }), _jsx(EnhancedInput, { error: errors.motherMobile, id: "motherMobile", info: t("formMotherMobileInfo"), label: t("formMobileLabel"), onChange: (e) => handleChange("motherMobile", e.target.value), placeholder: "+923001234567", required: true, type: "text", value: motherMobile || "" }), _jsx(EnhancedCheckbox, { label: t("formEmergencyContactLabel"), id: "emergencyContactMother", info: t("formMotherEmergencyContactInfo"), checked: emergencyContact === "Mother", onCheckedChange: (checked) => handleChange("emergencyContact", checked ? "Mother" : "") })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("formSectionHomeInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedTextarea, { error: errors.address, id: "homeAddress", info: t("formHomeAddressInfo"), label: t("formHomeAddressLabel"), onChange: (e) => handleChange("address", e.target.value), placeholder: t("formHomeAddressPlaceholder"), required: true, rows: 2, value: address || "" }), _jsx(EnhancedInput, { error: errors.city, id: "city", info: t("formCityInfo"), label: t("formCityLabel"), onChange: (e) => handleChange("city", e.target.value), placeholder: t("formCityPlaceholder"), required: true, type: "text", value: city || "" }), _jsx(EnhancedInput, { error: errors.state, id: "state", info: t("formStateInfo"), label: t("formStateLabel"), onChange: (e) => handleChange("state", e.target.value), placeholder: t("formStatePlaceholder"), required: true, type: "text", value: provinceState || "" }), _jsx(EnhancedInput, { error: errors.country, id: "country", info: t("formCountryInfo"), label: t("formCountryLabel"), onChange: (e) => handleChange("country", e.target.value), placeholder: t("formCountryPlaceholder"), required: true, type: "text", value: country || "" })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("formSectionAdmissionInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedInput, { error: errors.classForAdmission, id: "classForAdmission", info: t("formClassForAdmissionInfo"), label: t("formClassForAdmissionLabel"), onChange: (e) => handleChange("classForAdmission", e.target.value), placeholder: t("formClassForAdmissionPlaceholder"), required: true, type: "text", value: classForAdmission || "" }), _jsx(EnhancedInput, { error: errors.previousSchool, id: "previousSchool", info: t("formPreviousSchoolInfo"), label: t("formPreviousSchoolLabel"), onChange: (e) => handleChange("previousSchool", e.target.value), placeholder: t("formPreviousSchoolPlaceholder"), type: "text", value: previousSchool || "" }), _jsx(EnhancedTextarea, { error: errors.siblings, id: "siblings", info: t("formSiblingsInfo"), label: t("formSiblingsLabel"), onChange: (e) => handleChange("siblings", e.target.value), placeholder: t("formSiblingsPlaceholder"), rows: 3, value: siblings || "" })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("formSectionOfficeUse") }), _jsxs("div", { className: "grid grid-cols-4 gap-4", children: [_jsx(EnhancedTextarea, { error: errors.notes, id: "notes", info: t("formNotesInfo"), label: t("formNotesLabel"), onChange: (e) => handleChange("notes", e.target.value), placeholder: t("formNotesPlaceholder"), rows: 3, value: notes || "" }), _jsx(EnhancedTextarea, { error: errors.admissionNotes, id: "admissionNotes", info: t("formAdmissionNotesInfo"), label: t("formAdmissionNotesLabel"), onChange: (e) => handleChange("admissionNotes", e.target.value), placeholder: t("formAdmissionNotesPlaceholder"), rows: 3, value: admissionNotes || "" })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("formSectionDocumentsLabel") }), _jsx(EnhancedDropzone, { accept: [
136
+ "application/pdf",
137
+ "image/jpeg",
138
+ "image/png",
139
+ "image/webp",
140
+ "application/msword",
141
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
142
+ ], error: errors.documents ? t(errors.documents) : undefined, id: "documents", info: t("formDocumentsInfo"), label: t("formDocumentsLabel"), maxFiles: 10, maxSize: 10 * 1024 * 1024, onChange: (files) => dispatch({
143
+ type: ADMISSION_ACTION_TYPES.SET_INPUT_FIELD,
144
+ payload: { key: "documentsFiles", value: files },
145
+ }), value: documents || [] })] }));
135
146
  };
@@ -15,7 +15,7 @@ import { useAdmissionModule } from "./context";
15
15
  import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@appcorp/shadcn/components/ui/card";
16
16
  import { Badge } from "@appcorp/shadcn/components/ui/badge";
17
17
  import { Separator } from "@appcorp/shadcn/components/ui/separator";
18
- import { AlertTriangle, BookOpen, Brain, Calendar, CheckCircle2, FileText, Home, Loader2, RefreshCw, ShieldCheck, ShieldX, User, XCircle, } from "lucide-react";
18
+ import { AlertTriangle, BookOpen, Brain, Calendar, CheckCircle2, ExternalLink, FileText, Home, Loader2, RefreshCw, ShieldCheck, ShieldX, Trash2, User, XCircle, } from "lucide-react";
19
19
  import { Button } from "@appcorp/shadcn/components/ui/button";
20
20
  import { useTranslations } from "next-intl";
21
21
  import { formatValue } from "@react-pakistan/util-functions/general/format-value";
@@ -25,8 +25,8 @@ import { getCachedWorkspaceSync } from "../workspace/cache";
25
25
  import { ADMISSION_STATUS } from "../../type";
26
26
  export const AdmissionView = () => {
27
27
  var _a, _b, _c;
28
- const { state, handleAnalyze } = useAdmissionModule();
29
- const { address, admissionNotes, aiAnalysis, analyzeLoading, analyzeError, studentIdNumber, city, classForAdmission, country, discountCodeId, dob, emergencyContact, enabled, fatherIdNumber, fatherFirstName, fatherLastName, fatherMobile, fatherOccupation, fatherOrganization, firstName, gender, hafiz, id, lastName, motherIdNumber, motherFirstName, motherLastName, motherMobile, notes, orphan, postalCode, previousSchool, registrationCode, siblings, state: provinceState, status, } = state;
28
+ const { state, handleAnalyze, handleRemoveDocument } = useAdmissionModule();
29
+ const { address, admissionNotes, aiAnalysis, analyzeLoading, analyzeError, studentIdNumber, city, classForAdmission, country, discountCodeId, dob, documents, emergencyContact, enabled, fatherIdNumber, fatherFirstName, fatherLastName, fatherMobile, fatherOccupation, fatherOrganization, firstName, gender, hafiz, id, lastName, motherIdNumber, motherFirstName, motherLastName, motherMobile, notes, orphan, postalCode, previousSchool, registrationCode, siblings, state: provinceState, status, } = state;
30
30
  const workspace = getCachedWorkspaceSync();
31
31
  const hasGeminiSecrets = Boolean(((_a = workspace === null || workspace === void 0 ? void 0 : workspace.secrets) === null || _a === void 0 ? void 0 : _a.GEMINI_API_KEY) && ((_b = workspace === null || workspace === void 0 ? void 0 : workspace.secrets) === null || _b === void 0 ? void 0 : _b.GEMINI_MODEL));
32
32
  const t = useTranslations("admission");
@@ -57,5 +57,9 @@ export const AdmissionView = () => {
57
57
  ? t("viewButtonReRunAnalysis")
58
58
  : t("viewButtonAnalyzeWithAi")] }))] }), _jsx(CardDescription, { children: t("viewFieldGeminiPoweredAdmissionScoring") })] }), _jsx(Separator, {}), _jsxs(CardContent, { className: "pt-6", children: [analyzeLoading && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-3", children: [_jsx(Loader2, { className: "h-5 w-5 animate-spin" }), _jsx("span", { children: t("viewTextRunningAiAnalysis") })] })), analyzeError && !analyzeLoading && (_jsxs("div", { className: "text-destructive flex items-center gap-2 text-sm", children: [_jsx(AlertTriangle, { className: "h-4 w-4" }), _jsx("span", { children: analyzeError })] })), !analyzeLoading && aiAnalysis && (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [_jsxs("div", { className: "bg-muted flex flex-col items-center rounded-lg px-6 py-3", children: [_jsx("span", { className: "text-primary text-3xl font-bold", children: aiAnalysis.score }), _jsx("span", { className: "text-muted-foreground text-xs tracking-wide uppercase", children: "/ 100" })] }), _jsxs("span", { className: `inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-sm font-medium ${decisionColor(aiAnalysis.decision)}`, children: [decisionIcon(aiAnalysis.decision), aiAnalysis.decision.replace("_", " ")] }), _jsxs("div", { className: "text-muted-foreground text-sm", children: [_jsxs("span", { className: "font-medium", children: [t("viewFieldConfidence"), ":", " "] }), (aiAnalysis.confidence * 100).toFixed(0), "%"] })] }), aiAnalysis.reasons.length > 0 && (_jsxs("div", { children: [_jsx("p", { className: "mb-2 text-sm font-medium", children: t("viewFieldAiReasoningAndRiskFlags") }), _jsx("ul", { className: "space-y-1.5", children: aiAnalysis.reasons.map((reason, i) => (_jsxs("li", { className: "flex items-start gap-2 text-sm", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-4 w-4 shrink-0 text-yellow-500" }), _jsx("span", { children: reason })] }, i))) })] })), _jsxs("p", { className: "text-muted-foreground text-xs", children: [t("viewFieldLastAnalyzed"), ":", " ", formatDate(String(aiAnalysis.processedAt), DATE_FORMATS.LOCALE_DATE)] })] })), !analyzeLoading && !aiAnalysis && !analyzeError && (_jsx("p", { className: "text-muted-foreground text-sm", children: t("viewTextNoAiAnalysisYet") }))] })] })), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionAdmissionDetails") })] }), _jsx(CardDescription, { children: t("viewSectionRegistrationAndAdmissionInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldRegistrationCode") }), _jsx("p", { className: "font-mono text-base", children: formatValue(registrationCode) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldClassForAdmission") }), _jsx("p", { className: "text-base", children: formatValue(classForAdmission) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldStatus") }), _jsx("p", { className: "text-base", children: formatValue(status) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldPreviousSchool") }), _jsx("p", { className: "text-base", children: formatValue(previousSchool) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldSiblings") }), _jsx("p", { className: "text-base", children: formatValue(siblings) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(User, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionStudentInformation") })] }), _jsx(CardDescription, { children: t("viewSectionPersonalDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldFullName") }), _jsxs("p", { className: "text-base", children: [formatValue(firstName), " ", formatValue(lastName)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldDateOfBirth") }), _jsx("p", { className: "text-base", children: formatDate(String(dob), DATE_FORMATS.LOCALE_DATE) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldGender") }), _jsx("p", { className: "text-base", children: formatValue(gender) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldStudentIdNumber") }), _jsx("p", { className: "text-base", children: formatValue(studentIdNumber) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldDiscountCode") }), _jsx("p", { className: "text-base", children: discountCodeId
59
59
  ? ((_c = discountCode === null || discountCode === void 0 ? void 0 : discountCode.code) !== null && _c !== void 0 ? _c : discountCodeId)
60
- : "N/A" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldEmergencyContact") }), _jsx("p", { className: "text-base", children: formatValue(emergencyContact) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldHafizEQuran") }), _jsx("p", { className: "text-base", children: hafiz ? t("badgeYes") : t("badgeNo") })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldOrphan") }), _jsx("p", { className: "text-base", children: orphan ? t("badgeYes") : t("badgeNo") })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(User, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionFatherInformation") })] }), _jsx(CardDescription, { children: t("viewSectionFatherDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldFullName") }), _jsxs("p", { className: "text-base", children: [formatValue(fatherFirstName), " ", formatValue(fatherLastName)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldIdNumber") }), _jsx("p", { className: "text-base", children: formatValue(fatherIdNumber) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldMobile") }), _jsx("p", { className: "text-base", children: formatPhoneDisplay(fatherMobile) || formatValue(fatherMobile) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldOccupation") }), _jsx("p", { className: "text-base", children: formatValue(fatherOccupation) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldOrganization") }), _jsx("p", { className: "text-base", children: formatValue(fatherOrganization) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(User, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionMotherInformation") })] }), _jsx(CardDescription, { children: t("viewSectionMotherDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldFullName") }), _jsxs("p", { className: "text-base", children: [formatValue(motherFirstName), " ", formatValue(motherLastName)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldIdNumber") }), _jsx("p", { className: "text-base", children: formatValue(motherIdNumber) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldMobile") }), _jsx("p", { className: "text-base", children: formatPhoneDisplay(motherMobile) || formatValue(motherMobile) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Home, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionHomeDetails") })] }), _jsx(CardDescription, { children: t("viewSectionAddressInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldAddress") }), _jsx("p", { className: "text-base", children: formatValue(address) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldCity") }), _jsx("p", { className: "text-base", children: formatValue(city) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldState") }), _jsx("p", { className: "text-base", children: formatValue(provinceState) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldCountry") }), _jsx("p", { className: "text-base", children: formatValue(country) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldPostalCode") }), _jsx("p", { className: "text-base", children: formatValue(postalCode) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionOfficeUse") })] }), _jsx(CardDescription, { children: t("viewSectionInternalNotesAndProcessingInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldNotes") }), _jsx("p", { className: "text-base", children: formatValue(notes) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldAdmissionNotes") }), _jsx("p", { className: "text-base", children: formatValue(admissionNotes) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionRecordStatus") })] }), _jsx(CardDescription, { children: t("viewFieldRecordStateAndMetadata") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldEnabled") }), _jsxs(Badge, { variant: enabled ? "default" : "destructive", className: "gap-1", children: [enabled ? (_jsx(CheckCircle2, { className: "h-3 w-3" })) : (_jsx(XCircle, { className: "h-3 w-3" })), enabled ? t("badgeActive") : t("badgeInactive")] })] }) })] })] }));
60
+ : "N/A" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldEmergencyContact") }), _jsx("p", { className: "text-base", children: formatValue(emergencyContact) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldHafizEQuran") }), _jsx("p", { className: "text-base", children: hafiz ? t("badgeYes") : t("badgeNo") })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldOrphan") }), _jsx("p", { className: "text-base", children: orphan ? t("badgeYes") : t("badgeNo") })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(User, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionFatherInformation") })] }), _jsx(CardDescription, { children: t("viewSectionFatherDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldFullName") }), _jsxs("p", { className: "text-base", children: [formatValue(fatherFirstName), " ", formatValue(fatherLastName)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldIdNumber") }), _jsx("p", { className: "text-base", children: formatValue(fatherIdNumber) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldMobile") }), _jsx("p", { className: "text-base", children: formatPhoneDisplay(fatherMobile) || formatValue(fatherMobile) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldOccupation") }), _jsx("p", { className: "text-base", children: formatValue(fatherOccupation) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldOrganization") }), _jsx("p", { className: "text-base", children: formatValue(fatherOrganization) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(User, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionMotherInformation") })] }), _jsx(CardDescription, { children: t("viewSectionMotherDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldFullName") }), _jsxs("p", { className: "text-base", children: [formatValue(motherFirstName), " ", formatValue(motherLastName)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldIdNumber") }), _jsx("p", { className: "text-base", children: formatValue(motherIdNumber) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldMobile") }), _jsx("p", { className: "text-base", children: formatPhoneDisplay(motherMobile) || formatValue(motherMobile) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Home, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionHomeDetails") })] }), _jsx(CardDescription, { children: t("viewSectionAddressInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldAddress") }), _jsx("p", { className: "text-base", children: formatValue(address) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldCity") }), _jsx("p", { className: "text-base", children: formatValue(city) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldState") }), _jsx("p", { className: "text-base", children: formatValue(provinceState) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldCountry") }), _jsx("p", { className: "text-base", children: formatValue(country) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldPostalCode") }), _jsx("p", { className: "text-base", children: formatValue(postalCode) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionOfficeUse") })] }), _jsx(CardDescription, { children: t("viewSectionInternalNotesAndProcessingInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldNotes") }), _jsx("p", { className: "text-base", children: formatValue(notes) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldAdmissionNotes") }), _jsx("p", { className: "text-base", children: formatValue(admissionNotes) })] })] }) })] }), _jsxs(Card, { children: [_jsx(CardHeader, { className: "pb-3", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionDocumentsLabel") })] }) }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: documents && documents.length > 0 ? (_jsx("div", { className: "space-y-2", children: documents.map((url, idx) => {
61
+ var _a;
62
+ const fileName = ((_a = url.split("/").pop()) === null || _a === void 0 ? void 0 : _a.split("-").slice(1).join("-")) || url;
63
+ return (_jsxs("div", { className: "flex items-center justify-between gap-3 rounded-lg border bg-muted/50 p-3", children: [_jsxs("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: "text-sm truncate flex-1 hover:underline", children: [fileName, _jsx(ExternalLink, { className: "ml-2 inline h-3.5 w-3.5 text-muted-foreground" })] }), _jsx(Button, { type: "button", size: "icon", variant: "ghost", className: "h-8 w-8 shrink-0", "aria-label": "Remove document", onClick: () => handleRemoveDocument(url), children: _jsx(Trash2, { className: "h-4 w-4" }) })] }, `${url}-${idx}`));
64
+ }) })) : (_jsx("p", { className: "text-muted-foreground text-sm", children: t("viewTextNoDocuments") })) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionRecordStatus") })] }), _jsx(CardDescription, { children: t("viewFieldRecordStateAndMetadata") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldEnabled") }), _jsxs(Badge, { variant: enabled ? "default" : "destructive", className: "gap-1", children: [enabled ? (_jsx(CheckCircle2, { className: "h-3 w-3" })) : (_jsx(XCircle, { className: "h-3 w-3" })), enabled ? t("badgeActive") : t("badgeInactive")] })] }) })] })] }));
61
65
  };
package/constants.d.ts CHANGED
@@ -18,6 +18,10 @@ export declare const ADMISSION_API_ROUTES: {
18
18
  readonly BULK: "/api/v1/admission/bulk";
19
19
  readonly BULK_STATUS: (jobId: string) => string;
20
20
  };
21
+ export declare const DOCUMENT_UPLOAD_API_ROUTES: {
22
+ readonly UNIT: "/api/v1/document-upload";
23
+ };
24
+ export declare const STORAGE_WAKE_URL = "https://storage.edupilotpro.com/";
21
25
  export declare const CAMPUS_API_ROUTES: Record<string, string>;
22
26
  export declare const CLASS_API_ROUTES: {
23
27
  readonly UNIT: "/api/v1/class";