feat(aff): add internal contact field to aff request
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 6m36s
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 6m36s
This commit is contained in:
parent
5d80f20999
commit
42711cde5d
@ -24,6 +24,7 @@ public class AffiliationRequestModel {
|
||||
long siret;
|
||||
String RNA;
|
||||
String address;
|
||||
String contact;
|
||||
|
||||
String m1_lname;
|
||||
String m1_fname;
|
||||
|
||||
@ -118,6 +118,7 @@ public class AffiliationService {
|
||||
origine.setName(model.getName());
|
||||
origine.setRNA(model.getRNA());
|
||||
origine.setAddress(model.getAddress());
|
||||
origine.setContact(model.getContact());
|
||||
origine.setM1_lname(model.getM1_lname());
|
||||
origine.setM1_fname(model.getM1_fname());
|
||||
origine.setM1_lincence(model.getM1_lincence());
|
||||
@ -159,6 +160,7 @@ public class AffiliationService {
|
||||
model.setSiret(form.getSiret());
|
||||
model.setRNA(form.getRna());
|
||||
model.setAddress(form.getAddress());
|
||||
model.setContact(form.getContact());
|
||||
|
||||
if (form.getM1_mode() == 2) {
|
||||
model.setM1_lname(form.getM1_lname());
|
||||
@ -285,6 +287,7 @@ public class AffiliationService {
|
||||
club.setSIRET(form.getSiret());
|
||||
club.setRNA(form.getRna());
|
||||
club.setAddress(form.getAddress());
|
||||
club.setContact_intern(form.getContact());
|
||||
club.setAffiliations(new ArrayList<>());
|
||||
return Panache.withTransaction(() -> clubRepository.persist(club)
|
||||
.chain(c -> sequenceRepository.getNextValueInTransaction(SequenceType.Affiliation)
|
||||
@ -321,6 +324,7 @@ public class AffiliationService {
|
||||
club.setSIRET(form.getSiret());
|
||||
club.setRNA(form.getRna());
|
||||
club.setAddress(form.getAddress());
|
||||
club.setContact_intern(form.getContact());
|
||||
return Panache.withTransaction(() -> clubRepository.persist(club)
|
||||
.chain(() -> repository.persist(new AffiliationModel(null, club, model.getSaison())))
|
||||
.chain(() -> repositoryRequest.delete(model)));
|
||||
|
||||
@ -31,6 +31,8 @@ public class SimpleReqAffiliation {
|
||||
String RNA;
|
||||
@Schema(description = "Adresse de l'association", example = "1 rue de l'exemple, 75000 Paris")
|
||||
String address;
|
||||
@Schema(description = "Email de contact de l'association", example = "test@test.fr")
|
||||
String contact;
|
||||
@Schema(description = "Liste des membres pour la demande d'affiliation")
|
||||
List<AffiliationMember> members;
|
||||
@Schema(description = "Saison de l'affiliation", example = "2025")
|
||||
@ -47,6 +49,7 @@ public class SimpleReqAffiliation {
|
||||
.RNA(model.getRNA())
|
||||
.address(model.getAddress())
|
||||
.saison(model.getSaison())
|
||||
.contact(model.getContact())
|
||||
.members(List.of(
|
||||
new AffiliationMember(model.getM1_lname(), model.getM1_fname(), model.getM1_email(),
|
||||
model.getM1_lincence(), model.getM1_role()),
|
||||
|
||||
@ -33,6 +33,10 @@ public class AffiliationRequestForm {
|
||||
@FormParam("adresse")
|
||||
private String adresse = null;
|
||||
|
||||
@Schema(description = "Email de contact de l'association", example = "test@test.fr")
|
||||
@FormParam("contact")
|
||||
private String contact = null;
|
||||
|
||||
@Schema(description = "La saison de l'affiliation.", example = "2025", required = true)
|
||||
@FormParam("saison")
|
||||
private int saison = -1;
|
||||
@ -114,6 +118,7 @@ public class AffiliationRequestForm {
|
||||
model.setRNA(this.getRna());
|
||||
model.setAddress(this.getAdresse());
|
||||
model.setSaison(this.getSaison());
|
||||
model.setContact(this.getContact());
|
||||
|
||||
model.setM1_lname(this.getM1_lname());
|
||||
model.setM1_fname(this.getM1_fname());
|
||||
|
||||
@ -31,6 +31,10 @@ public class AffiliationRequestSaveForm {
|
||||
@FormParam("address")
|
||||
private String address = null;
|
||||
|
||||
@Schema(description = "Email de contact de l'association", example = "test@test.fr")
|
||||
@FormParam("contact")
|
||||
private String contact = null;
|
||||
|
||||
@Schema(description = "Le statut de l'association.")
|
||||
@FormParam("status")
|
||||
@PartType(MediaType.APPLICATION_OCTET_STREAM)
|
||||
|
||||
@ -208,6 +208,7 @@ function AssoInfo({initData, needFile}) {
|
||||
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 = () => {
|
||||
if (siret.length < 14) {
|
||||
@ -298,6 +299,15 @@ function AssoInfo({initData, needFile}) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mb-3">
|
||||
<div className="input-group">
|
||||
<span className="input-group-text" id="basic-addon1">Contact administratif*</span>
|
||||
<input type="email" className="form-control" placeholder="Contact administratif" aria-label="Contact administratif"
|
||||
aria-describedby="basic-addon1"
|
||||
required value={contact} name="contact" onChange={e => setContact(e.target.value)}/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mb-3">
|
||||
<div className="input-group">
|
||||
<label className="input-group-text" htmlFor="logo">Blason{needFile && "*"}</label>
|
||||
|
||||
@ -180,6 +180,7 @@ function Content({data, refresh}) {
|
||||
<TextField type="number" name="siret" text="SIRET" value={data.siret} disabled={true}/>
|
||||
<TextField name="rna" text="RNA" value={data.rna} required={false}/>
|
||||
<TextField name="address" text="Adresse" value={data.address}/>
|
||||
<TextField name="contact" text="Contact administratif" value={data.contact}/>
|
||||
|
||||
<img
|
||||
src={`${vite_url}/api/affiliation/request/${data.id}/logo`}
|
||||
@ -198,7 +199,7 @@ function Content({data, refresh}) {
|
||||
<label className="input-group-text" htmlFor="status">Status</label>
|
||||
<a href={`${vite_url}/api/affiliation/request/${data.id}/status`} target='_blank'>
|
||||
<button className="btn btn-outline-secondary" type="button" id="button-addon1"
|
||||
onClick={e => null}><FontAwesomeIcon icon={faFilePdf}></FontAwesomeIcon>
|
||||
onClick={_ => null}><FontAwesomeIcon icon={faFilePdf}></FontAwesomeIcon>
|
||||
</button>
|
||||
</a>
|
||||
<input type="file" className="form-control" id="status" name="status" accept=".pdf,.txt"/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user