-
Notifications
You must be signed in to change notification settings - Fork 0
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-6274] feat(cv): integration page CV #137
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = { | ||
'*.ts?(x)': 'yarn lint:fix', | ||
'*.ts?(x)': ['yarn tsc-files', 'yarn lint:fix'], | ||
'*.js?(x)': 'yarn lint:fix', | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
"lint": "npx eslint src --ext js,jsx,ts,tsx", | ||
"lint:fix": "npx eslint src --ext js,jsx,ts,tsx --fix", | ||
"ts-check": "tsc -p tsconfig.json --noEmit", | ||
"ts-check:hook": "tsc tsconfig.json --noEmit", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Il n'est pas utilisé ce script si ? Pourquoi il est différent ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ca faut le faire sauter |
||
"format": "prettier --write './**/*.{js,jsx,md,json,ts,tsx}' --config .prettierrc.json", | ||
"build": "next build", | ||
"uikit-install": "cd ./node_modules/uikit && yarn", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,31 @@ import { formEditCareerPath } from 'src/components/forms/schema/formEditCareerPa | |
import { openModal } from 'src/components/modals/Modal'; | ||
import { ModalEdit } from 'src/components/modals/Modal/ModalGeneric/ModalEdit'; | ||
import { ButtonIcon, Grid } from 'src/components/utils'; | ||
import { AMBITIONS_PREFIXES, BUSINESS_LINES } from 'src/constants'; | ||
import { | ||
AMBITIONS_PREFIXES, | ||
AmbitionsPrefixesType, | ||
BUSINESS_LINES, | ||
} from 'src/constants'; | ||
import { findConstantFromValue, sortByOrder } from 'src/utils'; | ||
|
||
export const CVEditCareerPath = ({ ambitions, businessLines, onChange }) => { | ||
interface CVEditCareerPath { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Plutôt |
||
ambitions: { | ||
order: number; | ||
name: string; | ||
prefix: AmbitionsPrefixesType; | ||
}[]; | ||
businessLines: { | ||
order: number; | ||
name: string; | ||
}[]; | ||
onChange: (arg1: any) => void; | ||
} | ||
|
||
export const CVEditCareerPath = ({ | ||
ambitions, | ||
businessLines, | ||
onChange, | ||
}: CVEditCareerPath) => { | ||
const sortedAmbitions = | ||
ambitions && ambitions.length > 0 ? sortByOrder(ambitions) : null; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import PropTypes from 'prop-types'; | ||
import React, { useCallback, useEffect, useState } from 'react'; | ||
import { CV } from 'src/api/types'; | ||
import { | ||
ExperiencesProfileCard, | ||
InfoProfileCard, | ||
|
@@ -15,7 +16,17 @@ import { Grid, Img } from 'src/components/utils'; | |
|
||
import { CV_STATUS } from 'src/constants'; | ||
import { useMount, usePrevious } from 'src/hooks/utils'; | ||
import { CVShape } from './CV.shape'; | ||
|
||
interface VFicheEditionProps { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Plutôt There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah oui il manque un C :D |
||
cv: CV; | ||
onChange?: (arg1: any) => void; | ||
disablePicture?: boolean; | ||
email: string; | ||
phone?: string; | ||
previewGenerating: boolean; | ||
address: string; | ||
userZone: string; | ||
} | ||
|
||
export const CVFicheEdition = ({ | ||
cv, | ||
|
@@ -26,7 +37,7 @@ export const CVFicheEdition = ({ | |
phone, | ||
address, | ||
userZone, | ||
}) => { | ||
}: VFicheEditionProps) => { | ||
const [previewUrl, setPreviewUrl] = useState(undefined); | ||
const [imageUrl, setImageUrl] = useState(undefined); | ||
|
||
|
@@ -151,22 +162,3 @@ export const CVFicheEdition = ({ | |
</Grid> | ||
); | ||
}; | ||
|
||
CVFicheEdition.propTypes = { | ||
cv: CVShape.isRequired, | ||
onChange: PropTypes.func, | ||
disablePicture: PropTypes.bool, | ||
email: PropTypes.string.isRequired, | ||
phone: PropTypes.string, | ||
address: PropTypes.string, | ||
previewGenerating: PropTypes.bool.isRequired, | ||
userZone: PropTypes.string, | ||
}; | ||
|
||
CVFicheEdition.defaultProps = { | ||
onChange: () => {}, | ||
disablePicture: false, | ||
phone: undefined, | ||
address: undefined, | ||
userZone: undefined, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* eslint import/no-unresolved: "off" */ | ||
import { Pagination, Autoplay, Navigation } from 'swiper/modules'; | ||
|
||
declare module 'swiper/react' { | ||
interface SwiperProps { | ||
modules?: any[]; | ||
threshold?: number; | ||
navigation: boolean; | ||
autoplay: boolean; | ||
pagination: { | ||
clickable: boolean; | ||
}; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est quoi
tsc-files
? Pourquoi on utilise pas le scriptts-check
?