Fetch-request source types, glass-pane create page, date formatting #18
@@ -130,22 +130,38 @@ function FetchRequestList() {
|
||||
})}
|
||||
onClick={() => navigate(`/fetch-requests/${row.id}`)}
|
||||
>
|
||||
<Box sx={{ display: "flex", gap: 2, flexWrap: "wrap", alignItems: "center" }}>
|
||||
{columns.map((col) => (
|
||||
<Box key={col.name} sx={{ minWidth: 120 }}>
|
||||
<Typography variant="caption" color="text.secondary" sx={{ display: "block" }}>
|
||||
{col.label}
|
||||
</Typography>
|
||||
<ListCellRenderer
|
||||
field={col}
|
||||
value={row[col.name]}
|
||||
displayFormat={col.fk
|
||||
? (allResources.find((r) => r.name === col.fk!.resource)?.displayFormat ?? displayFormat)
|
||||
: displayFormat}
|
||||
/>
|
||||
</Box>
|
||||
))}
|
||||
<Box sx={{ ml: "auto", flexShrink: 0 }}>
|
||||
<Box sx={{ display: "flex", gap: 2, alignItems: "center" }}>
|
||||
<Box sx={{ display: "flex", gap: 2, flexWrap: "wrap", alignItems: "center", flex: 1, minWidth: 0 }}>
|
||||
{columns
|
||||
.filter((col) => col.name !== "created_at")
|
||||
.map((col) => (
|
||||
<Box key={col.name} sx={{ minWidth: 120 }}>
|
||||
<Typography variant="caption" color="text.secondary" sx={{ display: "block" }}>
|
||||
{col.label}
|
||||
</Typography>
|
||||
<ListCellRenderer
|
||||
field={col}
|
||||
value={row[col.name]}
|
||||
displayFormat={col.fk
|
||||
? (allResources.find((r) => r.name === col.fk!.resource)?.displayFormat ?? displayFormat)
|
||||
: displayFormat}
|
||||
/>
|
||||
</Box>
|
||||
))}
|
||||
</Box>
|
||||
{(() => {
|
||||
const dateCol = columns.find((col) => col.name === "created_at");
|
||||
if (!dateCol) return null;
|
||||
return (
|
||||
<Box sx={{ flexShrink: 0, textAlign: "right" }}>
|
||||
<Typography variant="caption" color="text.secondary" sx={{ display: "block" }}>
|
||||
{dateCol.label}
|
||||
</Typography>
|
||||
<ListCellRenderer field={dateCol} value={row.created_at} displayFormat={displayFormat} />
|
||||
</Box>
|
||||
);
|
||||
})()}
|
||||
<Box sx={{ flexShrink: 0 }}>
|
||||
<Tooltip title="Delete fetch request">
|
||||
<IconButton
|
||||
size="small"
|
||||
|
||||
@@ -51,7 +51,7 @@ export function ReportList({ reports, loading, fields, selectedId, onView, onReg
|
||||
"&:hover": { borderColor: "primary.light" },
|
||||
}}
|
||||
>
|
||||
<Box sx={{ display: "flex", alignItems: "center", gap: 2, flexWrap: "wrap" }}>
|
||||
<Box sx={{ display: "flex", alignItems: "center", gap: 2 }}>
|
||||
<Box sx={{ flex: "1 1 260px", minWidth: 0 }}>
|
||||
<Typography variant="body1" fontWeight={600} noWrap sx={{ fontSize: "0.9375rem" }}>
|
||||
{report.name || report.id}
|
||||
|
||||
Reference in New Issue
Block a user