@appcorp/fusion-storybook 0.1.93 → 0.1.95

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.
Files changed (74) hide show
  1. package/base-modules/admission/context.js +9 -9
  2. package/base-modules/admission/filter.js +4 -4
  3. package/base-modules/admission/form.js +6 -6
  4. package/base-modules/admission/view.js +1 -1
  5. package/base-modules/attendance/form.js +2 -2
  6. package/base-modules/attendance/view.js +1 -1
  7. package/base-modules/campus/context.js +7 -7
  8. package/base-modules/campus/filter.js +4 -4
  9. package/base-modules/campus/form.js +1 -1
  10. package/base-modules/campus/view.js +1 -1
  11. package/base-modules/class/context.js +7 -7
  12. package/base-modules/class/filter.js +4 -4
  13. package/base-modules/class/form.js +1 -1
  14. package/base-modules/class/view.js +1 -1
  15. package/base-modules/course/filter.js +4 -4
  16. package/base-modules/course/form.js +4 -4
  17. package/base-modules/course/view.js +1 -1
  18. package/base-modules/discount-code/context.js +7 -7
  19. package/base-modules/discount-code/filter.js +1 -1
  20. package/base-modules/discount-code/more-actions.js +1 -1
  21. package/base-modules/discount-code/view.js +2 -2
  22. package/base-modules/enrollment/filter.js +4 -4
  23. package/base-modules/enrollment/form.js +5 -5
  24. package/base-modules/enrollment/view.js +2 -2
  25. package/base-modules/expense/filter.js +4 -4
  26. package/base-modules/expense/form.js +2 -2
  27. package/base-modules/expense/view.js +3 -3
  28. package/base-modules/family/context.js +6 -6
  29. package/base-modules/family/filter.js +4 -4
  30. package/base-modules/family/form.js +1 -1
  31. package/base-modules/family/view.js +1 -1
  32. package/base-modules/family-member/context.js +6 -6
  33. package/base-modules/family-member/filter.js +4 -4
  34. package/base-modules/family-member/form.js +1 -1
  35. package/base-modules/family-member/view.js +7 -7
  36. package/base-modules/fee-structure/context.d.ts +6 -0
  37. package/base-modules/fee-structure/context.js +2 -1
  38. package/base-modules/fee-structure/filter.js +4 -4
  39. package/base-modules/fee-structure/form.js +14 -10
  40. package/base-modules/fee-structure/validate.d.ts +1 -0
  41. package/base-modules/fee-structure/validate.js +1 -0
  42. package/base-modules/fee-structure/view.js +1 -1
  43. package/base-modules/school/context.js +1 -1
  44. package/base-modules/school/view.js +4 -4
  45. package/base-modules/section/context.js +7 -7
  46. package/base-modules/section/filter.js +4 -4
  47. package/base-modules/section/form.js +2 -2
  48. package/base-modules/section/view.js +1 -1
  49. package/base-modules/student-fee/filter.js +4 -4
  50. package/base-modules/student-fee/form.js +3 -3
  51. package/base-modules/student-fee/view.js +2 -2
  52. package/base-modules/student-profile/context.js +9 -9
  53. package/base-modules/student-profile/filter.js +4 -4
  54. package/base-modules/student-profile/form.js +3 -3
  55. package/base-modules/student-profile/view.js +3 -3
  56. package/base-modules/subject/context.js +6 -6
  57. package/base-modules/subject/filter.js +4 -4
  58. package/base-modules/subject/form.js +1 -1
  59. package/base-modules/subject/view.js +1 -1
  60. package/base-modules/teacher/context.js +8 -8
  61. package/base-modules/teacher/filter.js +4 -4
  62. package/base-modules/teacher/form.js +3 -3
  63. package/base-modules/teacher/page.d.ts +0 -1
  64. package/base-modules/teacher/page.js +1 -3
  65. package/base-modules/teacher/view.js +3 -3
  66. package/base-modules/workspace/form.js +1 -1
  67. package/base-modules/workspace/view.js +5 -5
  68. package/base-modules/workspace-user/context.js +6 -4
  69. package/base-modules/workspace-user/filter.js +4 -4
  70. package/base-modules/workspace-user/form.js +1 -1
  71. package/base-modules/workspace-user/view.js +1 -1
  72. package/package.json +1 -1
  73. package/tsconfig.build.tsbuildinfo +1 -1
  74. package/type.d.ts +3 -0
@@ -452,7 +452,7 @@ export const useAdmissionModule = () => {
452
452
  });
453
453
  }, [dispatch, byIdFetchNow]);
