forked from primeroIMS/primero
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAssignmentsSummary.jsx
43 lines (34 loc) · 1.24 KB
/
AssignmentsSummary.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2014 - 2023 UNICEF. All rights reserved.
import PropTypes from "prop-types";
import { Grid } from "@material-ui/core";
import { useI18n } from "../../i18n";
import { ASSIGNMENTS_SUMMARY_NAME as NAME } from "./constants";
const AssignmentsSummary = ({ transition, classes }) => {
const i18n = useI18n();
// TODO: It has to be modified, on summary should print username
// const renderTransitioned = !expanded ? (
// <Grid item md={6} xs={12}>
// <div>{transition.transitioned_to}</div>
// </Grid>
// ) : null;
return (
<Grid container spacing={2}>
<Grid item md={6} xs={10}>
<div className={classes.wrapper} data-testid="wrapper">
<div className={classes.date} data-testid="date">
{i18n.localizeDate(transition.created_at)}
</div>
<div className={classes.titleHeader}>{i18n.t("transition.type.assign")}</div>
</div>
</Grid>
{/* TODO: It has to be modified, on summary should print username */}
{/* {renderTransitioned} */}
</Grid>
);
};
AssignmentsSummary.displayName = NAME;
AssignmentsSummary.propTypes = {
classes: PropTypes.object.isRequired,
transition: PropTypes.object.isRequired
};
export default AssignmentsSummary;