Skip to content

Commit

Permalink
feat: ajout de la configuration CRISP (#3855)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrmr authored Oct 17, 2024
1 parent bc2208b commit f8221b2
Show file tree
Hide file tree
Showing 25 changed files with 203 additions and 166 deletions.
2 changes: 2 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ fileignoreconfig:
checksum: 70dcdce75bb98d7c5b05a34074ccef0412a7bbfb1755b472d66a74a144d0e882
- filename: ui/modules/referencement-organisme/tabs/AideRelationsOrganismes.tsx
checksum: 7174dc73718c7b2fb9c175d783c7ca5e0d02dd85db8c7c1453a2a23d9c171461
- filename: ui/pages/contact.tsx
checksum: d5a5f0510520b403d6cb83db5c9724b2408866c7f624f109fc9d9576944feac1
- filename: ui/pages/organismes-formation.tsx
checksum: 10ba3e10dc58d0b882a87038c57b632173d3428e8a3c3ceee514deff720fdf67
- filename: ui/modules/organismes/ListeOrganismesPage.tsx
Expand Down
2 changes: 1 addition & 1 deletion server/static/open-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"title": "API mission apprentissage",
"description": "L'API mission apprentissage est à disposition des ERPs et organismes de formation qui souhaitent envoyer leur donnnées effectifs au tableau de bord de l'apprentissage.",
"contact": {
"url": "https://tableaudebord-apprentissage.atlassian.net/servicedesk/customer/portal/3/group/11/create/48",
"url": "https://cfas.apprentissage.beta.gouv.fr/contact",
"name": "API Support"
}
},
Expand Down
58 changes: 30 additions & 28 deletions shared/constants/support.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
export const SUPPORT_PAGE_ACCUEIL = "https://tableaudebord-apprentissage.atlassian.net/servicedesk/customer/portal/3";
export const CRISP_FAQ = "https://aide.cfas.apprentissage.beta.gouv.fr/fr/";
export const SUPPORT_PAGE_ACCUEIL = "/contact";

export const GESTION_COMPTE_GROUP = `${SUPPORT_PAGE_ACCUEIL}/group/14`;
export const GESTION_ORGANISME_GROUP = `${SUPPORT_PAGE_ACCUEIL}/group/8`;
export const TRANSMISSION_DONNEES_GROUP = `${SUPPORT_PAGE_ACCUEIL}/group/11`;
export const EFFECTIFS_GROUP = `${SUPPORT_PAGE_ACCUEIL}/group/9`;
export const SIFA_GROUP = `${SUPPORT_PAGE_ACCUEIL}/group/12`;
export const AUTRE_GROUP = `${SUPPORT_PAGE_ACCUEIL}/group/10`;
export const GESTION_COMPTE_GROUP = `${SUPPORT_PAGE_ACCUEIL}`;
export const GESTION_ORGANISME_GROUP = `${SUPPORT_PAGE_ACCUEIL}`;
export const TRANSMISSION_DONNEES_GROUP = `${SUPPORT_PAGE_ACCUEIL}`;
export const EFFECTIFS_GROUP = `${SUPPORT_PAGE_ACCUEIL}`;
export const SIFA_GROUP = `${SUPPORT_PAGE_ACCUEIL}`;
export const AUTRE_GROUP = `${SUPPORT_PAGE_ACCUEIL}`;

export const GC_AIDE_CREATION_ELEMENT_LINK = `${GESTION_COMPTE_GROUP}/create/36`;
export const GC_SUPPRESSION_COMPTE_ELEMENT_LINK = ` ${GESTION_COMPTE_GROUP}/create/52`;
export const GC_AUTRE_ELEMENT_LINK = `${GESTION_COMPTE_GROUP}/create/53`;
export const GC_AIDE_CREATION_ELEMENT_LINK = `${GESTION_COMPTE_GROUP}`;
export const GC_SUPPRESSION_COMPTE_ELEMENT_LINK = ` ${GESTION_COMPTE_GROUP}`;
export const GC_AUTRE_ELEMENT_LINK = `${GESTION_COMPTE_GROUP}`;

export const GO_MODIFICATION_IDENTITE_ELEMENT_LINK = `${GESTION_ORGANISME_GROUP}/create/31`;
export const GO_MODIFICATION_RELATION_ELEMENT_LINK = ` ${GESTION_ORGANISME_GROUP}/create/64`;
export const GO_AUTRE_ELEMENT_LINK = `${GESTION_ORGANISME_GROUP}/create/11`;
export const GO_MODIFICATION_IDENTITE_ELEMENT_LINK = `${GESTION_ORGANISME_GROUP}`;
export const GO_MODIFICATION_RELATION_ELEMENT_LINK = ` ${GESTION_ORGANISME_GROUP}`;
export const GO_AUTRE_ELEMENT_LINK = `${GESTION_ORGANISME_GROUP}`;

