diff --git a/client/src/components/DashboardPage/Dashboard.tsx b/client/src/components/DashboardPage/Dashboard.tsx
index 528e026..8ffeabf 100644
--- a/client/src/components/DashboardPage/Dashboard.tsx
+++ b/client/src/components/DashboardPage/Dashboard.tsx
@@ -18,18 +18,31 @@ export function Dashboard() {
return (
-
-
-
Ces 7 derniers jours
-
-
-
-
+
+
+
+
+
+
+ Ces 7 derniers jours
+
+
+
+
+
+
+
+
+
+
+
);
}
\ No newline at end of file
diff --git a/client/src/components/DashboardPage/ItemPanel.tsx b/client/src/components/DashboardPage/ItemPanel.tsx
index d84860d..84211af 100644
--- a/client/src/components/DashboardPage/ItemPanel.tsx
+++ b/client/src/components/DashboardPage/ItemPanel.tsx
@@ -88,7 +88,7 @@ export const ItemPanel: FunctionComponent
= (props) => {
-
+
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/Timeline.tsx b/client/src/components/Timeline.tsx
index 036f352..4da19fc 100644
--- a/client/src/components/Timeline.tsx
+++ b/client/src/components/Timeline.tsx
@@ -13,7 +13,7 @@ export const Timeline: FunctionComponent = ({ events }) => {
events = debounceEvents(events) || [];
return (
-
+
{
events.map(evt => {
return (
@@ -29,7 +29,7 @@ export const Timeline: FunctionComponent
= ({ events }) => {
}
{
events.length === 0 ?
- Aucun évènement.
:
+ Aucun évènement.
:
null
}
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() {
-
diff --git a/client/src/hooks/useLoggedIn.tsx b/client/src/hooks/useLoggedIn.tsx
index 2764c04..4d4a432 100644
--- a/client/src/hooks/useLoggedIn.tsx
+++ b/client/src/hooks/useLoggedIn.tsx
@@ -9,13 +9,12 @@ export const useLoggedIn = () => {
};
export function saveLoggedIn(loggedIn: boolean) {
- console.log("saveLoggedIn", JSON.stringify(loggedIn))
- window.sessionStorage.setItem(LOGGED_IN_KEY, JSON.stringify(loggedIn));
+ window.localStorage.setItem(LOGGED_IN_KEY, JSON.stringify(loggedIn));
}
export function getSavedLoggedIn(): boolean {
try {
- const loggedIn = JSON.parse(window.sessionStorage.getItem(LOGGED_IN_KEY));
+ const loggedIn = JSON.parse(window.localStorage.getItem(LOGGED_IN_KEY));
return !!loggedIn;
} catch(err) {
return false;
diff --git a/internal/config/config.go b/internal/config/config.go
index c773539..d6f8c47 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -154,7 +154,7 @@ func NewDefault() *Config {
BaseURL: "http://localhost:8080",
ContentTemplate: dedent.Dedent(`
{{- $root := . -}}
- Bonjour {{ .User.Name }},
+ Bonjour{{if .User.Name}} {{ .User.Name }}{{end}},
{{ if not .HasEvents -}}
Aucun évènement notoire ces derniers jours.