Skip to content

Commit

Permalink
Feat : add establishment section Appels d'offres (#340)
Browse files Browse the repository at this point in the history
* chore: add pgadmin

* chore: numeric user

* chore: secret

* chore: auth

* feat: add establishment section Appels d'offres

* feat: Ajout du nom et du departement de l acheteur

* feat: add marche public

* fix: export xlsx

---------

Co-authored-by: Gary van Woerkens <[email protected]>
Co-authored-by: Matéo Mévollon <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2024
1 parent c07dd9f commit 6fb2557
Show file tree
Hide file tree
Showing 28 changed files with 1,030 additions and 47 deletions.
2 changes: 2 additions & 0 deletions src/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"react-scrollspy": "^3.4.2",
"react-select": "^5.8.0",
"react-toggle": "^4.1.1",
"react-top-loading-bar": "^2.3.1",
"react-transition-group": "^4.4.1",
"redux": "^4.0.5",
"redux-persist": "^6.0.0",
Expand All @@ -56,6 +57,7 @@
"sass": "^1.79.1",
"smoothscroll-polyfill": "^0.4.3",
"ua-parser-js": "^0.7.21",
"xlsx": "^0.18.5",
"zod": "^3.13.4"
},
"scripts": {
Expand Down
30 changes: 27 additions & 3 deletions src/client/src/components/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import Search from "../../containers/Search";
import SetMatomo from "../../helpers/Matomo/SetMatomo.js";
import Auth from "../../services/Auth/Auth.js";
import Config from "../../services/Config";
import { useIsNotFound } from "../../services/Elastic/elastic.js";
import { apolloClient } from "../../services/GraphQL/GraphQL";
import CustomLayout from "../../services/PrivateRoute/CustomLayout.jsx";
import configureStore from "../../services/Store";
Expand Down Expand Up @@ -259,10 +260,18 @@ const App = () => {
const EnterpriseWrapper = () => {
const { siren } = useParams();
const siret = getSirenFromSiret(siren);
const { isNotFound, loading } = useIsNotFound(siret, siren);

return (
<IEChecker>
<Layout>
<CustomLayout isEntrepriseDisplayed siren={siren} siret={siret}>
<CustomLayout
isNotFound={isNotFound}
isEntrepriseDisplayed
siren={siren}
siret={siret}
loading={loading}
>
<Enterprise siren={siren} />
</CustomLayout>
</Layout>
Expand All @@ -273,10 +282,18 @@ const EnterpriseWrapper = () => {
const EstablishmentWrapper = () => {
const { siret } = useParams();
const siren = getSirenFromSiret(siret);
const { isNotFound, loading } = useIsNotFound(siret, siren);

return (
<IEChecker>
<Layout>
<CustomLayout isEstablishmentDisplayed siren={siren} siret={siret}>
<CustomLayout
isNotFound={isNotFound}
isEstablishmentDisplayed
siren={siren}
siret={siret}
loading={loading}
>
<LegacyEtablissement siret={siret} />
</CustomLayout>
</Layout>
Expand All @@ -286,10 +303,17 @@ const EstablishmentWrapper = () => {

const ListEstablishmentsWrapper = () => {
const { siren } = useParams();
const { isNotFound, loading } = useIsNotFound("", siren);

return (
<IEChecker>
<Layout>
<CustomLayout isEstablishmentsDisplayed siren={siren}>
<CustomLayout
isNotFound={isNotFound}
isEstablishmentsDisplayed
siren={siren}
loading={loading}
>
<ListEtablissements siren={siren} />
</CustomLayout>
</Layout>
Expand Down
5 changes: 3 additions & 2 deletions src/client/src/components/App/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ const Layout = ({
hasSharedButton = false,
children,
displayMessage = false,
isNotFound = false,
}) => {
const isActiveMaintenanceMode = Config.get("maintenanceMode");

return (
<>
{hasLandingHeader ? (
{!isNotFound && hasLandingHeader ? (
<Header hasSharedButton={hasSharedButton} />
) : (
<>
Expand All @@ -42,6 +42,7 @@ Layout.propTypes = {
displayMessage: PropTypes.bool,
hasLandingHeader: PropTypes.bool,
hasSharedButton: PropTypes.bool,
isNotFound: PropTypes.bool,
};

export default Layout;
4 changes: 4 additions & 0 deletions src/client/src/components/App/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ a {
&--nowrap a {
white-space: nowrap;
}
&--sm-cell {
font-size: 0.5rem !important;
align-items: center !important;
}
}
}

Expand Down
17 changes: 17 additions & 0 deletions src/client/src/components/DataSheets/NotFound/NotFound.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import "./notFound.scss";

import React from "react";

const NotFound = () => {
return (
<section className="data-sheet container is-fluid">
<div className="">
<div className="notFound">
<div>0 entreprise correspond à votre requête</div>
</div>
</div>
</section>
);
};

export default NotFound;
7 changes: 7 additions & 0 deletions src/client/src/components/DataSheets/NotFound/notFound.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.notFound {
display: flex;
justify-content: center;
align-items: center;
font-size: 22px;
font-weight: bold;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Controles from "./Direccte/Controles";
import Header from "./Header";
import Helps from "./Helps";
import ListEstablishment from "./ListEtablishments/ListEstablishment.jsx";
import MarchesPublic from "./MarchesPublic/MarchesPublic.jsx";
import Muteco from "./Muteco";
import Relationship from "./Relationship";

Expand All @@ -37,9 +38,8 @@ const Establishment = ({ siret }) => {
<Muteco siret={siret} />
<Helps siret={siret} />
<Agrements siret={siret} />
{siren && (
<ListEstablishment siren={siren} isEstablishmentDisplayed={true} />
)}{" "}
<MarchesPublic siret={siret} />
<ListEstablishment siren={siren} isEstablishmentDisplayed={true} />
</div>
<ScrollToTopButton />
</div>
Expand Down
Loading

0 comments on commit 6fb2557

Please sign in to comment.