Skip to content

Commit

Permalink
✨ [Workshops] Setup workshop form to add new fields
Browse files Browse the repository at this point in the history
  • Loading branch information
tcheymol committed May 3, 2024
1 parent 50cb844 commit de566db
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 15 deletions.
16 changes: 14 additions & 2 deletions client/src/Pages/Workshops/Components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const WorkshopCard = ({workshop}: any) => (
Types de participants : <ChipList list={workshop.participantKinds} dropdownKind="participantKinds"/>
</div>
<div>
Tranches d&#39âge : <ChipList list={workshop.ageBreakpoints} dropdownKind="ageBreakpoints"/>
Tranches d'âge : <ChipList list={workshop.ageBreakpoints} dropdownKind="ageBreakpoints"/>
</div>
<div>
Outils utilisés : <ChipList list={workshop.usedEquipments} dropdownKind="usedEquipments"/>
Expand All @@ -70,11 +70,23 @@ const WorkshopCard = ({workshop}: any) => (
</div>
<br/>
<Typography variant="subtitle1">
Bilan global et axes d&#39amélioration :
Bilan global et axes d'amélioration :
</Typography>
<Typography variant="body2" style={{whiteSpace: "pre-line"}}>
{workshop.improvementAxis}
</Typography>
<Typography variant="subtitle1">
Proposition de modification (évolution d'une fonctionnalité, d'un site...) :
</Typography>
<Typography variant="body2" style={{whiteSpace: "pre-line"}}>
{workshop.updateProposal}
</Typography>
<Typography variant="subtitle1">
Proposition d'ajout (nouvelles ressources, exercices, thématiques...) :
</Typography>
<Typography variant="body2" style={{whiteSpace: "pre-line"}}>
{workshop.addProposal}
</Typography>
{!workshop.usedVault ? null : (
<div>
<br/>
Expand Down
16 changes: 16 additions & 0 deletions client/src/Pages/Workshops/Components/WorkshopForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,22 @@ const WorkshopForm: React.FC<WorkshopFormProps> = ({workshop, onSubmit}) => {
handleChange={handleChange}
/>
</FormRow>
<FormRow>
<FormTextField
id='updateProposal'
value={values.updateProposal}
label="Proposition de modification (évolution d'une fonctionnalité, d'un site...)"
handleChange={handleChange}
/>
</FormRow>
<FormRow>
<FormTextField
id='addProposal'
value={values.addProposal}
label="Proposition d'ajout (nouvelles ressources, exercices, thématiques...)"
handleChange={handleChange}
/>
</FormRow>
<FormRow>
<FormControlLabel
control={
Expand Down
2 changes: 2 additions & 0 deletions client/src/Types/Workshops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export interface WorkshopInterface extends Entity {
usedVault?: boolean;
attendees?: string;
improvementAxis?: string;
updateProposal?: string;
addProposal?: string;
duration?: Duration;
participantKinds?: ParticipantKind[];
equipmentSuppliers?: EquipmentSupplier[];
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Center.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function getName(): ?string
return $this->name;
}

public function setName(string $name = null): void
public function setName(?string $name = null): void
{
$this->name = $name;
}
Expand Down
22 changes: 11 additions & 11 deletions src/Entity/Permanence.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function getCenter(): ?Center
return $this->center;
}

public function setCenter(Center $center = null): void
public function setCenter(?Center $center = null): void
{
$this->center = $center;
}
Expand All @@ -168,7 +168,7 @@ public function getHours(): ?int
return $this->hours;
}

public function setHours(int $hours = null): void
public function setHours(?int $hours = null): void
{
$this->hours = $hours;
}
Expand All @@ -178,7 +178,7 @@ public function getNbPros(): ?int
return $this->nbPros;
}

public function setNbPros(int $nbPros = null): void
public function setNbPros(?int $nbPros = null): void
{
$this->nbPros = $nbPros;
}
Expand All @@ -188,7 +188,7 @@ public function getNbProAccounts(): ?int
return $this->nbProAccounts;
}

public function setNbProAccounts(int $nbProAccounts = null): void
public function setNbProAccounts(?int $nbProAccounts = null): void
{
$this->nbProAccounts = $nbProAccounts;
}
Expand All @@ -198,7 +198,7 @@ public function getNbBeneficiaries(): ?int
return $this->nbBeneficiaries;
}

public function setNbBeneficiaries(int $nbBeneficiaries = null): void
public function setNbBeneficiaries(?int $nbBeneficiaries = null): void
{
$this->nbBeneficiaries = $nbBeneficiaries;
}
Expand All @@ -208,7 +208,7 @@ public function getNbBeneficiariesAccounts(): ?int
return $this->nbBeneficiariesAccounts;
}

public function setNbBeneficiariesAccounts(int $nbBeneficiariesAccounts = null): void
public function setNbBeneficiariesAccounts(?int $nbBeneficiariesAccounts = null): void
{
$this->nbBeneficiariesAccounts = $nbBeneficiariesAccounts;
}
Expand All @@ -218,7 +218,7 @@ public function getNbStoredDocs(): ?int
return $this->nbStoredDocs;
}

public function setNbStoredDocs(int $nbStoredDocs = null): void
public function setNbStoredDocs(?int $nbStoredDocs = null): void
{
$this->nbStoredDocs = $nbStoredDocs;
}
Expand All @@ -228,7 +228,7 @@ public function getBeneficiariesNotes(): ?string
return $this->beneficiariesNotes;
}

public function setBeneficiariesNotes(string $beneficiariesNotes = null): void
public function setBeneficiariesNotes(?string $beneficiariesNotes = null): void
{
$this->beneficiariesNotes = $beneficiariesNotes;
}
Expand All @@ -238,7 +238,7 @@ public function getProNotes(): ?string
return $this->proNotes;
}

public function setProNotes(string $proNotes = null): void
public function setProNotes(?string $proNotes = null): void
{
$this->proNotes = $proNotes;
}
Expand All @@ -248,7 +248,7 @@ public function getReconnectNotes(): ?string
return $this->reconnectNotes;
}

public function setReconnectNotes(string $reconnectNotes = null): void
public function setReconnectNotes(?string $reconnectNotes = null): void
{
$this->reconnectNotes = $reconnectNotes;
}
Expand All @@ -258,7 +258,7 @@ public function getAttendees(): ?string
return $this->attendees;
}

public function setAttendees(string $attendees = null): void
public function setAttendees(?string $attendees = null): void
{
$this->attendees = $attendees;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Filter/AssociationFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AssociationFilter implements FilterInterface
/** @var array<string> */
private array $associations;

public static function new(string $propertyName, string $label = null): self
public static function new(string $propertyName, ?string $label = null): self
{
$properties = explode('.', $propertyName);

Expand Down

0 comments on commit de566db

Please sign in to comment.