File tree Expand file tree Collapse file tree
resources/js/pages/employees Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import ContractItemListItem from '@/components/helpers/contract-item-list-item' ;
12import EmployeeAccountInfoItem from '@/components/helpers/employee-account-info-item' ;
23import EmployeePersonalInfoItem from '@/components/helpers/employee-personal-info-item' ;
34import { Avatar , AvatarFallback , AvatarImage } from '@/components/ui/avatar' ;
@@ -27,13 +28,6 @@ export default function Show({ employee: data }: Readonly<{ employee: EmployeeIn
2728 } ,
2829 ] ;
2930
30- // TODO: Remove console logs after finishing page implementation
31- console . group ( 'Employee Details' ) ;
32- console . log ( 'User Data:' , user ) ;
33- console . log ( 'Contracts:' , contracts ) ;
34- console . log ( 'Employee Info:' , rest ) ;
35- console . groupEnd ( ) ;
36-
3731 const dateOfBirth = String ( rest ?. date_of_birth ) . replaceAll ( '-' , '/' ) ;
3832
3933 return (
@@ -104,7 +98,15 @@ export default function Show({ employee: data }: Readonly<{ employee: EmployeeIn
10498 </ TabsContent >
10599
106100 < TabsContent value = "contracts" >
107- { /* TODO: Employee Contracts With Progress Component */ }
101+ { ( contracts ?. length ?? 0 ) > 0 ? (
102+ < ul className = "mt-2 grid gap-4" >
103+ { contracts ! . map ( ( contract ) => (
104+ < ContractItemListItem key = { contract . id } contract = { contract } />
105+ ) ) }
106+ </ ul >
107+ ) : (
108+ < p > No contracts available.</ p >
109+ ) }
108110 </ TabsContent >
109111 </ Tabs >
110112 </ div >
You can’t perform that action at this time.
0 commit comments