export const TD_PARAMETRAGE_ELEMENT_LINK = `${TRANSMISSION_DONNEES_GROUP}/create/39`;
export const TD_API_ELEMENT_LINK = `${TRANSMISSION_DONNEES_GROUP}/create/48`;
export const TD_MANUEL_ELEMENT_LINK = `${TRANSMISSION_DONNEES_GROUP}/create/56`;
export const TD_COMPRENDRE_ELEMENT_LINK = `${TRANSMISSION_DONNEES_GROUP}/create/44`;
export const TD_AUTRE_ELEMENT_LINK = `${TRANSMISSION_DONNEES_GROUP}/create/57`;
export const TD_PARAMETRAGE_ELEMENT_LINK = `${TRANSMISSION_DONNEES_GROUP}`;
export const TD_API_ELEMENT_LINK = `${TRANSMISSION_DONNEES_GROUP}`;
export const TD_MANUEL_ELEMENT_LINK = `${TRANSMISSION_DONNEES_GROUP}`;
export const TD_COMPRENDRE_ELEMENT_LINK = `${TRANSMISSION_DONNEES_GROUP}`;
export const TD_AUTRE_ELEMENT_LINK = `${TRANSMISSION_DONNEES_GROUP}`;

export const EFF_ERREUR_ELEMENT_LINK = `${EFFECTIFS_GROUP}/create/63`;
export const EFF_AFFICHAGE_ELEMENT_LINK = `${EFFECTIFS_GROUP}/create/46`;
export const EFF_EDITION_ELEMENT_LINK = `${EFFECTIFS_GROUP}/create/42`;
export const EFF_AUTRE_ELEMENT_LINK = `${EFFECTIFS_GROUP}/create/58`;
export const EFF_ERREUR_ELEMENT_LINK = `${EFFECTIFS_GROUP}`;
export const EFF_AFFICHAGE_ELEMENT_LINK = `${EFFECTIFS_GROUP}`;
export const EFF_EDITION_ELEMENT_LINK = `${EFFECTIFS_GROUP}`;
export const EFF_AUTRE_ELEMENT_LINK = `${EFFECTIFS_GROUP}`;

export const SIFA_EFFECTIF_INCORRECT_ELEMENT_LINK = `${SIFA_GROUP}/create/30`;
export const SIFA_REJET_ELEMENT_LINK = `${SIFA_GROUP}/create/54`;
export const SIFA_AUTRE_ELEMENT_LINK = `${SIFA_GROUP}/create/59`;
export const SIFA_EFFECTIF_INCORRECT_ELEMENT_LINK = `${SIFA_GROUP}`;
export const SIFA_REJET_ELEMENT_LINK = `${SIFA_GROUP}`;
export const SIFA_AUTRE_ELEMENT_LINK = `${SIFA_GROUP}`;

export const AUTRE_AMELIORATION_ELEMENT_LINK = `${AUTRE_GROUP}/create/55`;
export const AUTRE_ANOMALIE_ELEMENT_LINK = `${AUTRE_GROUP}/create/49`;
export const AUTRE_MODIF_RESEAU_ELEMENT_LINK = `${AUTRE_GROUP}/create/79`;
export const AUTRE_AMELIORATION_ELEMENT_LINK = `${AUTRE_GROUP}`;
export const AUTRE_ANOMALIE_ELEMENT_LINK = `${AUTRE_GROUP}`;
export const AUTRE_MODIF_RESEAU_ELEMENT_LINK = `${AUTRE_GROUP}`;
export const AUTRE_AFFELNET_LINK = `${AUTRE_GROUP}`;
1 change: 0 additions & 1 deletion ui/common/constants/faq.ts

This file was deleted.

4 changes: 2 additions & 2 deletions ui/components/Page/Page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box, Container, ContainerProps } from "@chakra-ui/react";
import React from "react";
import { CRISP_FAQ } from "shared";

