Commit c8b31f08 authored by Jean-Marc Le Roux's avatar Jean-Marc Le Roux

Handle amendment status icon.

parent fa751bd3
Pipeline #40960 passed with stages
in 47 seconds
......@@ -27,6 +27,17 @@ export default class AmendmentList extends Component {
dispatch(fetchAmendmentsIfNeeded(project));
}
getStatusIcon(status) {
const icons = {
draft: 'mode_edit',
submitted: 'done',
accepted: 'done_all',
rejected: 'not_interested',
};
return icons[status];
}
render() {
if (!this.props.amendments || !this.props.amendments.items) {
......@@ -41,7 +52,7 @@ export default class AmendmentList extends Component {
key={amendement.id}
caption={AllHtmlEntities.decode(amendement.title)}
legend={amendement.description}
// leftIcon={amendement.status}
leftIcon={this.getStatusIcon(amendement.status)}
onClick={() => this.props.onAmendmentClick(amendement.id)}
/>
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment