|
1 | 1 | import { deburr } from "lodash-es";
|
| 2 | +import { |
| 3 | + type uSIAFaculty, |
| 4 | + type uSIAProgram, |
| 5 | + eSIAPlace, |
| 6 | + eSIABogotaFaculty, |
| 7 | + eSIABogotaProgram, |
| 8 | + eSIAMedicineBogotaProgram, |
| 9 | + eSIAVetMedicineBogotaProgram, |
| 10 | + eSIAEnfermeryBogotaProgram, |
| 11 | + eSIAArtsBogotaProgram, |
| 12 | + eSIAEngineeringBogotaProgram, |
| 13 | + eSIAOdontologyBogotaProgram, |
| 14 | + eSIALawBogotaProgram, |
| 15 | + eSIAScienceBogotaProgram, |
| 16 | + eSIAHumanScienceBogotaProgram, |
| 17 | + eSIAEconomicalScienceBogotaProgram, |
| 18 | + eSIAAgrarianScienceBogotaProgram, |
| 19 | + eSIALaPazFaculty, |
| 20 | + eSIALaPazProgram, |
| 21 | + eSIAPregradoLaPazProgram, |
| 22 | + eSIAMedellinFaculty, |
| 23 | + eSIAMedellinProgram, |
| 24 | + eSIAMinesMedellinProgram, |
| 25 | + eSIAArchitectureMedellinProgram, |
| 26 | + eSIAScienceMedellinProgram, |
| 27 | + eSIAAgrarianSciencesMedellinProgram, |
| 28 | + eSIAHumanSciencesAMedellinProgram, |
| 29 | + eSIAManizalesFaculty, |
| 30 | + eSIAManizalesProgram, |
| 31 | + eSIAEngineeringAndArchitectureManizalesProgram, |
| 32 | + eSIAExactSciencesManizalesProgram, |
| 33 | + eSIAManagementManizalesProgram, |
| 34 | + eSIAPalmiraFaculty, |
| 35 | + eSIAPalmiraProgram, |
| 36 | + eSIAAmazoniaFaculty, |
| 37 | + eSIAAmazoniaProgram, |
| 38 | + eSIACaribeFaculty, |
| 39 | + eSIACaribeProgram, |
| 40 | + eSIAOrinoquiaFaculty, |
| 41 | + eSIAOrinoquiaProgram, |
| 42 | + eSIATumacoFaculty, |
| 43 | + eSIATumacoProgram, |
| 44 | +} from "~/functions/src/types/SIA"; |
2 | 45 |
|
3 | 46 | import type { Course, User } from "~/resources/types/entities";
|
4 | 47 |
|
| 48 | +interface UNALItem { |
| 49 | + faculty: uSIAFaculty; |
| 50 | + programs: uSIAProgram[]; |
| 51 | +} |
| 52 | + |
| 53 | +export const UNAL: Record<eSIAPlace, UNALItem[]> = { |
| 54 | + [eSIAPlace.BOGOTÁ]: [ |
| 55 | + { |
| 56 | + faculty: eSIABogotaFaculty.SEDE_BOGOTÁ, |
| 57 | + programs: Object.values(eSIABogotaProgram), |
| 58 | + }, |
| 59 | + { |
| 60 | + faculty: eSIABogotaFaculty.MEDICINA, |
| 61 | + programs: Object.values(eSIAMedicineBogotaProgram), |
| 62 | + }, |
| 63 | + { |
| 64 | + faculty: eSIABogotaFaculty.MEDICINA_VETERINARIA, |
| 65 | + programs: Object.values(eSIAVetMedicineBogotaProgram), |
| 66 | + }, |
| 67 | + { |
| 68 | + faculty: eSIABogotaFaculty.ENFERMERÍA, |
| 69 | + programs: Object.values(eSIAEnfermeryBogotaProgram), |
| 70 | + }, |
| 71 | + { |
| 72 | + faculty: eSIABogotaFaculty.ARTES, |
| 73 | + programs: Object.values(eSIAArtsBogotaProgram), |
| 74 | + }, |
| 75 | + { |
| 76 | + faculty: eSIABogotaFaculty.INGENIERÍA, |
| 77 | + programs: Object.values(eSIAEngineeringBogotaProgram), |
| 78 | + }, |
| 79 | + { |
| 80 | + faculty: eSIABogotaFaculty.ODONTOLOGÍA, |
| 81 | + programs: Object.values(eSIAOdontologyBogotaProgram), |
| 82 | + }, |
| 83 | + { |
| 84 | + faculty: eSIABogotaFaculty.DERECHO, |
| 85 | + programs: Object.values(eSIALawBogotaProgram), |
| 86 | + }, |
| 87 | + { |
| 88 | + faculty: eSIABogotaFaculty.CIENCIAS, |
| 89 | + programs: Object.values(eSIAScienceBogotaProgram), |
| 90 | + }, |
| 91 | + { |
| 92 | + faculty: eSIABogotaFaculty.CIENCIAS_HUMANAS, |
| 93 | + programs: Object.values(eSIAHumanScienceBogotaProgram), |
| 94 | + }, |
| 95 | + { |
| 96 | + faculty: eSIABogotaFaculty.CIENCIAS_ECONÓMICAS, |
| 97 | + programs: Object.values(eSIAEconomicalScienceBogotaProgram), |
| 98 | + }, |
| 99 | + { |
| 100 | + faculty: eSIABogotaFaculty.CIENCIAS_AGRARIAS, |
| 101 | + programs: Object.values(eSIAAgrarianScienceBogotaProgram), |
| 102 | + }, |
| 103 | + ], |
| 104 | + [eSIAPlace.LA_PAZ]: [ |
| 105 | + { |
| 106 | + faculty: eSIALaPazFaculty.SEDE_LA_PAZ, |
| 107 | + programs: Object.values(eSIALaPazProgram), |
| 108 | + }, |
| 109 | + { |
| 110 | + faculty: eSIALaPazFaculty.ESCUELA_DE_PREGRADO, |
| 111 | + programs: Object.values(eSIAPregradoLaPazProgram), |
| 112 | + }, |
| 113 | + ], |
| 114 | + [eSIAPlace.MEDELLÍN]: [ |
| 115 | + { |
| 116 | + faculty: eSIAMedellinFaculty.SEDE_MEDELLÍN, |
| 117 | + programs: Object.values(eSIAMedellinProgram), |
| 118 | + }, |
| 119 | + { |
| 120 | + faculty: eSIAMedellinFaculty.FACULTAD_DE_MINAS, |
| 121 | + programs: Object.values(eSIAMinesMedellinProgram), |
| 122 | + }, |
| 123 | + { |
| 124 | + faculty: eSIAMedellinFaculty.FACULTAD_DE_ARQUITECTURA, |
| 125 | + programs: Object.values(eSIAArchitectureMedellinProgram), |
| 126 | + }, |
| 127 | + { |
| 128 | + faculty: eSIAMedellinFaculty.FACULTAD_DE_CIENCIAS, |
| 129 | + programs: Object.values(eSIAScienceMedellinProgram), |
| 130 | + }, |
| 131 | + { |
| 132 | + faculty: eSIAMedellinFaculty.FACULTAD_DE_CIENCIAS_AGRARIAS, |
| 133 | + programs: Object.values(eSIAAgrarianSciencesMedellinProgram), |
| 134 | + }, |
| 135 | + { |
| 136 | + faculty: eSIAMedellinFaculty.FACULTAD_DE_CIENCIAS_HUMANAS_Y_ECONÓMICAS_A, |
| 137 | + programs: Object.values(eSIAHumanSciencesAMedellinProgram), |
| 138 | + }, |
| 139 | + ], |
| 140 | + [eSIAPlace.MANIZALES]: [ |
| 141 | + { |
| 142 | + faculty: eSIAManizalesFaculty.SEDE_MANIZALES, |
| 143 | + programs: Object.values(eSIAManizalesProgram), |
| 144 | + }, |
| 145 | + { |
| 146 | + faculty: eSIAManizalesFaculty.FACULTAD_DE_INGENIERIA_Y_ARQUITECTURA, |
| 147 | + programs: Object.values(eSIAEngineeringAndArchitectureManizalesProgram), |
| 148 | + }, |
| 149 | + { |
| 150 | + faculty: eSIAManizalesFaculty.FACULTAD_DE_CIENCIAS_EXACTAS_Y_NATURALES, |
| 151 | + programs: Object.values(eSIAExactSciencesManizalesProgram), |
| 152 | + }, |
| 153 | + { |
| 154 | + faculty: eSIAManizalesFaculty.FACULTAD_DE_ADMINISTRACIÓN, |
| 155 | + programs: Object.values(eSIAManagementManizalesProgram), |
| 156 | + }, |
| 157 | + ], |
| 158 | + [eSIAPlace.PALMIRA]: [ |
| 159 | + { |
| 160 | + faculty: eSIAPalmiraFaculty.SEDE_PALMIRA, |
| 161 | + programs: Object.values(eSIAPalmiraProgram), |
| 162 | + }, |
| 163 | + ], |
| 164 | + [eSIAPlace.AMAZONÍA]: [ |
| 165 | + { |
| 166 | + faculty: eSIAAmazoniaFaculty.SEDE_AMAZONIA, |
| 167 | + programs: Object.values(eSIAAmazoniaProgram), |
| 168 | + }, |
| 169 | + ], |
| 170 | + [eSIAPlace.CARIBE]: [ |
| 171 | + { |
| 172 | + faculty: eSIACaribeFaculty.SEDE_CARIBE, |
| 173 | + programs: Object.values(eSIACaribeProgram), |
| 174 | + }, |
| 175 | + ], |
| 176 | + [eSIAPlace.ORINOQUÍA]: [ |
| 177 | + { |
| 178 | + faculty: eSIAOrinoquiaFaculty.SEDE_ORINOQUIA, |
| 179 | + programs: Object.values(eSIAOrinoquiaProgram), |
| 180 | + }, |
| 181 | + ], |
| 182 | + [eSIAPlace.TUMACO]: [ |
| 183 | + { |
| 184 | + faculty: eSIATumacoFaculty.SEDE_TUMACO, |
| 185 | + programs: Object.values(eSIATumacoProgram), |
| 186 | + }, |
| 187 | + ], |
| 188 | +}; |
| 189 | + |
5 | 190 | export function useMapUser({ role = 3, ...user }: User) {
|
6 | 191 | let roleName = "Invitado";
|
7 | 192 |
|
|
0 commit comments