diff --git a/src/client/.eslintrc.json b/src/client/.eslintrc.json index 54fa4c62f..7ccbf6aa9 100644 --- a/src/client/.eslintrc.json +++ b/src/client/.eslintrc.json @@ -1,3 +1,10 @@ { - "extends": ["@socialgouv/eslint-config-react"] -} + "extends": ["@socialgouv/eslint-config-react"], + "rules": { + "prettier/prettier": ["error",{ + "endOfLine": "auto"} + ] + + } + +} \ No newline at end of file diff --git a/src/client/package.json b/src/client/package.json index f2adad674..b03d81788 100644 --- a/src/client/package.json +++ b/src/client/package.json @@ -11,6 +11,7 @@ "@fortawesome/free-solid-svg-icons": "^5.12.1", "@fortawesome/react-fontawesome": "^0.1.9", "@sentry/browser": "^5.14.2", + "@socialgouv/codes-naf": "^1.1.0", "OhMyCache": "^1.1.1", "axios": "^0.19.2", "bulma": "^0.9.0", diff --git a/src/client/src/assets/img/FCE.svg b/src/client/src/assets/img/FCE.svg new file mode 100644 index 000000000..2a6c88b5b --- /dev/null +++ b/src/client/src/assets/img/FCE.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/client/src/assets/img/Footer_Logo.svg b/src/client/src/assets/img/Footer_Logo.svg new file mode 100644 index 000000000..db0ab47b2 --- /dev/null +++ b/src/client/src/assets/img/Footer_Logo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/client/src/assets/img/GouvernementSVG.svg b/src/client/src/assets/img/GouvernementSVG.svg new file mode 100644 index 000000000..54a5a63ba --- /dev/null +++ b/src/client/src/assets/img/GouvernementSVG.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/client/src/components/App/App.js b/src/client/src/components/App/App.js index e98993c8e..6ae2f5523 100644 --- a/src/client/src/components/App/App.js +++ b/src/client/src/components/App/App.js @@ -12,10 +12,11 @@ import { Error403, Error404 } from "../../components/Errors"; import IEChecker from "../../components/IEChecker"; import Enterprise from "../../containers/Enterprise"; import LegacyEtablissement from "../../containers/Enterprise/LegacyEtablissement"; +import ListEtablissements from "../../containers/Enterprise/ListEtablissements.jsx"; import Login from "../../containers/Login"; import PublicPage from "../../containers/PublicPage"; import Search from "../../containers/Search"; -import UnsubscribePage from "../../containers/UnsubscribePage"; +// import UnsubscribePage from "../../containers/UnsubscribePage"; import SetMatomo from "../../helpers/Matomo/SetMatomo"; import Config from "../../services/Config"; import { apolloClient } from "../../services/GraphQL/GraphQL"; @@ -52,7 +53,7 @@ const App = () => {
- ( @@ -60,7 +61,7 @@ const App = () => { )} - /> + /> */} {isActiveMaintenanceMode ? ( @@ -83,11 +84,19 @@ const App = () => { exact path="/enterprise/:siren" component={Enterprise} + isEntrepriseDisplayed /> + { + const location = useLocation(); + const invalidPaths = [ + "", + "/", + "/search", + "/a-propos", + "/faq", + "/aide", + "/sources-des-donnees", + "/statistics", + "/mentions-legales", + "/politique-de-confidentialite", + ]; + + if (invalidPaths.includes(location.pathname)) return null; + return ( +
+
+ Recherche + +
+
+ Liste établissements + +
+ {!location.pathname.includes("list-establishments") && ( +
+ + {location.pathname.includes("establishment") + ? "Fiche établissement" + : location.pathname.includes("entreprise") && "Fiche entreprise"} + +
+ )} +
+ ); +}; + +export default Breadcrumbs; diff --git a/src/client/src/components/App/Breadcrumbs/Breadcrumbs.scss b/src/client/src/components/App/Breadcrumbs/Breadcrumbs.scss new file mode 100644 index 000000000..33bf2c31a --- /dev/null +++ b/src/client/src/components/App/Breadcrumbs/Breadcrumbs.scss @@ -0,0 +1,36 @@ +@import "../../App/variables"; + +.breadcrumbs { + display: flex; + flex-wrap: wrap; + color: $grey-tundora !important; + background-color: $white; + padding: 1px 24px 1px 24px; + min-height: 45px; + flex-direction: row; + align-items: center; + justify-content: flex-start; + font-size: $font-size-small !important; + line-height: 1.25rem !important; + font-family: $marianne; + a { + color: $footer-link !important; + text-decoration: underline; + + &:hover { + color: $dark-blue !important; + } + } + svg { + margin-left: 10px; + } + + & > * { + display: inline-block; + margin-right: 10px; + } + + .crumb:last-child:after { + display: none; + } +} diff --git a/src/client/src/components/App/Footer/Footer.js b/src/client/src/components/App/Footer/Footer.js index 089a9b1d0..18af53efc 100644 --- a/src/client/src/components/App/Footer/Footer.js +++ b/src/client/src/components/App/Footer/Footer.js @@ -3,8 +3,9 @@ import "./footer.scss"; import React, { useEffect, useState } from "react"; import { Link } from "react-router-dom"; -import mariane from "../../../assets/img/logo_gouv.png"; +import Logo from "../../../assets/img/Footer_Logo.svg"; import Config from "../../../services/Config"; +import HeaderLogo from "../Logo/Logo.jsx"; const Footer = () => { const [communicationKitLink, setCommunicationKitLink] = useState(null); @@ -24,8 +25,21 @@ const Footer = () => { }, []); return ( - + + ); }; diff --git a/src/client/src/components/App/Footer/footer.scss b/src/client/src/components/App/Footer/footer.scss index e4f2f14a9..e9c05bbe8 100644 --- a/src/client/src/components/App/Footer/footer.scss +++ b/src/client/src/components/App/Footer/footer.scss @@ -4,101 +4,70 @@ .app { .footer { padding: 0; - background-color: $footer-bg; + background-color: $white; + box-shadow: 0 -1px 0 0 $dark-blue; + + &-row:not(:first-of-type) { + border-left: 1px solid $footer-link; + padding-left: 1.5rem; + } .container { display: flex; - flex-direction: column; - justify-content: space-between; - padding: $spacing-4 $padding-app-x; - - @include from($tablet) { - flex-direction: row; - } + flex-direction: column !important; } &__gouv { display: flex; - flex-direction: column; - - @include from($tablet) { - align-items: flex-start; - } - } - - &__gouv-text { - margin-top: $spacing-4; - padding-bottom: $spacing-2; - font-family: $segoe; - font-style: italic; - text-align: left; - - @include from($tablet) { - max-width: 16rem; - margin-top: 0; - text-align: right; + flex-direction: row !important; + padding: 1rem 4.25rem; + @media (max-width: 600px) { + padding: $spacing-1; } + } - &__gouv-logo { - width: 80px; background: #fff; - - @include from($tablet) { - width: 100px; - margin-left: auto; - padding: $spacing-1; - } } &__links { + display: flex; + padding: 1rem 7.5rem; + align-items: flex-start; + flex-flow: row wrap; + gap: 1rem; + color: $footer-link !important; + font-size: $font-size-small !important; + line-height: 1.25rem !important; + font-family: $marianne; + @media (max-width: 600px) { + padding: $spacing-3; + } a { - color: $footer-link; - transition: color 0.3s; + color: $footer-link !important; &:hover { - color: $primary; + color: $dark-blue !important; + text-decoration: underline !important; + text-underline-offset: 2px; } } &-row { display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1rem; + height: 1rem; } - &-row:not(:last-of-type) { - margin-bottom: $spacing-2; - } - - &-item:not(:last-of-type)::after { - content: "\2022"; - margin: 0 $spacing-4; - } - - &-row:last-of-type { - display: block; - - .footer__links-item:first-of-type { - margin-bottom: $spacing-2; - - &::after { - content: none; - } - } - } - - @media (min-width: 1024px) { - &-row:last-of-type { - display: flex; - - .footer__links-item:first-of-type { - margin-bottom: 0; - - &::after { - content: "\2022"; - } - } - } + &-row:not(:first-of-type) { + box-shadow: -1px 0 0 0 $default-grey; + padding-left: 1rem; } } } + .second-footer { + box-shadow: 0 -1px 0 0 $default-grey !important; + } } diff --git a/src/client/src/components/App/Header/Header.js b/src/client/src/components/App/Header/Header.js index f877216e6..d7f7ca56d 100644 --- a/src/client/src/components/App/Header/Header.js +++ b/src/client/src/components/App/Header/Header.js @@ -1,27 +1,24 @@ import "./header.scss"; -import { - faChevronLeft, - faInfoCircle, - faPlus, -} from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import PropTypes from "prop-types"; import React from "react"; import { connect } from "react-redux"; import { withRouter } from "react-router"; import { Link } from "react-router-dom"; -import logo from "../../../assets/img/logo_gouv-65w38h.png"; -import Config from "../../../services/Config"; +import LogoFCE from "../../../assets/img/FCE.svg"; +import Logo from "../../../assets/img/Footer_Logo.svg"; import { resetSearch } from "../../../services/Store/actions"; +import MessageIcon from "../../shared/Icons/MessageIcon.jsx"; +import Tooltip from "../../shared/Tooltip/Tooltip.jsx"; +import HeaderLogo from "../Logo/Logo.jsx"; -const Header = ({ resetSearch, location, showBetaMessage }) => { +const Header = ({ resetSearch, hasSharedButton = false }) => { return ( -
-
-
+ ); }; EnterpriseHeader.propTypes = { enterprise: PropTypes.object.isRequired, history: PropTypes.object.isRequired, - resetSearch: PropTypes.func.isRequired, - setSearchFilters: PropTypes.func.isRequired, - setSearchTerm: PropTypes.func.isRequired, }; const mapDispatchToProps = (dispatch) => { diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Helps.js b/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Helps.js index 4c5766c87..26cf2fc5e 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Helps.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Helps.js @@ -1,25 +1,27 @@ -import { faMedkit } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import PropTypes from "prop-types"; -import React from "react"; +import React, { useState } from "react"; +import BlocTitle from "../../SharedComponents/BlocTitle/BlocTitle.jsx"; import Apprentissage from "./Subcategory/Apprentissage"; import PlanDeRelance from "./Subcategory/PlanDeRelance"; const Helps = ({ enterprise }) => { + const [accordionOpen, setAccordionOpen] = useState(true); + return ( -
-
- - - -

Aides

-
+
+ setAccordionOpen(!accordionOpen)} + text={"Aides"} + /> -
- - -
+ {accordionOpen && ( +
+ + +
+ )}
); }; diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Subcategory/Apprentissage.js b/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Subcategory/Apprentissage.js index 42ce04b1c..cf8cf1ce6 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Subcategory/Apprentissage.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Subcategory/Apprentissage.js @@ -14,12 +14,13 @@ import { getCodePostal, getSiret, getState, + isActive, } from "../../../../../../utils/establishment/establishment"; +import BadgeWithIcon from "../../../../../shared/Badge/BadgeWithIcon.jsx"; import Data from "../../../SharedComponents/Data"; +import NonBorderedTable from "../../../SharedComponents/NonBorderedTable/NonBorderedTable"; import SeeDetailsLink from "../../../SharedComponents/SeeDetailsLink"; -import State from "../../../SharedComponents/State"; import Subcategory from "../../../SharedComponents/Subcategory"; -import Table from "../../../SharedComponents/Table"; import { useApprentissageBySiren } from "./Apprentissage.gql"; const Apprentissage = ({ entreprise: { siren } }) => { @@ -45,46 +46,62 @@ const Apprentissage = ({ entreprise: { siren } }) => { value={hasApprentissage} columnClasses={["is-7", "is-5"]} sourceSi="Ari@ne" + className="has-no-border" /> {hasApprentissage && ( - - - - - - - - - - - {formattedApprentissage.map((apprentissage) => { - const etablissement = apprentissage.etablissement; - const etat = getState(etablissement); - const codePostal = getCodePostal(etablissement); - const localite = getCity(etablissement); - const siret = getSiret(etablissement); +
+ 6}> +
+ + + + + + + + + {formattedApprentissage?.map((apprentissage) => { + const etablissement = apprentissage.etablissement; + const etat = getState(etablissement); + const etab = etablissement; + const isEtablissementActive = isActive(etab); + const stateClass = isEtablissementActive + ? "icon--success" + : "icon--danger"; + const stateText = isEtablissementActive ? "ouvert" : "fermé"; + const codePostal = getCodePostal(etablissement); + const localite = getCity(etablissement); + const siret = getSiret(etablissement); - return ( - - - - - - - - ); - })} - -
SiretÉtatCommuneNombre de contrats -
SiretÉtatCommuneNombre de contrats
{formatSiret(siret)} - {etat && } - {`${codePostal ? codePostal : ""} ${ - localite ? localite : "" - }`} - {getEstablishmentSignedCount(apprentissage)} - - -
+ return ( + + + + + + {etat && ( + + )} + + {`${codePostal ? codePostal : ""} ${ + localite ? localite : "" + }`} + + {getEstablishmentSignedCount(apprentissage)} + + + ); + })} + + +
)} diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Subcategory/PlanDeRelance.js b/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Subcategory/PlanDeRelance.js index 3d56758d2..da5c5c532 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Subcategory/PlanDeRelance.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Helps/Subcategory/PlanDeRelance.js @@ -3,8 +3,8 @@ import React from "react"; import { renderIfSiren } from "../../../../../../helpers/hoc/renderIfSiren"; import Data from "../../../SharedComponents/Data"; +import NonBorderedTable from "../../../SharedComponents/NonBorderedTable/NonBorderedTable"; import Subcategory from "../../../SharedComponents/Subcategory"; -import Table from "../../../SharedComponents/Table/Table"; import { usePlanRelanceBySiren } from "./PlanDeRelance.gql"; const PlanDeRelance = ({ entreprise: { siren } }) => { @@ -22,29 +22,35 @@ const PlanDeRelance = ({ entreprise: { siren } }) => { <> {planRelanceData?.length > 0 && ( - - - - - - - - - {planRelanceData.map(({ mesure, date }) => { - return ( - - - - - ); - })} - -
DateMesure
{date}{mesure}
+
+ 6}> + + + Date + Mesure + + + + {planRelanceData.map(({ mesure, date }) => { + return ( + + {date} + {mesure} + + ); + })} + + +
)} {!planRelanceData || (planRelanceData.length === 0 && ( - + ))}
diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/EffectifGraph.js b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/EffectifGraph.js index 83cf616b5..837bd49ff 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/EffectifGraph.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/EffectifGraph.js @@ -12,17 +12,14 @@ const EffectifGraph = ({ chartData }) => { return { datasets: [ { - backgroundColor: "#2980b9", - borderColor: "#2980b9", - borderWidth: 3, + backgroundColor: "#000091", + borderColor: "#000091", + borderWidth: 2, data: chartData?.map((obj) => obj?.effectif !== 0 ? obj?.effectif : null ), - label: "Effectif ETP", - pointBackgroundColor: "white", - pointBorderWidth: 1, tension: 0.3, }, @@ -38,11 +35,22 @@ const EffectifGraph = ({ chartData }) => { plugins: { legend: { - position: "top", + display: false, }, title: { - display: false, - text: "Chart.js Line Chart", + color: "#0063CB", + display: true, + font: { + family: "Marianne, sans-serif", + size: 14, + + weight: 700, + }, + padding: { + bottom: 30, + top: 5, + }, + text: "Effectif ETP", }, }, @@ -51,9 +59,20 @@ const EffectifGraph = ({ chartData }) => { scales: { x: { border: { display: false }, + grid: { + borderColor: "white", + color: "white", + }, + ticks: { color: "#7C8DB5 " }, }, + y: { border: { display: false }, + grid: { + borderColor: "#E6EDFF", + color: "#E6EDFF", + }, + ticks: { color: "#7C8DB5" }, }, }, }; diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Effectis.jsx b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Effectis.jsx new file mode 100644 index 000000000..e34463cf7 --- /dev/null +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Effectis.jsx @@ -0,0 +1,152 @@ +import PropTypes from "prop-types"; +import React, { useState } from "react"; +import Toggle from "react-toggle"; + +import AllEffectifsEtpButton from "../../../../../containers/AllEffectifsEtpButton/AllEffectifsEtpButton"; +import { + getDateMonthName, + getDateYear, + sortByPeriode, +} from "../../../../../helpers/Date"; +import { renderIfSiren } from "../../../../../helpers/hoc/renderIfSiren"; +import LoadableContent from "../../../../shared/LoadableContent/LoadableContent"; +import Value from "../../../../shared/Value"; +import Data from "../../SharedComponents/Data"; +import NonBorderedTable from "../../SharedComponents/NonBorderedTable/NonBorderedTable"; +import EffectifGraph from "./EffectifGraph"; +import { useEffectifsMensuels } from "./EnterpriseInfos.gql"; + +const MIN_EFFECTIFS_MENSUELS = 1; +const MAX_EFFECTIFS_MENSUELS = 24; +const Effectis = ({ siren }) => { + const [effectifsMensuelsLimit, setEffectifsMensuelsLimit] = useState( + MIN_EFFECTIFS_MENSUELS + ); + const [displayTable, setDisplayTable] = useState(false); + + const { + data: effectifsMensuels, + loading: effectifsMensuelsLoading, + error: effectifsMensuelsError, + } = useEffectifsMensuels(siren, effectifsMensuelsLimit); + const handleChange = (event) => { + setDisplayTable(event.target.checked); + }; + if (!effectifsMensuels || effectifsMensuels.length == 0) { + return ( + + ); + } + const EffectifEtpDataComponents = + effectifsMensuels.length > 0 ? ( + + ) : ( + + ); + + return ( + + <> + {EffectifEtpDataComponents} + + {effectifsMensuelsLimit === MIN_EFFECTIFS_MENSUELS && + effectifsMensuels?.length >= 1 && ( + setEffectifsMensuelsLimit(MAX_EFFECTIFS_MENSUELS)} + /> + )} + {effectifsMensuelsLimit === MAX_EFFECTIFS_MENSUELS && ( + setEffectifsMensuelsLimit(MIN_EFFECTIFS_MENSUELS)} + /> + )} + + + {!effectifsMensuelsLoading && + effectifsMensuelsLimit === MAX_EFFECTIFS_MENSUELS && ( + <> +
+ + +
+ {displayTable && ( +
+ + + + Date + Effectif + + + + {effectifsMensuels?.map?.((effectif) => ( + + + + + + + + + ))} + + +
+ )} + {!displayTable && effectifsMensuels && ( +
+ +
+ )} + + )} +
+ ); +}; + +Effectis.propTypes = { + siren: PropTypes.string.isRequired, +}; + +export default renderIfSiren(Effectis); diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/EnterpriseInfos.js b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/EnterpriseInfos.js index 81c99ee1d..1845755ef 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/EnterpriseInfos.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/EnterpriseInfos.js @@ -1,17 +1,8 @@ -import { faHistory } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { merge } from "lodash"; import PropTypes from "prop-types"; import React, { useMemo, useState } from "react"; -import Toggle from "react-toggle"; -import AllEffectifsEtpButton from "../../../../../containers/AllEffectifsEtpButton"; import Association from "../../../../../containers/Association/Association"; -import { - getDateMonthName, - getDateYear, - sortByPeriode, -} from "../../../../../helpers/Date"; import { formatSiret, formatTva } from "../../../../../helpers/utils"; import Config from "../../../../../services/Config"; import { @@ -31,13 +22,11 @@ import { } from "../../../../../utils/entreprise/entreprise"; import { getSiret } from "../../../../../utils/establishment/establishment"; import LoadableContent from "../../../../shared/LoadableContent/LoadableContent"; -import Value from "../../../../shared/Value"; +import BlocTitle from "../../SharedComponents/BlocTitle/BlocTitle.jsx"; import Data from "../../SharedComponents/Data"; import Subcategory from "../../SharedComponents/Subcategory"; -import Table from "../../SharedComponents/Table/Table"; -import EffectifGraph from "./EffectifGraph"; +import Effectis from "./Effectis.jsx"; import { - useEffectifsMensuels, useEffectifsPhysique, useExtraitsRcsInfogreffe, useMandataireInfos, @@ -47,14 +36,8 @@ import Finances from "./Finances"; import Mandataires from "./Mandataires"; import ObservationRCS from "./ObservationRCS"; -const MIN_EFFECTIFS_MENSUELS = 1; -const MAX_EFFECTIFS_MENSUELS = 24; - const EnterpriseInfos = ({ enterprise: baseEntreprise }) => { - const [effectifsMensuelsLimit, setEffectifsMensuelsLimit] = useState( - MIN_EFFECTIFS_MENSUELS - ); - const [displayTable, setDisplayTable] = useState(false); + const [accordionOpen, setAccordionOpen] = useState(true); const siren = getSiren(baseEntreprise); @@ -65,11 +48,7 @@ const EnterpriseInfos = ({ enterprise: baseEntreprise }) => { getSiren(baseEntreprise) ); const { data: mandataires } = useMandataireInfos(getSiren(baseEntreprise)); - const { - data: effectifsMensuels, - loading: effectifsMensuelsLoading, - error: effectifsMensuelsError, - } = useEffectifsMensuels(siren, effectifsMensuelsLimit); + const { data: effectifsPhysique, loading: effectifsPhysiqueLoading, @@ -89,216 +68,137 @@ const EnterpriseInfos = ({ enterprise: baseEntreprise }) => { const activeEstablishmentCount = getActiveEtablissementsCount(enterprise); const trancheEffectifs = getTrancheEffectifs(enterprise); - const handleChange = (event) => { - setDisplayTable(event.target.checked); - }; - - const EffectifEtpDataComponents = effectifsMensuels?.length ? ( - effectifsMensuels.map(({ periode_concerne, effectif }) => ( - - )) - ) : ( - - ); - const siegeSocial = getSiegeSocial(enterprise); const nafCode = getNafCode(enterprise); const nafLabel = getNafLabel(enterprise); return ( -
-
- - - -

Informations légales sur l’entreprise

-
-
- - - - - - + setAccordionOpen(!accordionOpen)} + text={"Informations légales sur l’entreprise"} + /> + + {accordionOpen && ( +
+ + + + + + - - - + establishmentCount - activeEstablishmentCount + } fermé(s)`} + className="has-no-border" + /> + - - - {effectifsMensuelsLimit === MIN_EFFECTIFS_MENSUELS && - EffectifEtpDataComponents} - {effectifsMensuelsLimit === MAX_EFFECTIFS_MENSUELS && ( - -
- - {!displayTable - ? " Afficher Tableau " - : " Afficher graphique "} - - -
- {displayTable && ( - <> - - - - - - - - - {effectifsMensuels?.map?.((effectif) => ( - - - - - ))} - -
DateEffectif
- - - -
- - )} - {!displayTable && effectifsMensuels && ( - - )} - - setEffectifsMensuelsLimit(MIN_EFFECTIFS_MENSUELS) - } - /> -
- )} -
- {effectifsMensuels?.length >= 1 && - effectifsMensuelsLimit === MIN_EFFECTIFS_MENSUELS && ( - - setEffectifsMensuelsLimit(MAX_EFFECTIFS_MENSUELS) - } + + - )}{" "} -
+ + + - -
- - Informations d'immatriculation (contenues dans un extrait - Kbis/D1) - {" "} - : consulter le(s) justificatif(s) sur{" "} - - annuaire entreprise - -
-
- À partir de novembre 2021, les entreprises immatriculées au RCS ou - au RNM n'ont plus à fournir leur extrait Kbis/D1 dans leurs - démarches administratives -
Décrets du 21 mai 2021 n°2021-631 et 2021-632 -
+ +
+ + Informations d'immatriculation (contenues dans un extrait + Kbis/D1) : consulter le(s) justificatif(s) sur{" "} + + annuaire entreprise + + +
+
+ À partir de novembre 2021, les entreprises immatriculées au RCS ou + au RNM n'ont plus à fournir leur extrait Kbis/D1 dans leurs + démarches administratives +
Décrets du 21 mai 2021 n°2021-631 et 2021-632 +
- + - {getRcsObservations(enterprise) && ( - - )} + {getRcsObservations(enterprise) && ( + + )} - - -
- - - - - - -
+ + +
+ + + + + + +
+ )}
); }; diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/Finances.js b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/Finances.js index 3e6befc76..e51b0e4d4 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/Finances.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/Finances.js @@ -16,7 +16,7 @@ import { } from "../../../../../../utils/donnees-ecofi/donnees-ecofi"; import LoadSpinner from "../../../../../shared/LoadSpinner"; import Value from "../../../../../shared/Value"; -import Table from "../../../SharedComponents/Table"; +import NonBorderedTable from "../../../SharedComponents/NonBorderedTable/NonBorderedTable"; import { useFinanceData, useFinanceDataApiEntreprise } from "./Finances.gql"; import FinancesGraph from "./FinancesGraph"; @@ -116,7 +116,7 @@ const Finances = ({ siret, siren }) => { datesApi = donneesEcofiApi?.map((donneeEcofi) => { return ( @@ -126,7 +126,7 @@ const Finances = ({ siret, siren }) => { caListApi = donneesEcofiApi?.map((donneeEcofi) => { return ( { return ( <> {hasBilan_K && ( - <> + Cette entreprise déclare un bilan consolidé, voir sur{" "} { > l’Annuaire des Entreprises - + )} {donneesEcofiBce?.length > 0 ? ( <> - - - - - {dates} - - - - - - {caList} - - - - {margeBrute} - - - - {EBE} - - - - {resultExploi} - - - - {resultats} - - -
Date fin exercice
Chiffre d{"'"}affaires (€)
Marge brute (€)
EBE (€)
{`Résultat d'exploitation (€)`}
Résultat net (€)
- +
+ + + + Date fin exercice + {dates} + + + + + Chiffre d{"'"}affaires (€) + {caList} + + + Marge brute (€) + {margeBrute} + + + EBITDA-EBE (€) + {EBE} + + + {`Résultat d'exploitation (€)`} + {resultExploi} + + + Résultat net (€) + {resultats} + + + +
+
+ +
) : donneesEcofiBce.length === 0 && donneesEcofiApi ? ( <> - - - - - {datesApi} - - - - - - {caListApi} - - -
Date fin exercice
Chiffre d{"'"}affaires (€)
- +
+ + + + Date fin exercice + {datesApi} + + + + + Chiffre d{"'"}affaires (€) + {caListApi} + + + +
+
+ +
) : (

diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/FinancesGraph.js b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/FinancesGraph.js index 29fd671f0..647e2cf42 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/FinancesGraph.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/FinancesGraph.js @@ -2,12 +2,16 @@ import PropTypes from "prop-types"; import React, { useEffect, useRef, useState } from "react"; import { Line } from "react-chartjs-2"; -import { setYearMonthFormat } from "../../../../../../helpers/Date"; +import { + setYearFormat, + setYearMonthFormat, +} from "../../../../../../helpers/Date"; import { formatChiffre, sortedApiDataAsc, sortedDataAsc, } from "../../../../../../utils/donnees-ecofi/donnees-ecofi"; +import EllipseIcon from "../../../../../shared/Icons/EllipseIcon.jsx"; function FinancesGraph({ data = [], isDataApi = false }) { const chartCanvasRef = useRef(null); @@ -58,19 +62,19 @@ function FinancesGraph({ data = [], isDataApi = false }) { ? [ { backgroundColor: "#FCF3CF", - borderColor: "#F4D03F", + borderColor: "#FF9500", label: "Chiffre d'affaires ", }, ] : [ { backgroundColor: "#85C1E9", - borderColor: "#3498DB", + borderColor: "#000091", label: "EBE ", }, { backgroundColor: "#FCF3CF", - borderColor: "#F4D03F", + borderColor: "#FF9500", label: "Chiffre d'affaires ", }, { @@ -81,13 +85,13 @@ function FinancesGraph({ data = [], isDataApi = false }) { }, { backgroundColor: "#F1948A", - borderColor: "#B71C1C", + borderColor: "#E1000F", borderWidth: 2.5, label: "Résultat net ", }, { backgroundColor: "#BB8FCE", - borderColor: "#5B2C6F", + borderColor: "rgb(155, 25, 245", borderWidth: 2.5, label: "Marge brute ", }, @@ -97,7 +101,7 @@ function FinancesGraph({ data = [], isDataApi = false }) { datasets: [ { backgroundColor: "#FCF3CF", - borderColor: "#F4D03F", + borderColor: "#FF9500", borderWidth: 2.5, data: sortedApiDataAsc(data)?.map(({ data }) => data?.ca), label: "Chiffre d'affaires ", @@ -114,7 +118,7 @@ function FinancesGraph({ data = [], isDataApi = false }) { datasets: [ { backgroundColor: "#85C1E9", - borderColor: "#3498DB", + borderColor: "#000091", borderWidth: 2.5, data: sortedDataAsc(data)?.map(({ EBE }) => EBE), fill: false, @@ -125,7 +129,7 @@ function FinancesGraph({ data = [], isDataApi = false }) { }, { backgroundColor: "#FCF3CF", - borderColor: "#F4D03F", + borderColor: "#FF9500", borderWidth: 2.5, data: sortedDataAsc(data)?.map(({ ca }) => ca), label: "Chiffre d'affaires ", @@ -145,7 +149,7 @@ function FinancesGraph({ data = [], isDataApi = false }) { }, { backgroundColor: "#F1948A", - borderColor: "#B71C1C", + borderColor: "#E1000F", borderWidth: 2.5, data: sortedDataAsc(data)?.map(({ Resultat_net }) => Resultat_net), label: "Résultat net ", @@ -155,7 +159,7 @@ function FinancesGraph({ data = [], isDataApi = false }) { }, { backgroundColor: "#BB8FCE", - borderColor: "#5B2C6F", + borderColor: "rgb(155, 25, 245", borderWidth: 2.5, data: sortedDataAsc(data)?.map(({ Marge_brute }) => Marge_brute), label: "Marge brute ", @@ -165,7 +169,7 @@ function FinancesGraph({ data = [], isDataApi = false }) { }, ], labels: sortedDataAsc(data)?.map(({ date_fin_exercice }) => - setYearMonthFormat(date_fin_exercice) + setYearFormat(date_fin_exercice) ), }; const options = { @@ -174,14 +178,13 @@ function FinancesGraph({ data = [], isDataApi = false }) { mode: "index", }, maintainAspectRatio: false, - plugins: { legend: { display: false, position: "bottom", }, title: { - display: true, + display: false, text: "Données financières", }, tooltip: { @@ -190,7 +193,7 @@ function FinancesGraph({ data = [], isDataApi = false }) { const label = tooltipItem.dataset.label || ""; return ( label + - "(€) :" + + "€:" + " " + formatChiffre(tooltipItem.parsed.y.toString()).toString() ); @@ -205,17 +208,29 @@ function FinancesGraph({ data = [], isDataApi = false }) { }, }, }, + responsive: true, scales: { x: { - border: { display: true }, + border: { display: false }, + grid: { + borderColor: "white", + color: "white", + }, + ticks: { color: "#7C8DB5 " }, }, y: { + border: { display: false }, + grid: { + borderColor: "#E6EDFF", + color: "#E6EDFF", + }, ticks: { callback: (label) => { - return formatChiffre(label.toString()) + "(€)"; + return formatChiffre(label.toString()) + " €"; }, + color: "#7C8DB5", }, }, }, @@ -224,33 +239,51 @@ function FinancesGraph({ data = [], isDataApi = false }) { return (

{data?.length > 0 && ( -
+ <> {!isDataApi && ( -
- {datasets.map(({ label, borderColor }) => ( -
- - - -
- ))} +
+ {datasets.map( + ({ label, borderColor }) => + datasetsToDisplay.includes(label) && ( +
+ + +
+ ) + )}
)} -
- + +
+ {!isDataApi && ( +
+ Afficher la courbe : + {datasets.map(({ label }) => ( +
+ + +
+ ))} +
+ )} +
+ +
-
+ )}
); diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/finances.scss b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/finances.scss index d405c6ca0..dc514cebf 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/finances.scss +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Finances/finances.scss @@ -4,52 +4,120 @@ $border-color: var(--border-color); .enterprise-finances { &__not-available { margin-top: $spacing-2; + font-family: $marianne; + font-size: 0.875rem; + font-style: normal; + font-weight: 500; + line-height: 1.5rem; + color: $dark-grey; } } .chart-wrapper { position: relative; - display: grid; - gap: 1em; - grid-template-rows: 1fr; - grid-template-columns: 1fr; - height: 250px; + display: flex; + min-height: 17.625rem; + flex-wrap: wrap; width: 100%; - margin: 1em; + margin: 1em 0 !important; + border-radius: 0.75rem; + border: 1px solid #e6edff; + padding: 1rem; + @media print { + width: 100% !important; + border: none; + margin: 0 !important; + height: 100% !important; + } + .chart-graph { + flex: 1; + width: 100% !important; + @media (max-width: 600px) { + border: none; + padding: 0; + width: 100%; + } + @media print { + height: 80% !important; + margin: 0 !important; + padding: 0 !important; + } + } +} +.horizontal-chart-legend { + font-size: 0.7rem; + font-weight: 400; + display: flex !important; + flex-direction: row !important; + flex-wrap: wrap; + + gap: $spacing-4; + color: #000; + font-family: $marianne; + div { + margin-bottom: 5px; + display: flex; + align-items: center; + + label { + margin-left: 5px; + } + } } .finance-chart-wrapper { position: relative; - display: grid; - grid-template-rows: 1fr; - grid-template-columns: 1fr 80%; - height: 250px; + display: flex; + flex-wrap: wrap; + flex: 1; + min-height: 17.625rem; + width: 100%; + @media print { + height: 300px !important; + width: 100% !important; + margin: 1rem !important; + } .chart-legend { - font-size: 0.7rem; - font-weight: 600; + flex: 1 3; + font-size: $font-size-base-small; + font-weight: 400; display: flex; flex-direction: column; - margin-top: 1.5rem; + color: $title-grey; + @media print { + display: none !important; + } div { margin-bottom: 5px; - span { - background-color: $border-color !important; - width: 0.7em; - height: 0.7em; - margin-left: 4px; - transform: rotate(45deg); - } display: flex; + gap: $spacing-2; align-items: center; input[type="checkbox"] { box-sizing: border-box; - padding: 0; - accent-color: $primary !important; - } - label { - margin-left: 5px; + padding: $spacing-4 0 !important; + accent-color: $dark-blue !important; + width: 20px !important; + height: 20px !important; } } } + .chart-graph { + flex: 3 1; + flex-basis: 3; + width: 100% !important; + border-radius: 0.75rem; + border: 1px solid #e6edff; + padding: 1rem; + @media (max-width: 600px) { + border: none; + padding: 0; + width: 100%; + } + @media print { + height: 80% !important; + margin: 0 !important; + padding: 0 !important; + } + } } diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Mandataires/Mandataires.js b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Mandataires/Mandataires.js index 241b8ea9d..4b9472072 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Mandataires/Mandataires.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Mandataires/Mandataires.js @@ -5,30 +5,32 @@ import React from "react"; import { formatUpperCase } from "../../../../../../utils/entreprise/entreprise"; import Value from "../../../../../shared/Value"; -import Table from "../../../SharedComponents/Table"; +import NonBorderedTable from "../../../SharedComponents/NonBorderedTable/NonBorderedTable"; const Mandataires = ({ mandataires }) => { return mandataires && mandataires.length ? ( - - - - - - - - - {mandataires?.map((mandataire, index) => ( - - - +
+ 7}> +
+ + + - ))} - -
FonctionNom ou raison sociale
- - - -
FonctionNom ou raison sociale
+ + + {mandataires?.map((mandataire, index) => ( + + + + + + + + + ))} + + +
) : (

Aucun mandataire n{"'"}a été trouvé diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Mandataires/enterprise-mandataires.scss b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Mandataires/enterprise-mandataires.scss index 8eecb513f..ece62b29c 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Mandataires/enterprise-mandataires.scss +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/Mandataires/enterprise-mandataires.scss @@ -5,5 +5,11 @@ &__not-found { padding-top: $spacing-2; + font-family: $marianne; + font-size: 0.875rem; + font-style: normal; + font-weight: 500; + line-height: 1.5rem; + color: $dark-grey; } } diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/ObservationRCS/ObservationRCS.js b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/ObservationRCS/ObservationRCS.js index 1f4efa2ad..5a5e19aca 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/ObservationRCS/ObservationRCS.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/ObservationRCS/ObservationRCS.js @@ -19,12 +19,13 @@ const ObservationRCS = ({ observations }) => { return ( +

    {displayedObservations.map(({ date, libelle }) => (
  • {`${toI18nDate(date)} - ${libelle}`}
  • ))} diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/ObservationRCS/observationsRcs.scss b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/ObservationRCS/observationsRcs.scss index 10e1b0e7a..5cca792d1 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Infos/ObservationRCS/observationsRcs.scss +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Infos/ObservationRCS/observationsRcs.scss @@ -12,7 +12,7 @@ } &__button { - color: $blue; + color: $dark-blue; text-decoration: none; border: 0; background-color: transparent; diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/AccordionTable.js b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/AccordionTable.js index 98fd4467b..274d61afd 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/AccordionTable.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/AccordionTable.js @@ -1,10 +1,5 @@ import "./AccordionTable.scss"; -import { - faChevronCircleDown, - faChevronCircleLeft, -} from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import PropTypes from "prop-types"; import React, { useState } from "react"; @@ -18,6 +13,8 @@ import { getSituationJuridique, getTypeLabel, } from "../../../../../utils/rupco/rupco"; +import ArrowDown from "../../../../shared/Icons/ArrowDown.jsx"; +import ArrowUp from "../../../../shared/Icons/ArrowUp.jsx"; import Value from "../../../../shared/Value"; const AccordionTable = ({ procedure, hasTypeColumn = false }) => { @@ -32,7 +29,7 @@ const AccordionTable = ({ procedure, hasTypeColumn = false }) => { return ( <> - + {hasTypeColumn && ( @@ -41,7 +38,7 @@ const AccordionTable = ({ procedure, hasTypeColumn = false }) => { - + @@ -50,10 +47,10 @@ const AccordionTable = ({ procedure, hasTypeColumn = false }) => { - + - + { tabIndex={0} onKeyDown={onKeyDown} onClick={() => setIsActiveAccordion(!isActiveAccordion)} - className="has-text-right accordion-table__header" + className="accordion-table__header" > - + {isActiveAccordion ? : }
- + {isActiveAccordion && procedure.map( ({ @@ -86,13 +79,13 @@ const AccordionTable = ({ procedure, hasTypeColumn = false }) => { nombre_de_ruptures_de_contrats_en_debut_de_procedure, nombre_de_ruptures_de_contrats_en_fin_de_procedure, }) => ( - + - + {nombre_de_ruptures_de_contrats_en_fin_de_procedure || nombre_de_ruptures_de_contrats_en_debut_de_procedure} - + { @@ -37,11 +38,14 @@ const ActivitePartielle = ({ enterprise: { siren } }) => { name="Nb d'établissements ayant eu recours à l'activité partielle au cours des 24 derniers mois" value={activitePartielle.length} emptyValue="0" - columnClasses={["is-8", "is-4"]} + columnClasses={["is-10", "is-2"]} + className="has-no-border" /> {hasActivitePartielle && ( - <> - +
+ 6} + >
@@ -66,28 +70,34 @@ const ActivitePartielle = ({ enterprise: { siren } }) => { }) => { const etat = getState(etablissement); const categorie = getCategoryLabel(etablissement); + const etab = etablissement; + const isEtablissementActive = isActive(etab); + const stateClass = isEtablissementActive + ? "icon--success" + : "icon--danger"; + const stateText = isEtablissementActive ? "ouvert" : "fermé"; return ( - - + + - ); } @@ -97,15 +107,15 @@ const ActivitePartielle = ({ enterprise: { siren } }) => { {totalActivitePartielle && ( - - + + + - )} -
SIRET
- {formatSiret(siret)} + - {etat && } + {etat && ( + + )} {categorie} - {formatNumber(Math.round(nb_h_auto_cum))} - - {formatNumber(Math.round(nb_h_conso_cum))} - {formatNumber(Math.round(nb_h_auto_cum))}{formatNumber(Math.round(nb_h_conso_cum))} {} - -
- Totaux - + Totaux {formatNumber( Math.round(totalActivitePartielle.nb_h_auto_cum) )} + {formatNumber( Math.round(totalActivitePartielle.nb_h_conso_cum) )} @@ -114,8 +124,8 @@ const ActivitePartielle = ({ enterprise: { siren } }) => {
- + + )} ); diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/EnterpriseMuteco.js b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/EnterpriseMuteco.js index 966a4b4ba..6ea000c29 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/EnterpriseMuteco.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/EnterpriseMuteco.js @@ -1,28 +1,31 @@ -import { faUmbrella } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import PropTypes from "prop-types"; -import React from "react"; +import React, { useState } from "react"; +import BlocTitle from "../../SharedComponents/BlocTitle/BlocTitle.jsx"; import ActivitePartielle from "./ActivitePartielle"; import Lice from "./Lice"; import Pse from "./Pse"; import Rcc from "./Rcc"; const EnterpriseMuteco = ({ enterprise }) => { + const [accordionOpen, setAccordionOpen] = useState(true); + return ( -
-
- - - -

Mutations Economiques

-
-
- - - - -
+
+ setAccordionOpen(!accordionOpen)} + text={"Mutations Economiques"} + /> + + {accordionOpen && ( +
+ + + + +
+ )}
); }; diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Lice.js b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Lice.js index 2c4e447d5..b5c0133c5 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Lice.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Lice.js @@ -21,6 +21,7 @@ const Lice = ({ entreprise }) => { {hasLice && } diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Pse.js b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Pse.js index 2a1cb7daa..90dd50e5a 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Pse.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Pse.js @@ -18,6 +18,7 @@ const Pse = ({ entreprise }) => { {hasPse && } diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Rcc.js b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Rcc.js index 6a9ff39f5..d5facb6a5 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Rcc.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/Rcc.js @@ -21,6 +21,7 @@ const Rcc = ({ entreprise }) => { {hasRcc && } diff --git a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/RupcoTable.js b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/RupcoTable.js index c4b0a86c1..c310935ed 100644 --- a/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/RupcoTable.js +++ b/src/client/src/components/DataSheets/Sections/Enterprise/Muteco/RupcoTable.js @@ -3,45 +3,37 @@ import "./RupcoTable.scss"; import PropTypes from "prop-types"; import React from "react"; -import Table from "../../SharedComponents/Table"; +import NonBorderedTable from "../../SharedComponents/NonBorderedTable/NonBorderedTable"; import AccordionTable from "./AccordionTable"; const RupcoTable = ({ list, hasTypeColumn = false }) => ( - - - - {hasTypeColumn && ( - - )} - - - - - - - - - - {list.map((procedure) => ( - - ))} -
Type - Date d{"'"}enregistrement - - Numéro de dossier - État du dossier - Situation juridique de l{"'"}entreprise au moment de la procédure - - Date du jugement - - Nombre maximum de ruptures de contrats de travail envisagées - - Nombre d{"'"}établissements impactés -
+
+ + + + {hasTypeColumn && Type} + Date d{"'"}enregistrement + Numéro de dossier + État du dossier + + Situation juridique de l{"'"}entreprise au moment de la procédure + + + Date du jugement + + Nombre maximum de ruptures de contrats de travail envisagées + Nombre d{"'"}établissements impactés + + + {list.map((procedure) => ( + + ))} + +
); RupcoTable.propTypes = { diff --git a/src/client/src/components/DataSheets/Sections/Establishment/Activity/Activite.js b/src/client/src/components/DataSheets/Sections/Establishment/Activity/Activite.js index 32620397d..135882f2c 100644 --- a/src/client/src/components/DataSheets/Sections/Establishment/Activity/Activite.js +++ b/src/client/src/components/DataSheets/Sections/Establishment/Activity/Activite.js @@ -1,12 +1,11 @@ import "./establishmentActivity.scss"; -import { faHistory } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import PropTypes from "prop-types"; -import React from "react"; +import React, { useState } from "react"; import { renderIfSiret } from "../../../../../helpers/hoc/renderIfSiret"; import LoadableContent from "../../../../shared/LoadableContent/LoadableContent"; +import BlocTitle from "../../SharedComponents/BlocTitle/BlocTitle.jsx"; import Subcategory from "../../SharedComponents/Subcategory"; import { useSuccessionData } from "./Activite.gql"; import EffectifsDsn from "./EffectifsDsn"; @@ -18,40 +17,43 @@ import TrancheEffectifsInsee from "./TrancheEffectifsInsee"; const Activite = ({ siret }) => { const { loading, data, error } = useSuccessionData(siret); + const [accordionOpen, setAccordionOpen] = useState(true); return ( -
-
- - - -

Activité

-
-
- - - {data?.predecesseurs?.length > 0 && ( - - )} - {data?.successeurs?.length > 0 && ( - - )} - - - - - - - - - -
+
+ setAccordionOpen(!accordionOpen)} + text={"Activité"} + /> + + {accordionOpen && ( +
+ + + {data?.predecesseurs?.length > 0 && ( + + )} + {data?.successeurs?.length > 0 && ( + + )} + + + + + + + + + +
+ )}
); }; diff --git a/src/client/src/components/DataSheets/Sections/Establishment/Activity/DeveloppementEconomique.js b/src/client/src/components/DataSheets/Sections/Establishment/Activity/DeveloppementEconomique.js index 0d5481e46..bda1e44b2 100644 --- a/src/client/src/components/DataSheets/Sections/Establishment/Activity/DeveloppementEconomique.js +++ b/src/client/src/components/DataSheets/Sections/Establishment/Activity/DeveloppementEconomique.js @@ -1,3 +1,5 @@ +// Cette fonction affiche les informations de développement économique en fonction d'un numéro de SIRET. +// À SUPPRIMER : Vérifier si cette fonction est toujours utilisée et si elle peut être supprimée en toute sécurité. import PropTypes from "prop-types"; import React from "react"; diff --git a/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsDsn.js b/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsDsn.js index 76a833139..bfca7a8a0 100644 --- a/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsDsn.js +++ b/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsDsn.js @@ -1,3 +1,5 @@ +import "react-toggle/style.css"; + import PropTypes from "prop-types"; import React, { useState } from "react"; import Toggle from "react-toggle"; @@ -7,18 +9,17 @@ import { renderIfSiret } from "../../../../../helpers/hoc/renderIfSiret"; import LoadableContent from "../../../../shared/LoadableContent/LoadableContent"; import Value from "../../../../shared/Value"; import Data from "../../SharedComponents/Data"; -import Subcategory from "../../SharedComponents/Subcategory"; -import Table from "../../SharedComponents/Table"; +import NonBorderedTable from "../../SharedComponents/NonBorderedTable"; import { useDsnEffectif } from "./EffectifsDsn.gql"; import EffectifsGraph from "./EffectifsGraph"; -const EXPANDED_MAX_EFFECTIFS = 12; +const EXPANDED_MAX_EFFECTIFS = 60; const COLLAPSED_MAX_EFFECTIFS = 1; const START_DATE = "2018-01"; const EffectifsDsn = ({ siret }) => { const [isExpanded, setIsExpanded] = useState(false); - const [displayTable, setDisplayTable] = useState(false); + const [displayTable, setDisplayTable] = useState(true); const { loading, @@ -39,6 +40,7 @@ const EffectifsDsn = ({ siret }) => { name={"Effectif physique"} emptyValue="Non disponible" sourceCustom={`Gip-Mds / DSN`} + className="has-no-border" /> ); } @@ -49,121 +51,122 @@ const EffectifsDsn = ({ siret }) => { return ( - {!isExpanded ? ( - <> - + + {!isExpanded && effectifs?.length >= 1 && ( + setIsExpanded(true)} /> - {effectifs?.length >= 1 && ( - setIsExpanded(true)} + )} + {isExpanded && ( + setIsExpanded(false)} + /> + )} + + {!loading && isExpanded && ( + <> +
+ + +
+ {!displayTable && ( +
+ + + + Date + Effectif Total + Homme + Femme + CDD + CDI + Total Interim + + + + {effectifs?.map?.((effectif) => ( + + {effectif?.mois} + + + + + + + + + + + + + + + + + + + + ))} + + +
)} + {displayTable && ( + + )}{" "} - ) : ( - !loading && ( - <> - -
- - - {!displayTable ? " Afficher Tableau" : " Afficher Courbe"} - -
- {displayTable && ( - - - - - - - - - - - - - - {effectifs?.map?.((effectif) => ( - - - - - - - - - - ))} - -
DateEffectif TotalHommeFemmeCDDCDITotal Interim
{effectif?.mois} - - - - - - - - - - - -
- )} -
- {!displayTable && siret && ( - - )}{" "} - {isExpanded && ( - setIsExpanded(false)} - /> - )} - - ) )}
); diff --git a/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsEtp.js b/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsEtp.js index 66c5441fb..b637a8e74 100644 --- a/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsEtp.js +++ b/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsEtp.js @@ -14,18 +14,17 @@ import { renderIfSiret } from "../../../../../helpers/hoc/renderIfSiret"; import LoadableContent from "../../../../shared/LoadableContent/LoadableContent"; import Value from "../../../../shared/Value"; import Data from "../../SharedComponents/Data"; -import Subcategory from "../../SharedComponents/Subcategory"; -import Table from "../../SharedComponents/Table/Table"; +import NonBorderedTable from "../../SharedComponents/NonBorderedTable/NonBorderedTable"; import { useEffectifsEtablissementsEtpData } from "./EffectifsEtp.gql"; import EffectifGraph from "./EffectifsGraph"; -const MAX_EFFECTIF_COUNT = 12; +const MAX_EFFECTIF_COUNT = 60; const MIN_EFFECTIFS_COUNT = 1; const start_date = "2018-01-01"; const EffectifsEtp = ({ siret }) => { const [displayedEffectifsCount, setDisplayedEffectifsCount] = useState(MIN_EFFECTIFS_COUNT); - const [displayTable, setDisplayTable] = useState(false); + const [displayTable, setDisplayTable] = useState(true); const { loading, @@ -48,44 +47,54 @@ const EffectifsEtp = ({ siret }) => { name={"Effectif ETP"} emptyValue="Non disponible" sourceCustom={`Gip-Mds / DSN`} + className="has-no-border" /> ); } return ( <> - {displayedEffectifsCount === MIN_EFFECTIFS_COUNT && ( - <> - - {effectifsMensuels && ( - - )} - - {effectifsMensuels?.length >= 1 && ( + <> + + {effectifsMensuels && ( + + )} + + {displayedEffectifsCount === MIN_EFFECTIFS_COUNT && + effectifsMensuels?.length >= 1 && ( setDisplayedEffectifsCount(MAX_EFFECTIF_COUNT)} /> )} - - )} + {displayedEffectifsCount === MAX_EFFECTIF_COUNT && ( + setDisplayedEffectifsCount(MIN_EFFECTIFS_COUNT)} + /> + )} + {displayedEffectifsCount === MAX_EFFECTIF_COUNT && ( - + <> + {" "}
+ { value={displayTable} onChange={handleChange} /> - - {!displayTable ? " Afficher Tableau" : " Afficher Courbe"} -
- {displayTable && effectifsMensuels && ( - - - - - - - - - {effectifsMensuels?.map?.( - ({ periode_concerne, effectif }) => ( - - - - - ) - )} - -
DateEffectif ETP
{setYearMonthFormat(periode_concerne)} - -
+ {!displayTable && effectifsMensuels && ( +
+ {" "} + + + + Date + Effectif ETP + + + + {effectifsMensuels?.map?.( + ({ periode_concerne, effectif }) => ( + + {setYearMonthFormat(periode_concerne)} + + + + + ) + )} + + +
)}
-
+ )} - {!displayTable && + {displayTable && displayedEffectifsCount !== MIN_EFFECTIFS_COUNT && siret && ( { date={effectifsMensuels[0]?.periode_concerne} /> )}{" "} - {displayedEffectifsCount === MAX_EFFECTIF_COUNT && ( - setDisplayedEffectifsCount(MIN_EFFECTIFS_COUNT)} - /> - )} ); }; diff --git a/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsGraph.js b/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsGraph.js index c2ea617a2..a6bcf550d 100644 --- a/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsGraph.js +++ b/src/client/src/components/DataSheets/Sections/Establishment/Activity/EffectifsGraph.js @@ -52,9 +52,9 @@ const EffectifGraph = ({ return { datasets: [ { - backgroundColor: "#2980b9", - borderColor: "#2980b9", - borderWidth: 3, + backgroundColor: "#000091", + borderColor: "#000091", + borderWidth: 2, data: chartData?.map((obj) => isEtpData && !isDsnData ? obj?.effectif : obj?.eff ), @@ -83,7 +83,18 @@ const EffectifGraph = ({ position: "top", }, title: { + color: "#0063CB", display: true, + font: { + family: "Marianne, sans-serif", + size: 14, + + weight: 700, + }, + padding: { + bottom: 30, + top: 5, + }, text: isEtpData && !isDsnData ? "Effectif ETP" : "Effectif physique", }, }, @@ -93,9 +104,20 @@ const EffectifGraph = ({ scales: { x: { border: { display: false }, + grid: { + borderColor: "white", + color: "white", + }, + ticks: { color: "#7C8DB5 " }, }, + y: { border: { display: false }, + grid: { + borderColor: "#E6EDFF", + color: "#E6EDFF", + }, + ticks: { color: "#7C8DB5" }, }, }, }; @@ -105,12 +127,12 @@ const EffectifGraph = ({ }; return ( - <> +
{(dsn_data?.length > 0 || etp_data?.length > 0) && ( <> {" "} -
+
setEmail(e.target.value.trim())} - /> -
-
-
-
-
- - )} - {step === "login-form-code" && ( - <> - {showSuccessNotif && ( - - )} - {infoMessage && {infoMessage}} +
+
+
+ + {step === "login-form-email" && ( login(e, email, code, isCheckedSubscription)} + onSubmit={(evt) => sendCode(evt, email)} errorMessage={errorMessage} + loading={loading} > -
- {showMailingListSignup && ( -
- - setIsCheckedSubscription(!isCheckedSubscription) - } - /> - - {isCheckedSubscription && ( -
- Dès votre connexion votre adresse email sera ajoutée à - notre liste de contacts. Un email de confirmation vous - sera envoyé. -
- )} -
+
+ +
Connexion pour les agents des DDETS (PP)
+ Vous pouvez désormais vous connecter en utilisant votre + adresse mail au format :{" "} + prenom.nom@departement.gouv.fr +
+ {errorData?.loginMessage && ( + {errorData.loginMessage} )} -
+
+ -
+
handleCodeChange(e.target.value)} + value={email} + onChange={(e) => setEmail(e.target.value.trim())} />
-
-
- - )} +
+ {showMailingListSignup && ( +
+ + setIsCheckedSubscription(!isCheckedSubscription) + } + /> + + {isCheckedSubscription && ( +
+ Dès votre connexion votre adresse email sera ajoutée à + notre liste de contacts. Un email de confirmation vous + sera envoyé. +
+ )} +
+ )} + +
+
+ handleCodeChange(e.target.value)} + /> +
+
+
+
+
+ +
+
+ + )} +
); diff --git a/src/client/src/components/Login/steps/Form/StepForm.js b/src/client/src/components/Login/steps/Form/StepForm.js index db664441b..c6617af54 100644 --- a/src/client/src/components/Login/steps/Form/StepForm.js +++ b/src/client/src/components/Login/steps/Form/StepForm.js @@ -3,9 +3,9 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import PropTypes from "prop-types"; import React from "react"; -const StepForm = ({ errorMessage, onSubmit, children }) => { +const StepForm = ({ errorMessage, onSubmit, children, className }) => { return ( -
+ {errorMessage && (
@@ -19,6 +19,7 @@ const StepForm = ({ errorMessage, onSubmit, children }) => { StepForm.propTypes = { children: PropTypes.node, + className: PropTypes.string, errorMessage: PropTypes.string, onSubmit: PropTypes.func.isRequired, }; diff --git a/src/client/src/components/PublicPage/Faq/Faq.js b/src/client/src/components/PublicPage/Faq/Faq.js index f61b70f23..69fa53816 100644 --- a/src/client/src/components/PublicPage/Faq/Faq.js +++ b/src/client/src/components/PublicPage/Faq/Faq.js @@ -5,6 +5,7 @@ import React from "react"; import { Link } from "react-router-dom"; import UsersFeedback from "../../../containers/UsersFeedback"; +import ScrollToTopButton from "../../DataSheets/Sections/SharedComponents/ScrollToTopButton/ScrollToTopButton.jsx"; import LoadSpinner from "../../shared/LoadSpinner"; import { Question } from "./Question"; @@ -57,6 +58,7 @@ const Faq = ({ pageData = null, isLoading, hasError }) => { )}
+ ); }; diff --git a/src/client/src/components/PublicPage/Faq/faq.scss b/src/client/src/components/PublicPage/Faq/faq.scss index 01777600e..1f909b338 100644 --- a/src/client/src/components/PublicPage/Faq/faq.scss +++ b/src/client/src/components/PublicPage/Faq/faq.scss @@ -13,8 +13,8 @@ &__title { padding: $spacing-2 $spacing-2 $spacing-1; - color: #fff; - background: $primary; + color: #fff !important; + background: $dark-blue; } &__question { @@ -24,6 +24,9 @@ background: transparent; border: none; border-radius: $border-radius-1; + cursor: pointer; + text-decoration: underline; + &:focus { outline: none; diff --git a/src/client/src/components/PublicPage/PublicPage.js b/src/client/src/components/PublicPage/PublicPage.js index b2601678a..1883c9593 100644 --- a/src/client/src/components/PublicPage/PublicPage.js +++ b/src/client/src/components/PublicPage/PublicPage.js @@ -4,6 +4,7 @@ import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; import UsersFeedback from "../../containers/UsersFeedback"; +import ScrollToTopButton from "../DataSheets/Sections/SharedComponents/ScrollToTopButton/ScrollToTopButton.jsx"; import LoadSpinner from "../shared/LoadSpinner"; const PublicPage = ({ pageData = null, isLoading, hasError }) => { @@ -17,7 +18,7 @@ const PublicPage = ({ pageData = null, isLoading, hasError }) => { } return ( - <> +
{isLoading ? ( @@ -31,7 +32,8 @@ const PublicPage = ({ pageData = null, isLoading, hasError }) => { )}
- + +
); }; diff --git a/src/client/src/components/PublicPage/Statistics/Statistics.js b/src/client/src/components/PublicPage/Statistics/Statistics.js index c31249e86..816118c79 100644 --- a/src/client/src/components/PublicPage/Statistics/Statistics.js +++ b/src/client/src/components/PublicPage/Statistics/Statistics.js @@ -90,14 +90,16 @@ const Statistics = () => { ]; return ( -
+

Statistiques

- +
+ +
{error && (
Une erreur est survenue lors de la récupération des données Matomo diff --git a/src/client/src/components/PublicPage/Statistics/StatsFilters.js b/src/client/src/components/PublicPage/Statistics/StatsFilters.js index 32def84de..1b0beae03 100644 --- a/src/client/src/components/PublicPage/Statistics/StatsFilters.js +++ b/src/client/src/components/PublicPage/Statistics/StatsFilters.js @@ -15,7 +15,7 @@ const StatsFilters = ({ range, setRange, isLoading }) => { ]; return ( -
+
{ - filters[id] ? removeFilter(id) : addFilter(id, "true"); - }} - checked={!!filters[id]} - /> -