From fc4912882a7bc16e6396739ad43e5823bb29a82f Mon Sep 17 00:00:00 2001 From: William Petit Date: Fri, 31 Jul 2020 18:04:31 +0200 Subject: [PATCH] =?UTF-8?q?Base=20de=20la=20page=20de=20cr=C3=A9ation/?= =?UTF-8?q?=C3=A9dition=20d'un=20DAD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/App.tsx | 2 + .../DecisionSupportFilePage/AppendixPanel.tsx | 18 +++++ .../ClarificationSection.tsx | 67 +++++++++++++++++ .../DecisionSupportFilePage.tsx | 74 +++++++++++++++++++ .../DecisionSupportFilePage/MetadataPanel.tsx | 54 ++++++++++++++ .../OptionsSection.tsx | 17 +++++ .../HomePage/DecisionSupportFilePanel.tsx | 2 +- client/src/components/HomePage/ItemPanel.tsx | 2 +- client/src/components/Navbar.tsx | 2 +- client/src/gql/mutations/profile.tsx | 2 +- client/src/gql/mutations/workgroups.tsx | 11 ++- client/src/gql/queries/decisions.tsx | 2 +- client/src/gql/queries/profile.tsx | 2 +- client/src/gql/queries/workgroups.tsx | 2 +- client/src/index.html | 2 +- client/src/sass/_base.scss | 8 +- 16 files changed, 254 insertions(+), 13 deletions(-) create mode 100644 client/src/components/DecisionSupportFilePage/AppendixPanel.tsx create mode 100644 client/src/components/DecisionSupportFilePage/ClarificationSection.tsx create mode 100644 client/src/components/DecisionSupportFilePage/DecisionSupportFilePage.tsx create mode 100644 client/src/components/DecisionSupportFilePage/MetadataPanel.tsx create mode 100644 client/src/components/DecisionSupportFilePage/OptionsSection.tsx diff --git a/client/src/components/App.tsx b/client/src/components/App.tsx index 89e3dca..9324cf2 100644 --- a/client/src/components/App.tsx +++ b/client/src/components/App.tsx @@ -3,6 +3,7 @@ import { BrowserRouter, Route, Redirect, Switch } from "react-router-dom"; import { HomePage } from './HomePage/HomePage'; import { ProfilePage } from './ProfilePage/ProfilePage'; import { WorkgroupPage } from './WorkgroupPage/WorkgroupPage'; +import { DecisionSupportFilePage } from './DecisionSupportFilePage/DecisionSupportFilePage'; export class App extends React.Component { render() { @@ -12,6 +13,7 @@ export class App extends React.Component { + } /> diff --git a/client/src/components/DecisionSupportFilePage/AppendixPanel.tsx b/client/src/components/DecisionSupportFilePage/AppendixPanel.tsx new file mode 100644 index 0000000..97603a4 --- /dev/null +++ b/client/src/components/DecisionSupportFilePage/AppendixPanel.tsx @@ -0,0 +1,18 @@ +import React, { FunctionComponent, useState } from 'react'; +import { DecisionSupportFile } from '../../types/decision'; + +export interface AppendixPanelProps { + dsf: DecisionSupportFile, +}; + +export const AppendixPanel: FunctionComponent = ({ dsf }) => { + return ( + + ); +}; \ No newline at end of file diff --git a/client/src/components/DecisionSupportFilePage/ClarificationSection.tsx b/client/src/components/DecisionSupportFilePage/ClarificationSection.tsx new file mode 100644 index 0000000..d2a767c --- /dev/null +++ b/client/src/components/DecisionSupportFilePage/ClarificationSection.tsx @@ -0,0 +1,67 @@ +import React, { FunctionComponent, useState } from 'react'; +import { DecisionSupportFile } from '../../types/decision'; + +export interface ClarificationSectionProps { + dsf: DecisionSupportFile, +}; + +export const ClarificationSection: FunctionComponent = ({ dsf }) => { + return ( +
+
+
+ +
+ +
+
+
+ +
+ +
+

Ne pas essayer de rentrer trop dans les détails ici. Préférer l'utilisation des annexes et y faire référence.

+
+
+ +
+ +
+

Penser à indiquer si des obligations légales pèsent sur cette prise de décision.

+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+ +
+
+
+
+ ); +}; \ No newline at end of file diff --git a/client/src/components/DecisionSupportFilePage/DecisionSupportFilePage.tsx b/client/src/components/DecisionSupportFilePage/DecisionSupportFilePage.tsx new file mode 100644 index 0000000..02f23da --- /dev/null +++ b/client/src/components/DecisionSupportFilePage/DecisionSupportFilePage.tsx @@ -0,0 +1,74 @@ +import React, { FunctionComponent, useState } from 'react'; +import { Page } from '../Page'; +import { ClarificationSection } from './ClarificationSection'; +import { OptionsSection } from './OptionsSection'; +import { MetadataPanel } from './MetadataPanel'; +import { AppendixPanel } from './AppendixPanel'; + +export interface DecisionSupportFilePageProps { + +}; + +export const DecisionSupportFilePage: FunctionComponent = () => { + const [ state, setState ] = useState({ dsf: null }); + const isNew = true; + const isClosed = false; + return ( + +
+
+
+
+ { + isNew ? +
+
+

Nouveau

+

Dossier d'Aide à la Décision

+
+
: +
+
+

{state.dsf.title}

+

Dossier d'Aide à la Décision { isClosed ? '(clos)' : null }

+
+
+ } +
+
+
+ +
+
+ ); +}; \ No newline at end of file diff --git a/client/src/components/DecisionSupportFilePage/MetadataPanel.tsx b/client/src/components/DecisionSupportFilePage/MetadataPanel.tsx new file mode 100644 index 0000000..674edcf --- /dev/null +++ b/client/src/components/DecisionSupportFilePage/MetadataPanel.tsx @@ -0,0 +1,54 @@ +import React, { FunctionComponent, useState } from 'react'; +import { DecisionSupportFile } from '../../types/decision'; + +export interface MetadataPanelProps { + dsf: DecisionSupportFile, +}; + +export const MetadataPanel: FunctionComponent = ({ dsf }) => { + return ( + + ); +}; \ No newline at end of file diff --git a/client/src/components/DecisionSupportFilePage/OptionsSection.tsx b/client/src/components/DecisionSupportFilePage/OptionsSection.tsx new file mode 100644 index 0000000..bd537cd --- /dev/null +++ b/client/src/components/DecisionSupportFilePage/OptionsSection.tsx @@ -0,0 +1,17 @@ +import React, { FunctionComponent, useState } from 'react'; +import { DecisionSupportFile } from '../../types/decision'; + +export interface OptionsSectionProps { + dsf: DecisionSupportFile, +}; + +export const OptionsSection: FunctionComponent = ({ dsf }) => { + return ( +
+

Explorer les options

+
+ +
+
+ ); +}; \ No newline at end of file diff --git a/client/src/components/HomePage/DecisionSupportFilePanel.tsx b/client/src/components/HomePage/DecisionSupportFilePanel.tsx index d241ff8..e6b69b1 100644 --- a/client/src/components/HomePage/DecisionSupportFilePanel.tsx +++ b/client/src/components/HomePage/DecisionSupportFilePanel.tsx @@ -31,7 +31,7 @@ export function DecisionSupportFilePanel() { return ( = (props) => { return (