diff --git a/client/src/components/DecisionSupportFilePage/DecisionSupportFilePage.tsx b/client/src/components/DecisionSupportFilePage/DecisionSupportFilePage.tsx index daf112a..a2dd2fa 100644 --- a/client/src/components/DecisionSupportFilePage/DecisionSupportFilePage.tsx +++ b/client/src/components/DecisionSupportFilePage/DecisionSupportFilePage.tsx @@ -9,6 +9,7 @@ import { useDecisionSupportFiles } from '../../gql/queries/dsf'; import { useCreateDecisionSupportFileMutation, useUpdateDecisionSupportFileMutation } from '../../gql/mutations/dsf'; import { OptionsSection } from './OptionsSection'; import { useIsAuthorized } from '../../gql/queries/authorization'; +import { TimelinePanel } from './TimelinePanel'; export interface DecisionSupportFilePageProps { @@ -127,7 +128,7 @@ export const DecisionSupportFilePage: FunctionComponent
-
+
  • -
    +
    +
diff --git a/client/src/components/DecisionSupportFilePage/TimelinePanel.tsx b/client/src/components/DecisionSupportFilePage/TimelinePanel.tsx new file mode 100644 index 0000000..a537abf --- /dev/null +++ b/client/src/components/DecisionSupportFilePage/TimelinePanel.tsx @@ -0,0 +1,36 @@ +import React, { FunctionComponent, useState } from 'react'; +import { DecisionSupportFile } from '../../types/decision'; +import { Timeline } from '../Timeline'; +import { useEvents } from '../../gql/queries/event'; + +export interface TimelinePanelProps { + dsf: DecisionSupportFile, +}; + +export const TimelinePanel: FunctionComponent = ({ dsf }) => { + const { events } = useEvents({ + variables: { + filter: { + objectType: 'dsf', + objectId: dsf.id + } + } + }); + + return ( +
+

+

+
+ Suivi des opérations +
+
+
+
+

+
+ +
+
+ ); +}; \ No newline at end of file diff --git a/client/src/components/WorkgroupPage/TimelinePanel.tsx b/client/src/components/WorkgroupPage/TimelinePanel.tsx new file mode 100644 index 0000000..0f52f62 --- /dev/null +++ b/client/src/components/WorkgroupPage/TimelinePanel.tsx @@ -0,0 +1,37 @@ +import React, { FunctionComponent, useState } from 'react'; +import { DecisionSupportFile } from '../../types/decision'; +import { Timeline } from '../Timeline'; +import { useEvents } from '../../gql/queries/event'; +import { Workgroup } from '../../types/workgroup'; + +export interface TimelinePanelProps { + workgroup: Workgroup, +}; + +export const TimelinePanel: FunctionComponent = ({ workgroup }) => { + const { events } = useEvents({ + variables: { + filter: { + objectType: 'workgroup', + objectId: workgroup.id + } + } + }); + + return ( +
+

+

+
+ Suivi des opérations +
+
+
+
+

+
+ +
+
+ ); +}; \ No newline at end of file diff --git a/client/src/components/WorkgroupPage/WorkgroupPage.tsx b/client/src/components/WorkgroupPage/WorkgroupPage.tsx index 218ec69..b9f74b3 100644 --- a/client/src/components/WorkgroupPage/WorkgroupPage.tsx +++ b/client/src/components/WorkgroupPage/WorkgroupPage.tsx @@ -9,6 +9,7 @@ import { User } from '../../types/user'; import { InfoPanel } from './InfoPanel'; import { Workgroup } from '../../types/workgroup'; import { useJoinWorkgroupMutation, useLeaveWorkgroupMutation, useCloseWorkgroupMutation } from '../../gql/mutations/workgroups'; +import { TimelinePanel } from './TimelinePanel'; export function WorkgroupPage() { const { id } = useParams(); @@ -134,12 +135,15 @@ export function WorkgroupPage() {
-
+
-
+
+
+ +