#25-cleanup-&-enhancements #26
4 changed files with 12 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { dataSource } from "../data-source";
|
import { dataSource } from "../data-source";
|
||||||
import { award } from "../entity/award";
|
import { award } from "../entity/award";
|
||||||
|
import { member } from "../entity/member";
|
||||||
import { memberAwards } from "../entity/memberAwards";
|
import { memberAwards } from "../entity/memberAwards";
|
||||||
import { user } from "../entity/user";
|
|
||||||
import InternalException from "../exceptions/internalException";
|
import InternalException from "../exceptions/internalException";
|
||||||
import { CreateMemberAwardCommand, DeleteMemberAwardCommand, UpdateMemberAwardCommand } from "./memberAwardCommand";
|
import { CreateMemberAwardCommand, DeleteMemberAwardCommand, UpdateMemberAwardCommand } from "./memberAwardCommand";
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@ export default abstract class MemberAwardCommandHandler {
|
||||||
note: createMemberAward.note,
|
note: createMemberAward.note,
|
||||||
date: createMemberAward.date,
|
date: createMemberAward.date,
|
||||||
member: await dataSource
|
member: await dataSource
|
||||||
.getRepository(user)
|
.getRepository(member)
|
||||||
.createQueryBuilder("user")
|
.createQueryBuilder("member")
|
||||||
.where("id = :id", { id: createMemberAward.memberId })
|
.where("id = :id", { id: createMemberAward.memberId })
|
||||||
.getOneOrFail(),
|
.getOneOrFail(),
|
||||||
award: await dataSource
|
award: await dataSource
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { dataSource } from "../data-source";
|
import { dataSource } from "../data-source";
|
||||||
import { executivePosition } from "../entity/executivePosition";
|
import { executivePosition } from "../entity/executivePosition";
|
||||||
|
import { member } from "../entity/member";
|
||||||
import { memberExecutivePositions } from "../entity/memberExecutivePositions";
|
import { memberExecutivePositions } from "../entity/memberExecutivePositions";
|
||||||
import { user } from "../entity/user";
|
|
||||||
import InternalException from "../exceptions/internalException";
|
import InternalException from "../exceptions/internalException";
|
||||||
import {
|
import {
|
||||||
CreateMemberExecutivePositionCommand,
|
CreateMemberExecutivePositionCommand,
|
||||||
|
@ -25,8 +25,8 @@ export default abstract class MemberExecutivePositionCommandHandler {
|
||||||
start: createMemberExecutivePosition.start,
|
start: createMemberExecutivePosition.start,
|
||||||
end: createMemberExecutivePosition.end,
|
end: createMemberExecutivePosition.end,
|
||||||
member: await dataSource
|
member: await dataSource
|
||||||
.getRepository(user)
|
.getRepository(member)
|
||||||
.createQueryBuilder("user")
|
.createQueryBuilder("member")
|
||||||
.where("id = :id", { id: createMemberExecutivePosition.memberId })
|
.where("id = :id", { id: createMemberExecutivePosition.memberId })
|
||||||
.getOneOrFail(),
|
.getOneOrFail(),
|
||||||
executivePosition: await dataSource
|
executivePosition: await dataSource
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { dataSource } from "../data-source";
|
import { dataSource } from "../data-source";
|
||||||
import { qualification } from "../entity/qualification";
|
import { qualification } from "../entity/qualification";
|
||||||
import { memberQualifications } from "../entity/memberQualifications";
|
import { memberQualifications } from "../entity/memberQualifications";
|
||||||
import { user } from "../entity/user";
|
|
||||||
import InternalException from "../exceptions/internalException";
|
import InternalException from "../exceptions/internalException";
|
||||||
import {
|
import {
|
||||||
CreateMemberQualificationCommand,
|
CreateMemberQualificationCommand,
|
||||||
DeleteMemberQualificationCommand,
|
DeleteMemberQualificationCommand,
|
||||||
UpdateMemberQualificationCommand,
|
UpdateMemberQualificationCommand,
|
||||||
} from "./memberQualificationCommand";
|
} from "./memberQualificationCommand";
|
||||||
|
import { member } from "../entity/member";
|
||||||
|
|
||||||
export default abstract class MemberQualificationCommandHandler {
|
export default abstract class MemberQualificationCommandHandler {
|
||||||
/**
|
/**
|
||||||
|
@ -24,8 +24,8 @@ export default abstract class MemberQualificationCommandHandler {
|
||||||
note: createMemberQualification.note,
|
note: createMemberQualification.note,
|
||||||
start: createMemberQualification.start,
|
start: createMemberQualification.start,
|
||||||
member: await dataSource
|
member: await dataSource
|
||||||
.getRepository(user)
|
.getRepository(member)
|
||||||
.createQueryBuilder("user")
|
.createQueryBuilder("member")
|
||||||
.where("id = :id", { id: createMemberQualification.memberId })
|
.where("id = :id", { id: createMemberQualification.memberId })
|
||||||
.getOneOrFail(),
|
.getOneOrFail(),
|
||||||
qualification: await dataSource
|
qualification: await dataSource
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { dataSource } from "../data-source";
|
import { dataSource } from "../data-source";
|
||||||
|
import { member } from "../entity/member";
|
||||||
import { membership } from "../entity/membership";
|
import { membership } from "../entity/membership";
|
||||||
import { membershipStatus } from "../entity/membershipStatus";
|
import { membershipStatus } from "../entity/membershipStatus";
|
||||||
import { user } from "../entity/user";
|
|
||||||
import InternalException from "../exceptions/internalException";
|
import InternalException from "../exceptions/internalException";
|
||||||
import { CreateMembershipCommand, DeleteMembershipCommand, UpdateMembershipCommand } from "./membershipCommand";
|
import { CreateMembershipCommand, DeleteMembershipCommand, UpdateMembershipCommand } from "./membershipCommand";
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ export default abstract class MembershipCommandHandler {
|
||||||
internalId: createMembership.internalId,
|
internalId: createMembership.internalId,
|
||||||
start: createMembership.start,
|
start: createMembership.start,
|
||||||
member: await dataSource
|
member: await dataSource
|
||||||
.getRepository(user)
|
.getRepository(member)
|
||||||
.createQueryBuilder("user")
|
.createQueryBuilder("member")
|
||||||
.where("id = :id", { id: createMembership.memberId })
|
.where("id = :id", { id: createMembership.memberId })
|
||||||
.getOneOrFail(),
|
.getOneOrFail(),
|
||||||
status: await dataSource
|
status: await dataSource
|
||||||
|
|
Loading…
Reference in a new issue