454
454
  const handleDelete = useCallback((row) => {
455
- if (!confirm(t("areYouSureYouWantToDeleteThisAdmission")))
455
+ if (!confirm(t("actionDeleteConfirmation")))
456
456
  return;
457
457
  deleteFetchNow === null || deleteFetchNow === void 0 ? void 0 : deleteFetchNow(undefined, {
458
458
  body: JSON.stringify({ id: row === null || row === void 0 ? void 0 : row.id }),
@@ -755,14 +755,14 @@ export const useAdmissionModule = () => {
755
755
  {
756
756
  enabled: true,
757
757
  handleOnClick: handleFilters,
758
- label: t("headerActionsFilters"),
758
+ label: t("actionHeaderFilters"),
759
759
  order: 1,
760
760
  icon: Filter,
761
761
  },
762
762
  {
763
763
  enabled: true,
764
764
  handleOnClick: handleCreate,
765
- label: t("headerActionsAddAdmission"),
765
+ label: t("actionHeaderAddAdmission"),
766
766
  order: 2,
767
767
  icon: Plus,
768
768
  },
@@ -771,39 +771,39 @@ export const useAdmissionModule = () => {
771
771
  {
772
772
  enabled: true,
773
773
  handleOnClick: handleView,
774
- label: t("rowActionsView"),
774
+ label: t("actionRowView"),
775
775
  order: 1,
776
776
  },
777
777
  {
778
778
  enabled: (row) => (row === null || row === void 0 ? void 0 : row.status) === ADMISSION_STATUS.PENDING,
779
779
  handleOnClick: handleEdit,
780
- label: t("rowActionsEdit"),
780
+ label: t("actionRowEdit"),
781
781
  order: 2,
782
782
  },
783
783
  {
784
784
  enabled: (row) => (row === null || row === void 0 ? void 0 : row.status) === ADMISSION_STATUS.PENDING,
785
785
  handleOnClick: handleDelete,
786
- label: t("rowActionsDelete"),
786
+ label: t("actionRowDelete"),
787
787
  order: 3,
788
788
  variant: "destructive",
789
789
  },
790
790
  {
791
791
  enabled: true,
792
792
  handleOnClick: handlePrint,
793
- label: t("rowActionsPrintPdf"),
793
+ label: t("actionRowPrintPdf"),
794
794
  order: 4,
795
795
  },
796
796
  {
797
797
  enabled: (row) => hasGeminiSecrets &&
798
798
  (row === null || row === void 0 ? void 0 : row.status) === ADMISSION_STATUS.PENDING,
799
799
  handleOnClick: handleAnalyze,
800
- label: t("rowActionsAnalyzeWithAi"),
800
+ label: t("actionRowAnalyzeWithAi"),
801
801
  order: 5,
802
802
  },
803
803
  {
804
804
  enabled: (row) => (row === null || row === void 0 ? void 0 : row.status) !== ADMISSION_STATUS.APPROVED,
805
805
  handleOnClick: handleAddStudent,
806
- label: t("rowActionsAddStudent"),
806
+ label: t("actionRowAddStudent"),
807
807
  order: 6,
808
808
  },
809
809
  ], [
@@ -20,10 +20,10 @@ export const AdmissionFilter = () => {
20
20
  : filterEnabled
21
21
  ? "true"
22
22
  : "false";
23
- return (_jsx("div", { className: "space-y-4", children: _jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(EnhancedCombobox, { id: "filterAdmissionStatus", label: t("admissionStatus"), info: t("filterByAdmissionStatus"), options: [...ADMISSION_STATUS_OPTIONS], value: filterAdmissionStatus !== null && filterAdmissionStatus !== void 0 ? filterAdmissionStatus : undefined, onValueChange: (value) => handleChange("filterAdmissionStatus", value) }), _jsxs("div", { children: [_jsx("label", { htmlFor: "startDate", className: "text-foreground mb-1 block text-sm font-medium", children: t("startDate") }), _jsx("input", { id: "startDate", type: "date", value: filterStartDate || "", onChange: (e) => handleSetStartDate(e.target.value), className: "border-input bg-background text-foreground focus:ring-ring w-full rounded-md border px-3 py-2 focus:border-transparent focus:ring-2 focus:outline-none" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "endDate", className: "text-foreground mb-1 block text-sm font-medium", children: t("endDate") }), _jsx("input", { id: "endDate", type: "date", value: filterEndDate || "", onChange: (e) => handleSetEndDate(e.target.value), className: "border-input bg-background text-foreground focus:ring-ring w-full rounded-md border px-3 py-2 focus:border-transparent focus:ring-2 focus:outline-none" })] }), _jsx(EnhancedRadio, { label: t("enabled"), name: "filterEnabled", value: filterEnabledValue, options: [
24
- { label: t("all"), value: "undefined" },
25
- { label: t("enabled"), value: "true" },
26
- { label: t("disabled"), value: "false" },
23
+ return (_jsx("div", { className: "space-y-4", children: _jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(EnhancedCombobox, { id: "filterAdmissionStatus", label: t("filterAdmissionStatusLabel"), info: t("filterByAdmissionStatus"), options: [...ADMISSION_STATUS_OPTIONS], value: filterAdmissionStatus !== null && filterAdmissionStatus !== void 0 ? filterAdmissionStatus : undefined, onValueChange: (value) => handleChange("filterAdmissionStatus", value) }), _jsxs("div", { children: [_jsx("label", { htmlFor: "startDate", className: "text-foreground mb-1 block text-sm font-medium", children: t("filterStartDateLabel") }), _jsx("input", { id: "startDate", type: "date", value: filterStartDate || "", onChange: (e) => handleSetStartDate(e.target.value), className: "border-input bg-background text-foreground focus:ring-ring w-full rounded-md border px-3 py-2 focus:border-transparent focus:ring-2 focus:outline-none" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "endDate", className: "text-foreground mb-1 block text-sm font-medium", children: t("filterEndDateLabel") }), _jsx("input", { id: "endDate", type: "date", value: filterEndDate || "", onChange: (e) => handleSetEndDate(e.target.value), className: "border-input bg-background text-foreground focus:ring-ring w-full rounded-md border px-3 py-2 focus:border-transparent focus:ring-2 focus:outline-none" })] }), _jsx(EnhancedRadio, { label: t("filterOptionEnabled"), name: "filterEnabled", value: filterEnabledValue, options: [
24
+ { label: t("filterOptionAll"), value: "undefined" },
25
+ { label: t("filterOptionEnabled"), value: "true" },
26
+ { label: t("filterOptionDisabled"), value: "false" },
27
27
  ], onValueChange: (next) => {
28
28
  const parsed = next === "true" ? true : next === "false" ? false : undefined;
29
29
  handleChange("filterEnabled", parsed);
@@ -77,10 +77,10 @@ export const AdmissionForm = () => {
77
77
  },
78
78
  });
79
79
  }
80
- }, [id]);
81
- return (_jsxs("div", { className: "grid grid-cols-1 gap-2 space-y-2", children: [_jsx("h4", { className: "m-0 p-0", children: t("studentInformation") }), _jsxs("div", { className: "grid grid-cols-5 gap-4", children: [_jsx(EnhancedInput, { error: errors.firstName, id: "firstName", info: t("firstNameInfo"), label: t("firstName"), onChange: (e) => handleChange("firstName", e.target.value), placeholder: t("enterFirstName"), required: true, type: "text", value: firstName || "" }), _jsx(EnhancedInput, { error: errors.lastName, id: "lastName", info: t("lastNameInfo"), label: t("lastName"), onChange: (e) => handleChange("lastName", e.target.value), placeholder: t("enterLastName"), required: true, type: "text", value: lastName || "" }), _jsx(EnhancedInput, { error: errors.bForm, id: "bForm", info: t("bFormInfo"), label: t("bForm"), onChange: (e) => handleChange("bForm", e.target.value), placeholder: t("enterBForm"), required: true, type: "text", value: bForm || "" }), _jsx(EnhancedCombobox, { emptyText: t("noGenderOptionsFound"), error: errors.gender, id: "gender", info: t("genderInfo"), label: t("gender"), required: true, onValueChange: (value) => handleChange("gender", value), options: [
82
- { label: t("male"), value: GENDER.MALE },
83
- { label: t("female"), value: GENDER.FEMALE },
84
- { label: t("other"), value: GENDER.OTHER },
85
- ], placeholder: t("selectGender"), searchPlaceholder: t("searchGender"), value: gender }), _jsx(EnhancedInput, { error: errors.dob, id: "dob", info: t("dobInfo"), label: t("dob"), onChange: (e) => handleChange("dob", e.target.value), placeholder: t("selectDob"), required: true, type: "date", value: dob || "" }), _jsx(EnhancedInput, { error: errors.registrationCode, id: "registrationCode", info: t("registrationCodeInfo"), label: t("registrationCode"), onChange: (e) => handleChange("registrationCode", e.target.value), placeholder: t("enterRegistrationCode"), required: true, type: "text", value: registrationCode || "", disabled: true }), _jsx(EnhancedCombobox, { emptyText: t("noDiscountCodesAvailable"), error: errors.discountCode, id: "discountCode", info: t("discountCodeInfo"), label: t("discountCode"), onValueChange: (value) => handleChange("discountCode", value), options: discountCodeOptions, placeholder: t("enterDiscountCode"), searchPlaceholder: t("searchDiscountCodes"), value: discountCode || "" }), _jsx(EnhancedCheckbox, { label: t("hafiz"), id: "hafiz", info: t("hafizInfo"), onCheckedChange: (checked) => handleChange("hafiz", checked) }), _jsx(EnhancedCheckbox, { label: t("orphan"), id: "orphan", info: t("orphanInfo"), onCheckedChange: (checked) => handleChange("orphan", checked) })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("fatherInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedInput, { error: errors.fatherFirstName, id: "fatherFirstName", info: t("fatherFirstNameInfo"), label: t("firstName"), onChange: (e) => handleChange("fatherFirstName", e.target.value), placeholder: t("enterFirstName"), required: true, type: "text", value: fatherFirstName || "" }), _jsx(EnhancedInput, { error: errors.fatherLastName, id: "fatherLastName", info: t("fatherLastNameInfo"), label: t("lastName"), onChange: (e) => handleChange("fatherLastName", e.target.value), placeholder: t("enterLastName"), required: true, type: "text", value: fatherLastName || "" }), _jsx(EnhancedInput, { error: errors.fatherCnic, id: "fatherCnic", info: t("fatherCnicInfo"), label: t("cnic"), onChange: (e) => handleChange("fatherCnic", e.target.value), placeholder: t("enterIDNumber"), required: true, type: "text", value: fatherCnic || "" }), _jsx(EnhancedInput, { error: errors.fatherMobile, id: "fatherMobile", info: t("fatherMobileInfo"), label: t("mobile"), onChange: (e) => handleChange("fatherMobile", e.target.value), placeholder: "+923001234567", required: true, type: "text", value: fatherMobile || "" }), _jsx(EnhancedInput, { error: errors.fatherOccupation, id: "fatherOccupation", info: t("fatherOccupationInfo"), label: t("occupation"), onChange: (e) => handleChange("fatherOccupation", e.target.value), placeholder: t("enterOccupation"), required: false, type: "text", value: fatherOccupation || "" }), _jsx(EnhancedInput, { error: errors.fatherOrganization, id: "fatherOrganization", info: t("fatherOrganizationInfo"), label: t("organization"), onChange: (e) => handleChange("fatherOrganization", e.target.value), placeholder: t("enterOrganization"), required: false, type: "text", value: fatherOrganization || "" }), _jsx(EnhancedCheckbox, { label: t("emergencyContact"), id: "emergencyContactFather", info: t("fatherEmergencyContactInfo"), checked: emergencyContact === "Father", onCheckedChange: (checked) => handleChange("emergencyContact", checked ? "Father" : "") })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("motherInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedInput, { error: errors.motherFirstName, id: "motherFirstName", info: t("motherFirstNameInfo"), label: t("firstName"), onChange: (e) => handleChange("motherFirstName", e.target.value), placeholder: t("enterFirstName"), required: true, type: "text", value: motherFirstName || "" }), _jsx(EnhancedInput, { error: errors.motherLastName, id: "motherLastName", info: t("motherLastNameInfo"), label: t("lastName"), onChange: (e) => handleChange("motherLastName", e.target.value), placeholder: t("enterLastName"), required: true, type: "text", value: motherLastName || "" }), _jsx(EnhancedInput, { error: errors.motherCnic, id: "motherCnic", info: t("motherCnicInfo"), label: t("cnic"), onChange: (e) => handleChange("motherCnic", e.target.value), placeholder: t("enterIDNumber"), required: true, type: "text", value: motherCnic || "" }), _jsx(EnhancedInput, { error: errors.motherMobile, id: "motherMobile", info: t("motherMobileInfo"), label: t("mobile"), onChange: (e) => handleChange("motherMobile", e.target.value), placeholder: "+923001234567", required: true, type: "text", value: motherMobile || "" }), _jsx(EnhancedCheckbox, { label: t("emergencyContact"), id: "emergencyContactMother", info: t("motherEmergencyContactInfo"), checked: emergencyContact === "Mother", onCheckedChange: (checked) => handleChange("emergencyContact", checked ? "Mother" : "") })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("homeInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedTextarea, { error: errors.address, id: "homeAddress", info: t("homeAddressInfo"), label: t("homeAddress"), onChange: (e) => handleChange("address", e.target.value), placeholder: t("enterHomeAddress"), required: true, rows: 2, value: address || "" }), _jsx(EnhancedInput, { error: errors.city, id: "city", info: t("cityInfo"), label: t("city"), onChange: (e) => handleChange("city", e.target.value), placeholder: t("enterCity"), required: true, type: "text", value: city || "" }), _jsx(EnhancedInput, { error: errors.state, id: "state", info: t("stateInfo"), label: t("state"), onChange: (e) => handleChange("state", e.target.value), placeholder: t("enterState"), required: true, type: "text", value: provinceState || "" }), _jsx(EnhancedInput, { error: errors.country, id: "country", info: t("countryInfo"), label: t("country"), onChange: (e) => handleChange("country", e.target.value), placeholder: t("enterCountry"), required: true, type: "text", value: country || "" })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("admissionInformation") }), _jsxs("div", { className: "grid grid-cols-6 gap-4", children: [_jsx(EnhancedInput, { error: errors.classForAdmission, id: "classForAdmission", info: t("classForAdmissionInfo"), label: t("classForAdmission"), onChange: (e) => handleChange("classForAdmission", e.target.value), placeholder: t("enterClassForAdmission"), required: true, type: "text", value: classForAdmission || "" }), _jsx(EnhancedInput, { error: errors.previousSchool, id: "previousSchool", info: t("previousSchoolInfo"), label: t("previousSchool"), onChange: (e) => handleChange("previousSchool", e.target.value), placeholder: t("enterPreviousSchool"), type: "text", value: previousSchool || "" }), _jsx(EnhancedTextarea, { error: errors.siblings, id: "siblings", info: t("siblingsInfo"), label: t("siblings"), onChange: (e) => handleChange("siblings", e.target.value), placeholder: t("enterSiblings"), rows: 3, value: siblings || "" })] }), _jsx(Separator, {}), _jsx("h4", { className: "m-0 p-0", children: t("officeUse") }), _jsxs("div", { className: "grid grid-cols-4 gap-4", children: [_jsx(EnhancedTextarea, { error: errors.notes, id: "notes", info: t("notesInfo"), label: t("notes"), onChange: (e) => handleChange("notes", e.target.value), placeholder: t("enterNotes"), rows: 3, value: notes || "" }), _jsx(EnhancedTextarea, { error: errors.admissionNotes, id: "admissionNotes", info: t("admissionNotesInfo"), label: t("admissionNotes"), onChange: (e) => handleChange("admissionNotes", e.target.value), placeholder: t("enterAdmissionNotes"), rows: 3, value: admissionNotes || "" })] })] }));
80
+ }, [id, dispatch, workspace]);
81
+ 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.bForm, id: "bForm", info: t("formBFormInfo"), label: t("formBFormLabel"), onChange: (e) => handleChange("bForm", e.target.value), placeholder: t("formBFormPlaceholder"), required: true, type: "text", value: bForm || "" }), _jsx(EnhancedCombobox, { emptyText: t("formNoGenderOptionsEmpty"), error: errors.gender, id: "gender", info: t("formGenderInfo"), label: t("formGenderLabel"), required: true, onValueChange: (value) => handleChange("gender", value), options: [
82
+ { label: t("formOptionMale"), value: GENDER.MALE },
83
+ { label: t("formOptionFemale"), value: GENDER.FEMALE },
84
+ { label: t("formOptionOther"), value: GENDER.OTHER },
85
+ ], placeholder: t("formGenderPlaceholder"), searchPlaceholder: t("formSearchGenderPlaceholder"), value: gender }), _jsx(EnhancedInput, { error: errors.dob, id: "dob", info: t("formDobInfo"), label: t("formDobLabel"), onChange: (e) => handleChange("dob", e.target.value), 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 }), _jsx(EnhancedCombobox, { emptyText: t("formNoDiscountCodesEmpty"), error: errors.discountCode, id: "discountCode", info: t("formDiscountCodeInfo"), label: t("formDiscountCodeLabel"), onValueChange: (value) => handleChange("discountCode", value), options: discountCodeOptions, placeholder: t("formDiscountCodePlaceholder"), searchPlaceholder: t("formSearchDiscountCodesPlaceholder"), value: discountCode || "" }), _jsx(EnhancedCheckbox, { label: t("formCheckboxHafizLabel"), id: "hafiz", info: t("formHafizInfo"), onCheckedChange: (checked) => handleChange("hafiz", checked) }), _jsx(EnhancedCheckbox, { label: t("formCheckboxOrphanLabel"), 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.fatherCnic, id: "fatherCnic", info: t("formFatherCnicInfo"), label: t("formCnicLabel"), onChange: (e) => handleChange("fatherCnic", e.target.value), placeholder: t("formIDNumberPlaceholder"), required: true, type: "text", value: fatherCnic || "" }), _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.motherCnic, id: "motherCnic", info: t("formMotherCnicInfo"), label: t("formCnicLabel"), onChange: (e) => handleChange("motherCnic", e.target.value), placeholder: t("formIDNumberPlaceholder"), required: true, type: "text", value: motherCnic || "" }), _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 || "" })] })] }));
86
86
  };
@@ -42,5 +42,5 @@ export const AdmissionView = () => {
42
42
  return _jsx(ShieldX, { className: "h-4 w-4" });
43
43
  return _jsx(AlertTriangle, { className: "h-4 w-4" });
44
44
  };
45
- return (_jsxs("div", { className: "space-y-6", children: [hasGeminiSecrets && (_jsxs(Card, { className: "border-primary/20 border-2", children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Brain, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("aiAnalysis") })] }), status === ADMISSION_STATUS.PENDING && (_jsxs(Button, { variant: "outline", size: "sm", disabled: analyzeLoading, onClick: () => handleAnalyze({ id }), children: [analyzeLoading ? (_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" })) : (_jsx(RefreshCw, { className: "mr-2 h-4 w-4" })), aiAnalysis ? t("reRunAnalysis") : t("analyzeWithAi")] }))] }), _jsx(CardDescription, { children: t("geminiPoweredAdmissionScoring") })] }), _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("runningAiAnalysis") })] })), 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("confidence"), ": "] }), (aiAnalysis.confidence * 100).toFixed(0), "%"] })] }), aiAnalysis.reasons.length > 0 && (_jsxs("div", { children: [_jsx("p", { className: "mb-2 text-sm font-medium", children: t("aiReasoningAndRiskFlags") }), _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("lastAnalyzed"), ":", " ", formatDate(String(aiAnalysis.processedAt), DATE_FORMATS.LOCALE_DATE)] })] })), !analyzeLoading && !aiAnalysis && !analyzeError && (_jsx("p", { className: "text-muted-foreground text-sm", children: t("noAiAnalysisYet") }))] })] })), _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("admissionDetails") })] }), _jsx(CardDescription, { children: t("registrationAndAdmissionInformation") })] }), _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("registrationCode") }), _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("classForAdmission") }), _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("status") }), _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("previousSchool") }), _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("siblings") }), _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("studentInformation") })] }), _jsx(CardDescription, { children: t("personalDetails") })] }), _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("fullName") }), _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("dob") }), _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("gender") }), _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("bForm") }), _jsx("p", { className: "text-base", children: formatValue(bForm) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("discountCode") }), _jsx("p", { className: "text-base", children: formatValue(discountCode) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("emergencyContact") }), _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("hafizEQuran") }), _jsx("p", { className: "text-base", children: hafiz ? t("yes") : t("no") })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("orphan") }), _jsx("p", { className: "text-base", children: orphan ? t("yes") : t("no") })] })] }) })] }), _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("fatherInformation") })] }), _jsx(CardDescription, { children: t("fatherDetails") })] }), _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("fullName") }), _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("cnic") }), _jsx("p", { className: "text-base", children: formatValue(fatherCnic) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("mobile") }), _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("occupation") }), _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("organization") }), _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("motherInformation") })] }), _jsx(CardDescription, { children: t("motherDetails") })] }), _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("fullName") }), _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("cnic") }), _jsx("p", { className: "text-base", children: formatValue(motherCnic) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("mobile") }), _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("homeDetails") })] }), _jsx(CardDescription, { children: t("addressInformation") })] }), _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("address") }), _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("city") }), _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("state") }), _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("country") }), _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("postalCode") }), _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("officeUse") })] }), _jsx(CardDescription, { children: t("internalNotesAndProcessingInformation") })] }), _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("notes") }), _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("admissionNotes") }), _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("recordStatus") })] }), _jsx(CardDescription, { children: t("recordStateAndMetadata") })] }), _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("enabled") }), _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("active") : t("inactive")] })] }) })] })] }));
45
+ return (_jsxs("div", { className: "space-y-6", children: [hasGeminiSecrets && (_jsxs(Card, { className: "border-primary/20 border-2", children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Brain, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionAiAnalysis") })] }), status === ADMISSION_STATUS.PENDING && (_jsxs(Button, { variant: "outline", size: "sm", disabled: analyzeLoading, onClick: () => handleAnalyze({ id }), children: [analyzeLoading ? (_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" })) : (_jsx(RefreshCw, { className: "mr-2 h-4 w-4" })), aiAnalysis ? t("viewButtonReRunAnalysis") : 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("viewFieldDob") }), _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("viewFieldBForm") }), _jsx("p", { className: "text-base", children: formatValue(bForm) })] }), _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: formatValue(discountCode) })] }), _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("viewFieldYes") : t("viewFieldNo") })] }), _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("viewFieldYes") : t("viewFieldNo") })] })] }) })] }), _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("viewFieldCnic") }), _jsx("p", { className: "text-base", children: formatValue(fatherCnic) })] }), _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("viewFieldCnic") }), _jsx("p", { className: "text-base", children: formatValue(motherCnic) })] }), _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")] })] }) })] })] }));
46
46
  };
