Add report scrub issue page.

This commit is contained in:
Patrick Fic
2025-10-01 17:05:41 -07:00
parent ced1cd299c
commit 2704be74a9
5 changed files with 51 additions and 41 deletions

View File

@@ -134,36 +134,23 @@ export function EstimateScrubberResults({ bodyshop, jobid, job, esResults }) {
return (
<div style={{ padding: "16px" }}>
<Space direction="vertical" size="large" style={{ width: "100%" }}>
{/* Search Input */}
<div>
<Space>
<Input
placeholder="Search"
prefix={<SearchOutlined />}
value={searchText}
onChange={(e) => setSearchText(e.target.value)}
allowClear
style={{ maxWidth: 400 }}
/>
{searchText && (
<div style={{ marginTop: "8px" }}>
<Text type="secondary">
Showing {filteredItems.length} of {esResults.items.length} items
</Text>
</div>
)}
<Space>
<Input
placeholder="Search"
prefix={<SearchOutlined />}
value={searchText}
onChange={(e) => setSearchText(e.target.value)}
allowClear
style={{ maxWidth: 400 }}
/>
{searchText && (
<div style={{ marginTop: "8px" }}>
<Text type="secondary">
Showing {filteredItems.length} of {esResults.items.length} items
</Text>
</div>
)}
<Space wrap size={"small"}>
{Object.entries(groupedItems).map(([category, items]) => {
const config = categoryConfig[category] || { color: "default" };
return (
<Tag key={category} color={config.color}>
{category}: {items.length}
</Tag>
);
})}
</Space>
</Space>
<Button
style={{ float: "right" }}
type="primary"
@@ -173,7 +160,26 @@ export function EstimateScrubberResults({ bodyshop, jobid, job, esResults }) {
>
View PDF
</Button>
</div>
<Button
style={{ float: "right" }}
type="link"
href={esResults?.reportIssueUrl}
target="_blank"
disabled={!esResults?.reportIssueUrl}
>
Report Scrubbing Issue
</Button>
</Space>
<Space wrap size={"small"}>
{Object.entries(groupedItems).map(([category, items]) => {
const config = categoryConfig[category] || { color: "default" };
return (
<Tag key={category} color={config.color}>
{category}: {items.length}
</Tag>
);
})}
</Space>
{/* Grouped Results */}
<Collapse defaultActiveKey={sortedCategories} expandIconPosition="right" size="large">
@@ -185,7 +191,7 @@ export function EstimateScrubberResults({ bodyshop, jobid, job, esResults }) {
<Panel
header={
<Space>
<span style={{ fontSize: "18px" }}>{config.icon}</span>
{/* <span style={{ fontSize: "18px" }}>{config.icon}</span> */}
<Text strong>{category}</Text>
<Badge
count={items.length}
@@ -211,8 +217,6 @@ export function EstimateScrubberResults({ bodyshop, jobid, job, esResults }) {
);
})}
</Collapse>
{/* Summary */}
</Space>
</div>
);