@@ -39,8 +39,8 @@ import { Frequency, Internship, Student } from "@/types/database";
3939
4040// Sort options for frequency
4141const frequencySortOptions = ( t : any ) : SortOption [ ] => [
42- { label : t ( "frequency .fields.date" ) , column : "date" } ,
43- { label : t ( "frequency .fields.hoursPerformed" ) , column : "performed_hours" } ,
42+ { label : t ( "frequencies .fields.date" ) , column : "date" } ,
43+ { label : t ( "frequencies .fields.hoursPerformed" ) , column : "performed_hours" } ,
4444 { label : t ( "common.createdAt" ) , column : "created_at" } ,
4545] ;
4646
@@ -61,13 +61,13 @@ const frequencySchema = (t: any) =>
6161 z . object ( {
6262 internship_id : z
6363 . string ( )
64- . uuid ( t ( "frequency .validations.internshipRequired" ) ) ,
65- date : z . string ( ) . min ( 1 , t ( "frequency .validations.dateRequired" ) ) ,
64+ . uuid ( t ( "frequencies .validations.internshipRequired" ) ) ,
65+ date : z . string ( ) . min ( 1 , t ( "frequencies .validations.dateRequired" ) ) ,
6666 performed_hours : z
6767 . number ( )
68- . min ( 1 , t ( "frequency .validations.hoursMin" ) )
69- . max ( 10 , t ( "frequency .validations.hoursMax" ) ) ,
70- activities : z . string ( ) . min ( 10 , t ( "frequency .validations.activitiesMin" ) ) ,
68+ . min ( 1 , t ( "frequencies .validations.hoursMin" ) )
69+ . max ( 10 , t ( "frequencies .validations.hoursMax" ) ) ,
70+ activities : z . string ( ) . min ( 10 , t ( "frequencies .validations.activitiesMin" ) ) ,
7171 validated_by_supervisor : z . boolean ( ) . default ( false ) ,
7272 validated_by_advisor : z . boolean ( ) . default ( false ) ,
7373 } ) ;
@@ -144,10 +144,10 @@ export default function FrequencyPage() {
144144 try {
145145 if ( selectedFreq ) {
146146 await update ( { id : selectedFreq . id , ...data } ) ;
147- toast . success ( t ( "frequency .messages.updateSuccess" ) ) ;
147+ toast . success ( t ( "frequencies .messages.updateSuccess" ) ) ;
148148 } else {
149149 await create ( data ) ;
150- toast . success ( t ( "frequency .messages.createSuccess" ) ) ;
150+ toast . success ( t ( "frequencies .messages.createSuccess" ) ) ;
151151 }
152152 handleCloseForm ( ) ;
153153 } catch ( error ) {
@@ -170,7 +170,7 @@ export default function FrequencyPage() {
170170 ids : selection . selectedIds ,
171171 updateData,
172172 } ) ;
173- toast . success ( t ( "frequency .messages.bulkUpdateSuccess" ) ) ;
173+ toast . success ( t ( "frequencies .messages.bulkUpdateSuccess" ) ) ;
174174 setIsBulkEditOpen ( false ) ;
175175 selection . clearSelection ( ) ;
176176 resetBulk ( ) ;
@@ -201,7 +201,7 @@ export default function FrequencyPage() {
201201 if ( ! selectedFreq ) return ;
202202 try {
203203 await remove ( selectedFreq . id ) ;
204- toast . success ( t ( "frequency .messages.deleteSuccess" ) ) ;
204+ toast . success ( t ( "frequencies .messages.deleteSuccess" ) ) ;
205205 setIsDeleteOpen ( false ) ;
206206 setSelectedFreq ( null ) ;
207207 } catch ( error ) {
@@ -212,7 +212,7 @@ export default function FrequencyPage() {
212212 const confirmBulkDelete = async ( ) => {
213213 try {
214214 await bulkRemove ( selection . selectedIds ) ;
215- toast . success ( t ( "frequency .messages.bulkDeleteSuccess" ) ) ;
215+ toast . success ( t ( "frequencies .messages.bulkDeleteSuccess" ) ) ;
216216 setIsBulkDeleteOpen ( false ) ;
217217 selection . clearSelection ( ) ;
218218 } catch ( error ) {
@@ -274,15 +274,18 @@ export default function FrequencyPage() {
274274 < div className = "flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 bg-white p-6 rounded-2xl shadow-sm border border-gray-100" >
275275 < div >
276276 < h1 className = "text-2xl font-black text-blue-900 flex items-center gap-2" >
277- < Clock className = "text-blue-600" size = { 28 } /> { t ( "frequency.title" ) }
277+ < Clock className = "text-blue-600" size = { 28 } /> { " " }
278+ { t ( "frequencies.title" ) }
278279 </ h1 >
279- < p className = "text-gray-500 font-medium" > { t ( "frequency.subtitle" ) } </ p >
280+ < p className = "text-gray-500 font-medium" >
281+ { t ( "frequencies.subtitle" ) }
282+ </ p >
280283 </ div >
281284 < button
282285 onClick = { ( ) => setIsFormOpen ( true ) }
283286 className = "w-full sm:w-auto bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-xl flex items-center justify-center gap-2 font-bold transition-all shadow-lg shadow-blue-200 active:scale-95"
284287 >
285- < Plus size = { 20 } /> { t ( "frequency .new" ) }
288+ < Plus size = { 20 } /> { t ( "frequencies .new" ) }
286289 </ button >
287290 </ div >
288291
@@ -291,7 +294,7 @@ export default function FrequencyPage() {
291294 < div className = "bg-blue-600 p-6 rounded-2xl shadow-lg shadow-blue-100 flex justify-between items-center text-white" >
292295 < div >
293296 < p className = "text-blue-100 text-xs font-black uppercase tracking-widest mb-1" >
294- { t ( "frequency .stats.accumulatedTotal" ) }
297+ { t ( "frequencies .stats.accumulatedTotal" ) }
295298 </ p >
296299 < h2 className = "text-4xl font-black" > { totalHoras } h</ h2 >
297300 </ div >
@@ -303,7 +306,7 @@ export default function FrequencyPage() {
303306 < div className = "bg-white p-6 rounded-2xl shadow-sm border border-gray-100 flex justify-between items-center" >
304307 < div >
305308 < p className = "text-gray-400 text-xs font-black uppercase tracking-widest mb-1" >
306- { t ( "frequency .stats.mandatoryGoal" ) }
309+ { t ( "frequencies .stats.mandatoryGoal" ) }
307310 </ p >
308311 < h2 className = "text-4xl font-black text-gray-800" > 400h</ h2 >
309312 </ div >
@@ -322,7 +325,7 @@ export default function FrequencyPage() {
322325 />
323326 < input
324327 type = "text"
325- placeholder = { t ( "frequency .searchPlaceholder" ) }
328+ placeholder = { t ( "frequencies .searchPlaceholder" ) }
326329 value = { searchTerm }
327330 onChange = { ( e ) => setSearchTerm ( e . target . value ) }
328331 className = "w-full pl-12 pr-4 py-4 bg-white border border-gray-200 rounded-2xl focus:ring-2 focus:ring-blue-500 outline-none transition-all shadow-sm"
@@ -350,7 +353,7 @@ export default function FrequencyPage() {
350353 >
351354 < div >
352355 < label className = "block text-xs font-black text-gray-400 uppercase tracking-widest mb-2" >
353- { t ( "frequency .fields.internship" ) }
356+ { t ( "frequencies .fields.internship" ) }
354357 </ label >
355358 < select
356359 value = { filters . internshipId }
@@ -370,7 +373,7 @@ export default function FrequencyPage() {
370373
371374 < div >
372375 < label className = "block text-xs font-black text-gray-400 uppercase tracking-widest mb-2" >
373- { t ( "frequency .fields.supervisorValidation" ) }
376+ { t ( "frequencies .fields.supervisorValidation" ) }
374377 </ label >
375378 < select
376379 value = { filters . supervisorValidated }
@@ -387,7 +390,7 @@ export default function FrequencyPage() {
387390
388391 < div >
389392 < label className = "block text-xs font-black text-gray-400 uppercase tracking-widest mb-2" >
390- { t ( "frequency .fields.advisorValidation" ) }
393+ { t ( "frequencies .fields.advisorValidation" ) }
391394 </ label >
392395 < select
393396 value = { filters . advisorValidated }
@@ -476,7 +479,7 @@ export default function FrequencyPage() {
476479 : "bg-gray-50 text-gray-400 border-gray-100" ,
477480 ) }
478481 >
479- { t ( "frequency .labels.validatedSup" ) }
482+ { t ( "frequencies .labels.validatedSup" ) }
480483 </ span >
481484 < span
482485 className = { cn (
@@ -486,7 +489,7 @@ export default function FrequencyPage() {
486489 : "bg-gray-50 text-gray-400 border-gray-100" ,
487490 ) }
488491 >
489- { t ( "frequency .labels.validatedOri" ) }
492+ { t ( "frequencies .labels.validatedOri" ) }
490493 </ span >
491494 </ div >
492495 </ div >
@@ -499,7 +502,7 @@ export default function FrequencyPage() {
499502 < div className = "flex items-center gap-2 text-blue-700 font-black" >
500503 < Clock size = { 16 } />
501504 < span >
502- { t ( "frequency .labels.hoursPerformed" , {
505+ { t ( "frequencies .labels.hoursPerformed" , {
503506 count : frequency . performed_hours ,
504507 } ) }
505508 </ span >
@@ -552,7 +555,7 @@ export default function FrequencyPage() {
552555 { t ( "common.date" ) } / { t ( "students.title" ) }
553556 </ th >
554557 < th className = "px-6 py-4 text-xs font-black text-gray-500 uppercase tracking-widest" >
555- { t ( "frequency .fields.activities" ) }
558+ { t ( "frequencies .fields.activities" ) }
556559 </ th >
557560 < th className = "px-6 py-4 text-xs font-black text-gray-500 uppercase tracking-widest text-center" >
558561 { t ( "common.hours" , "Hours" ) }
@@ -644,7 +647,7 @@ export default function FrequencyPage() {
644647 : "bg-gray-50 text-gray-400 border-gray-100" ,
645648 ) }
646649 >
647- { t ( "frequency .labels.validatedSup" ) }
650+ { t ( "frequencies .labels.validatedSup" ) }
648651 </ span >
649652 < span
650653 className = { cn (
@@ -654,7 +657,7 @@ export default function FrequencyPage() {
654657 : "bg-gray-50 text-gray-400 border-gray-100" ,
655658 ) }
656659 >
657- { t ( "frequency .labels.validatedOri" ) }
660+ { t ( "frequencies .labels.validatedOri" ) }
658661 </ span >
659662 </ div >
660663 </ td >
@@ -707,15 +710,15 @@ export default function FrequencyPage() {
707710 isOpen = { isFormOpen }
708711 onOpenChange = { setIsFormOpen }
709712 title = {
710- selectedFreq ? t ( "frequency .editTitle" ) : t ( "frequency .newTitle" )
713+ selectedFreq ? t ( "frequencies .editTitle" ) : t ( "frequencies .newTitle" )
711714 }
712- description = { t ( "frequency .formDescription" ) }
715+ description = { t ( "frequencies .formDescription" ) }
713716 >
714717 < form onSubmit = { handleSubmit ( onSubmit ) } className = "space-y-6" >
715718 < div className = "grid grid-cols-1 md:grid-cols-2 gap-4" >
716719 < div className = "md:col-span-2" >
717720 < label className = "text-sm font-bold text-gray-700 ml-1" >
718- { t ( "frequency .fields.internship" ) }
721+ { t ( "frequencies .fields.internship" ) }
719722 </ label >
720723 < div className = "relative mt-1" >
721724 < User
@@ -732,7 +735,7 @@ export default function FrequencyPage() {
732735 ) }
733736 >
734737 < option value = "" >
735- { t ( "frequency .placeholders.selectInternship" ) }
738+ { t ( "frequencies .placeholders.selectInternship" ) }
736739 </ option >
737740 { internships
738741 . filter ( ( e : Internship ) => e . status === "active" )
@@ -755,7 +758,7 @@ export default function FrequencyPage() {
755758
756759 < div >
757760 < label className = "text-sm font-bold text-gray-700 ml-1" >
758- { t ( "frequency .fields.date" ) }
761+ { t ( "frequencies .fields.date" ) }
759762 </ label >
760763 < div className = "relative mt-1" >
761764 < Calendar
@@ -782,7 +785,7 @@ export default function FrequencyPage() {
782785
783786 < div >
784787 < label className = "text-sm font-bold text-gray-700 ml-1" >
785- { t ( "frequency .fields.hoursPerformed" ) }
788+ { t ( "frequencies .fields.hoursPerformed" ) }
786789 </ label >
787790 < div className = "relative mt-1" >
788791 < Clock
@@ -809,7 +812,7 @@ export default function FrequencyPage() {
809812
810813 < div className = "md:col-span-2" >
811814 < label className = "text-sm font-bold text-gray-700 ml-1" >
812- { t ( "frequency .fields.activities" ) }
815+ { t ( "frequencies .fields.activities" ) }
813816 </ label >
814817 < div className = "relative mt-1" >
815818 < Activity
@@ -825,7 +828,7 @@ export default function FrequencyPage() {
825828 ? "border-red-500 focus:ring-red-200"
826829 : "border-gray-200 focus:ring-blue-100 focus:border-blue-500" ,
827830 ) }
828- placeholder = { t ( "frequency .placeholders.activitiesExample" ) }
831+ placeholder = { t ( "frequencies .placeholders.activitiesExample" ) }
829832 />
830833 </ div >
831834 { errors . activities && (
@@ -843,7 +846,7 @@ export default function FrequencyPage() {
843846 className = "w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"
844847 />
845848 < span className = "text-xs font-bold text-gray-600 group-hover:text-blue-600 transition-colors" >
846- { t ( "frequency .fields.supervisorValidation" ) }
849+ { t ( "frequencies .fields.supervisorValidation" ) }
847850 </ span >
848851 </ label >
849852 < label className = "flex items-center gap-2 cursor-pointer group" >
@@ -853,7 +856,7 @@ export default function FrequencyPage() {
853856 className = "w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"
854857 />
855858 < span className = "text-xs font-bold text-gray-600 group-hover:text-blue-600 transition-colors" >
856- { t ( "frequency .fields.advisorValidation" ) }
859+ { t ( "frequencies .fields.advisorValidation" ) }
857860 </ span >
858861 </ label >
859862 </ div >
@@ -895,7 +898,7 @@ export default function FrequencyPage() {
895898 < div className = "space-y-4" >
896899 < div className = "flex flex-col gap-4 bg-gray-50 p-4 rounded-xl" >
897900 < p className = "text-sm font-bold text-gray-700 mb-2" >
898- { t ( "frequency .bulkEdit.validateSelected" ) }
901+ { t ( "frequencies .bulkEdit.validateSelected" ) }
899902 </ p >
900903 < label className = "flex items-center gap-2 cursor-pointer group" >
901904 < input
@@ -904,7 +907,7 @@ export default function FrequencyPage() {
904907 className = "w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"
905908 />
906909 < span className = "text-sm font-bold text-gray-600 group-hover:text-blue-600 transition-colors" >
907- { t ( "frequency .bulkEdit.validateSupervisor" ) }
910+ { t ( "frequencies .bulkEdit.validateSupervisor" ) }
908911 </ span >
909912 </ label >
910913 < label className = "flex items-center gap-2 cursor-pointer group" >
@@ -914,7 +917,7 @@ export default function FrequencyPage() {
914917 className = "w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"
915918 />
916919 < span className = "text-sm font-bold text-gray-600 group-hover:text-blue-600 transition-colors" >
917- { t ( "frequency .bulkEdit.validateAdvisor" ) }
920+ { t ( "frequencies .bulkEdit.validateAdvisor" ) }
918921 </ span >
919922 </ label >
920923 </ div >
0 commit comments