@@ -11,12 +11,12 @@ export const AttendanceForm = () => {
11
11
  const { state, handleChange } = useAttendanceModule();
12
12
  const { date, enabled, errors, remarks, status } = state;
13
13
  const t = useTranslations("attendance");
14
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { error: errors.date, id: "date", info: t("dateInfo"), label: t("date"), onChange: (e) => handleChange("date", e.target.value), placeholder: t("datePlaceholder"), required: true, type: "date", value: date }), _jsx(EnhancedCombobox, { error: errors.status, id: "status", info: t("statusInfo"), label: t("status"), onValueChange: (value) => handleChange("status", value), options: ATTENDANCE_STATUS_OPTIONS.map((opt) => ({
14
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { error: errors.date, id: "date", info: t("formDateInfo"), label: t("formDateLabel"), onChange: (e) => handleChange("date", e.target.value), placeholder: t("formDatePlaceholder"), required: true, type: "date", value: date }), _jsx(EnhancedCombobox, { error: errors.status, id: "status", info: t("formStatusInfo"), label: t("formOptionStatus"), onValueChange: (value) => handleChange("status", value), options: ATTENDANCE_STATUS_OPTIONS.map((opt) => ({
15
15
  label: t(`status${opt.value.charAt(0).toUpperCase() +
16
16
  opt.value
17
17
  .slice(1)
18
18
  .toLowerCase()
19
19
  .replace(/_([a-z])/g, (_, c) => c.toUpperCase())}`),
20
20
  value: opt.value,
21
- })), placeholder: t("statusPlaceholder"), required: true, searchPlaceholder: t("searchStatus"), emptyText: t("noStatusFound"), value: status }), _jsx(EnhancedTextarea, { error: errors.remarks, id: "remarks", info: t("remarksInfo"), label: t("remarks"), onChange: (e) => handleChange("remarks", e.target.value), placeholder: t("remarksPlaceholder"), rows: 3, value: remarks !== null && remarks !== void 0 ? remarks : "" }), _jsx(EnhancedCheckbox, { defaultChecked: enabled, label: t("activeAttendanceRecord"), onCheckedChange: (checked) => handleChange("enabled", checked) })] }));
21
+ })), placeholder: t("formStatusPlaceholder"), required: true, searchPlaceholder: t("formSearchStatusPlaceholder"), emptyText: t("formNoStatusEmpty"), value: status }), _jsx(EnhancedTextarea, { error: errors.remarks, id: "remarks", info: t("formRemarksInfo"), label: t("formRemarksLabel"), onChange: (e) => handleChange("remarks", e.target.value), placeholder: t("formRemarksPlaceholder"), rows: 3, value: remarks !== null && remarks !== void 0 ? remarks : "" }), _jsx(EnhancedCheckbox, { defaultChecked: enabled, label: t("formActiveAttendanceRecordLabel"), onCheckedChange: (checked) => handleChange("enabled", checked) })] }));
22
22
  };
