member data service and factory
This commit is contained in:
parent
e4e5f6dffb
commit
f673dec5fa
2 changed files with 13 additions and 3 deletions
|
@ -13,6 +13,7 @@ export default abstract class MemberQualificationFactory {
|
||||||
note: record.note,
|
note: record.note,
|
||||||
start: record.start,
|
start: record.start,
|
||||||
end: record.end,
|
end: record.end,
|
||||||
|
terminationReason: record.terminationReason,
|
||||||
qualification: record.qualification.qualification,
|
qualification: record.qualification.qualification,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,13 +26,13 @@ export default abstract class MemberService {
|
||||||
)
|
)
|
||||||
.leftJoinAndSelect("membership_first.status", "status_first")
|
.leftJoinAndSelect("membership_first.status", "status_first")
|
||||||
.leftJoinAndSelect("membership_last.status", "status_last")
|
.leftJoinAndSelect("membership_last.status", "status_last")
|
||||||
.leftJoinAndSelect("member.sendNewsletter", "communication")
|
.leftJoinAndSelect("member.sendNewsletter", "sendNewsletter")
|
||||||
.leftJoinAndSelect("communication.type", "communicationtype")
|
.leftJoinAndSelect("sendNewsletter.type", "communicationtype")
|
||||||
.leftJoinAndMapMany(
|
.leftJoinAndMapMany(
|
||||||
"member.preferredCommunication",
|
"member.preferredCommunication",
|
||||||
"member.communications",
|
"member.communications",
|
||||||
"preferredCommunication",
|
"preferredCommunication",
|
||||||
"preferredCommunication.preferred = TRUE"
|
"preferredCommunication.preferred = 1"
|
||||||
)
|
)
|
||||||
.leftJoinAndSelect("preferredCommunication.type", "communicationtype_preferred")
|
.leftJoinAndSelect("preferredCommunication.type", "communicationtype_preferred")
|
||||||
.offset(offset)
|
.offset(offset)
|
||||||
|
@ -72,6 +72,15 @@ export default abstract class MemberService {
|
||||||
)
|
)
|
||||||
.leftJoinAndSelect("membership_first.status", "status_first")
|
.leftJoinAndSelect("membership_first.status", "status_first")
|
||||||
.leftJoinAndSelect("membership_last.status", "status_last")
|
.leftJoinAndSelect("membership_last.status", "status_last")
|
||||||
|
.leftJoinAndSelect("member.sendNewsletter", "sendNewsletter")
|
||||||
|
.leftJoinAndSelect("sendNewsletter.type", "communicationtype")
|
||||||
|
.leftJoinAndMapMany(
|
||||||
|
"member.preferredCommunication",
|
||||||
|
"member.communications",
|
||||||
|
"preferredCommunication",
|
||||||
|
"preferredCommunication.preferred = 1"
|
||||||
|
)
|
||||||
|
.leftJoinAndSelect("preferredCommunication.type", "communicationtype_preferred")
|
||||||
.where("member.id = :id", { id: id })
|
.where("member.id = :id", { id: id })
|
||||||
.getOneOrFail()
|
.getOneOrFail()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
Loading…
Reference in a new issue