Skip to content

Commit

Permalink
Merge pull request #91 from konsept-ch/tutors
Browse files Browse the repository at this point in the history
update tutors view
  • Loading branch information
firepolo committed Apr 10, 2024
2 parents 2ee8aca + 1786fc9 commit f0f50bc
Showing 1 changed file with 81 additions and 34 deletions.
115 changes: 81 additions & 34 deletions src/pages/TutorsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export function TutorsPage() {
onClick={() => {
reset({
...data,
titles: data.titles.map((v) => ({ v })),
skills: data.skills.map((v) => ({ v })),
roles: data.roles.map((v) => ({ v })),
administrative: data.administrative.map((v) => ({ v })),
domain: data.domain ? { v: data.domain } : null,
domains: data.domains.map((v) => ({ v })),
status: data.status ? { v: data.status } : null,
})
setVisible(true)
Expand Down Expand Up @@ -75,13 +75,17 @@ export function TutorsPage() {
},
{
field: 'cert',
headerName: 'Certificat envoyé',
headerName: 'Diplômes/certifications transmis',
valueGetter: (o) => (o.data.cert ? 'Oui' : 'Non'),
},
{
field: 'title',
headerName: 'Titre pédagogique',
},
{
field: 'titles',
headerName: 'Titres pédagogique',
},
{
field: 'accreditations',
headerName: 'Accréditations spécifiques tests',
Expand All @@ -99,8 +103,8 @@ export function TutorsPage() {
headerName: 'Rôles',
},
{
field: 'domain',
headerName: 'Domaine intervention',
field: 'domains',
headerName: 'Domaines intervention',
},
{
field: 'cat',
Expand Down Expand Up @@ -130,17 +134,29 @@ export function TutorsPage() {
field: 'dates',
headerName: 'Dates',
},
{
field: 'administrative',
headerName: 'Suivi administratif',
},
{
field: 'grids',
headerName: 'Grilles supervision',
},
{
field: 'educational',
headerName: 'Suivi pédagogique',
headerName: 'Dernière supervision',
},
{
field: 'expertise',
headerName: 'Titre expertise métier',
},
{
field: 'course',
headerName: 'Descriptif de cours',
},
{
field: 'pitch',
headerName: 'Pitch',
},
{
field: 'scenario',
headerName: "Scénario d'hybridation/fil rouge",
},
],
[]
Expand Down Expand Up @@ -168,7 +184,12 @@ export function TutorsPage() {
<Form.Control type="text" {...register('year')} />
</Form.Group>
<Form.Check type="checkbox" id="cv" label="CV envoyé" {...register('cv')} />
<Form.Check type="checkbox" id="cert" label="Certficat envoyé" {...register('cert')} />
<Form.Check
type="checkbox"
id="cert"
label="Diplômes/certifications transmis"
{...register('cert')}
/>
<Form.Check type="checkbox" id="cat" label="CAT" {...register('cat')} />
<Form.Check type="checkbox" id="ps" label="PS" {...register('ps')} />
<Form.Check type="checkbox" id="fsm" label="FSM" {...register('fsm')} />
Expand Down Expand Up @@ -278,10 +299,10 @@ export function TutorsPage() {
)}
/>
</Form.Group>
<Form.Group className="mb-3" controlId="domain">
<Form.Label>Domaine intervention</Form.Label>
<Form.Group className="mb-3" controlId="domains">
<Form.Label>Domaines intervention</Form.Label>
<Controller
name="domain"
name="domains"
control={control}
render={({ field }) => (
<Select
Expand All @@ -299,6 +320,7 @@ export function TutorsPage() {
]}
getOptionLabel={(o) => o.v}
getOptionValue={(o) => o.v}
isMulti
/>
)}
/>
Expand All @@ -318,19 +340,46 @@ export function TutorsPage() {
)}
/>
</Form.Group>
<Form.Group className="mb-3" controlId="administrative">
<Form.Label>Suivi administratif</Form.Label>
<Form.Group className="mb-3" controlId="course">
<Form.Label>Descriptif de cours</Form.Label>
<Form.Control as="textarea" rows={1} {...register('course')} />
</Form.Group>
<Form.Group className="mb-3" controlId="pitch">
<Form.Label>Pitch</Form.Label>
<Form.Control as="textarea" rows={1} {...register('pitch')} />
</Form.Group>
<Form.Group className="mb-3" controlId="scenario">
<Form.Label>Scénario d'hybridation/fil rouge</Form.Label>
<Form.Control as="textarea" rows={1} {...register('scenario')} />
</Form.Group>
</Col>
<Col>
<Form.Group className="mb-3" controlId="address">
<Form.Label>Adresse</Form.Label>
<Form.Control as="textarea" rows={2} {...register('address')} />
</Form.Group>
<Form.Group className="mb-3" controlId="title">
<Form.Label>Titre pédagogique</Form.Label>
<Form.Control as="textarea" rows={2} {...register('title')} />
</Form.Group>
<Form.Group className="mb-3" controlId="titles">
<Form.Label>Titres pédagogique</Form.Label>
<Controller
name="administrative"
name="titles"
control={control}
render={({ field }) => (
<Select
{...field}
options={[
{ v: 'Scénario hybridation / fil rouge' },
{ v: 'Descriptif de cours' },
{ v: 'Pitch' },
{ v: 'Programme' },
{ v: 'Certificat FSEA - module 1' },
{ v: 'Certificat FSEA - module 2' },
{ v: 'Certificat FSEA - module 3' },
{ v: 'Certificat FSEA - module 4' },
{ v: 'Certificat FSEA - module 5' },
{ v: "Brevet fédéral de formateur/trice d'adultes" },
{ v: 'Diplôme fédéral de responsable de formation' },
{ v: "DAS en formation d'adultes" },
{ v: "Formation universitaire en sciences de l'éducation" },
]}
getOptionLabel={(o) => o.v}
getOptionValue={(o) => o.v}
Expand All @@ -339,16 +388,6 @@ export function TutorsPage() {
)}
/>
</Form.Group>
</Col>
<Col>
<Form.Group className="mb-3" controlId="address">
<Form.Label>Adresse</Form.Label>
<Form.Control as="textarea" rows={2} {...register('address')} />
</Form.Group>
<Form.Group className="mb-3" controlId="title">
<Form.Label>Titre pédagogique</Form.Label>
<Form.Control as="textarea" rows={2} {...register('title')} />
</Form.Group>
<Form.Group className="mb-3" controlId="accreditations">
<Form.Label>Accréditations spécifiques tests</Form.Label>
<Form.Control as="textarea" rows={2} {...register('accreditations')} />
Expand All @@ -368,9 +407,13 @@ export function TutorsPage() {
<Form.Control as="textarea" rows={2} {...register('links')} />
</Form.Group>
<Form.Group className="mb-3" controlId="educational">
<Form.Label>Suivi pédagogique</Form.Label>
<Form.Label>Dernière supervision</Form.Label>
<Form.Control as="textarea" rows={2} {...register('educational')} />
</Form.Group>
<Form.Group className="mb-3" controlId="expertise">
<Form.Label>Titre expertise métier</Form.Label>
<Form.Control as="textarea" rows={2} {...register('expertise')} />
</Form.Group>
</Col>
</Row>
</Modal.Body>
Expand All @@ -397,10 +440,14 @@ export function TutorsPage() {
dates: data.dates,
links: data.links,
educational: data.educational,
expertise: data.expertise,
course: data.course,
pitch: data.pitch,
scenario: data.scenario,
titles: data.titles.map((o) => o.v),
skills: data.skills.map((o) => o.v),
roles: data.roles.map((o) => o.v),
administrative: data.administrative.map((o) => o.v),
domain: data.domain?.v,
domains: data.domains.map((o) => o.v),
status: data.status?.v,
},
})
Expand Down

0 comments on commit f0f50bc

Please sign in to comment.