Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the button for downloading exceptions file #1378

Merged
merged 3 commits into from
Jan 8, 2024
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
20 changes: 15 additions & 5 deletions src/main/cliapp/src/containers/dataLoadsPage/DataLoadsComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,18 @@ export const DataLoadsComponent = () => {
};

const historyActionBodyTemplate = (rowData) => {
return <Button icon="pi pi-search-plus" className="p-button-rounded p-button-info mr-2" onClick={() => showHistory(rowData)} />
};
return (
<nobr>
<Button icon="pi pi-search-plus" className="p-button-rounded p-button-info mr-2" onClick={() => showHistory(rowData)} />
{ rowData.failedRecords > 0 &&
<a href={`/api/bulkloadfilehistory/${rowData.id}/download`} target="_blank" rel="noopener noreferrer" className="p-button p-button-warning">
<i className="pi pi-exclamation-triangle"></i>
<i className="pi pi-download"></i>
</a>
}
</nobr>
)
}

const showUploadConfirmDialog = (rowData) => {
setUploadLoadType(rowData.backendBulkLoadType);
Expand Down Expand Up @@ -410,7 +420,7 @@ export const DataLoadsComponent = () => {
if (file.dateLastLoaded) {
lastLoadedDates.set(file.dateLastLoaded, file);
} else {
filesWithoutDates.push(file);
filesWithoutDates.push(file);
}
} else {
lastLoadedDates.set(new Date().toISOString(), file);
Expand All @@ -421,7 +431,7 @@ export const DataLoadsComponent = () => {
const start2 = new Date(b);
return start2 - start1;
}).forEach(date => sortedFiles.push(lastLoadedDates.get(date)));

if (filesWithoutDates.length > 0) {
filesWithoutDates.forEach(fwd => {sortedFiles.push(fwd)});
}
Expand Down Expand Up @@ -460,7 +470,7 @@ export const DataLoadsComponent = () => {
if (group.loads) {
sortedLoads = group.loads.sort((a, b) => (a.name > b.name) ? 1: -1);
}

return (
<div className="card">
<DataTable key="loadTable" value={sortedLoads} responsiveLayout="scroll"
Expand Down
Loading