import { FAQ_PATH } from "@/common/constants/faq";
import Link from "@/components/Links/Link";
import Section from "@/components/Section/Section";
import { Interrogation } from "@/theme/components/icons";
Expand All @@ -27,7 +27,7 @@ function Page({ children, childrenContainer, ...rest }: PageProps) {
</Box>
<Link
isExternal
href={FAQ_PATH}
href={CRISP_FAQ}
position="fixed"
width="60px"
height="60px"
Expand Down
4 changes: 2 additions & 2 deletions ui/components/Page/SimplePage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Box, Container } from "@chakra-ui/react";
import Head from "next/head";
import React from "react";
import { CRISP_FAQ } from "shared";

import { FAQ_PATH } from "@/common/constants/faq";
import Link from "@/components/Links/Link";
import { Interrogation } from "@/theme/components/icons";

Expand All @@ -28,7 +28,7 @@ function SimplePage({ title, children }: Props) {
</Box>
<Link
isExternal
href={FAQ_PATH}
href={CRISP_FAQ}
position="fixed"
width="60px"
height="60px"
Expand Down
6 changes: 3 additions & 3 deletions ui/components/Page/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Container, Flex, Grid, GridItem, Image, List, ListItem, Text } from "@chakra-ui/react";
import { CRISP_FAQ } from "shared";

import { FAQ_PATH } from "@/common/constants/faq";
import Link from "@/components/Links/Link";
import { ExternalLinkLine } from "@/theme/components/icons";