@@ -24,6 +24,6 @@ export const AttendanceView = () => {
24
24
  studentProfile.studentCode
25
25
  : studentProfileId || "—";
26
26
  const formattedDate = date ? formatDate(date, DATE_FORMATS.LOCALE_DATE) : "—";
27
- return (_jsxs("div", { className: "space-y-4", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(ClipboardList, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("attendanceDetails") })] }), _jsx(CardDescription, { children: t("attendanceRecordDetails") })] }), _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: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(User, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("student") })] }), _jsx("p", { className: "text-base", children: studentName })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(CalendarDays, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("date") })] }), _jsx("p", { className: "text-base", children: formattedDate })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("status") }), _jsx(Badge, { variant: "secondary", children: status || "—" })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("additionalDetails") })] }), _jsx(CardDescription, { children: t("optionalNotes") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("remarks") }), _jsx("p", { className: "text-base", children: remarks || "—" })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("statusInfo") })] }), _jsx(CardDescription, { children: t("recordState") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _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("statusActive") : t("statusInactive")] }) })] })] }));
27
+ return (_jsxs("div", { className: "space-y-4", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(ClipboardList, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionAttendanceDetails") })] }), _jsx(CardDescription, { children: t("viewSectionAttendanceRecordDetails") })] }), _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: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(User, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldStudent") })] }), _jsx("p", { className: "text-base", children: studentName })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(CalendarDays, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldDate") })] }), _jsx("p", { className: "text-base", children: formattedDate })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldStatus") }), _jsx(Badge, { variant: "secondary", children: status || "—" })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionAdditionalDetails") })] }), _jsx(CardDescription, { children: t("viewFieldOptionalNotes") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldRemarks") }), _jsx("p", { className: "text-base", children: remarks || "—" })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("viewFieldStatusInfo") })] }), _jsx(CardDescription, { children: t("viewFieldRecordState") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _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("viewFieldStatusActive") : t("viewFieldStatusInactive")] }) })] })] }));
28
28
  };
