2020-07-21 22:25:39 +02:00
|
|
|
import React from 'react';
|
2020-07-21 18:12:02 +02:00
|
|
|
import { WorkgroupsPanel } from './WorkgroupsPanel';
|
2020-07-31 17:36:10 +02:00
|
|
|
import { DecisionSupportFilePanel } from './DecisionSupportFilePanel';
|
2020-10-02 16:37:24 +02:00
|
|
|
import { Timeline } from '../Timeline';
|
|
|
|
import { useEvents } from '../../gql/queries/event';
|
|
|
|
|
|
|
|
const from = new Date();
|
|
|
|
from.setDate(from.getDate() - 7);
|
2020-07-16 20:43:41 +02:00
|
|
|
|
|
|
|
export function Dashboard() {
|
2020-10-02 16:37:24 +02:00
|
|
|
const { events } = useEvents({
|
|
|
|
variables: {
|
|
|
|
filter: {
|
|
|
|
from,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2020-07-16 20:43:41 +02:00
|
|
|
return (
|
|
|
|
<div className="columns">
|
2020-10-02 16:37:24 +02:00
|
|
|
<div className="column is-5">
|
|
|
|
<div className="box">
|
|
|
|
<h3 className="is-size-3 mb-3">Ces 7 derniers jours</h3>
|
|
|
|
<Timeline events={events} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="column is-4">
|
2020-07-31 17:36:10 +02:00
|
|
|
<DecisionSupportFilePanel />
|
2020-07-16 20:43:41 +02:00
|
|
|
</div>
|
2020-07-31 17:36:10 +02:00
|
|
|
<div className="column is-3">
|
|
|
|
<WorkgroupsPanel />
|
2020-07-16 20:43:41 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|