Compare commits
3 Commits
7e380ccb69
...
8a0e4423f2
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a0e4423f2 | |||
| b956236934 | |||
| 7767c98304 |
@ -11,7 +11,7 @@ import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||
import org.jboss.resteasy.reactive.PartType;
|
||||
|
||||
@Getter
|
||||
@ToString
|
||||
@ToString(exclude = {"status", "logo"})
|
||||
public class AffiliationRequestForm {
|
||||
@Schema(description = "L'identifiant de l'affiliation. (null si nouvelle demande d'affiliation)")
|
||||
@FormParam("id")
|
||||
|
||||
@ -126,6 +126,7 @@ function ReAuthMsg() {
|
||||
const notAuthPaths = [
|
||||
/^\/$/s,
|
||||
/^\/affiliation(\/)?$/s,
|
||||
/^\/affiliation\/ok(\/)?$/s,
|
||||
/^\/complete\/auth.*$/s
|
||||
]
|
||||
|
||||
|
||||
@ -88,13 +88,14 @@ export function CountryList({name, text, value, values = undefined, disabled = f
|
||||
</div>
|
||||
}
|
||||
|
||||
export function TextField({name, text, value, placeholder, type = "text", disabled = false, required = true}) {
|
||||
return <div className="row">
|
||||
<div className="input-group mb-3">
|
||||
export function TextField({name, text, value, placeholder, type = "text", disabled = false, required = true, ttip = null}) {
|
||||
return <div className="row mb-3">
|
||||
<div className="input-group">
|
||||
<span className="input-group-text" id={name}>{text}</span>
|
||||
<input type={type} className="form-control" placeholder={placeholder ? placeholder : text} aria-label={name}
|
||||
name={name} aria-describedby={name} defaultValue={value} disabled={disabled} required={required}/>
|
||||
</div>
|
||||
{ttip}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@ -20,11 +20,11 @@ function reconstruireAdresse(infos) {
|
||||
console.log(infos);
|
||||
let adresseReconstruite = "";
|
||||
|
||||
if(infos.numero_voie === null){
|
||||
if (infos.numero_voie === null) {
|
||||
if (infos.complement_adresse) {
|
||||
adresseReconstruite += formatAdresse(infos.complement_adresse) + ', ';
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
adresseReconstruite += infos.numero_voie + ' ';
|
||||
}
|
||||
|
||||
@ -46,6 +46,13 @@ function reconstruireAdresse(infos) {
|
||||
return adresseReconstruite;
|
||||
}
|
||||
|
||||
function getSaisonToAff(currentDate = new Date()) {
|
||||
if (currentDate.getMonth() >= 7) { //aout et plus
|
||||
return currentDate.getFullYear()
|
||||
} else {
|
||||
return currentDate.getFullYear() - 1
|
||||
}
|
||||
}
|
||||
|
||||
export function DemandeAff() {
|
||||
const {hash} = useLocation();
|
||||
@ -145,7 +152,7 @@ export function DemandeAff() {
|
||||
}
|
||||
|
||||
return <div>
|
||||
<h1>Demande d'affiliation</h1>
|
||||
<h1>Demande d'affiliation {getSaisonToAff() + "-" + (getSaisonToAff() + 1)}</h1>
|
||||
<p>L'affiliation est annuelle et valable pour une saison sportive : du 1er septembre au 31 août de l’année
|
||||
suivante.</p>
|
||||
Pour s’affilier, une association sportive doit réunir les conditions suivantes :
|
||||
@ -216,7 +223,6 @@ function AssoInfo({initData, needFile}) {
|
||||
const [rna, setRna] = useState(initData.rna ? initData.rna : "")
|
||||
const [rnaEnable, setRnaEnable] = useState(false)
|
||||
const [adresse, setAdresse] = useState(initData.address ? initData.address : "")
|
||||
const [saison, setSaison] = useState(initData.saison ? initData.saison : getSaison())
|
||||
const [contact, setContact] = useState(initData.contact ? initData.contact : "")
|
||||
|
||||
const fetchSiret = () => {
|
||||
@ -245,26 +251,8 @@ function AssoInfo({initData, needFile}) {
|
||||
setAdresse(reconstruireAdresse(data2.etablissement_siege))
|
||||
})
|
||||
}
|
||||
|
||||
const currentSaison = getSaison();
|
||||
|
||||
return <>
|
||||
<div className="input-group mb-3">
|
||||
<div className="input-group-text">
|
||||
<input className="form-check-input mt-0" type="radio" value={currentSaison} aria-label={currentSaison + "-" + (currentSaison + 1)}
|
||||
name={"saison"} checked={saison === currentSaison}
|
||||
onChange={e => setSaison(Number(e.target.value))}/>
|
||||
{currentSaison + "-" + (currentSaison + 1)}
|
||||
</div>
|
||||
<span className="input-group-text">OU</span>
|
||||
<div className="input-group-text">
|
||||
<input className="form-check-input mt-0" type="radio" value={currentSaison + 1}
|
||||
aria-label={(currentSaison + 1) + "-" + (currentSaison + 2)}
|
||||
name={"saison"} checked={saison === currentSaison + 1}
|
||||
onChange={e => setSaison(Number(e.target.value))}/>
|
||||
{(currentSaison + 1) + "-" + (currentSaison + 2)}
|
||||
</div>
|
||||
</div>
|
||||
<input name="saison" value={getSaisonToAff()} readOnly hidden/>
|
||||
|
||||
<div className="input-group mb-3">
|
||||
<span className="input-group-text" id="basic-addon1">Nom de l'association*</span>
|
||||
|
||||
@ -8,7 +8,6 @@ import {RoleList, TextField} from "../../../components/MemberCustomFiels.jsx";
|
||||
import {useEffect, useRef, useState} from "react";
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faFilePdf} from "@fortawesome/free-solid-svg-icons";
|
||||
import {ConfirmDialog} from "../../../components/ConfirmDialog.jsx";
|
||||
|
||||
const vite_url = import.meta.env.VITE_URL;
|
||||
|
||||
@ -166,7 +165,7 @@ function Content({data, refresh}) {
|
||||
<input name="id" value={data.id} readOnly hidden/>
|
||||
<div className="card-header">Demande d'affiliation</div>
|
||||
<div className="card-body text-center">
|
||||
{data.club && <h5>Ce club a déjà ete affilier (affiliation n°{data.club_no_aff})</h5>}
|
||||
{data.club && <h5>Ce club a déjà été affilié (affiliation n°{data.club_no_aff})</h5>}
|
||||
<h4 id="saison">Saison {data.saison}-{data.saison + 1}</h4>
|
||||
|
||||
<div className="row mb-3">
|
||||
|
||||
@ -49,7 +49,9 @@ export function InformationForm({data}) {
|
||||
<TextField name="lname" text="Nom" value={data.lname}/>
|
||||
<TextField name="fname" text="Prénom" value={data.fname}/>
|
||||
<TextField name="email" text="Email" value={data.email} placeholder="name@example.com"
|
||||
type="email"/>
|
||||
type="email" ttip={<small className="form-text">L'email sert à la création de compte pour se connecter au site et doit être unique. <br/>
|
||||
Pour les mineurs, l'email des parents peut être utilisé plusieurs fois grâce à la syntaxe suivante : {'email.parent+<caractères alphanumériques>@exemple.com'}.<br/>
|
||||
Exemples : mail.parent+1@exemple.com, mail.parent+titouan@exemple.com, mail.parent+cedrique@exemple.com</small>}/>
|
||||
<OptionField name="genre" text="Genre" value={data.genre}
|
||||
values={{NA: 'N/A', H: 'H', F: 'F'}}/>
|
||||
<CountryList name="country" text="Pays" value={data.country}/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user