added a table for files w/ burnettk

This commit is contained in:
jasquat 2022-11-07 17:41:35 -05:00
parent ff7322f0b8
commit 9a83f1c486

View File

@ -13,6 +13,12 @@ import {
ButtonSet,
Modal,
FileUploader,
Table,
TableHead,
TableHeader,
TableRow,
TableCell,
TableBody,
// @ts-ignore
} from '@carbon/react';
import ProcessBreadcrumb from '../components/ProcessBreadcrumb';
@ -167,7 +173,8 @@ export default function ProcessModelShow() {
primarySuffix = '- Primary File';
}
constructedTag = (
<li key={processModelFile.name}>
<TableRow key={processModelFile.name}>
<TableCell key={`${processModelFile.name}-cell`}>
<Link
to={`/admin/process-models/${
(processModel as any).process_group_id
@ -176,11 +183,13 @@ export default function ProcessModelShow() {
{processModelFile.name}
</Link>
{primarySuffix}
</li>
</TableCell>
</TableRow>
);
} else if (processModelFile.name.match(/\.(json|md)$/)) {
constructedTag = (
<li key={processModelFile.name}>
<TableRow key={processModelFile.name}>
<TableCell key={`${processModelFile.name}-cell`}>
<Link
to={`/admin/process-models/${
(processModel as any).process_group_id
@ -188,17 +197,37 @@ export default function ProcessModelShow() {
>
{processModelFile.name}
</Link>
</li>
</TableCell>
</TableRow>
);
} else {
constructedTag = (
<li key={processModelFile.name}>{processModelFile.name}</li>
<TableRow key={processModelFile.name}>
<TableCell key={`${processModelFile.name}-cell`}>
{processModelFile.name}
</TableCell>
</TableRow>
);
}
return constructedTag;
});
return <ul>{tags}</ul>;
// return <ul>{tags}</ul>;
const headers = ['name', 'Actions'];
return (
<Table size="lg" useZebraStyles={false}>
<TableHead>
<TableRow>
{headers.map((header) => (
<TableHeader id={header} key={header}>
{header}
</TableHeader>
))}
</TableRow>
</TableHead>
<TableBody>{tags}</TableBody>
</Table>
);
};
const processInstancesUl = () => {