-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/EN-7744-ga-event-member-profile' of https://git…
…hub.com/ReseauEntourage/entourage-job-front into feature/EN-7744-ga-event-member-profile
- Loading branch information
Showing
34 changed files
with
516 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v16.17.0 | ||
v18.20.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
"engines": { | ||
"node": "18.x" | ||
}, | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e", | ||
"scripts": { | ||
"dev": "node -r dotenv/config server-next.js", | ||
"next": "next", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/components/backoffice/dashboard/DashboardNextSteps/DashboardNextSteps.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const StyledStepsContainer = styled.div` | ||
display: grid; | ||
width: 100%; | ||
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); | ||
justify-content: center; | ||
gap: 40px; | ||
`; |
87 changes: 87 additions & 0 deletions
87
src/components/backoffice/dashboard/DashboardNextSteps/DashboardNextSteps.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import React from 'react'; | ||
import { useSelector } from 'react-redux'; | ||
import { v4 as uuid } from 'uuid'; | ||
import { | ||
IlluBulleQuestion, | ||
IlluCoeurMainsOuvertesBleu, | ||
IlluCV, | ||
} from 'assets/icons/icons'; | ||
import { Card } from 'src/components/utils/Cards/Card/Card'; | ||
import { USER_ROLES } from 'src/constants/users'; | ||
import { useCandidateId } from 'src/hooks/queryParams/useCandidateId'; | ||
import { selectCurrentUser } from 'src/use-cases/current-user'; | ||
import { StyledStepsContainer } from './DashboardNextSteps.styles'; | ||
import { Step } from './Step/Step'; | ||
|
||
export const DashboardNextSteps = () => { | ||
const iconSizeProps = { width: 90, height: 90 }; | ||
const candidateId = useCandidateId(); | ||
const currentUser = useSelector(selectCurrentUser); | ||
|
||
const webinarStep = { | ||
title: "S'inscrire au webinaire d'information", | ||
icon: <IlluBulleQuestion {...iconSizeProps} />, | ||
content: | ||
'Envie d’en savoir plus sur la plateforme Entourage pro. Inscrivez-vous au prochain webinaire d’information', | ||
cta: { | ||
label: "S'inscrire", | ||
href: process.env.WEBINAR_URL, | ||
}, | ||
}; | ||
|
||
const stepsByRole = { | ||
[USER_ROLES.CANDIDATE]: [ | ||
webinarStep, | ||
{ | ||
title: 'Faire mon CV Entourage pro', | ||
icon: <IlluCV {...iconSizeProps} />, | ||
content: | ||
'L’objectif du CV Entourage Pro est de rendre visible et valoriser votre projet professionnel', | ||
cta: { | ||
label: 'Créer mon CV', | ||
href: `/backoffice/candidat/${candidateId}/cv`, | ||
}, | ||
}, | ||
{ | ||
title: 'Découvrir le réseau d’entraide ', | ||
icon: <IlluCoeurMainsOuvertesBleu {...iconSizeProps} />, | ||
content: | ||
'Retrouvez tous les coachs de la communauté et contactez-les pour leur demander de l’aide et des conseils', | ||
cta: { | ||
label: 'Découvrir', | ||
href: '/backoffice/annuaire?role=Coach', | ||
}, | ||
}, | ||
], | ||
[USER_ROLES.COACH]: [ | ||
webinarStep, | ||
{ | ||
title: 'Découvrir le réseau d’entraide ', | ||
icon: <IlluCoeurMainsOuvertesBleu {...iconSizeProps} />, | ||
content: | ||
'Retrouvez tous les candidats de la communauté et contactez-les pour leur proposer de l’aide et des conseils', | ||
cta: { | ||
label: 'Découvrir', | ||
href: '/backoffice/annuaire?role=Candidat', | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
if (!currentUser || !currentUser.role) { | ||
return null; | ||
} | ||
|
||
const steps = stepsByRole[currentUser.role] || []; | ||
|
||
return ( | ||
<Card title="Les prochaines étapes" centerTitle> | ||
<StyledStepsContainer> | ||
{steps.map((step) => { | ||
const uuidValue = uuid(); | ||
return <Step step={step} key={uuidValue} />; | ||
})} | ||
</StyledStepsContainer> | ||
</Card> | ||
); | ||
}; |
24 changes: 24 additions & 0 deletions
24
src/components/backoffice/dashboard/DashboardNextSteps/Step/Step.style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import styled from 'styled-components'; | ||
import { COLORS } from 'src/constants/styles'; | ||
|
||
export const StyledStepContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 14px; | ||
justify-content: space-between; | ||
padding: 20px; | ||
border: ${COLORS.gray} 1px solid; | ||
border-radius: 20px; | ||
`; | ||
|
||
export const StyledStepImage = styled.div` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 103px; | ||
`; | ||
|
||
export const StyledStepBtnContainer = styled.div` | ||
display: flex; | ||
justify-content: center; | ||
`; |
49 changes: 49 additions & 0 deletions
49
src/components/backoffice/dashboard/DashboardNextSteps/Step/Step.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react'; | ||
import { Button } from 'src/components/utils/Button/Button'; | ||
import { H5 } from 'src/components/utils/Headings'; | ||
import { Text } from 'src/components/utils/Text/Text'; | ||
import { COLORS } from 'src/constants/styles'; | ||
import { | ||
StyledStepBtnContainer, | ||
StyledStepContainer, | ||
StyledStepImage, | ||
} from './Step.style'; | ||
|
||
export interface Step { | ||
title: string; | ||
content: string; | ||
icon: React.ReactElement; | ||
cta: { | ||
label: string; | ||
href: string; | ||
}; | ||
} | ||
|
||
export interface StepProps { | ||
step: Step; | ||
} | ||
|
||
export const Step = ({ step }: StepProps) => { | ||
return ( | ||
<StyledStepContainer> | ||
<StyledStepImage>{step.icon}</StyledStepImage> | ||
<H5 | ||
title={step.title} | ||
center | ||
color={COLORS.primaryBlue} | ||
weight="semibold" | ||
/> | ||
<Text center>{step.content}</Text> | ||
<StyledStepBtnContainer> | ||
<Button | ||
style="custom-primary-inverted" | ||
href={step.cta.href} | ||
isExternal | ||
newTab | ||
> | ||
{step.cta.label} | ||
</Button> | ||
</StyledStepBtnContainer> | ||
</StyledStepContainer> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.