29
29
  AttendanceView.displayName = "AttendanceView";
@@ -399,19 +399,19 @@ export const useCampusModule = () => {
399
399
  {
400
400
  enabled: false,
401
401
  handleOnClick: handleMoreActions,
402
- label: t("headerActionsMoreActions"),
402
+ label: t("actionHeaderMoreActions"),
403
403
  order: 0,
404
404
  },
405
405
  {
406
406
  enabled: true,
407
407
  handleOnClick: handleFilters,
408
- label: t("headerActionsFilters"),
408
+ label: t("actionHeaderFilters"),
409
409
  order: 1,
410
410
  },
411
411
  {
412
412
  enabled: true,
413
413
  handleOnClick: handleCreate,
414
- label: t("headerActionsAdd"),
414
+ label: t("actionHeaderAdd"),
415
415
  order: 2,
416
416
  },
417
417
  ], [handleCreate, handleFilters, handleMoreActions, t]);
@@ -419,26 +419,26 @@ export const useCampusModule = () => {
419
419
  {
420
420
  enabled: true,
421
421
  handleOnClick: handleView,
422
- label: t("rowActionsView"),
422
+ label: t("actionRowView"),
423
423
  order: 1,
424
424
  },
425
425
  {
426
426
  enabled: (row) => (row === null || row === void 0 ? void 0 : row.enabled) === true,
427
427
  handleOnClick: handleEdit,
428
- label: t("rowActionsEdit"),
428
+ label: t("actionRowEdit"),
429
429
  order: 2,
430
430
  },
431
431
  {
432
432
  enabled: (row) => (row === null || row === void 0 ? void 0 : row.enabled) === false,
433
433
  handleOnClick: handleDelete,
434
- label: t("rowActionsDelete"),
434
+ label: t("actionRowDelete"),
435
435
  order: 3,
436
436
  variant: "destructive",
437
437
  },
438
438
  {
439
439
  enabled: false,
440
440
  handleOnClick: toggleStatus,
441
- label: t("rowActionsToggleStatus"),
441
+ label: t("actionRowToggleStatus"),
442
442
  order: 4,
443
443
  },
444
444
  ], [handleDelete, handleEdit, handleView, t, toggleStatus]);
