feat: Resynchronisation automatique des associations
This commit is contained in:
parent
a33dfc9322
commit
dc26afe2cb
|
@ -52,57 +52,57 @@ const config = {
|
||||||
},
|
},
|
||||||
deleteFields: [],
|
deleteFields: [],
|
||||||
},
|
},
|
||||||
// Association: {
|
Association: {
|
||||||
// readByQueryOption: {
|
readByQueryOption: {
|
||||||
// fields: [
|
fields: [
|
||||||
// 'denomination',
|
'denomination',
|
||||||
// 'title',
|
'title',
|
||||||
// 'description',
|
'description',
|
||||||
// 'mail',
|
'mail',
|
||||||
// 'telephone',
|
'telephone',
|
||||||
// 'site',
|
'site',
|
||||||
// 'facebook',
|
'facebook',
|
||||||
// 'bureau.sort',
|
'bureau.sort',
|
||||||
// 'bureau.Contact_id.*',
|
'bureau.Contact_id.*',
|
||||||
// 'content',
|
'content',
|
||||||
// ],
|
],
|
||||||
// filterAssociation
|
filterAssociation
|
||||||
// },
|
},
|
||||||
// pathBuilder: (association) => {
|
pathBuilder: (association) => {
|
||||||
// if (!association.title) {
|
if (!association.title) {
|
||||||
// association.title = association.denomination
|
association.title = association.denomination
|
||||||
// }
|
}
|
||||||
// console.log("Import de l'association « " + association.title + " »")
|
console.log("Import de l'association « " + association.title + " »")
|
||||||
// if (association.bureau && association.bureau.length > 0) {
|
if (association.bureau && association.bureau.length > 0) {
|
||||||
// const bureau = []
|
const bureau = []
|
||||||
// for (const contact of association.bureau) {
|
for (const contact of association.bureau) {
|
||||||
// const detail = contact.Contact_id
|
const detail = contact.Contact_id
|
||||||
// if (detail) {
|
if (detail) {
|
||||||
// let c = {
|
let c = {
|
||||||
// denomination: detail.denomination,
|
denomination: detail.denomination,
|
||||||
// prenom: detail.prenom,
|
prenom: detail.prenom,
|
||||||
// nom: detail.nom,
|
nom: detail.nom,
|
||||||
// }
|
}
|
||||||
// if (detail.mail && detail.display_mail) {
|
if (detail.mail && detail.display_mail) {
|
||||||
// c.mail = detail.mail
|
c.mail = detail.mail
|
||||||
// }
|
}
|
||||||
// if (detail.telephone && detail.display_telephone) {
|
if (detail.telephone && detail.display_telephone) {
|
||||||
// c.telephone = detail.telephone
|
c.telephone = detail.telephone
|
||||||
// }
|
}
|
||||||
// bureau.push(c)
|
bureau.push(c)
|
||||||
// } else {
|
} else {
|
||||||
// console.log("problème sur un contact")
|
console.log("problème sur un contact")
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// association.bureau = bureau
|
association.bureau = bureau
|
||||||
// } else {
|
} else {
|
||||||
// delete association.bureau
|
delete association.bureau
|
||||||
// }
|
}
|
||||||
|
|
||||||
// return `./content/associations/${urlslug(association.denomination)}`;
|
return `./content/associations/${urlslug(association.denomination)}`;
|
||||||
// },
|
},
|
||||||
// deleteFields: [],
|
deleteFields: [],
|
||||||
// },
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue