Skip to content

Commit 6d9affd

Browse files
feat(Show): add contract item list display and remove debug logs
1 parent e4b4d08 commit 6d9affd

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

resources/js/pages/employees/Show.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import ContractItemListItem from '@/components/helpers/contract-item-list-item';
12
import EmployeeAccountInfoItem from '@/components/helpers/employee-account-info-item';
23
import EmployeePersonalInfoItem from '@/components/helpers/employee-personal-info-item';
34
import { 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>

0 commit comments

Comments
 (0)