Skip to content
Extraits de code Groupes Projets
Valider aef30a38 rédigé par mohamedlemine.telmoudy's avatar mohamedlemine.telmoudy
Parcourir les fichiers

Add default render inputs

parent 7f06545c
1 requête de fusion!26"feature/HIR-10" : Gestion des Evénement | Interfaces
Pipeline #4173 réussi avec l'étape
in 4 minutes et 24 secondes
......@@ -66,7 +66,7 @@ export function CreateCampaign({ onClose, onCreate }: CreateCampaignProps) {
<TextField
label="Nom"
variant="outlined"
value={name}
value={name || `Titre du Campagne !!`}
onChange={(e) => setName(e.target.value)}
/>
{errors.name && <FormHelperText>Ce champ est requis</FormHelperText>}
......@@ -78,7 +78,7 @@ export function CreateCampaign({ onClose, onCreate }: CreateCampaignProps) {
type="date"
InputLabelProps={{ shrink: true }}
variant="outlined"
value={startDate}
value={startDate }
onChange={(e) => setStartDate(e.target.value)}
/>
{errors.startDate && <FormHelperText>Ce champ est requis</FormHelperText>}
......@@ -90,21 +90,13 @@ export function CreateCampaign({ onClose, onCreate }: CreateCampaignProps) {
type="date"
InputLabelProps={{ shrink: true }}
variant="outlined"
value={endDate}
value={endDate }
onChange={(e) => setEndDate(e.target.value)}
/>
{errors.endDate && <FormHelperText>Ce champ est requis</FormHelperText>}
</FormControl>
<FormControl error={errors.coverImage} fullWidth>
<TextField
label="Image de couverture"
variant="outlined"
value={coverImage}
onChange={(e) => setCoverImage(e.target.value)}
/>
{errors.coverImage && <FormHelperText>Ce champ est requis</FormHelperText>}
</FormControl>
<FormControl error={errors.shortDescription} fullWidth>
<TextField
......@@ -112,7 +104,7 @@ export function CreateCampaign({ onClose, onCreate }: CreateCampaignProps) {
variant="outlined"
multiline
rows={3}
value={shortDescription}
value={shortDescription || `Description..`}
onChange={(e) => setShortDescription(e.target.value)}
/>
{errors.shortDescription && <FormHelperText>Ce champ est requis</FormHelperText>}
......@@ -122,7 +114,7 @@ export function CreateCampaign({ onClose, onCreate }: CreateCampaignProps) {
<TextField
label="Durée"
variant="outlined"
value={duration}
value={duration || `Durée en jours..`}
onChange={(e) => setDuration(e.target.value)}
/>
{errors.duration && <FormHelperText>Ce champ est requis</FormHelperText>}
......@@ -132,7 +124,7 @@ export function CreateCampaign({ onClose, onCreate }: CreateCampaignProps) {
<TextField
label="Activités"
variant="outlined"
value={activities}
value={activities || `Activités.. !!`}
onChange={(e) => setActivities(e.target.value)}
/>
{errors.activities && <FormHelperText>Ce champ est requis</FormHelperText>}
......
......@@ -67,8 +67,8 @@ export function CreateHackathon({ onClose, onCreate }: CreateHackathonProps) {
<TextField
label="Nom"
variant="outlined"
value={name}
onChange={(e) => setName(e.target.value)}
value={name || `Titre du Hackathon !!`}
onChange={(e) => setName(e.target.value)}
/>
{errors.name && <FormHelperText>Ce champ est requis</FormHelperText>}
</FormControl>
......@@ -79,7 +79,7 @@ export function CreateHackathon({ onClose, onCreate }: CreateHackathonProps) {
type="date"
InputLabelProps={{ shrink: true }}
variant="outlined"
value={startDate}
value={startDate }
onChange={(e) => setStartDate(e.target.value)}
/>
{errors.startDate && <FormHelperText>Ce champ est requis</FormHelperText>}
......@@ -91,29 +91,20 @@ export function CreateHackathon({ onClose, onCreate }: CreateHackathonProps) {
type="date"
InputLabelProps={{ shrink: true }}
variant="outlined"
value={endDate}
value={endDate }
onChange={(e) => setEndDate(e.target.value)}
/>
{errors.endDate && <FormHelperText>Ce champ est requis</FormHelperText>}
</FormControl>
<FormControl error={errors.coverImage} fullWidth>
<TextField
label="Image de couverture"
variant="outlined"
value={coverImage}
onChange={(e) => setCoverImage(e.target.value)}
/>
{errors.coverImage && <FormHelperText>Ce champ est requis</FormHelperText>}
</FormControl>
<FormControl error={errors.shortDescription} fullWidth>
<TextField
label="Description courte"
variant="outlined"
multiline
rows={3}
value={shortDescription}
value={shortDescription || `Description..`}
onChange={(e) => setShortDescription(e.target.value)}
/>
{errors.shortDescription && <FormHelperText>Ce champ est requis</FormHelperText>}
......@@ -123,7 +114,7 @@ export function CreateHackathon({ onClose, onCreate }: CreateHackathonProps) {
<TextField
label="Durée"
variant="outlined"
value={duration}
value={duration || `une seule Journée`}
onChange={(e) => setDuration(e.target.value)}
/>
{errors.duration && <FormHelperText>Ce champ est requis</FormHelperText>}
......@@ -133,7 +124,7 @@ export function CreateHackathon({ onClose, onCreate }: CreateHackathonProps) {
<TextField
label="Activités"
variant="outlined"
value={activities}
value={activities || `Activités.. !!`}
onChange={(e) => setActivities(e.target.value)}
/>
{errors.activities && <FormHelperText>Ce champ est requis</FormHelperText>}
......
0% ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter