Skip to content

Commit

Permalink
Allow datasource list view to be sort by last update
Browse files Browse the repository at this point in the history
  • Loading branch information
CFarcy committed Dec 15, 2023
1 parent 34d9068 commit 3f414c0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@
"refresh": {
"accepted": "Refresh accepted",
"notAllowed": "Refresh not possible"
}
},
"updated": "Last update"
},
"edit": {
"refresh": "Refresh data",
Expand Down
3 changes: 2 additions & 1 deletion public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@
"refresh": {
"accepted": "Actualisation acceptée",
"notAllowed": "Actualisation impossible"
}
},
"updated": "Dernière mise à jour"
},
"edit": {
"refresh": "Actualiser les données",
Expand Down
6 changes: 6 additions & 0 deletions src/modules/RA/DataSource/views/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ export const DataSourceList = props => (
<StatusChip sourceId={id} status={{ status, report }} />
}
/>
<FunctionField
source="updated_at"
label="datasource.form.updated"
render={({ updated_at: updatedAt }) => new Date(updatedAt).toLocaleDateString()}
/>

<CustomCloneButton endpoint={RES_DATASOURCE} label="" />
</Datagrid>
</List>
Expand Down

0 comments on commit 3f414c0

Please sign in to comment.