Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions src/pages/TableDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { Badge } from "../components/ui/Badge";
import { Link } from "../components/core/Link";
import { Loading } from "../components/core/Loading";
import { ErrorPage } from "../components/ui/ErrorPage";
import { getResource } from "../resources/resources";
import { useDataFetching } from "../hooks/useDataFetching";
import { backendClient } from "../clients/config";

Expand Down Expand Up @@ -119,42 +118,6 @@ function TableMeta(props: TableMetaProps): ReactElement {
);
}

interface MarkingRulesProps {
table: GetTableResponse;
}

function renderCatalog(catalog: CellPrimitive): ReactElement {
return <span>{getResource(`catalog.${String(catalog)}`).Title}</span>;
}

function MarkingRules(props: MarkingRulesProps): ReactElement {
const columns: Column[] = [
{ name: "Catalog", renderCell: renderCatalog },
{ name: "Parameter" },
{ name: "Column name", renderCell: renderColumnName },
];

const values: Record<string, CellPrimitive>[] = [];

props.table.marking_rules.forEach((rules) => {
for (const key in rules.columns) {
values.push({
Catalog: rules.catalog,
Parameter: key,
"Column name": rules.columns[key],
});
}
});

return (
<CommonTable columns={columns} data={values} className="pb-5">
<h2 className="text-2xl font-bold">
Mapping of columns to catalog values for marking of records
</h2>
</CommonTable>
);
}

interface CrossmatchStatsProps {
table: GetTableResponse;
tableName: string;
Expand Down Expand Up @@ -295,7 +258,6 @@ export function TableDetailsPage(): ReactElement {
return (
<>
<TableMeta tableName={tableName ?? ""} table={payload} />
<MarkingRules table={payload} />
<CrossmatchStats
table={payload}
tableName={tableName ?? ""}
Expand Down
Loading