Skip to content

Commit

Permalink
feat: Page de recherche : Tableau résultat de la recherche + footer p…
Browse files Browse the repository at this point in the history
…ages
  • Loading branch information
ImenOuidou committed Oct 13, 2023
1 parent 56e7ce6 commit b026e32
Show file tree
Hide file tree
Showing 44 changed files with 363 additions and 245 deletions.
23 changes: 19 additions & 4 deletions src/client/src/components/App/_pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@
.page {
@extend .container;
padding: $spacing-6;
background-color: white;

li,
h1,
h2,
h3,
h4,
h5,
h6 {
@extend .title;
font-family: $marianne;
color: $title-grey !important;
}

h1 {
@extend .is-size-3;
@extend .is-size-4-mobile;
margin-top: 0;
}
a {
color: $dark-blue !important;
font-family: $marianne;
text-decoration: underline !important;
text-underline-offset: 4px;

&:hover {
text-decoration-thickness: 2px !important;
}
}
h2 {
@extend .is-size-4;
@extend .is-size-5-mobile;
Expand All @@ -30,7 +39,13 @@
@extend .is-size-6-mobile;
}

p {
p{
margin-bottom: $spacing-4;
font-family: $marianne;
color: $title-grey !important;
}
div {
font-family: $marianne;
color: $title-grey !important;
}
}
4 changes: 4 additions & 0 deletions src/client/src/components/App/_placeholders.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
background-color: $white;
border-color: $grey !important;
}
%is-dark-blue {
color: $dark-blue !important;
background-color: $white;
}

