Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EN-6289] feat(cv): add formation fields experience #139

Merged

Conversation

PaulEntourage
Copy link
Collaborator

No description provided.

@PaulEntourage PaulEntourage force-pushed the feature/EN_6289-cv-add-formation-fields-experience branch from 1cfb2ac to d02f678 Compare August 21, 2023 10:18
@PaulEntourage PaulEntourage force-pushed the feature/EN_6289-cv-add-formation-fields-experience branch from d02f678 to 96090e4 Compare August 29, 2023 16:10

interface ExperiencesProfileCardProps {
experiences: CVExperience[];
onChange: (arg1: Partial<CV>) => void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En fait ici je mettrais plutôt : onChange: (updatedExperiences: { experiences: CVExperience[] }) => void;. Comme ça on a un type plus précis

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok


interface FormationProfileCardProps {
formations: CVFormation[];
onChange: (arg1: Partial<CV>) => void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pareil, ici je mettrais plutôt : onChange: (updatedFormations: { formations: CVFormations[] }) => void;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

const [remainingItems, setRemainingItems] = useState<number>();

useEffect(() => {
setRemainingItems(5 - experiences.length);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je mettrais le 5 dans une constante 😉

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

const [remainingItems, setRemainingItems] = useState<number>();

useEffect(() => {
setRemainingItems(3 - formations.length);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je mettrais le 3 dans une constante 😉

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

value: CVExperience | CVFormation;
sortIndex: number;
items: CVExperience[] | CVFormation[];
onChange: (arg1: Partial<CV>) => void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je mettrais plutôt : onChange: (updatedCV: { experiences: CVExperience[] } | { formations: CVFormation[] }) => void;. Comme ça le typage est plus précis

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai dû faire un truc un peu plus compliqué que ça ;)

@@ -345,19 +354,96 @@ export const PageCVContent = ({
>
<H2 title="Expériences" color={CV_COLORS.titleGray} />
</span>
{/* } */}
<ul>
{cv.experiences.map((experience) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faudrait vérifier si les expériences sont bien définis ;)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -58,6 +62,10 @@ export const PageCVContent = ({
cv,
actionDisabled = false,
}: PageCVContentProps) => {


console.log(cv);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

À retirer ;)

Pense bien à lancer les commandes eslint avant de pousser pour être sûr que tous ces trucs soit corrigé ;)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes bien vu

@@ -234,9 +237,12 @@ export const StyledCVPageContentDetailsContainer = styled.div`
flex-direction: row;
margin: 26px 15px 0;
box-sizing: border-box;
flex-wrap: wrap;
flex: 1 1 0%;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Qu'est-ce que ça fait ça exactement ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L'espace dans le container flex, que les éléments prennent toute la place qui leur attribuée

Comment on lines 15 to 62
{
id: 'title',
name: 'title',
component: 'text-input',
type: 'text',
title: 'Intitulé de la formation',
},
{
id: 'description',
name: 'description',
component: 'textarea',
title: 'Description',
maxLength: 2000,
},
{
id: 'location',
name: 'location',
component: 'text-input',
type: 'text',
title: 'Lieu de formation',
},
{
id: 'institution',
name: 'institution',
component: 'text-input',
type: 'text',
title: 'Etablissement / Institution',
},
{
id: 'dateStart',
name: 'dateStart',
component: 'datepicker',
title: 'Date de début',
},
{
id: 'dateEnd',
name: 'dateEnd',
component: 'datepicker',
title: 'Date de fin',
},
{
id: 'skills',
name: 'skills',
title: 'Compétences acquises',
component: 'select-creatable',
isMulti: true,
},
],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il manque la propriété isRequired sur la plupart des champs non ? Il faudrait pas les rendre obligatoire sinon ça va poser soucis non ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non il n'y a que le title qui est required, je l'ajoute t'as raison

Comment on lines 15 to 51
{
id: 'title',
name: 'title',
component: 'text-input',
title: 'Intitulé de la formation',
},
{
id: 'description',
name: 'description',
component: 'textarea',
title: 'Description',
maxLength: 2000,
},
{
id: 'location',
name: 'location',
component: 'text-input',
title: 'Lieu de formation',
},
{
id: 'company',
name: 'company',
component: 'text-input',
title: 'Entreprise',
},
{
id: 'dateStart',
name: 'dateStart',
component: 'datepicker',
title: 'Date de début',
},
{
id: 'dateEnd',
name: 'dateEnd',
component: 'datepicker',
title: 'Date de fin',
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il manque la propriété isRequired sur la plupart des champs non ? Il faudrait pas les rendre obligatoire sinon ça va poser soucis non ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

@PaulEntourage PaulEntourage temporarily deployed to entourage-job-front September 1, 2023 13:35 — with GitHub Actions Inactive
@PaulEntourage PaulEntourage merged commit 5079c72 into develop Sep 4, 2023
2 checks passed
@PaulEntourage PaulEntourage deleted the feature/EN_6289-cv-add-formation-fields-experience branch September 4, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants