Changeset 50f2fb4 for src/app/students/semesters/page.tsx
- Timestamp:
- 01/30/26 01:40:27 (8 months ago)
- Branches:
- master
- Children:
- ba52069
- Parents:
- 298f9b3
- File:
-
- 1 edited
-
src/app/students/semesters/page.tsx (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/app/students/semesters/page.tsx
r298f9b3 r50f2fb4 14 14 import { useEffect, useState } from 'react'; 15 15 import { getAccessToken } from '@/lib/auth'; 16 import { useTranslation } from 'react-i18next'; 16 17 17 18 type Semester = { … … 54 55 55 56 const StatusBadge = ({ status }: { status: string }) => { 57 const { t } = useTranslation(); 56 58 const baseClasses = "px-2 py-1 rounded-full text-xs font-medium"; 57 58 if (status === "валиден") { 59 if (status === t('valid')) { 59 60 return ( 60 61 <span className={`${baseClasses} bg-green-100 text-green-800 flex items-center gap-1`}> 61 62 <FontAwesomeIcon icon={faCheckCircle} className="w-3 h-3" /> 62 { status}63 {t('valid')} 63 64 </span> 64 65 ); 65 66 } 66 67 67 return ( 68 68 <span className={`${baseClasses} bg-gray-100 text-gray-800`}> 69 { status}69 {t(status) || status} 70 70 </span> 71 71 ); … … 73 73 74 74 const YesNoBadge = ({ value }: { value: string }) => { 75 if (value === "Да") { 75 const { t } = useTranslation(); 76 if (value === t('yes')) { 76 77 return ( 77 78 <span className="inline-flex items-center justify-center w-6 h-6 bg-green-100 text-green-600 rounded-full"> … … 79 80 </span> 80 81 ); 81 } else if (value === "Не") {82 } else if (value === t('no')) { 82 83 return ( 83 84 <span className="inline-flex items-center justify-center w-6 h-6 bg-red-100 text-red-600 rounded-full"> … … 112 113 const [isLoading, setIsLoading] = useState(true); 113 114 const [errorMessage, setErrorMessage] = useState<string | null>(null); 115 const { t } = useTranslation(); 114 116 115 117 useEffect(() => { … … 162 164 <div className="min-h-screen pb-8"> 163 165 <div className="bg-white rounded-xl shadow-sm border border-gray-100 p-6"> 164 Loading...166 {t('loading')} 165 167 </div> 166 168 </div> … … 187 189 </div> 188 190 <div> 189 <h1 className="text-3xl font-bold mb-2"> Семестри</h1>191 <h1 className="text-3xl font-bold mb-2">{t('semesters')}</h1> 190 192 <p className="text-lg opacity-90"> 191 Преглед на сите запишани семестри и нивниот статус193 {t('semesters_overview')} 192 194 </p> 193 195 </div> … … 198 200 <div className="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden"> 199 201 <div className="bg-primary text-white px-6 py-4"> 200 <h2 className="text-xl font-bold"> Листа на семестри</h2>202 <h2 className="text-xl font-bold">{t('semesters_list')}</h2> 201 203 </div> 202 204 … … 206 208 <tr> 207 209 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">#</th> 208 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Семестар</th>209 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Насока</th>210 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Квота</th>211 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Забелешка</th>212 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Студ.Ком.</th>213 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Сума</th>214 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Платено</th>215 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> УКИМ</th>216 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Креирано на</th>217 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Датум промена</th>218 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Ц.Кр</th>219 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Тип</th>220 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Док.</th>221 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Док1.</th>222 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Вериф.</th>223 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Таксени</th>224 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Потписи</th>225 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Статус</th>226 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Зав.</th>210 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('semester')}</th> 211 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('direction')}</th> 212 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('quota')}</th> 213 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('note')}</th> 214 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('student_com')}</th> 215 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('sum')}</th> 216 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('paid')}</th> 217 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('ukim')}</th> 218 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('created_on')}</th> 219 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('date_changed')}</th> 220 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('credits')}</th> 221 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('type')}</th> 222 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('doc')}</th> 223 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('doc1')}</th> 224 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('verified')}</th> 225 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('taxes')}</th> 226 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('signatures')}</th> 227 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('status')}</th> 228 <th className="px-4 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{t('completed')}</th> 227 229 </tr> 228 230 </thead> … … 335 337 </div> 336 338 <div> 337 <h3 className="text-lg font-bold text-gray-900"> Завршени семестри</h3>339 <h3 className="text-lg font-bold text-gray-900">{t('completed_semesters')}</h3> 338 340 <p className="text-2xl font-bold text-green-600"> 339 341 {semesters.filter(s => s.completed !== "Не").length} … … 349 351 </div> 350 352 <div> 351 <h3 className="text-lg font-bold text-gray-900"> Верифицирани</h3>353 <h3 className="text-lg font-bold text-gray-900">{t('verified_semesters')}</h3> 352 354 <p className="text-2xl font-bold text-blue-600"> 353 355 {semesters.filter(s => s.verified === "Да").length} … … 363 365 </div> 364 366 <div> 365 <h3 className="text-lg font-bold text-gray-900"> Вкупно семестри</h3>367 <h3 className="text-lg font-bold text-gray-900">{t('total_semesters')}</h3> 366 368 <p className="text-2xl font-bold text-primary"> 367 369 {semesters.length}
Note:
See TracChangeset
for help on using the changeset viewer.
