Skip to content

Commit

Permalink
Merge pull request #1378 from SocialGouv/feat/us-2671-aij-recherche-i…
Browse files Browse the repository at this point in the history
…mmersion-service-civique

feat(us-2671): aij ajoute recherche service civique immersion
  • Loading branch information
octo-theg committed Jun 18, 2024
2 parents fede6ff + c2269e8 commit 58bd0cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/offres/FormRechercheOffres.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import RechercheServicesCiviquesSecondaire from 'components/offres/RechercheServ
import Button from 'components/ui/Button/Button'
import { Etape } from 'components/ui/Form/Etape'
import IconComponent, { IconName } from 'components/ui/IconComponent'
import { estPassEmploi } from 'interfaces/conseiller'
import { estBRSA } from 'interfaces/conseiller'
import { TypeOffre } from 'interfaces/offre'
import { Commune, Localite, Metier } from 'interfaces/referentiel'
import { SearchImmersionsQuery } from 'services/immersions.service'
Expand Down Expand Up @@ -71,6 +71,8 @@ export default function FormRechercheOffres({
const [motsCles, setMotsCles] = useState<string | undefined>()
const [offreLieu, setOffreLieu] = useState<string | undefined>()

const aAccesRechercheAlternanceServiceCivique = !estBRSA(conseiller)

function formIsInvalid(): boolean {
switch (typeOffre) {
case TypeOffre.EMPLOI:
Expand Down Expand Up @@ -174,7 +176,7 @@ export default function FormRechercheOffres({
label='Offre d’emploi'
/>

{!estPassEmploi(conseiller) && (
{aAccesRechercheAlternanceServiceCivique && (
<>
<RadioBox
isSelected={typeOffre === TypeOffre.ALTERNANCE}
Expand Down
4 changes: 4 additions & 0 deletions interfaces/conseiller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export function estPoleEmploi(conseiller: Conseiller): boolean {
)
}

export function estBRSA(conseiller: Conseiller): boolean {
return conseiller.structure === StructureConseiller.POLE_EMPLOI_BRSA
}

export function estPassEmploi(conseiller: Conseiller): boolean {
return (
conseiller.structure === StructureConseiller.POLE_EMPLOI_BRSA ||
Expand Down

0 comments on commit 58bd0cf

Please sign in to comment.