Impremented test case create button and process

This commit is contained in:
Takeshi Kimata
2024-03-23 23:17:40 +09:00
parent ad9dd5fce1
commit 4122e475a1
3 changed files with 89 additions and 6 deletions

View File

@@ -46,10 +46,11 @@ type Case = {
type Props = {
projectId: boolean;
cases: Case[];
onCreateCase: () => void;
onDeleteCase: (caseId: number) => void;
};
export default function TestCaseTable({ projectId, cases, onDeleteCase }: Props) {
export default function TestCaseTable({ projectId, cases, onCreateCase, onDeleteCase }: Props) {
const [selectedKeys, setSelectedKeys] = useState<Selection>(new Set([]));
const [sortDescriptor, setSortDescriptor] = useState<SortDescriptor>({
column: "id",
@@ -141,7 +142,7 @@ export default function TestCaseTable({ projectId, cases, onDeleteCase }: Props)
startContent={<Plus size={16} />}
size="sm"
color="primary"
onClick={() => console.log("create")}
onClick={onCreateCase}
>
New Test Case
</Button>