43 lines
1.8 KiB
TypeScript
43 lines
1.8 KiB
TypeScript
import React from 'react';
|
|
import { SrsRequirement } from '../../../types/srs.ts';
|
|
import SrsStatusPill from '../SrsStatusPill.tsx';
|
|
|
|
const RequirementTable: React.FC<{ requirements: SrsRequirement[] }> = ({ requirements }) => (
|
|
<div className="overflow-x-auto">
|
|
<table className="min-w-full bg-white border border-gray-200 rounded-lg overflow-hidden mb-8">
|
|
<thead className="bg-gray-100">
|
|
<tr>
|
|
<th className="w-1/12 px-4 py-2 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider">
|
|
ID
|
|
</th>
|
|
<th className="w-7/12 px-4 py-2 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider">
|
|
Deskripsi Kebutuhan
|
|
</th>
|
|
<th className="w-2/12 px-4 py-2 text-center text-sm font-semibold text-gray-600 uppercase tracking-wider">
|
|
Status FE
|
|
</th>
|
|
<th className="w-2/12 px-4 py-2 text-center text-sm font-semibold text-gray-600 uppercase tracking-wider">
|
|
Status BE
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody className="divide-y divide-gray-200">
|
|
{requirements.map((req, index) => (
|
|
<tr key={req.id} className={index % 2 === 0 ? 'bg-white' : 'bg-gray-50'}>
|
|
<td className="px-4 py-3 text-sm font-mono text-gray-700 align-top">{req.id}</td>
|
|
<td className="px-4 py-3 text-sm text-gray-800 leading-relaxed">{req.description}</td>
|
|
<td className="px-4 py-3 text-center align-middle">
|
|
<SrsStatusPill status={req.statusFE} />
|
|
</td>
|
|
<td className="px-4 py-3 text-center align-middle">
|
|
<SrsStatusPill status={req.statusBE} />
|
|
</td>
|
|
</tr>
|
|
))}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
);
|
|
|
|
export default RequirementTable;
|