Enregistrement et affichage d'un flux d'évènements
- Ajout d'une nouvelle entité "Event" - Affichage d'une "timeline" sur le tableau de bord - Création semi-automatique des évènements lors des modifications par les utilisateurs
This commit is contained in:
25
client/src/components/DecisionSupportFileLink.tsx
Normal file
25
client/src/components/DecisionSupportFileLink.tsx
Normal file
@ -0,0 +1,25 @@
|
||||
import React, { FunctionComponent } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useWorkgroups } from "../gql/queries/workgroups";
|
||||
import { useDecisionSupportFiles } from "../gql/queries/dsf";
|
||||
|
||||
export interface DecisioSupportFileLinkProps {
|
||||
decisionSupportFileId: number
|
||||
}
|
||||
|
||||
export const DecisioSupportFileLink: FunctionComponent<DecisioSupportFileLinkProps> = ({ decisionSupportFileId }) => {
|
||||
const { decisionSupportFiles } = useDecisionSupportFiles({
|
||||
fetchPolicy: "cache-first",
|
||||
variables: {
|
||||
filter: {
|
||||
ids: [decisionSupportFileId]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const title = decisionSupportFiles.length > 0 ? decisionSupportFiles[0].title : `#${decisionSupportFileId}`;
|
||||
|
||||
return (
|
||||
<Link to={`/decisions/${decisionSupportFileId}`}>{title}</Link>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user