Skip to content

Commit

Permalink
return gfay
Browse files Browse the repository at this point in the history
  • Loading branch information
fufeck committed Jun 11, 2024
1 parent 71d8c40 commit f9b07f6
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ NEXT_PUBLIC_BAL_API_URL=https://api-bal.adresse.data.gouv.fr/v2
NEXT_PUBLIC_MOISSONNEUR_BAL_API_URL=https://plateforme-bal.adresse.data.gouv.fr/moissonneur
NEXT_PUBLIC_MES_ADRESSES=https://mes-adresses.data.gouv.fr
NEXT_PUBLIC_BAL_WIDGET_URL=https://baseadressenationale.github.io/bal-widget
NEXT_PUBLIC_CLIENT_GUICHET_ADRESSE=
NEXT_PUBLIC_CLIENT_MES_ADRESSE=
NEXT_PUBLIC_CLIENT_FORMULAIRE_PUBLICATION=

# -----------------------------------------
# --- Utilisation Matomo pour les stats ---
Expand Down Expand Up @@ -59,3 +62,4 @@ S3_CONFIG_ENDPOINT=
# Connexion au Dossier Data local (en cas de rollback - TOGGLER_DATA_SOURCES=local sinon TOGGLER_DATA_SOURCES=S3)
TOGGLER_DATA_SOURCES=S3
PATH_STATIC_FILE=

7 changes: 7 additions & 0 deletions components/base-adresse-nationale/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ function Tooltip({message, direction, children}) {
/* Position the tooltip */
position: absolute;
}
.tooltip-text {
z-index: 2;
}
.tooltip-bottom .tooltip-left .tooltip-text, .tooltip-right .tooltip-text {
z-index: 1;
}
Expand Down
17 changes: 5 additions & 12 deletions components/bases-locales/charte/commune.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,11 @@ function Commune({_id, name, codeCommune, picture, signatureDate, charteURL}) {
<Link href={`/commune/${codeCommune}`} aria-label={`Aller sur la page commune de ${name}`}>{`${name} - ${codeCommune}`}</Link>
</div>
<div className='signature-date'>Partenaire depuis le <b>{date}</b></div>
<div>
{_id && (
<ButtonLink href={`/bases-locales/charte/partenaires/${_id}`} label={`Fiche partenaire ${name}`}>
Fiche Partenaire
</ButtonLink>
)}
{charteURL && (
<ButtonLink href={charteURL} isExternal target='_blank' label={`Voir la charte de ${name}`}>
Voir la charte
</ButtonLink>
)}
</div>
{charteURL && (
<ButtonLink href={charteURL} isExternal target='_blank' label={`Voir la charte de ${name}`}>
Voir la charte
</ButtonLink>
)}

<style jsx>{`
.commune-container {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import PropTypes from 'prop-types'
import getConfig from 'next/config'

import UpdateStatusBadge from '../update-status'
import ButtonLink from '@/components/button-link'
Expand All @@ -7,17 +8,21 @@ import Tooltip from '@/components/base-adresse-nationale/tooltip'
import Badge from '@codegouvfr/react-dsfr/Badge'
import {formatDate} from '@/lib/date'

const {NEXT_PUBLIC_CLIENT_GUICHET_ADRESSE: CLIENT_GUICHET_ADRESSE} = getConfig().publicRuntimeConfig
const {NEXT_PUBLIC_CLIENT_MES_ADRESSE: CLIENT_MES_ADRESSE} = getConfig().publicRuntimeConfig
const {NEXT_PUBLIC_CLIENT_FORMULAIRE_PUBLICATION: CLIENT_FORMULAIRE_PUBLICATION} = getConfig().publicRuntimeConfig

const otherClients = [
{
id: '63f5eb7db804021c67e4e4dc',
id: CLIENT_GUICHET_ADRESSE,
name: 'Guichet Adresse'
},
{
id: '63f5eb7db804021c67e4e4dd',
id: CLIENT_MES_ADRESSE,
name: 'Mes Adresses'
},
{
id: '63f5eb7db804021c67e4e4de',
id: CLIENT_FORMULAIRE_PUBLICATION,
name: 'Formulaire Publication'
}
]
Expand Down
6 changes: 5 additions & 1 deletion components/bases-locales/charte/partner.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Partner({partnerInfos, isCommune}) {
const [isDisplay, setIsDisplay] = useState(false)
const [mairieContact, setMairieContact] = useState(null)

const {name, link, infos, perimeter, codeCommune, services, testimonyURL, isCompany, picture, charteURL} = partnerInfos
const {_id, name, link, infos, perimeter, codeCommune, services, testimonyURL, isCompany, picture, charteURL} = partnerInfos
const Chevron = isDisplay ? ChevronUp : ChevronDown

const getMairieInfos = useCallback(async () => {
Expand Down Expand Up @@ -109,6 +109,9 @@ function Partner({partnerInfos, isCommune}) {
Voir la charte
</ButtonLink>
)}
<ButtonLink href={`/bases-locales/charte/partenaires/${_id}`} label={`Fiche partenaire ${name}`} style={{marginLeft: '0px'}}>
Fiche Partenaire
</ButtonLink>
</div>
)}

Expand Down Expand Up @@ -223,6 +226,7 @@ function Partner({partnerInfos, isCommune}) {

Partner.propTypes = {
partnerInfos: PropTypes.shape({
_id: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
link: PropTypes.string.isRequired,
infos: PropTypes.string,
Expand Down
3 changes: 2 additions & 1 deletion pages/bases-locales/charte/partenaires/[id].js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import PropTypes from 'prop-types'
import {Users} from 'react-feather'

import Page from '@/layouts/main'
import Head from '@/components/head'
Expand All @@ -13,7 +14,7 @@ function PartenairePage({partenaireDeLaCharte, moissonneur}) {

return (
<Page title={title} description={description}>
<Head title={title} />
<Head title={title} icon={<Users size={56} alt='' aria-hidden='true' />} />
<Partenaire partenaireDeLaCharte={partenaireDeLaCharte} moissonneur={moissonneur} />
</Page>
)
Expand Down

0 comments on commit f9b07f6

Please sign in to comment.