@@ -17,10 +17,10 @@ export const CampusFilter = () => {
17
17
  : filterEnabled
18
18
  ? "true"
19
19
  : "false";
20
- return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("enabled"), name: "filterEnabled", value: filterEnabledValue, options: [
21
- { label: t("all"), value: "undefined" },
22
- { label: t("enabled"), value: "true" },
23
- { label: t("disabled"), value: "false" },
20
+ return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("filterOptionEnabled"), name: "filterEnabled", value: filterEnabledValue, options: [
21
+ { label: t("filterOptionAll"), value: "undefined" },
22
+ { label: t("filterOptionEnabled"), value: "true" },
23
+ { label: t("filterOptionDisabled"), value: "false" },
24
24
  ], onValueChange: (next) => {
25
25
  const parsed = next === "true" ? true : next === "false" ? false : undefined;
26
26
  handleChange("filterEnabled", parsed);
@@ -13,5 +13,5 @@ export const CampusForm = () => {
13
13
  const { state, handleChange } = useCampusModule();
14
14
  const { address, city, code, country, enabled, errors, name, phone, state: campusState, } = state;
15
15
  const t = useTranslations("campus");
16
- return (_jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(EnhancedInput, { error: errors.name, id: "name", info: t("campusNameInfo"), label: t("campusName"), onChange: (e) => handleChange("name", e.target.value), placeholder: t("campusNamePlaceholder"), required: true, value: name }), _jsx(EnhancedInput, { error: errors.code, id: "code", info: t("campusCodeInfo"), label: t("campusCode"), onChange: (e) => handleChange("code", e.target.value), placeholder: t("campusCodePlaceholder"), required: true, value: code }), _jsx(EnhancedInput, { error: errors.address, id: "address", info: t("addressInfo"), label: t("address"), onChange: (e) => handleChange("address", e.target.value), placeholder: t("addressPlaceholder"), value: address || "" }), _jsx(EnhancedInput, { error: errors.city, id: "city", info: t("cityInfo"), label: t("city"), onChange: (e) => handleChange("city", e.target.value), placeholder: t("cityPlaceholder"), value: city || "" }), _jsx(EnhancedInput, { error: errors.state, id: "state", info: t("stateInfo"), label: t("state"), onChange: (e) => handleChange("state", e.target.value), placeholder: t("statePlaceholder"), value: campusState || "" }), _jsx(EnhancedInput, { error: errors.country, id: "country", info: t("countryInfo"), label: t("country"), onChange: (e) => handleChange("country", e.target.value), placeholder: t("countryPlaceholder"), value: country || "" }), _jsx(EnhancedInput, { error: errors.phone, id: "phone", info: t("phoneInfo"), label: t("phone"), onChange: (e) => handleChange("phone", e.target.value), placeholder: t("phonePlaceholder"), value: phone || "" }), _jsx(EnhancedCheckbox, { info: t("activeCampusInfo"), label: t("activeCampus"), defaultChecked: enabled, onCheckedChange: (checked) => handleChange("enabled", checked) })] }));
16
+ return (_jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(EnhancedInput, { error: errors.name, id: "name", info: t("formCampusNameInfo"), label: t("formCampusNameLabel"), onChange: (e) => handleChange("name", e.target.value), placeholder: t("formCampusNamePlaceholder"), required: true, value: name }), _jsx(EnhancedInput, { error: errors.code, id: "code", info: t("formCampusCodeInfo"), label: t("formCampusCodeLabel"), onChange: (e) => handleChange("code", e.target.value), placeholder: t("formCampusCodePlaceholder"), required: true, value: code }), _jsx(EnhancedInput, { error: errors.address, id: "address", info: t("formAddressInfo"), label: t("formAddressLabel"), onChange: (e) => handleChange("address", e.target.value), placeholder: t("formAddressPlaceholder"), 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"), 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"), value: campusState || "" }), _jsx(EnhancedInput, { error: errors.country, id: "country", info: t("formCountryInfo"), label: t("formCountryLabel"), onChange: (e) => handleChange("country", e.target.value), placeholder: t("formCountryPlaceholder"), value: country || "" }), _jsx(EnhancedInput, { error: errors.phone, id: "phone", info: t("formPhoneInfo"), label: t("formPhoneLabel"), onChange: (e) => handleChange("phone", e.target.value), placeholder: t("formPhonePlaceholder"), value: phone || "" }), _jsx(EnhancedCheckbox, { info: t("formActiveCampusInfo"), label: t("formActiveCampusLabel"), defaultChecked: enabled, onCheckedChange: (checked) => handleChange("enabled", checked) })] }));
17
17
  };
@@ -17,5 +17,5 @@ export const CampusView = () => {
17
17
  const { state } = useCampusModule();
18
18
  const { address, city, code, country, enabled, name, phone, state: campusState, } = state;
19
19
  const t = useTranslations("campus");
20
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "bg-primary/10 flex h-24 w-24 items-center justify-center rounded-full", children: _jsx(Building2, { className: "text-primary h-12 w-12" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: name }), enabled ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsxs("p", { className: "text-muted-foreground mt-1", children: [t("code"), ": ", code] })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Building2, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("campusDetails") })] }), _jsx(CardDescription, { children: t("completeCampusInformation") })] }), _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("campusName") }), _jsx("p", { className: "text-base", children: formatValue(name) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("campusCode") }), _jsx("p", { className: "text-base", children: formatValue(code) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("address") }), _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("city") }), _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("state") }), _jsx("p", { className: "text-base", children: formatValue(campusState) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("country") }), _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("phone") }), _jsx("p", { className: "text-base", children: formatPhoneDisplay(phone) || formatValue(phone) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("status") }), _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? t("statusActive") : t("statusInactive") })] })] }) })] })] }));
20
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "bg-primary/10 flex h-24 w-24 items-center justify-center rounded-full", children: _jsx(Building2, { className: "text-primary h-12 w-12" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: name }), enabled ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsxs("p", { className: "text-muted-foreground mt-1", children: [t("viewFieldCode"), ": ", code] })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Building2, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionCampusDetails") })] }), _jsx(CardDescription, { children: t("viewSectionCompleteCampusInformation") })] }), _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("viewFieldCampusName") }), _jsx("p", { className: "text-base", children: formatValue(name) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldCampusCode") }), _jsx("p", { className: "text-base", children: formatValue(code) })] }), _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(campusState) })] }), _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("viewFieldPhone") }), _jsx("p", { className: "text-base", children: formatPhoneDisplay(phone) || formatValue(phone) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldStatus") }), _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? t("viewFieldStatusActive") : t("viewFieldStatusInactive") })] })] }) })] })] }));
21
21
  };
@@ -377,19 +377,19 @@ export const useClassModule = () => {
377
377
  {
378
378
  enabled: false,
379
379
  handleOnClick: handleMoreActions,
380
- label: t("headerActionsMoreActions"),
380
+ label: t("actionHeaderMoreActions"),
381
381
  order: 0,
382
382
  },
383
383
  {
384
384
  enabled: false,
385
385
  handleOnClick: handleFilters,
386
- label: t("headerActionsFilters"),
386
+ label: t("actionHeaderFilters"),
387
387
  order: 1,
388
388
  },
389
389
  {
390
390
  enabled: true,
391
391
  handleOnClick: handleCreate,
392
- label: t("headerActionsAdd"),
392
+ label: t("actionHeaderAdd"),
393
393
  order: 2,
394
394
  },
395
395
  ], [handleCreate, handleFilters, handleMoreActions, t]);
