member communication
This commit is contained in:
parent
2398084764
commit
93afdec274
1 changed files with 81 additions and 76 deletions
|
@ -462,7 +462,8 @@ router.get("/", async (req, res) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add communications
|
// add communications
|
||||||
const createCommunicationCommands:CreateCommunicationCommand[] = [];
|
if (!queryResultElement.verzogen) {
|
||||||
|
const createCommunicationCommands: CreateCommunicationCommand[] = [];
|
||||||
let havePreferred = false;
|
let havePreferred = false;
|
||||||
if (queryResultElement.Mobiltelefon && !queryResultElement.verstorben && !queryResultElement.verzogenDatum) {
|
if (queryResultElement.Mobiltelefon && !queryResultElement.verstorben && !queryResultElement.verzogenDatum) {
|
||||||
const createCommunicationMobile: CreateCommunicationCommand = {
|
const createCommunicationMobile: CreateCommunicationCommand = {
|
||||||
|
@ -472,6 +473,7 @@ router.get("/", async (req, res) => {
|
||||||
city: "",
|
city: "",
|
||||||
email: "",
|
email: "",
|
||||||
mobile: queryResultElement.Mobiltelefon.trim(),
|
mobile: queryResultElement.Mobiltelefon.trim(),
|
||||||
|
postalCode: "",
|
||||||
preferred: false,
|
preferred: false,
|
||||||
street: "",
|
street: "",
|
||||||
streetNumber: 0,
|
streetNumber: 0,
|
||||||
|
@ -488,6 +490,7 @@ router.get("/", async (req, res) => {
|
||||||
email: queryResultElement.email,
|
email: queryResultElement.email,
|
||||||
mobile: "",
|
mobile: "",
|
||||||
preferred: queryResultElement.EinladungNurPerEmail,
|
preferred: queryResultElement.EinladungNurPerEmail,
|
||||||
|
postalCode: "",
|
||||||
street: "",
|
street: "",
|
||||||
streetNumber: 0,
|
streetNumber: 0,
|
||||||
streetNumberAddition: "",
|
streetNumberAddition: "",
|
||||||
|
@ -506,6 +509,7 @@ router.get("/", async (req, res) => {
|
||||||
city: "",
|
city: "",
|
||||||
email: "",
|
email: "",
|
||||||
mobile: queryResultElement.Mobiltelefon.trim(),
|
mobile: queryResultElement.Mobiltelefon.trim(),
|
||||||
|
postalCode: "",
|
||||||
preferred: preferred,
|
preferred: preferred,
|
||||||
street: "",
|
street: "",
|
||||||
streetNumber: 0,
|
streetNumber: 0,
|
||||||
|
@ -526,6 +530,7 @@ router.get("/", async (req, res) => {
|
||||||
email: "",
|
email: "",
|
||||||
mobile: "",
|
mobile: "",
|
||||||
preferred: preferred,
|
preferred: preferred,
|
||||||
|
postalCode: queryResultElement.PLZ,
|
||||||
street: queryResultElement.street.trim(),
|
street: queryResultElement.street.trim(),
|
||||||
streetNumber: queryResultElement.streetnumber,
|
streetNumber: queryResultElement.streetnumber,
|
||||||
streetNumberAddition: queryResultElement.streetnumberaddition.trim(),
|
streetNumberAddition: queryResultElement.streetnumberaddition.trim(),
|
||||||
|
@ -543,7 +548,7 @@ router.get("/", async (req, res) => {
|
||||||
console.log(`Adding communication for ${sCommTypesById[createCommunicationCommand.typeId]} to ${newMember.firstname} ${newMember.lastname}`)
|
console.log(`Adding communication for ${sCommTypesById[createCommunicationCommand.typeId]} to ${newMember.firstname} ${newMember.lastname}`)
|
||||||
await CommunicationCommandHandler.create(createCommunicationCommand);
|
await CommunicationCommandHandler.create(createCommunicationCommand);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
res.sendStatus(200);
|
res.sendStatus(200);
|
||||||
|
|
Loading…
Reference in a new issue