# HG changeset patch # User salimr # Date 1539104360 -7200 # Node ID 62e5be0df812aaba877d2a3d5c6e1b37d5f27ead # Parent 30a5baa313142bec2dcf7ff69c134c3dfef3ede4 Add ProtocolSummary component diff -r 30a5baa31314 -r 62e5be0df812 client/src/components/ProtocolSummary.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/ProtocolSummary.js Tue Oct 09 18:59:20 2018 +0200 @@ -0,0 +1,43 @@ +import React, { Component } from 'react'; +import '../App.css'; +import './SessionSummary.css' + + +// const SessionSummary = ({notes}) => ( +// +// ) + +export default class ProtocolSummary extends Component { + render() { + return ( +
+
+ important +

la métacatégorie important

+
+
+ mot-clé +

la métacatégorie mot-clé

+
+
+ commentaire +

la métacatégorie commentaire

+
+
+ trouble +

la métacatégorie trouble

+
+
+ ); + } +} diff -r 30a5baa31314 -r 62e5be0df812 client/src/components/Session.js --- a/client/src/components/Session.js Tue Oct 09 18:54:42 2018 +0200 +++ b/client/src/components/Session.js Tue Oct 09 18:59:20 2018 +0200 @@ -18,11 +18,48 @@ class Session extends Component { + state = { + screenSummary: 0, + } + onClickReadOnly = (e) => { e.preventDefault(); this.props.history.push('/read-only/' + this.props.match.params.id); } + toggleScreenSummary = (e) => { + if (this.state.screenSummary === 0) { + e.preventDefault() + this.setState({screenSummary: 1}) + } + + if (this.state.screenSummary === 1) { + e.preventDefault() + this.setState({screenSummary: 0}) + } + } + + screenSummary = () => { + + if (this.state.screenSummary === 0) { + return ( +
+ Afficher le protocole d'annotation + +
+ ); + } + + if (this.state.screenSummary === 1) { + return ( +
+ Afficher le résumé de la session + +
+ ); + } + } + render() { return ( @@ -32,7 +69,7 @@
remove_red_eye - + {this.screenSummary()}