@@ -397,26 +397,26 @@ export const useClassModule = () => {
397
397
  {
398
398
  enabled: true,
399
399
  handleOnClick: handleView,
400
- label: t("rowActionsView"),
400
+ label: t("actionRowView"),
401
401
  order: 1,
402
402
  },
403
403
  {
404
404
  enabled: (row) => (row === null || row === void 0 ? void 0 : row.enabled) === true,
405
405
  handleOnClick: handleEdit,
406
- label: t("rowActionsEdit"),
406
+ label: t("actionRowEdit"),
407
407
  order: 2,
408
408
  },
409
409
  {
410
410
  enabled: (row) => (row === null || row === void 0 ? void 0 : row.enabled) === false,
411
411
  handleOnClick: handleDelete,
412
- label: t("rowActionsDelete"),
412
+ label: t("actionRowDelete"),
413
413
  order: 3,
414
414
  variant: "destructive",
415
415
  },
416
416
  {
417
417
  enabled: false,
418
418
  handleOnClick: toggleStatus,
419
- label: t("rowActionsToggleStatus"),
419
+ label: t("actionRowToggleStatus"),
420
420
  order: 4,
421
421
  },
422
422
  ], [handleDelete, handleEdit, handleView, t, toggleStatus]);
@@ -17,10 +17,10 @@ export const ClassFilter = () => {
17
17
  : filterEnabled
18
18
  ? "true"
19
19
  : "false";
20
- return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("enabled"), name: "filterEnabled", value: filterEnabledValue, options: [
21
- { label: t("all"), value: "undefined" },
22
- { label: t("enabled"), value: "true" },
23
- { label: t("disabled"), value: "false" },
20
+ return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("filterOptionEnabled"), name: "filterEnabled", value: filterEnabledValue, options: [
21
+ { label: t("filterOptionAll"), value: "undefined" },
22
+ { label: t("filterOptionEnabled"), value: "true" },
23
+ { label: t("filterOptionDisabled"), value: "false" },
24
24
  ], onValueChange: (next) => {
25
25
  const parsed = next === "true" ? true : next === "false" ? false : undefined;
26
26
  handleChange("filterEnabled", parsed);
@@ -14,5 +14,5 @@ export const ClassForm = () => {
14
14
  const { state, handleChange } = useClassModule();
15
15
  const { code, description, enabled, errors, name } = state;
16
16
  const t = useTranslations("class");
17
- return (_jsx("div", { className: "space-y-4", children: _jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(EnhancedInput, { error: errors.name, id: "name", info: t("classNameInfo"), label: t("className"), onChange: (e) => handleChange("name", e.target.value), placeholder: t("classNamePlaceholder"), required: true, value: name }), _jsx(EnhancedInput, { error: errors.code, id: "code", info: t("classCodeInfo"), label: t("classCode"), onChange: (e) => handleChange("code", e.target.value), placeholder: t("classCodePlaceholder"), required: true, value: code }), _jsx(EnhancedTextarea, { error: errors.description, id: "description", info: t("descriptionInfo"), label: t("description"), onChange: (e) => handleChange("description", e.target.value), placeholder: t("descriptionPlaceholder"), rows: 3, value: description || "" }), _jsx(EnhancedCheckbox, { label: t("activeClass"), defaultChecked: enabled, onCheckedChange: (checked) => handleChange("enabled", checked), info: t("toggleToActivateOrDeactivateClass") })] }) }));
17
+ return (_jsx("div", { className: "space-y-4", children: _jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(EnhancedInput, { error: errors.name, id: "name", info: t("formClassNameInfo"), label: t("formClassNameLabel"), onChange: (e) => handleChange("name", e.target.value), placeholder: t("formClassNamePlaceholder"), required: true, value: name }), _jsx(EnhancedInput, { error: errors.code, id: "code", info: t("formClassCodeInfo"), label: t("formClassCodeLabel"), onChange: (e) => handleChange("code", e.target.value), placeholder: t("formClassCodePlaceholder"), required: true, value: code }), _jsx(EnhancedTextarea, { error: errors.description, id: "description", info: t("formDescriptionInfo"), label: t("formDescriptionLabel"), onChange: (e) => handleChange("description", e.target.value), placeholder: t("formDescriptionPlaceholder"), rows: 3, value: description || "" }), _jsx(EnhancedCheckbox, { label: t("formActiveClassLabel"), defaultChecked: enabled, onCheckedChange: (checked) => handleChange("enabled", checked), info: t("actionToggleActivateOrDeactivateClass") })] }) }));
18
18
  };
@@ -16,5 +16,5 @@ export const ClassView = () => {
16
16
  const { state } = useClassModule();
17
17
  const { code, description, enabled, name } = state;
18
18
  const t = useTranslations("class");
19
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "bg-primary/10 flex h-24 w-24 items-center justify-center rounded-full", children: _jsx(GraduationCap, { className: "text-primary h-12 w-12" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: name }), enabled ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsxs("p", { className: "text-muted-foreground mt-1", children: [t("code"), ": ", code] })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(GraduationCap, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("classDetails") })] }), _jsx(CardDescription, { children: t("completeClassInformation") })] }), _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("className") }), _jsx("p", { className: "text-base", children: formatValue(name) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("classCode") }), _jsx("p", { className: "text-base", children: formatValue(code) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("description") }), _jsx("p", { className: "text-base", children: formatValue(description) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("status") }), _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? t("statusActive") : t("statusInactive") })] })] }) })] })] }));
19
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "bg-primary/10 flex h-24 w-24 items-center justify-center rounded-full", children: _jsx(GraduationCap, { className: "text-primary h-12 w-12" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: name }), enabled ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsxs("p", { className: "text-muted-foreground mt-1", children: [t("viewFieldCode"), ": ", code] })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(GraduationCap, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionClassDetails") })] }), _jsx(CardDescription, { children: t("viewSectionCompleteClassInformation") })] }), _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("viewFieldClassName") }), _jsx("p", { className: "text-base", children: formatValue(name) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldClassCode") }), _jsx("p", { className: "text-base", children: formatValue(code) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldDescription") }), _jsx("p", { className: "text-base", children: formatValue(description) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldStatus") }), _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? t("viewFieldStatusActive") : t("viewFieldStatusInactive") })] })] }) })] })] }));
20
20
  };