Expand Down Expand Up @@ -105,8 +105,8 @@ const Footer = () => {
</Link>
</ListItem>
<ListItem _after={{ content: "'|'", marginLeft: "0.5rem", marginRight: "0.5rem" }}>
<Link target="_blank" rel="noopener noreferrer" href={FAQ_PATH}>
Page d’aide
<Link target="_blank" rel="noopener noreferrer" href={CRISP_FAQ}>
Centre d’aide
</Link>
</ListItem>
<ListItem _after={{ content: "'|'", marginLeft: "0.5rem", marginRight: "0.5rem" }}>
Expand Down
16 changes: 3 additions & 13 deletions ui/components/Page/components/NavigationMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { ChevronDownIcon, SettingsIcon } from "@chakra-ui/icons";
import { Box, Container, Flex, Menu, MenuButton, MenuItem, MenuList, Text, Tooltip } from "@chakra-ui/react";
import { useRouter } from "next/router";
import { ReactElement, useState } from "react";
import { IOrganisationType, ORGANISATION_TYPE, SUPPORT_PAGE_ACCUEIL } from "shared";
import { CRISP_FAQ, IOrganisationType, ORGANISATION_TYPE } from "shared";

import { FAQ_PATH } from "@/common/constants/faq";
import { AuthContext } from "@/common/internal/AuthContext";
import Link from "@/components/Links/Link";
import { useOrganisationOrganisme } from "@/hooks/organismes";
Expand Down Expand Up @@ -278,12 +277,12 @@ const MenuQuestions = () => {
)}
<MenuItem
as="a"
href={FAQ_PATH}
href={CRISP_FAQ}
target="_blank"
rel="noopener noreferrer"
onClick={() => trackPlausibleEvent("clic_homepage_page_aide")}
>
Page d’aide
Centre d’aide
</MenuItem>
<MenuItem
as="a"
Expand All @@ -295,15 +294,6 @@ const MenuQuestions = () => {
<MenuItem as="a" href="/glossaire">
Glossaire
</MenuItem>
<MenuItem
as="a"
href={SUPPORT_PAGE_ACCUEIL}
target="_blank"
rel="noopener noreferrer"
onClick={() => trackPlausibleEvent("clic_homepage_envoi_message")}
>
Nous envoyer un message
</MenuItem>
</MenuList>
</Menu>
</>
Expand Down
8 changes: 4 additions & 4 deletions ui/modules/auth/inscription/components/SearchBySIRETForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import {
} from "@chakra-ui/react";
import { Field, Form, Formik } from "formik";
import { useState } from "react";
import { SUPPORT_PAGE_ACCUEIL } from "shared";
import * as Yup from "yup";

import { CONTACT_ADDRESS } from "@/common/constants/product";
import { siretRegex } from "@/common/domain/siret";
import { _post } from "@/common/httpClient";
import { sleep } from "@/common/utils/misc";
Expand Down Expand Up @@ -85,15 +85,15 @@ export default function SearchBySIRETForm({ organisation, setOrganisation }: Ins
</Link>
.
<br />
Si vous pensez que c’est une erreur, veuillez nous contacter à{" "}
Si vous pensez que c’est une erreur, veuillez nous contacter :{" "}
<Link
href={`mailto:${CONTACT_ADDRESS}`}
href={SUPPORT_PAGE_ACCUEIL}
target="_blank"
textDecoration="underline"
isExternal
whiteSpace="nowrap"
>
{CONTACT_ADDRESS}
contactez-nous
</Link>
.
</div>
Expand Down
8 changes: 4 additions & 4 deletions ui/modules/auth/inscription/components/SearchByUAIForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import {
} from "@chakra-ui/react";
import { Field, Form, Formik } from "formik";
import { useState } from "react";
import { SUPPORT_PAGE_ACCUEIL } from "shared";
import * as Yup from "yup";

import { CONTACT_ADDRESS } from "@/common/constants/product";
import { UAI_REGEX } from "@/common/domain/uai";
import { _post } from "@/common/httpClient";
import { sleep } from "@/common/utils/misc";
Expand Down Expand Up @@ -86,15 +86,15 @@ export default function SearchByUAIForm({ organisation, setOrganisation }: Inscr
</Link>
.
<br />
Si vous pensez que c’est une erreur, veuillez nous contacter à{" "}
Si vous pensez que c’est une erreur, veuillez nous contacter :{" "}
<Link
href={`mailto:${CONTACT_ADDRESS}`}
href={SUPPORT_PAGE_ACCUEIL}
target="_blank"
textDecoration="underline"
isExternal
whiteSpace="nowrap"
>
{CONTACT_ADDRESS}
contactez-nous
</Link>
.
</div>
Expand Down
9 changes: 5 additions & 4 deletions ui/modules/dashboard/DashboardOrganisme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ import {
UAI_INCONNUE_TAG_FORMAT,
UAI_INCONNUE,
UAI_INCONNUE_CAPITALIZE,
GO_MODIFICATION_RELATION_ELEMENT_LINK,
CRISP_FAQ,
} from "shared";

import { FAQ_PATH } from "@/common/constants/faq";
import { convertOrganismeToExport, organismesExportColumns } from "@/common/exports";
import { _get, _post } from "@/common/httpClient";
import { AuthContext } from "@/common/internal/AuthContext";
Expand Down Expand Up @@ -310,7 +311,7 @@ const DashboardOrganisme = ({ organisme, modePublique }: Props) => {
.
<br />
<Link
href="https://tableaudebord-apprentissage.atlassian.net/servicedesk/customer/portal/3/group/8/create/64"
href={GO_MODIFICATION_RELATION_ELEMENT_LINK}
target="_blank"
borderBottom="1px"
_hover={{ textDecoration: "none" }}
Expand Down Expand Up @@ -757,7 +758,7 @@ const DashboardOrganisme = ({ organisme, modePublique }: Props) => {
paramétrer
</Link>{" "}
votre moyen de transmission. Lire la FAQ{" "}
<Link href={FAQ_PATH} variant="link" ml="auto" isExternal>
<Link href={CRISP_FAQ} variant="link" ml="auto" isExternal>
“Comment transmettre ?”
</Link>
</Text>
Expand Down Expand Up @@ -905,7 +906,7 @@ const DashboardOrganisme = ({ organisme, modePublique }: Props) => {
</Text>

<Link
href={FAQ_PATH}
href={CRISP_FAQ}
target="_blank"
rel="noopener noreferrer"
borderBottom="1px"
Expand Down
16 changes: 5 additions & 11 deletions ui/modules/organismes/ListeOrganismesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
Text,
UnorderedList,
} from "@chakra-ui/react";
import { IOrganisationType } from "shared";
import { CRISP_FAQ, IOrganisationType, SUPPORT_PAGE_ACCUEIL } from "shared";

import { _get } from "@/common/httpClient";
import { Organisme } from "@/common/internal/Organisme";
Expand Down Expand Up @@ -385,7 +385,7 @@ function ListeOrganismesPage(props: ListeOrganismesPageProps) {
<p>
Si la liste des organismes de votre réseau ci-dessus est incomplète ou erronée ,{" "}
<Link
href="mailto:[email protected]"
href={SUPPORT_PAGE_ACCUEIL}
target="_blank"
textDecoration="underline"
isExternal
Expand Down Expand Up @@ -671,14 +671,8 @@ function ListeOrganismesPage(props: ListeOrganismesPageProps) {
Vous ne trouvez pas la réponse à vos questions ?
</Text>
<Flex gap={6}>
<Link
variant="link"
display="inline-flex"
href="https://tableaudebord-apprentissage.atlassian.net/servicedesk/customer/portal/3"
isExternal
width={"fit-content"}
>
Contactez-nous
<Link variant="link" display="inline-flex" href={CRISP_FAQ} isExternal width={"fit-content"}>
Aide
<Box className="ri-arrow-right-line" />
</Link>
<Link
Expand Down Expand Up @@ -709,7 +703,7 @@ function ListeOrganismesPage(props: ListeOrganismesPageProps) {
organisons des webinaires réguliers avec les CFA de votre{" "}
{organisationType === "TETE_DE_RESEAU" ? <>réseau</> : <>territoire</>}.{" "}
<Link
href="mailto:[email protected]"
href={SUPPORT_PAGE_ACCUEIL}
target="_blank"
textDecoration="underline"
isExternal
Expand Down
7 changes: 3 additions & 4 deletions ui/modules/referencement-organisme/tabs/AideSiret.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Text, Link, UnorderedList, OrderedList, ListItem, Img } from "@chakra-ui/react";
import React, { useState } from "react";
import { GC_SUPPRESSION_COMPTE_ELEMENT_LINK } from "shared";

import Accordion from "@/components/Accordion/Accordion";
import AidePage from "@/components/Page/AidePage";
Expand Down Expand Up @@ -117,10 +118,8 @@ const AideSiret = () => {
</UnorderedList>
<Text>
Concernant le Tableau de bord, demandez la suppression de votre compte utilisateur à{" "}
<AidePage.Link href="https://tableaudebord-apprentissage.atlassian.net/servicedesk/customer/portal/3/group/14/create/52">
notre service support
</AidePage.Link>{" "}
pour pouvoir ensuite créer un nouveau sur votre dernier SIRET.
<AidePage.Link href={GC_SUPPRESSION_COMPTE_ELEMENT_LINK}>notre service support</AidePage.Link> pour
pouvoir ensuite créer un nouveau sur votre dernier SIRET.
</Text>
</Accordion.Item>

Expand Down
8 changes: 2 additions & 6 deletions ui/modules/voeux/AffelnetPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
} from "@chakra-ui/react";
import { useRouter } from "next/router";
import { useCallback, useMemo } from "react";
import { AUTRE_AFFELNET_LINK } from "shared";

import { _getBlob } from "@/common/httpClient";
import { downloadObject } from "@/common/utils/browser";
Expand Down Expand Up @@ -324,12 +325,7 @@ function VoeuxAffelnetPage() {
</Grid>
<Flex gap={3}>
<Text>Vous avez une question / remarque ?</Text>
<Link
variant="link"
display="inline-flex"
href="https://tableaudebord-apprentissage.atlassian.net/servicedesk/customer/portal/3/group/10/create/80"
isExternal
>
<Link variant="link" display="inline-flex" href={AUTRE_AFFELNET_LINK} isExternal>
Écrivez-nous
<Box className="ri-arrow-right-line" />
</Link>
Expand Down
6 changes: 3 additions & 3 deletions ui/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ const contentSecurityPolicy = `
block-all-mixed-content;
font-src 'self' https: data:;
frame-ancestors 'self' https://cfas.apprentissage.beta.gouv.fr;
frame-src 'self' https://plausible.io https://cfas.apprentissage.beta.gouv.fr https://cfas-recette.apprentissage.beta.gouv.fr https://tableau-de-bord-preprod.apprentissage.beta.gouv.fr;
frame-src 'self' https://plausible.io https://cfas.apprentissage.beta.gouv.fr https://cfas-recette.apprentissage.beta.gouv.fr https://tableau-de-bord-preprod.apprentissage.beta.gouv.fr https://plugins.crisp.chat;
img-src 'self' https://files.tableau-de-bord.apprentissage.beta.gouv.fr https://www.notion.so https://mission-apprentissage.notion.site https://stats.beta.gouv.fr data:;
object-src 'none';
script-src 'self' https://plausible.io https://stats.beta.gouv.fr ${
script-src 'self' https://plausible.io https://stats.beta.gouv.fr https://client.crisp.chat ${
process.env.NEXT_PUBLIC_ENV === "local" ? "'unsafe-eval'" : ""
};
script-src-attr 'none';
style-src 'self' https: *.plausible.io 'unsafe-inline';
connect-src 'self' https://plausible.io https://stats.beta.gouv.fr https://sentry.apprentissage.beta.gouv.fr ${
connect-src 'self' https://plausible.io https://stats.beta.gouv.fr https://client.crisp.chat https://plugins.crisp.chat https://sentry.apprentissage.beta.gouv.fr ${
process.env.NEXT_PUBLIC_ENV === "local" ? "http://localhost:5001/" : ""
};
upgrade-insecure-requests;
Expand Down
Loading

0 comments on commit f8221b2

Please sign in to comment.