%has-first-letter-uppercase {
&::first-letter {
Expand Down
2 changes: 1 addition & 1 deletion src/client/src/components/App/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ $font-size-title: 1.5rem;
$segoe: "Segoe Pro", sans-serif;
$evolventa: "Evolventa", sans-serif;
$roboto: Roboto, sans-serif;
$marianne: "Marianne", sans-serif;
$marianne: Marianne,arial,sans-serif;

/* SPACING (values from Bulma) */
$spacing-1: map-get($spacing-values, "1"); // 0.25rem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import BlocTitle from "../../SharedComponents/BlocTitle/BlocTitle.jsx";
import OrganismeFormation from "./OrganismeFormation";

const Agrements = ({ enterprise }) => {
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

return (
<section id="agrements" className="data-sheet__bloc_section ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import InteractionType from "./InteractionType";

const Direccte = ({ entreprise: { siren } }) => {
const { loading, data, error } = useInteractionsBySiren(siren);
const [direccteAccordionOpen, setDireccteAccordionOpen] = useState(false);
const [direccteAccordionOpen, setDireccteAccordionOpen] = useState(true);

if (loading || error) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Enterprise = ({ enterprise }) => {
useScrollToLocationHash({ location });

return (
<div>
<div className="data-sheet__main-content">
<Header enterprise={enterprise} />
<div className="data-sheet__main-container">
<Infos enterprise={enterprise} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Egapro from "./Egapro";
import Psi from "./Psi";

const RelationsEntreprise = ({ enterprise }) => {
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

return (
<section id="relationship" className="data-sheet__bloc_section">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Apprentissage from "./Subcategory/Apprentissage";
import PlanDeRelance from "./Subcategory/PlanDeRelance";

const Helps = ({ enterprise }) => {
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

return (
<section id="helps" className="data-sheet__bloc_section">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import Mandataires from "./Mandataires";
import ObservationRCS from "./ObservationRCS";

const EnterpriseInfos = ({ enterprise: baseEntreprise }) => {
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

const siren = getSiren(baseEntreprise);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ $border-color: var(--border-color);
font-weight: 400;
display: flex;
flex-direction: column;
color: #161616;
color: $title-grey;
@media print {
display: none !important;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Pse from "./Pse";
import Rcc from "./Rcc";

const EnterpriseMuteco = ({ enterprise }) => {
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

return (
<section id="muteco" className="data-sheet__bloc_section">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import TrancheEffectifsInsee from "./TrancheEffectifsInsee";

const Activite = ({ siret }) => {
const { loading, data, error } = useSuccessionData(siret);
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

return (
<section id="activity" className="data-sheet__bloc_section">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import AgrementsIAE from "./AgrementsIAE";
import OrganismeFormation from "./OrganismeFormation";

const Agrements = ({ siret }) => {
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

return (
<section id="agrements" className="data-sheet__bloc_section ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,74 +115,76 @@ const Dashboard = ({ siret }) => {

return (
<div className="dashboard ">
<div className="columns column ">
<Item
icon={effectifItem}
name="Effectif"
value={effectifLoading ? "Chargement ..." : effectif}
/>

<Item
icon={<Calendar />}
name="Visites"
smallText={!hasInteractions}
value={hasInteractions ? lastControl : "Pas d'intervention connue"}
/>

<Item
icon={<Warning />}
name="Mutations économiques"
smallText={true}
value={
<>
{!activity.hasPse &&
!activity.hasRcc &&
!activity.hasLice &&
!activity.partialActivity &&
"Non"}
<div className="column ">
<div className="columns column ">
<Item
icon={effectifItem}
name="Effectif"
value={effectifLoading ? "Chargement ..." : effectif}
/>

<Item
icon={<Calendar />}
name="Visites"
smallText={!hasInteractions}
value={hasInteractions ? lastControl : "Pas d'intervention connue"}
/>

<Item
icon={<Warning />}
name="Mutations économiques"
smallText={true}
value={
<>
{!activity.hasPse &&
!activity.hasRcc &&
!activity.hasLice &&
!activity.partialActivity &&
"Non"}
<div>
{activity.hasPse && "PSE-"}
{activity.hasRcc && "RCC-"}
{activity.hasLice && activity.liceTypes?.join("-")}
</div>

{activity.partialActivity && <div>Activité partielle</div>}
</>
}
/>
</div>
<div className="columns column ">
<Item
icon={<Network />}
name="PSI"
smallText={true}
value={
<div>
{activity.hasPse && "PSE-"}
{activity.hasRcc && "RCC-"}
{activity.hasLice && activity.liceTypes?.join("-")}
<ul>
{isEstablishmentWithPsi && <li>Salariés détachés</li>}
{isEnterprisePsiContractor && <li>Entreprise DO</li>}
</ul>
{!isEnterprisePsiContractor && !isEstablishmentWithPsi && "Non"}
</div>

{activity.partialActivity && <div>Activité partielle</div>}
</>
}
/>
</div>
<div className="columns column ">
<Item
icon={<Network />}
name="PSI"
smallText={true}
value={
<div>
<ul>
{isEstablishmentWithPsi && <li>Salariés détachés</li>}
{isEnterprisePsiContractor && <li>Entreprise DO</li>}
</ul>
{!isEnterprisePsiContractor && !isEstablishmentWithPsi && "Non"}
</div>
}
/>
<Item
icon={<Hospital />}
name="Accident Travail"
value={data?.accidents_travail?.[0]?.total}
empty="Non"
/>
<Item
icon={<HealthIcon />}
name="Aides"
value={hasAide(data) ? "Oui" : "Non"}
/>

<Item
icon={<SchoolIcon />}
name="Organisme Formation"
value={isOrganismeFormation(data) ? "Oui" : "Non"}
/>
}
/>
<Item
icon={<Hospital />}
name="Accident Travail"
value={data?.accidents_travail?.[0]?.total}
empty="Non"
/>
<Item
icon={<HealthIcon />}
name="Aides"
value={hasAide(data) ? "Oui" : "Non"}
/>

<Item
icon={<SchoolIcon />}
name="Organisme Formation"
value={isOrganismeFormation(data) ? "Oui" : "Non"}
/>
</div>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { useControles } from "./Controles.gql";

const Controles = ({ siret }) => {
const { loading, data: interactions, error } = useControles(siret);
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

if (loading || error) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Establishment = ({ siret }) => {
const siren = getSirenFromSiret(siret);

return (
<div>
<div className="data-sheet__main-content">
<Header siret={siret} siren={siren} />
<div className="data-sheet__main-container">
<Activite siret={siret} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Apprentissage from "./Subcategory/Apprentissage";
import ContratsAides from "./Subcategory/ContratsAides";

const EstablishmentHelps = ({ siret }) => {
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

return (
<section id="helps" className="data-sheet__bloc_section ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import PaginationTable from "../../SharedComponents/PaginationTable/PaginationTa
const ListEstablishment = () => {
const { loading, data: entreprise, error } = useEstablishmentData();
const history = useHistory();
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

const [currentPage, setCurrentPage] = useState(1);
if (loading || error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Rcc from "./Rcc";

const EtablissementMuteco = ({ siret }) => {
const { data, loading, error } = useMutecoData(siret);
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

if (loading || error) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import WorkAccident from "./WorkAccident";

const EstablishmentRelationship = ({ siret }) => {
const { loading, data, error } = useAccordsEntreprise(siret);
const [accordionOpen, setAccordionOpen] = useState(false);
const [accordionOpen, setAccordionOpen] = useState(true);

const accords = groupAccordsByType(data || []);
const nbAccords = getGroupedAccordsSum(accords);
Expand Down
4 changes: 3 additions & 1 deletion src/client/src/components/DataSheets/Sidebar/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ $border-color: var(--border-color);
> .aside-contain {
position: -webkit-sticky;
position: sticky;
top: 1rem;
top: 0;
z-index: 1;
display: block;
padding: $spacing-4 0;
padding-top: 0 !important;
margin-top: 2rem;
overflow: auto;
border-radius: $border-radius-2;
Expand All @@ -30,6 +31,7 @@ $border-color: var(--border-color);
margin: 0;
overflow: hidden;
padding:0 $spacing-2;

}
}
}
Expand Down
Loading

0 comments on commit b026e32

Please sign in to comment.