@@ -16,10 +16,10 @@ export const CourseFilter = () => {
16
16
  : state.filterEnabled
17
17
  ? "true"
18
18
  : "false";
19
- return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("enabled"), name: "filterEnabled", value: filterEnabledValue, options: [
20
- { label: t("all"), value: "undefined" },
21
- { label: t("enabled"), value: "true" },
22
- { label: t("disabled"), value: "false" },
19
+ return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("filterOptionEnabled"), name: "filterEnabled", value: filterEnabledValue, options: [
20
+ { label: t("filterOptionAll"), value: "undefined" },
21
+ { label: t("filterOptionEnabled"), value: "true" },
22
+ { label: t("filterOptionDisabled"), value: "false" },
23
23
  ], onValueChange: (next) => {
24
24
  const parsed = next === "true" ? true : next === "false" ? false : undefined;
25
25
  handleChange("filterEnabled", parsed);
@@ -292,17 +292,17 @@ export const CourseForm = () => {
292
292
  isActive = false;
293
293
  };
294
294
  }, [schoolId, trimmedTeacherSearchQuery]);
295
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { error: errors.code, id: "code", info: t("courseCodeInfo"), label: t("courseCode"), onChange: (e) => handleChange("code", e.target.value), placeholder: t("courseCodePlaceholder"), required: true, value: code }), _jsx(EnhancedCombobox, { emptyText: t("noSectionFound"), error: errors.sectionId, id: "sectionId", info: t("sectionInfo"), label: t("section"), loading: sectionOptionsLoading && Boolean(trimmedSectionSearchQuery), onValueChange: (value) => {
295
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { error: errors.code, id: "code", info: t("formCourseCodeInfo"), label: t("formCourseCodeLabel"), onChange: (e) => handleChange("code", e.target.value), placeholder: t("formCourseCodePlaceholder"), required: true, value: code }), _jsx(EnhancedCombobox, { emptyText: t("formNoSectionEmpty"), error: errors.sectionId, id: "sectionId", info: t("sectionInfo"), label: t("section"), loading: sectionOptionsLoading && Boolean(trimmedSectionSearchQuery), onValueChange: (value) => {
296
296
  var _a;
297
297
  handleChange("sectionId", value);
298
298
  handleChange("sectionLabel", ((_a = displayedSectionOptions.find((option) => option.value === value)) === null || _a === void 0 ? void 0 : _a.label) || "");
299
- }, onSearchChange: setSectionSearchQuery, options: displayedSectionOptions, placeholder: t("sectionPlaceholder"), required: true, searchPlaceholder: t("searchSections"), value: sectionId }), _jsx(EnhancedCombobox, { emptyText: t("noSubjectFound"), error: errors.subjectId, id: "subjectId", info: t("subjectInfo"), label: t("subject"), loading: subjectOptionsLoading && Boolean(trimmedSubjectSearchQuery), onValueChange: (value) => {
299
+ }, onSearchChange: setSectionSearchQuery, options: displayedSectionOptions, placeholder: t("sectionPlaceholder"), required: true, searchPlaceholder: t("formSearchSectionsPlaceholder"), value: sectionId }), _jsx(EnhancedCombobox, { emptyText: t("formNoSubjectEmpty"), error: errors.subjectId, id: "subjectId", info: t("formSubjectInfo"), label: t("formSubjectLabel"), loading: subjectOptionsLoading && Boolean(trimmedSubjectSearchQuery), onValueChange: (value) => {
300
300
  var _a;
301
301
  handleChange("subjectId", value);
302
302
  handleChange("subjectLabel", ((_a = displayedSubjectOptions.find((option) => option.value === value)) === null || _a === void 0 ? void 0 : _a.label) || "");
303
- }, onSearchChange: setSubjectSearchQuery, options: displayedSubjectOptions, placeholder: t("subjectPlaceholder"), required: true, searchPlaceholder: t("searchSubjects"), value: subjectId }), _jsx(EnhancedCombobox, { emptyText: t("noTeacherFound"), error: errors.teacherId, id: "teacherId", info: t("teacherInfo"), label: t("teacher"), loading: teacherOptionsLoading && Boolean(trimmedTeacherSearchQuery), onValueChange: (value) => {
303
+ }, onSearchChange: setSubjectSearchQuery, options: displayedSubjectOptions, placeholder: t("formSubjectPlaceholder"), required: true, searchPlaceholder: t("formSearchSubjectsPlaceholder"), value: subjectId }), _jsx(EnhancedCombobox, { emptyText: t("formNoTeacherEmpty"), error: errors.teacherId, id: "teacherId", info: t("formTeacherInfo"), label: t("formTeacherLabel"), loading: teacherOptionsLoading && Boolean(trimmedTeacherSearchQuery), onValueChange: (value) => {
304
304
  var _a;
305
305
  handleChange("teacherId", value);
306
306
  handleChange("teacherLabel", ((_a = displayedTeacherOptions.find((option) => option.value === value)) === null || _a === void 0 ? void 0 : _a.label) || "");
307
- }, onSearchChange: setTeacherSearchQuery, options: displayedTeacherOptions, placeholder: t("teacherPlaceholder"), required: true, searchPlaceholder: t("searchTeachers"), value: teacherId }), _jsx(EnhancedCheckbox, { label: t("activeCourse"), defaultChecked: enabled, onCheckedChange: (checked) => handleChange("enabled", checked), info: t("toggleToEnableOrDisableCourse") })] }));
307
+ }, onSearchChange: setTeacherSearchQuery, options: displayedTeacherOptions, placeholder: t("formTeacherPlaceholder"), required: true, searchPlaceholder: t("formSearchTeachersPlaceholder"), value: teacherId }), _jsx(EnhancedCheckbox, { label: t("formActiveCourseLabel"), defaultChecked: enabled, onCheckedChange: (checked) => handleChange("enabled", checked), info: t("actionToggleEnableOrDisableCourse") })] }));
308
308
  };
@@ -36,5 +36,5 @@ export const CourseView = () => {
36
36
  teacher.teacherCode ||
37
37
  "—"
38
38
  : "—";
39
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "bg-primary/10 flex h-24 w-24 items-center justify-center rounded-full", children: _jsx(BookMarked, { className: "text-primary h-12 w-12" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: formatValue(code) }), enabled ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsx("p", { className: "text-muted-foreground mt-1", children: sectionName })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookMarked, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("courseDetails") })] }), _jsx(CardDescription, { children: t("completeCourseInformation") })] }), _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("courseCode") }), _jsx("p", { className: "text-base", children: formatValue(code) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("section") }), _jsx("p", { className: "text-base", children: sectionName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("subject") }), _jsx("p", { className: "text-base", children: subjectName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("teacher") }), _jsx("p", { className: "text-base", children: teacherName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("status") }), _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? t("statusActive") : t("statusInactive") })] })] }) })] })] }));
39
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "bg-primary/10 flex h-24 w-24 items-center justify-center rounded-full", children: _jsx(BookMarked, { className: "text-primary h-12 w-12" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: formatValue(code) }), enabled ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsx("p", { className: "text-muted-foreground mt-1", children: sectionName })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookMarked, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionCourseDetails") })] }), _jsx(CardDescription, { children: t("viewSectionCompleteCourseInformation") })] }), _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("viewFieldCourseCode") }), _jsx("p", { className: "text-base", children: formatValue(code) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("section") }), _jsx("p", { className: "text-base", children: sectionName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldSubject") }), _jsx("p", { className: "text-base", children: subjectName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldTeacher") }), _jsx("p", { className: "text-base", children: teacherName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldStatus") }), _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? t("viewFieldStatusActive") : t("viewFieldStatusInactive") })] })] }) })] })] }));
40
40
  };