@@ -100,42 +130,62 @@ class History extends Component {
}
}
renderVersionInfo(rawModelData){
letdateInfo=(<em>(Informationnonconnue.)</em>);
const{updated_on}=rawModelData;
if(updated_on){
constdata=dateTimeStrToStr(updated_on);
dateInfo=data.date+" à "+data.time;
}
/**
* Function to close history panel
*
* @memberof History
*/
closeHistory(){
this.props.handleHistoryWasClosed();
this.props.closeFullScreenDialog();
this.props.resetVersions();
}
/**
* Renders the panel that contain the history data
*
* @returns
* @memberof History
*/
renderPanel(){
const{classes}=this.props;
return(
<div>
<Typographyvariant='caption'align='center'>Lesversionssuccessivesd'un même utilisateur ne sont pas enregistrés (dans de tels cas, seul la dernière est conservée).</Typography>
<Typography variant='h6' align='center'>Version n°{this.state.versionInView + 1} du {dateInfo}</Typography>
@@ -168,32 +218,42 @@ class History extends Component {
);
}
render() {
const { classes } = this.props;
/**
* Render a version
*
* @param {object} rawModelData
* @returns
* @memberof History
*/
renderVersionInfo(rawModelData){
letdateInfo=<em>(Informationnonconnue.)</em>;
const{updated_on}=rawModelData;
if(updated_on){
constdata=dateTimeStrToStr(updated_on);
dateInfo=`${data.date} à ${data.time}`;
}
return(
<div>
<Dialog
fullScreen
open={this.props.open}
TransitionComponent={Transition}
<Typographyvariant='caption'align='center'>Lesversionssuccessivesd'un même utilisateur ne sont pas enregistrés (dans de tels cas, seul la dernière est conservée).</Typography>
<Typography variant='h6' align='center'>Version n°{this.state.versionInView + 1} du {dateInfo}</Typography>