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,
|
||||
start: record.start,
|
||||
end: record.end,
|
||||
terminationReason: record.terminationReason,
|
||||
qualification: record.qualification.qualification,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -26,13 +26,13 @@ export default abstract class MemberService {
|
|||
)
|
||||
.leftJoinAndSelect("membership_first.status", "status_first")
|
||||
.leftJoinAndSelect("membership_last.status", "status_last")
|
||||
.leftJoinAndSelect("member.sendNewsletter", "communication")
|
||||
.leftJoinAndSelect("communication.type", "communicationtype")
|
||||
.leftJoinAndSelect("member.sendNewsletter", "sendNewsletter")
|
||||
.leftJoinAndSelect("sendNewsletter.type", "communicationtype")
|
||||
.leftJoinAndMapMany(
|
||||
"member.preferredCommunication",
|
||||
"member.communications",
|
||||
"preferredCommunication",
|
||||
"preferredCommunication.preferred = TRUE"
|
||||
"preferredCommunication.preferred = 1"
|
||||
)
|
||||
.leftJoinAndSelect("preferredCommunication.type", "communicationtype_preferred")
|
||||
.offset(offset)
|
||||
|
@ -72,6 +72,15 @@ export default abstract class MemberService {
|
|||
)
|
||||
.leftJoinAndSelect("membership_first.status", "status_first")
|
||||
.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 })
|
||||
.getOneOrFail()
|
||||
.then((res) => {
|
||||
|
|
Loading…
Reference in a new issue