feat: Protection des données des associations
This commit is contained in:
@ -34,23 +34,28 @@ const config = {
|
||||
if (!association.title) {
|
||||
association.title = association.denomination
|
||||
}
|
||||
const bureau = []
|
||||
for (const contact of association.bureau) {
|
||||
const detail = contact.Contact_id
|
||||
let c = {
|
||||
denomination: detail.denomination,
|
||||
prenom: detail.prenom,
|
||||
nom: detail.nom,
|
||||
if (association.bureau && association.bureau.length > 0) {
|
||||
console.log(association.bureau.length)
|
||||
const bureau = []
|
||||
for (const contact of association.bureau) {
|
||||
const detail = contact.Contact_id
|
||||
let c = {
|
||||
denomination: detail.denomination,
|
||||
prenom: detail.prenom,
|
||||
nom: detail.nom,
|
||||
}
|
||||
if (detail.mail && detail.display_mail) {
|
||||
c.mail = detail.mail
|
||||
}
|
||||
if (detail.telephone && detail.display_telephone) {
|
||||
c.telephone = detail.telephone
|
||||
}
|
||||
bureau.push(c)
|
||||
}
|
||||
if (detail.mail && detail.display_mail) {
|
||||
c.mail = detail.mail
|
||||
}
|
||||
if (detail.telephone && detail.display_telephone) {
|
||||
c.telephone = detail.telephone
|
||||
}
|
||||
bureau.push(c)
|
||||
association.bureau = bureau
|
||||
} else {
|
||||
delete association.bureau
|
||||
}
|
||||
association.bureau = bureau
|
||||
|
||||
return `./content/associations/${urlslug(association.denomination)}`;
|
||||
},
|
||||
|
Reference in New Issue
Block a user