Skip to content

Commit

Permalink
CM-729: added user upload and sort by date created DESC (#50)
Browse files Browse the repository at this point in the history
* CM-729: added individual upload history dialog

* CM-729: added adjustments to the frontend

* CM-729: added improvements for history dialog upload
  • Loading branch information
sniedzielski authored Feb 27, 2024
1 parent b7faace commit f9f3d6a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const UPLOAD_HISTORY_FULL_PROJECTION = () => [
'uuid',
'workflow',
'dataUpload {uuid, dateCreated, dateUpdated, sourceName, sourceType, status, error }',
'userCreated {username}',
];

export function fetchIndividualEnrollmentSummary(params) {
Expand Down
18 changes: 15 additions & 3 deletions src/components/dialogs/IndividualsHistoryUploadDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ function IndividualsUploadHistoryDialog({

useEffect(() => {
if (isOpen) {
const params = [];
const params = [
'orderBy: ["-dateCreated"]',
];
fetchUploadHistory(params);
}
}, [isOpen]);
Expand All @@ -85,8 +87,8 @@ function IndividualsUploadHistoryDialog({
top: '50%',
left: '50%',
transform: 'translate(-50%,-50%)',
width: '75%',
maxWidth: '75%',
width: '85%',
maxWidth: '85%',
},
}}
>
Expand Down Expand Up @@ -141,6 +143,13 @@ function IndividualsUploadHistoryDialog({
'individual.upload.uploadHistoryTable.status',
)}
</TableCell>
<TableCell>
{formatMessage(
intl,
'individual',
'individual.upload.uploadHistoryTable.userCreated',
)}
</TableCell>
<TableCell>
{formatMessage(
intl,
Expand Down Expand Up @@ -170,6 +179,9 @@ function IndividualsUploadHistoryDialog({
<TableCell>
{ item.dataUpload.status}
</TableCell>
<TableCell>
{item.userCreated.username}
</TableCell>
<TableCell>
<CollapsableErrorList errors={item.dataUpload.error} />
</TableCell>
Expand Down
3 changes: 2 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"status": "Status",
"error": "Error",
"buttonLabel": "UPLOAD HISTORY",
"label": "Upload History Table"
"label": "Upload History Table",
"userCreated": "User Created"
}
},
"enrollment": {
Expand Down

0 comments on commit f9f3d6a

Please sign in to comment.