Merge pull request '#25-cleanup-&-enhancements' (#31) from #25-cleanup-&-enhancements into main

Reviewed-on: Ehrenamt/member-administration-server#31
This commit is contained in:
Julian Krauser 2025-01-05 15:12:11 +00:00
commit bd355cff1f
260 changed files with 1231 additions and 1002 deletions

View file

@ -2,5 +2,5 @@
node_modules/
dist/
.git/
export/
files/
.env

2
.gitignore vendored
View file

@ -130,6 +130,6 @@ dist
.yarn/install-state.gz
.pnp.*
export
files
.idea

View file

@ -39,7 +39,7 @@ services:
- CLUB_NAME=<tobemodified>
- CLUB_WEBSITE=<tobemodified>
volumes:
- <volume|local path>:/app/export
- <volume|local path>:/app/files
networks:
- ff_internal
depends_on:

View file

@ -1,13 +1,13 @@
import { dataSource } from "../data-source";
import { calendar } from "../entity/calendar";
import { calendarType } from "../entity/calendarType";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { calendar } from "../../../entity/club/calendar";
import { calendarType } from "../../../entity/settings/calendarType";
import InternalException from "../../../exceptions/internalException";
import { CreateCalendarCommand, DeleteCalendarCommand, UpdateCalendarCommand } from "./calendarCommand";
export default abstract class CalendarCommandHandler {
/**
* @description create calendar
* @param CreateCalendarCommand
* @param {CreateCalendarCommand} createCalendar
* @returns {Promise<number>}
*/
static async create(createCalendar: CreateCalendarCommand): Promise<number> {
@ -39,7 +39,7 @@ export default abstract class CalendarCommandHandler {
/**
* @description update calendar
* @param UpdateCalendarCommand
* @param {UpdateCalendarCommand} updateCalendar
* @returns {Promise<void>}
*/
static async update(updateCalendar: UpdateCalendarCommand): Promise<void> {
@ -78,7 +78,7 @@ export default abstract class CalendarCommandHandler {
/**
* @description delete calendar
* @param DeleteCalendarCommand
* @param {DeleteCalendarCommand} deleteCalendar
* @returns {Promise<void>}
*/
static async delete(deleteCalendar: DeleteCalendarCommand): Promise<void> {

View file

@ -1,8 +1,6 @@
import { dataSource } from "../data-source";
import { communication } from "../entity/communication";
import { communicationType } from "../entity/communicationType";
import { user } from "../entity/user";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { communication } from "../../../entity/club/member/communication";
import InternalException from "../../../exceptions/internalException";
import {
CreateCommunicationCommand,
DeleteCommunicationCommand,
@ -12,7 +10,7 @@ import {
export default abstract class CommunicationCommandHandler {
/**
* @description create communication
* @param CreateCommunicationCommand
* @param {CreateCommunicationCommand} createCommunication
* @returns {Promise<number>}
*/
static async create(createCommunication: CreateCommunicationCommand): Promise<number> {
@ -44,7 +42,7 @@ export default abstract class CommunicationCommandHandler {
/**
* @description update communication
* @param UpdateCommunicationCommand
* @param {UpdateCommunicationCommand} updateCommunication
* @returns {Promise<void>}
*/
static async update(updateCommunication: UpdateCommunicationCommand): Promise<void> {
@ -73,7 +71,7 @@ export default abstract class CommunicationCommandHandler {
/**
* @description delete communication
* @param DeleteCommunicationCommand
* @param {DeleteCommunicationCommand} deleteCommunication
* @returns {Promise<void>}
*/
static async delete(deleteCommunication: DeleteCommunicationCommand): Promise<void> {

View file

@ -1,14 +1,12 @@
import { dataSource } from "../data-source";
import { award } from "../entity/award";
import { member } from "../entity/member";
import { memberAwards } from "../entity/memberAwards";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { memberAwards } from "../../../entity/club/member/memberAwards";
import InternalException from "../../../exceptions/internalException";
import { CreateMemberAwardCommand, DeleteMemberAwardCommand, UpdateMemberAwardCommand } from "./memberAwardCommand";
export default abstract class MemberAwardCommandHandler {
/**
* @description create memberAward
* @param CreateMemberAwardCommand
* @param {CreateMemberAwardCommand} createMemberAward
* @returns {Promise<number>}
*/
static async create(createMemberAward: CreateMemberAwardCommand): Promise<number> {
@ -34,7 +32,7 @@ export default abstract class MemberAwardCommandHandler {
/**
* @description update memberAward
* @param UpdateMemberAwardCommand
* @param {UpdateMemberAwardCommand} updateMemberAward
* @returns {Promise<void>}
*/
static async update(updateMemberAward: UpdateMemberAwardCommand): Promise<void> {
@ -58,16 +56,16 @@ export default abstract class MemberAwardCommandHandler {
/**
* @description delete memberAward
* @param DeleteMemberAwardCommand
* @param {DeleteMemberAwardCommand} deleteMemberAward
* @returns {Promise<void>}
*/
static async delete(deletMemberAward: DeleteMemberAwardCommand): Promise<void> {
static async delete(deleteMemberAward: DeleteMemberAwardCommand): Promise<void> {
return await dataSource
.createQueryBuilder()
.delete()
.from(memberAwards)
.where("id = :id", { id: deletMemberAward.id })
.andWhere("memberId = :memberId", { memberId: deletMemberAward.memberId })
.where("id = :id", { id: deleteMemberAward.id })
.andWhere("memberId = :memberId", { memberId: deleteMemberAward.memberId })
.execute()
.then(() => {})
.catch((err) => {

View file

@ -1,4 +1,4 @@
import { Salutation } from "../enums/salutation";
import { Salutation } from "../../../enums/salutation";
export interface CreateMemberCommand {
salutation: Salutation;

View file

@ -1,8 +1,7 @@
import { dataSource } from "../data-source";
import { communication } from "../entity/communication";
import { member } from "../entity/member";
import InternalException from "../exceptions/internalException";
import CommunicationService from "../service/communicationService";
import { dataSource } from "../../../data-source";
import { communication } from "../../../entity/club/member/communication";
import { member } from "../../../entity/club/member/member";
import InternalException from "../../../exceptions/internalException";
import {
CreateMemberCommand,
DeleteMemberCommand,
@ -13,7 +12,7 @@ import {
export default abstract class MemberCommandHandler {
/**
* @description create member
* @param CreateMemberCommand
* @param {CreateMemberCommand} createMember
* @returns {Promise<number>}
*/
static async create(createMember: CreateMemberCommand): Promise<number> {
@ -40,7 +39,7 @@ export default abstract class MemberCommandHandler {
/**
* @description update member
* @param UpdateMemberCommand
* @param {UpdateMemberCommand} updateMember
* @returns {Promise<void>}
*/
static async update(updateMember: UpdateMemberCommand): Promise<void> {
@ -66,7 +65,7 @@ export default abstract class MemberCommandHandler {
/**
* @description update member newsletter
* @param UpdateMemberCommand
* @param {UpdateMemberCommand} updateMember
* @returns {Promise<void>}
*/
static async updateNewsletter(updateMember: UpdateMemberNewsletterCommand): Promise<void> {
@ -91,7 +90,7 @@ export default abstract class MemberCommandHandler {
/**
* @description update member newsletter to unset
* @param memberId string
* @param {number} memberId
* @returns {Promise<void>}
*/
static async unsetNewsletter(memberId: number): Promise<void> {
@ -111,7 +110,7 @@ export default abstract class MemberCommandHandler {
/**
* @description delete member
* @param DeleteMemberCommand
* @param {DeleteMemberCommand} deleteMember
* @returns {Promise<void>}
*/
static async delete(deleteMember: DeleteMemberCommand): Promise<void> {

View file

@ -1,8 +1,6 @@
import { dataSource } from "../data-source";
import { executivePosition } from "../entity/executivePosition";
import { member } from "../entity/member";
import { memberExecutivePositions } from "../entity/memberExecutivePositions";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { memberExecutivePositions } from "../../../entity/club/member/memberExecutivePositions";
import InternalException from "../../../exceptions/internalException";
import {
CreateMemberExecutivePositionCommand,
DeleteMemberExecutivePositionCommand,
@ -12,7 +10,7 @@ import {
export default abstract class MemberExecutivePositionCommandHandler {
/**
* @description create memberExecutivePosition
* @param CreateMemberExecutivePositionCommand
* @param {CreateMemberExecutivePositionCommand} createMemberExecutivePosition
* @returns {Promise<number>}
*/
static async create(createMemberExecutivePosition: CreateMemberExecutivePositionCommand): Promise<number> {
@ -38,7 +36,7 @@ export default abstract class MemberExecutivePositionCommandHandler {
/**
* @description update memberExecutivePosition
* @param UpdateMemberExecutivePositionCommand
* @param {UpdateMemberExecutivePositionCommand} updateMemberExecutivePosition
* @returns {Promise<void>}
*/
static async update(updateMemberExecutivePosition: UpdateMemberExecutivePositionCommand): Promise<void> {
@ -62,16 +60,16 @@ export default abstract class MemberExecutivePositionCommandHandler {
/**
* @description delete memberExecutivePosition
* @param DeleteMemberExecutivePositionCommand
* @param {DeleteMemberExecutivePositionCommand} deleteMemberExecutivePosition
* @returns {Promise<void>}
*/
static async delete(deletMemberExecutivePosition: DeleteMemberExecutivePositionCommand): Promise<void> {
static async delete(deleteMemberExecutivePosition: DeleteMemberExecutivePositionCommand): Promise<void> {
return await dataSource
.createQueryBuilder()
.delete()
.from(memberExecutivePositions)
.where("id = :id", { id: deletMemberExecutivePosition.id })
.andWhere("memberId = :memberId", { memberId: deletMemberExecutivePosition.memberId })
.where("id = :id", { id: deleteMemberExecutivePosition.id })
.andWhere("memberId = :memberId", { memberId: deleteMemberExecutivePosition.memberId })
.execute()
.then(() => {})
.catch((err) => {

View file

@ -1,18 +1,16 @@
import { dataSource } from "../data-source";
import { qualification } from "../entity/qualification";
import { memberQualifications } from "../entity/memberQualifications";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { memberQualifications } from "../../../entity/club/member/memberQualifications";
import InternalException from "../../../exceptions/internalException";
import {
CreateMemberQualificationCommand,
DeleteMemberQualificationCommand,
UpdateMemberQualificationCommand,
} from "./memberQualificationCommand";
import { member } from "../entity/member";
export default abstract class MemberQualificationCommandHandler {
/**
* @description create memberQualification
* @param CreateMemberQualificationCommand
* @param {CreateMemberQualificationCommand} createMemberQualification
* @returns {Promise<number>}
*/
static async create(createMemberQualification: CreateMemberQualificationCommand): Promise<number> {
@ -37,7 +35,7 @@ export default abstract class MemberQualificationCommandHandler {
/**
* @description update memberQualification
* @param UpdateMemberQualificationCommand
* @param {UpdateMemberQualificationCommand} updateMemberQualification
* @returns {Promise<void>}
*/
static async update(updateMemberQualification: UpdateMemberQualificationCommand): Promise<void> {
@ -62,16 +60,16 @@ export default abstract class MemberQualificationCommandHandler {
/**
* @description delete memberQualification
* @param DeleteMemberQualificationCommand
* @param {DeleteMemberQualificationCommand} deleteMemberQualification
* @returns {Promise<void>}
*/
static async delete(deletMemberQualification: DeleteMemberQualificationCommand): Promise<void> {
static async delete(deleteMemberQualification: DeleteMemberQualificationCommand): Promise<void> {
return await dataSource
.createQueryBuilder()
.delete()
.from(memberQualifications)
.where("id = :id", { id: deletMemberQualification.id })
.andWhere("memberId = :memberId", { memberId: deletMemberQualification.memberId })
.where("id = :id", { id: deleteMemberQualification.id })
.andWhere("memberId = :memberId", { memberId: deleteMemberQualification.memberId })
.execute()
.then(() => {})
.catch((err) => {

View file

@ -1,8 +1,6 @@
import { dataSource } from "../data-source";
import { member } from "../entity/member";
import { membership } from "../entity/membership";
import { membershipStatus } from "../entity/membershipStatus";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { membership } from "../../../entity/club/member/membership";
import InternalException from "../../../exceptions/internalException";
import { CreateMembershipCommand, DeleteMembershipCommand, UpdateMembershipCommand } from "./membershipCommand";
export default abstract class MembershipCommandHandler {
@ -33,7 +31,7 @@ export default abstract class MembershipCommandHandler {
.createQueryBuilder()
.update(membership)
.set({
end: createMembership.start,
end: new Date(createMembership.start).setDate(new Date(createMembership.start).getDate() - 1),
terminationReason: "beendet durch neuen Eintrag.",
})
.where("end IS NULL")

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { newsletter } from "../entity/newsletter";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { newsletter } from "../../../entity/club/newsletter/newsletter";
import InternalException from "../../../exceptions/internalException";
import { CreateNewsletterCommand, SendNewsletterCommand, SynchronizeNewsletterCommand } from "./newsletterCommand";
export default abstract class NewsletterCommandHandler {
/**
* @description create newsletter
* @param CreateNewsletterCommand
* @param {CreateNewsletterCommand} createNewsletter
* @returns {Promise<number>}
*/
static async create(createNewsletter: CreateNewsletterCommand): Promise<number> {
@ -28,7 +28,7 @@ export default abstract class NewsletterCommandHandler {
/**
* @description sync newsletter
* @param SynchronizeNewsletterCommand
* @param {SynchronizeNewsletterCommand} syncNewsletter
* @returns {Promise<void>}
*/
static async sync(syncNewsletter: SynchronizeNewsletterCommand): Promise<void> {
@ -53,7 +53,7 @@ export default abstract class NewsletterCommandHandler {
/**
* @description send newsletter
* @param SendNewsletterCommand
* @param {SendNewsletterCommand} syncNewsletter
* @returns {Promise<void>}
*/
static async send(syncNewsletter: SendNewsletterCommand): Promise<void> {

View file

@ -1,9 +1,9 @@
import { DeleteResult, EntityManager, InsertResult, UpdateResult } from "typeorm";
import { dataSource } from "../data-source";
import InternalException from "../exceptions/internalException";
import NewsletterDatesService from "../service/newsletterDatesService";
import { dataSource } from "../../../data-source";
import InternalException from "../../../exceptions/internalException";
import NewsletterDatesService from "../../../service/club/newsletter/newsletterDatesService";
import { NewsletterDateCommand, SynchronizeNewsletterDatesCommand } from "./newsletterDatesCommand";
import { newsletterDates } from "../entity/newsletterDates";
import { newsletterDates } from "../../../entity/club/newsletter/newsletterDates";
export default abstract class NewsletterDatesCommandHandler {
/**

View file

@ -1,9 +1,9 @@
import { DeleteResult, EntityManager, InsertResult, UpdateResult } from "typeorm";
import { dataSource } from "../data-source";
import InternalException from "../exceptions/internalException";
import NewsletterRecipientsService from "../service/newsletterRecipientsService";
import { dataSource } from "../../../data-source";
import InternalException from "../../../exceptions/internalException";
import NewsletterRecipientsService from "../../../service/club/newsletter/newsletterRecipientsService";
import { SynchronizeNewsletterRecipientsCommand } from "./newsletterRecipientsCommand";
import { newsletterRecipients } from "../entity/newsletterRecipients";
import { newsletterRecipients } from "../../../entity/club/newsletter/newsletterRecipients";
export default abstract class NewsletterRecipientsCommandHandler {
/**

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { protocolAgenda } from "../entity/protocolAgenda";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { protocolAgenda } from "../../../entity/club/protocol/protocolAgenda";
import InternalException from "../../../exceptions/internalException";
import { SynchronizeProtocolAgendaCommand } from "./protocolAgendaCommand";
export default abstract class ProtocolAgendaCommandHandler {
/**
* @description create protocolAgenda
* @param {number}
* @param {number} protocolId
* @returns {Promise<number>}
*/
static async create(protocolId: number): Promise<number> {
@ -30,7 +30,7 @@ export default abstract class ProtocolAgendaCommandHandler {
/**
* @description sync protocolAgenda
* @param {Array<SynchronizeProtocolAgendaCommand>}
* @param {Array<SynchronizeProtocolAgendaCommand>} syncProtocolAgenda
* @returns {Promise<void>}
*/
static async sync(syncProtocolAgenda: Array<SynchronizeProtocolAgendaCommand>): Promise<void> {

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { protocol } from "../entity/protocol";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { protocol } from "../../../entity/club/protocol/protocol";
import InternalException from "../../../exceptions/internalException";
import { CreateProtocolCommand, SynchronizeProtocolCommand } from "./protocolCommand";
export default abstract class ProtocolCommandHandler {
/**
* @description create protocol
* @param CreateProtocolCommand
* @param {CreateProtocolCommand} createProtocol
* @returns {Promise<number>}
*/
static async create(createProtocol: CreateProtocolCommand): Promise<number> {
@ -29,7 +29,7 @@ export default abstract class ProtocolCommandHandler {
/**
* @description sync protocol
* @param SynchronizeProtocolCommand
* @param {SynchronizeProtocolCommand} syncProtocol
* @returns {Promise<void>}
*/
static async sync(syncProtocol: SynchronizeProtocolCommand): Promise<void> {

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { protocolDecision } from "../entity/protocolDecision";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { protocolDecision } from "../../../entity/club/protocol/protocolDecision";
import InternalException from "../../../exceptions/internalException";
import { SynchronizeProtocolDecisionCommand } from "./protocolDecisionCommand";
export default abstract class ProtocolDecisionCommandHandler {
/**
* @description create protocolDecision
* @param {number}
* @param {number} protocolId
* @returns {Promise<number>}
*/
static async create(protocolId: number): Promise<number> {
@ -29,7 +29,7 @@ export default abstract class ProtocolDecisionCommandHandler {
}
/**
* @description sync protocolDecision
* @param {Array<SynchronizeProtocolDecisionCommand>}
* @param {Array<SynchronizeProtocolDecisionCommand>} syncProtocolDecisions
* @returns {Promise<void>}
*/
static async sync(syncProtocolDecisions: Array<SynchronizeProtocolDecisionCommand>): Promise<void> {

View file

@ -0,0 +1,9 @@
export interface SynchronizeProtocolPresenceCommand {
members: Array<ProtocolPresenceCommand>;
protocolId: number;
}
export interface ProtocolPresenceCommand {
memberId: number;
absent: boolean;
}

View file

@ -0,0 +1,96 @@
import { DeleteResult, EntityManager, InsertResult, UpdateResult } from "typeorm";
import { dataSource } from "../../../data-source";
import { protocolPresence } from "../../../entity/club/protocol/protocolPresence";
import InternalException from "../../../exceptions/internalException";
import ProtocolPresenceService from "../../../service/club/protocol/protocolPrecenseService";
import { ProtocolPresenceCommand, SynchronizeProtocolPresenceCommand } from "./protocolPresenceCommand";
export default abstract class ProtocolPresenceCommandHandler {
/**
* @description sync protocolPresence
* @param {SynchronizeProtocolPresenceCommand} syncProtocolPresences
* @returns {Promise<void>}
*/
static async sync(syncProtocolPresences: SynchronizeProtocolPresenceCommand): Promise<void> {
let currentPresence = await ProtocolPresenceService.getAll(syncProtocolPresences.protocolId);
return await dataSource.manager
.transaction(async (manager) => {
let newMembers = syncProtocolPresences.members.filter(
(r) => !currentPresence.some((cp) => cp.memberId == r.memberId)
);
let removeMembers = currentPresence.filter(
(r) => !syncProtocolPresences.members.some((cp) => cp.memberId == r.memberId)
);
let keptMembers = syncProtocolPresences.members.filter(
(m) =>
currentPresence.some((cd) => cd.memberId == m.memberId) &&
!removeMembers.some((cd) => cd.memberId == m.memberId)
);
if (newMembers.length != 0) {
await this.syncPresenceAdd(manager, syncProtocolPresences.protocolId, newMembers);
}
if (removeMembers.length != 0) {
await this.syncPresenceRemove(manager, syncProtocolPresences.protocolId, removeMembers);
}
for (const member of keptMembers) {
await this.syncPresenceUpdate(manager, syncProtocolPresences.protocolId, member);
}
})
.then(() => {})
.catch((err) => {
throw new InternalException("Failed saving protocol presence", err);
});
}
private static async syncPresenceAdd(
manager: EntityManager,
protocolId: number,
memberIds: Array<ProtocolPresenceCommand>
): Promise<InsertResult> {
return await manager
.createQueryBuilder()
.insert()
.into(protocolPresence)
.values(
memberIds.map((m) => ({
...m,
protocolId,
}))
)
.execute();
}
private static async syncPresenceUpdate(
manager: EntityManager,
protocolId: number,
member: ProtocolPresenceCommand
): Promise<UpdateResult> {
return await manager
.createQueryBuilder()
.update(protocolPresence)
.set({
absent: member.absent,
})
.where("memberId = :memberId", { memberId: member.memberId })
.andWhere("protocolId = :protocolId", { protocolId })
.execute();
}
private static async syncPresenceRemove(
manager: EntityManager,
protocolId: number,
members: Array<ProtocolPresenceCommand>
): Promise<DeleteResult> {
return await manager
.createQueryBuilder()
.delete()
.from(protocolPresence)
.where("memberId IN (:...ids)", { ids: members.map((m) => m.memberId) })
.andWhere("protocolId = :protocolId", { protocolId })
.execute();
}
}

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { protocolPrintout } from "../entity/protocolPrintout";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { protocolPrintout } from "../../../entity/club/protocol/protocolPrintout";
import InternalException from "../../../exceptions/internalException";
import { CreateProtocolPrintoutCommand } from "./protocolPrintoutCommand";
export default abstract class ProtocolPrintoutCommandHandler {
/**
* @description create protocolPrintout
* @param {number}
* @param {CreateProtocolPrintoutCommand} printout
* @returns {Promise<number>}
*/
static async create(printout: CreateProtocolPrintoutCommand): Promise<number> {

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { protocolVoting } from "../entity/protocolVoting";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { protocolVoting } from "../../../entity/club/protocol/protocolVoting";
import InternalException from "../../../exceptions/internalException";
import { SynchronizeProtocolVotingCommand } from "./protocolVotingCommand";
export default abstract class ProtocolVotingCommandHandler {
/**
* @description create protocolVoting
* @param {number}
* @param {number} protocolId
* @returns {Promise<number>}
*/
static async create(protocolId: number): Promise<number> {
@ -29,7 +29,7 @@ export default abstract class ProtocolVotingCommandHandler {
}
/**
* @description sync protocolVoting
* @param {Array<SynchronizeProtocolVotingCommand>}
* @param {Array<SynchronizeProtocolVotingCommand>} syncProtocolVotings
* @returns {Promise<void>}
*/
static async sync(syncProtocolVotings: Array<SynchronizeProtocolVotingCommand>): Promise<void> {

View file

@ -1,4 +0,0 @@
export interface SynchronizeProtocolPresenceCommand {
memberIds: Array<number>;
protocolId: number;
}

View file

@ -1,69 +0,0 @@
import { DeleteResult, EntityManager, InsertResult } from "typeorm";
import { dataSource } from "../data-source";
import { protocolPresence } from "../entity/protocolPresence";
import InternalException from "../exceptions/internalException";
import ProtocolPresenceService from "../service/protocolPrecenseService";
import { SynchronizeProtocolPresenceCommand } from "./protocolPresenceCommand";
export default abstract class ProtocolPresenceCommandHandler {
/**
* @description sync protocolPresence
* @param {SynchronizeProtocolPresenceCommand}
* @returns {Promise<void>}
*/
static async sync(syncProtocolPresences: SynchronizeProtocolPresenceCommand): Promise<void> {
let currentPresence = (await ProtocolPresenceService.getAll(syncProtocolPresences.protocolId)).map(
(r) => r.memberId
);
return await dataSource.manager
.transaction(async (manager) => {
let newMembers = syncProtocolPresences.memberIds.filter((r) => !currentPresence.includes(r));
let removeMembers = currentPresence.filter((r) => !syncProtocolPresences.memberIds.includes(r));
if (newMembers.length != 0) {
await this.syncPresenceAdd(manager, syncProtocolPresences.protocolId, newMembers);
}
if (removeMembers.length != 0) {
await this.syncPresenceRemove(manager, syncProtocolPresences.protocolId, removeMembers);
}
})
.then(() => {})
.catch((err) => {
throw new InternalException("Failed saving protocol presence", err);
});
}
private static async syncPresenceAdd(
manager: EntityManager,
protocolId: number,
memberIds: Array<number>
): Promise<InsertResult> {
return await manager
.createQueryBuilder()
.insert()
.into(protocolPresence)
.values(
memberIds.map((m) => ({
protocolId,
memberId: m,
}))
)
.execute();
}
private static async syncPresenceRemove(
manager: EntityManager,
protocolId: number,
memberIds: Array<number>
): Promise<DeleteResult> {
return await manager
.createQueryBuilder()
.delete()
.from(protocolPresence)
.where("memberId IN (:...ids)", { ids: memberIds })
.andWhere("protocolId = :protocolId", { protocolId })
.execute();
}
}

View file

@ -4,7 +4,7 @@ import { REFRESH_EXPIRATION } from "../env.defaults";
import InternalException from "../exceptions/internalException";
import { JWTHelper } from "../helpers/jwtHelper";
import { StringHelper } from "../helpers/stringHelper";
import UserService from "../service/userService";
import UserService from "../service/user/userService";
import { JWTRefresh } from "../type/jwtTypes";
import { CreateRefreshCommand, DeleteRefreshCommand } from "./refreshCommand";
import ms from "ms";
@ -12,7 +12,7 @@ import ms from "ms";
export default abstract class RefreshCommandHandler {
/**
* @description create and save refreshToken to user
* @param CreateRefreshCommand
* @param {CreateRefreshCommand} createRefresh
* @returns {Promise<string>}
*/
static async create(createRefresh: CreateRefreshCommand): Promise<string> {
@ -42,7 +42,7 @@ export default abstract class RefreshCommandHandler {
/**
* @description delete refresh by user and token
* @param DeleteRefreshCommand
* @param {DeleteRefreshCommand} deleteRefresh
* @returns {Promise<any>}
*/
static async deleteByToken(deleteRefresh: DeleteRefreshCommand): Promise<any> {

View file

@ -7,7 +7,7 @@ import { CreateResetCommand, DeleteResetCommand } from "./resetCommand";
export default abstract class ResetCommandHandler {
/**
* @description create user
* @param CreateResetCommand
* @param {CreateResetCommand} createReset
* @returns {Promise<string>}
*/
static async create(createReset: CreateResetCommand): Promise<string> {
@ -35,7 +35,7 @@ export default abstract class ResetCommandHandler {
/**
* @description delete reset by mail and token
* @param DeleteRefreshCommand
* @param {DeleteRefreshCommand} deleteReset
* @returns {Promise<any>}
*/
static async deleteByTokenAndMail(deleteReset: DeleteResetCommand): Promise<any> {

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { award } from "../entity/award";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { award } from "../../../entity/settings/award";
import InternalException from "../../../exceptions/internalException";
import { CreateAwardCommand, DeleteAwardCommand, UpdateAwardCommand } from "./awardCommand";
export default abstract class AwardCommandHandler {
/**
* @description create award
* @param CreateAwardCommand
* @param {CreateAwardCommand} createAward
* @returns {Promise<number>}
*/
static async create(createAward: CreateAwardCommand): Promise<number> {
@ -28,7 +28,7 @@ export default abstract class AwardCommandHandler {
/**
* @description update award
* @param UpdateAwardCommand
* @param {UpdateAwardCommand} updateAward
* @returns {Promise<void>}
*/
static async update(updateAward: UpdateAwardCommand): Promise<void> {
@ -48,15 +48,15 @@ export default abstract class AwardCommandHandler {
/**
* @description delete award
* @param DeleteAwardCommand
* @param {DeleteAwardCommand} deleteAward
* @returns {Promise<void>}
*/
static async delete(deletAward: DeleteAwardCommand): Promise<void> {
static async delete(deleteAward: DeleteAwardCommand): Promise<void> {
return await dataSource
.createQueryBuilder()
.delete()
.from(award)
.where("id = :id", { id: deletAward.id })
.where("id = :id", { id: deleteAward.id })
.execute()
.then(() => {})
.catch((err) => {

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { calendarType } from "../entity/calendarType";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { calendarType } from "../../../entity/settings/calendarType";
import InternalException from "../../../exceptions/internalException";
import { CreateCalendarTypeCommand, DeleteCalendarTypeCommand, UpdateCalendarTypeCommand } from "./calendarTypeCommand";
export default abstract class CalendarTypeCommandHandler {
/**
* @description create calendarType
* @param CreateCalendarTypeCommand
* @param {CreateCalendarTypeCommand} createCalendarType
* @returns {Promise<number>}
*/
static async create(createCalendarType: CreateCalendarTypeCommand): Promise<number> {
@ -31,7 +31,7 @@ export default abstract class CalendarTypeCommandHandler {
/**
* @description update calendarType
* @param UpdateCalendarTypeCommand
* @param {UpdateCalendarTypeCommand} updateCalendarType
* @returns {Promise<void>}
*/
static async update(updateCalendarType: UpdateCalendarTypeCommand): Promise<void> {
@ -54,7 +54,7 @@ export default abstract class CalendarTypeCommandHandler {
/**
* @description delete calendarType
* @param DeleteCalendarTypeCommand
* @param {DeleteCalendarTypeCommand} deleteCalendarType
* @returns {Promise<void>}
*/
static async delete(deleteCalendarType: DeleteCalendarTypeCommand): Promise<void> {

View file

@ -1,4 +1,4 @@
import { CommunicationFieldType } from "../type/fieldTypes";
import { CommunicationFieldType } from "../../../type/fieldTypes";
export interface CreateCommunicationTypeCommand {
type: string;

View file

@ -1,6 +1,6 @@
import { dataSource } from "../data-source";
import { communicationType } from "../entity/communicationType";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { communicationType } from "../../../entity/settings/communicationType";
import InternalException from "../../../exceptions/internalException";
import {
CreateCommunicationTypeCommand,
DeleteCommunicationTypeCommand,
@ -10,7 +10,7 @@ import {
export default abstract class CommunicationTypeCommandHandler {
/**
* @description create communicationType
* @param CreateCommunicationTypeCommand
* @param {CreateCommunicationTypeCommand} createCommunicationType
* @returns {Promise<number>}
*/
static async create(createCommunicationType: CreateCommunicationTypeCommand): Promise<number> {
@ -33,7 +33,7 @@ export default abstract class CommunicationTypeCommandHandler {
/**
* @description update communicationType
* @param UpdateCommunicationTypeCommand
* @param {UpdateCommunicationTypeCommand} updateCommunicationType
* @returns {Promise<void>}
*/
static async update(updateCommunicationType: UpdateCommunicationTypeCommand): Promise<void> {
@ -54,15 +54,15 @@ export default abstract class CommunicationTypeCommandHandler {
/**
* @description delete communicationType
* @param DeleteCommunicationTypeCommand
* @param {DeleteCommunicationTypeCommand} deleteCommunicationType
* @returns {Promise<void>}
*/
static async delete(deletCommunicationType: DeleteCommunicationTypeCommand): Promise<void> {
static async delete(deleteCommunicationType: DeleteCommunicationTypeCommand): Promise<void> {
return await dataSource
.createQueryBuilder()
.delete()
.from(communicationType)
.where("id = :id", { id: deletCommunicationType.id })
.where("id = :id", { id: deleteCommunicationType.id })
.execute()
.then(() => {})
.catch((err) => {

View file

@ -1,6 +1,6 @@
import { dataSource } from "../data-source";
import { executivePosition } from "../entity/executivePosition";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { executivePosition } from "../../../entity/settings/executivePosition";
import InternalException from "../../../exceptions/internalException";
import {
CreateExecutivePositionCommand,
DeleteExecutivePositionCommand,
@ -10,7 +10,7 @@ import {
export default abstract class ExecutivePositionCommandHandler {
/**
* @description create executivePosition
* @param CreateExecutivePositionCommand
* @param {CreateExecutivePositionCommand} createExecutivePosition
* @returns {Promise<number>}
*/
static async create(createExecutivePosition: CreateExecutivePositionCommand): Promise<number> {
@ -32,7 +32,7 @@ export default abstract class ExecutivePositionCommandHandler {
/**
* @description update executivePosition
* @param UpdateExecutivePositionCommand
* @param {UpdateExecutivePositionCommand} updateExecutivePosition
* @returns {Promise<void>}
*/
static async update(updateExecutivePosition: UpdateExecutivePositionCommand): Promise<void> {
@ -52,15 +52,15 @@ export default abstract class ExecutivePositionCommandHandler {
/**
* @description delete executivePosition
* @param DeleteExecutivePositionCommand
* @param {DeleteExecutivePositionCommand} deleteExecutivePosition
* @returns {Promise<void>}
*/
static async delete(deletExecutivePosition: DeleteExecutivePositionCommand): Promise<void> {
static async delete(deleteExecutivePosition: DeleteExecutivePositionCommand): Promise<void> {
return await dataSource
.createQueryBuilder()
.delete()
.from(executivePosition)
.where("id = :id", { id: deletExecutivePosition.id })
.where("id = :id", { id: deleteExecutivePosition.id })
.execute()
.then(() => {})
.catch((err) => {

View file

@ -1,6 +1,6 @@
import { dataSource } from "../data-source";
import { membershipStatus } from "../entity/membershipStatus";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { membershipStatus } from "../../../entity/settings/membershipStatus";
import InternalException from "../../../exceptions/internalException";
import {
CreateMembershipStatusCommand,
DeleteMembershipStatusCommand,
@ -10,7 +10,7 @@ import {
export default abstract class MembershipStatusCommandHandler {
/**
* @description create membershipStatus
* @param CreateMembershipStatusCommand
* @param {CreateMembershipStatusCommand} createMembershipStatus
* @returns {Promise<number>}
*/
static async create(createMembershipStatus: CreateMembershipStatusCommand): Promise<number> {
@ -32,7 +32,7 @@ export default abstract class MembershipStatusCommandHandler {
/**
* @description update membershipStatus
* @param UpdateMembershipStatusCommand
* @param {UpdateMembershipStatusCommand} updateMembershipStatus
* @returns {Promise<void>}
*/
static async update(updateMembershipStatus: UpdateMembershipStatusCommand): Promise<void> {
@ -52,15 +52,15 @@ export default abstract class MembershipStatusCommandHandler {
/**
* @description delete membershipStatus
* @param DeleteMembershipStatusCommand
* @param {DeleteMembershipStatusCommand} deleteMembershipStatus
* @returns {Promise<void>}
*/
static async delete(deletMembershipStatus: DeleteMembershipStatusCommand): Promise<void> {
static async delete(deleteMembershipStatus: DeleteMembershipStatusCommand): Promise<void> {
return await dataSource
.createQueryBuilder()
.delete()
.from(membershipStatus)
.where("id = :id", { id: deletMembershipStatus.id })
.where("id = :id", { id: deleteMembershipStatus.id })
.execute()
.then(() => {})
.catch((err) => {

View file

@ -1,4 +1,4 @@
import { NewsletterConfigType } from "../enums/newsletterConfigType";
import { NewsletterConfigType } from "../../../enums/newsletterConfigType";
export interface SetNewsletterConfigCommand {
comTypeId: number;

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { newsletterConfig } from "../entity/newsletterConfig";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { newsletterConfig } from "../../../entity/settings/newsletterConfig";
import InternalException from "../../../exceptions/internalException";
import { DeleteNewsletterConfigCommand, SetNewsletterConfigCommand } from "./newsletterConfigCommand";
export default abstract class NewsletterConfigCommandHandler {
/**
* @description set newsletterConfig
* @param SetNewsletterConfigCommand
* @param {SetNewsletterConfigCommand} setNewsletterConfig
* @returns {Promise<number>}
*/
static async set(setNewsletterConfig: SetNewsletterConfigCommand): Promise<number> {
@ -29,7 +29,7 @@ export default abstract class NewsletterConfigCommandHandler {
}
/**
* @description delete newsletterConfig
* @param number
* @param {DeleteNewsletterConfigCommand} deleteNewsletterConfig
* @returns {Promise<void>}
*/
static async delete(deleteNewsletterConfig: DeleteNewsletterConfigCommand): Promise<void> {

View file

@ -1,6 +1,6 @@
import { dataSource } from "../data-source";
import { qualification } from "../entity/qualification";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { qualification } from "../../../entity/settings/qualification";
import InternalException from "../../../exceptions/internalException";
import {
CreateQualificationCommand,
DeleteQualificationCommand,
@ -10,7 +10,7 @@ import {
export default abstract class QualificationCommandHandler {
/**
* @description create qualification
* @param CreateQualificationCommand
* @param {CreateQualificationCommand} createQualification
* @returns {Promise<number>}
*/
static async create(createQualification: CreateQualificationCommand): Promise<number> {
@ -33,7 +33,7 @@ export default abstract class QualificationCommandHandler {
/**
* @description update qualification
* @param UpdateQualificationCommand
* @param {UpdateQualificationCommand} updateQualification
* @returns {Promise<void>}
*/
static async update(updateQualification: UpdateQualificationCommand): Promise<void> {
@ -54,15 +54,15 @@ export default abstract class QualificationCommandHandler {
/**
* @description delete qualification
* @param DeleteQualificationCommand
* @param {DeleteQualificationCommand} deleteQualification
* @returns {Promise<void>}
*/
static async delete(deletQualification: DeleteQualificationCommand): Promise<void> {
static async delete(deleteQualification: DeleteQualificationCommand): Promise<void> {
return await dataSource
.createQueryBuilder()
.delete()
.from(qualification)
.where("id = :id", { id: deletQualification.id })
.where("id = :id", { id: deleteQualification.id })
.execute()
.then(() => {})
.catch((err) => {

View file

@ -1,4 +1,4 @@
import { DynamicQueryStructure } from "../type/dynamicQueries";
import { DynamicQueryStructure } from "../../../type/dynamicQueries";
export interface CreateQueryStoreCommand {
title: string;

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { query } from "../entity/query";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { query } from "../../../entity/settings/query";
import InternalException from "../../../exceptions/internalException";
import { CreateQueryStoreCommand, DeleteQueryStoreCommand, UpdateQueryStoreCommand } from "./queryStoreCommand";
export default abstract class QueryStoreCommandHandler {
/**
* @description create queryStore
* @param CreateQueryStoreCommand
* @param {CreateQueryStoreCommand} createQueryStore
* @returns {Promise<number>}
*/
static async create(createQueryStore: CreateQueryStoreCommand): Promise<number> {
@ -30,7 +30,7 @@ export default abstract class QueryStoreCommandHandler {
/**
* @description update queryStore
* @param UpdateQueryStoreCommand
* @param {UpdateQueryStoreCommand} updateQueryStore
* @returns {Promise<void>}
*/
static async update(updateQueryStore: UpdateQueryStoreCommand): Promise<void> {
@ -51,15 +51,15 @@ export default abstract class QueryStoreCommandHandler {
/**
* @description delete queryStore
* @param DeleteQueryStoreCommand
* @param {DeleteQueryStoreCommand} deleteQueryStore
* @returns {Promise<void>}
*/
static async delete(deletQueryStore: DeleteQueryStoreCommand): Promise<void> {
static async delete(deleteQueryStore: DeleteQueryStoreCommand): Promise<void> {
return await dataSource
.createQueryBuilder()
.delete()
.from(query)
.where("id = :id", { id: deletQueryStore.id })
.where("id = :id", { id: deleteQueryStore.id })
.execute()
.then(() => {})
.catch((err) => {

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { template } from "../entity/template";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { template } from "../../../entity/settings/template";
import InternalException from "../../../exceptions/internalException";
import { CreateTemplateCommand, DeleteTemplateCommand, UpdateTemplateCommand } from "./templateCommand";
export default abstract class TemplateCommandHandler {
/**
* @description create template
* @param CreateTemplateCommand
* @param {CreateTemplateCommand} createTemplate
* @returns {Promise<number>}
*/
static async create(createTemplate: CreateTemplateCommand): Promise<number> {
@ -29,7 +29,7 @@ export default abstract class TemplateCommandHandler {
/**
* @description update template
* @param UpdateTemplateCommand
* @param {UpdateTemplateCommand} updateTemplate
* @returns {Promise<void>}
*/
static async update(updateTemplate: UpdateTemplateCommand): Promise<void> {
@ -52,15 +52,15 @@ export default abstract class TemplateCommandHandler {
/**
* @description delete template
* @param DeleteTemplateCommand
* @param {DeleteTemplateCommand} deleteTemplate
* @returns {Promise<void>}
*/
static async delete(deletTemplate: DeleteTemplateCommand): Promise<void> {
static async delete(deleteTemplate: DeleteTemplateCommand): Promise<void> {
return await dataSource
.createQueryBuilder()
.delete()
.from(template)
.where("id = :id", { id: deletTemplate.id })
.where("id = :id", { id: deleteTemplate.id })
.execute()
.then(() => {})
.catch((err) => {

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { templateUsage } from "../entity/templateUsage";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { templateUsage } from "../../../entity/settings/templateUsage";
import InternalException from "../../../exceptions/internalException";
import { UpdateTemplateUsageCommand } from "./templateUsageCommand";
export default abstract class TemplateUsageCommandHandler {
/**
* @description update templateUsage
* @param UpdateTemplateUsageCommand
* @param {UpdateTemplateUsageCommand} updateTemplateUsage
* @returns {Promise<void>}
*/
static async update(updateTemplateUsage: UpdateTemplateUsageCommand): Promise<void> {

View file

@ -1,12 +1,12 @@
import { dataSource } from "../data-source";
import { role } from "../entity/role";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { role } from "../../../entity/user/role";
import InternalException from "../../../exceptions/internalException";
import { CreateRoleCommand, DeleteRoleCommand, UpdateRoleCommand } from "./roleCommand";
export default abstract class RoleCommandHandler {
/**
* @description create role
* @param CreateRoleCommand
* @param {CreateRoleCommand} createRole
* @returns {Promise<number>}
*/
static async create(createRole: CreateRoleCommand): Promise<number> {
@ -28,7 +28,7 @@ export default abstract class RoleCommandHandler {
/**
* @description update role
* @param UpdateRoleCommand
* @param {UpdateRoleCommand} updateRole
* @returns {Promise<void>}
*/
static async update(updateRole: UpdateRoleCommand): Promise<void> {
@ -48,7 +48,7 @@ export default abstract class RoleCommandHandler {
/**
* @description delete role
* @param DeleteRoleCommand
* @param {DeleteRoleCommand} deleteRole
* @returns {Promise<void>}
*/
static async delete(deleteRole: DeleteRoleCommand): Promise<void> {

View file

@ -1,4 +1,4 @@
import { PermissionString } from "../type/permissionTypes";
import { PermissionString } from "../../../type/permissionTypes";
export interface CreateRolePermissionCommand {
permission: PermissionString;

View file

@ -1,22 +1,21 @@
import { DeleteResult, EntityManager, InsertResult } from "typeorm";
import { dataSource } from "../data-source";
import { rolePermission } from "../entity/role_permission";
import InternalException from "../exceptions/internalException";
import RoleService from "../service/roleService";
import { dataSource } from "../../../data-source";
import { rolePermission } from "../../../entity/user/role_permission";
import InternalException from "../../../exceptions/internalException";
import RoleService from "../../../service/user/roleService";
import {
CreateRolePermissionCommand,
DeleteRolePermissionCommand,
UpdateRolePermissionsCommand,
} from "./rolePermissionCommand";
import PermissionHelper from "../helpers/permissionHelper";
import RolePermissionService from "../service/rolePermissionService";
import { role } from "../entity/role";
import { PermissionString } from "../type/permissionTypes";
import PermissionHelper from "../../../helpers/permissionHelper";
import RolePermissionService from "../../../service/user/rolePermissionService";
import { PermissionString } from "../../../type/permissionTypes";
export default abstract class RolePermissionCommandHandler {
/**
* @description update role permissions
* @param UpdateRolePermissionsCommand
* @param {UpdateRolePermissionsCommand} updateRolePermissions
* @returns {Promise<void>}
*/
static async updatePermissions(updateRolePermissions: UpdateRolePermissionsCommand): Promise<void> {
@ -75,7 +74,7 @@ export default abstract class RolePermissionCommandHandler {
/**
* @description grant permission to user
* @param CreateRolePermissionCommand
* @param {CreateRolePermissionCommand} createPermission
* @returns {Promise<number>}
*/
static async create(createPermission: CreateRolePermissionCommand): Promise<number> {
@ -98,7 +97,7 @@ export default abstract class RolePermissionCommandHandler {
/**
* @description remove permission from role
* @param DeleteRolePermissionCommand
* @param {DeleteRolePermissionCommand} deletePermission
* @returns {Promise<any>}
*/
static async delete(deletePermission: DeleteRolePermissionCommand): Promise<any> {
@ -109,7 +108,7 @@ export default abstract class RolePermissionCommandHandler {
.where("roleId = :id", { id: deletePermission.roleId })
.andWhere("permission = :permission", { permission: deletePermission.permission })
.execute()
.then((res) => {})
.then(() => {})
.catch((err) => {
throw new InternalException("failed role permission removal", err);
});

View file

@ -1,7 +1,7 @@
import { dataSource } from "../data-source";
import { invite } from "../entity/invite";
import InternalException from "../exceptions/internalException";
import { StringHelper } from "../helpers/stringHelper";
import { dataSource } from "../../../data-source";
import { invite } from "../../../entity/user/invite";
import InternalException from "../../../exceptions/internalException";
import { StringHelper } from "../../../helpers/stringHelper";
import { CreateInviteCommand, DeleteInviteCommand } from "./inviteCommand";
export default abstract class InviteCommandHandler {

View file

@ -1,7 +1,7 @@
import { EntityManager } from "typeorm";
import { dataSource } from "../data-source";
import { user } from "../entity/user";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { user } from "../../../entity/user/user";
import InternalException from "../../../exceptions/internalException";
import {
CreateUserCommand,
DeleteUserCommand,
@ -10,12 +10,12 @@ import {
UpdateUserRolesCommand,
UpdateUserSecretCommand,
} from "./userCommand";
import UserService from "../service/userService";
import UserService from "../../../service/user/userService";
export default abstract class UserCommandHandler {
/**
* @description create user
* @param CreateUserCommand
* @param {CreateUserCommand} createUser
* @returns {Promise<number>}
*/
static async create(createUser: CreateUserCommand): Promise<number> {
@ -42,7 +42,7 @@ export default abstract class UserCommandHandler {
/**
* @description update user
* @param UpdateUserCommand
* @param {UpdateUserCommand} updateUser
* @returns {Promise<void>}
*/
static async update(updateUser: UpdateUserCommand): Promise<void> {
@ -65,7 +65,7 @@ export default abstract class UserCommandHandler {
/**
* @description update user
* @param UpdateUserSecretCommand
* @param {UpdateUserSecretCommand} updateUser
* @returns {Promise<void>}
*/
static async updateSecret(updateUser: UpdateUserSecretCommand): Promise<void> {
@ -85,7 +85,7 @@ export default abstract class UserCommandHandler {
/**
* @description update user roles
* @param UpdateUserRolesCommand
* @param {UpdateUserRolesCommand} updateUserRoles
* @returns {Promise<void>}
*/
static async updateRoles(updateUserRoles: UpdateUserRolesCommand): Promise<void> {
@ -119,13 +119,13 @@ export default abstract class UserCommandHandler {
/**
* @description transfer ownership
* @param TransferUserOwnerCommand
* @param {TransferUserOwnerCommand} transferOwnership
* @returns {Promise<void>}
*/
static async transferOwnership(transferOwnership: TransferUserOwnerCommand): Promise<void> {
return await dataSource.manager
.transaction(async (manager) => {
manager
await manager
.createQueryBuilder()
.update(user)
.set({
@ -134,7 +134,7 @@ export default abstract class UserCommandHandler {
.where("id = :id", { id: transferOwnership.fromId })
.execute();
manager
await manager
.createQueryBuilder()
.update(user)
.set({

View file

@ -1,4 +1,4 @@
import { PermissionString } from "../type/permissionTypes";
import { PermissionString } from "../../../type/permissionTypes";
export interface CreateUserPermissionCommand {
permission: PermissionString;

View file

@ -1,21 +1,21 @@
import { DeleteResult, EntityManager, InsertResult } from "typeorm";
import { dataSource } from "../data-source";
import { user } from "../entity/user";
import { userPermission } from "../entity/user_permission";
import InternalException from "../exceptions/internalException";
import { dataSource } from "../../../data-source";
import { user } from "../../../entity/user/user";
import { userPermission } from "../../../entity/user/user_permission";
import InternalException from "../../../exceptions/internalException";
import {
CreateUserPermissionCommand,
DeleteUserPermissionCommand,
UpdateUserPermissionsCommand,
} from "./userPermissionCommand";
import UserPermissionService from "../service/userPermissionService";
import PermissionHelper from "../helpers/permissionHelper";
import { PermissionString } from "../type/permissionTypes";
import UserPermissionService from "../../../service/user/userPermissionService";
import PermissionHelper from "../../../helpers/permissionHelper";
import { PermissionString } from "../../../type/permissionTypes";
export default abstract class UserPermissionCommandHandler {
/**
* @description update user permissions
* @param UpdateUserPermissionsCommand
* @param {UpdateUserPermissionsCommand} updateUserPermissions
* @returns {Promise<void>}
*/
static async updatePermissions(updateUserPermissions: UpdateUserPermissionsCommand): Promise<void> {
@ -75,7 +75,7 @@ export default abstract class UserPermissionCommandHandler {
/**
* @description grant permission to user
* @param CreateUserPermissionCommand
* @param {CreateUserPermissionCommand} createPermission
* @returns {Promise<number>}
*/
static async create(createPermission: CreateUserPermissionCommand): Promise<number> {
@ -98,7 +98,7 @@ export default abstract class UserPermissionCommandHandler {
/**
* @description remove permission to user
* @param DeleteUserPermissionCommand
* @param {DeleteUserPermissionCommand} deletePermission
* @returns {Promise<any>}
*/
static async delete(deletePermission: DeleteUserPermissionCommand): Promise<any> {

View file

@ -1,16 +1,16 @@
import { Request, Response } from "express";
import CalendarService from "../../service/calendarService";
import CalendarFactory from "../../factory/admin/calendar";
import CalendarTypeService from "../../service/calendarTypeService";
import CalendarTypeFactory from "../../factory/admin/calendarType";
import { CreateCalendarCommand, DeleteCalendarCommand, UpdateCalendarCommand } from "../../command/calendarCommand";
import CalendarCommandHandler from "../../command/calendarCommandHandler";
import CalendarService from "../../../service/club/calendarService";
import CalendarFactory from "../../../factory/admin/club/calendar";
import CalendarTypeService from "../../../service/settings/calendarTypeService";
import CalendarTypeFactory from "../../../factory/admin/settings/calendarType";
import { CreateCalendarCommand, DeleteCalendarCommand, UpdateCalendarCommand } from "../../../command/club/calendar/calendarCommand";
import CalendarCommandHandler from "../../../command/club/calendar/calendarCommandHandler";
import {
CreateCalendarTypeCommand,
DeleteCalendarTypeCommand,
UpdateCalendarTypeCommand,
} from "../../command/calendarTypeCommand";
import CalendarTypeCommandHandler from "../../command/calendarTypeCommandHandler";
} from "../../../command/settings/calendarType/calendarTypeCommand";
import CalendarTypeCommandHandler from "../../../command/settings/calendarType/calendarTypeCommandHandler";
/**
* @description get all calendar items

View file

@ -1,53 +1,55 @@
import { Request, Response } from "express";
import MemberService from "../../service/memberService";
import MemberFactory from "../../factory/admin/member";
import MembershipService from "../../service/membershipService";
import MembershipFactory from "../../factory/admin/membership";
import MemberAwardService from "../../service/memberAwardService";
import MemberAwardFactory from "../../factory/admin/memberAward";
import MemberQualificationService from "../../service/memberQualificationService";
import MemberQualificationFactory from "../../factory/admin/memberQualification";
import MemberExecutivePositionService from "../../service/memberExecutivePositionService";
import MemberExecutivePositionFactory from "../../factory/admin/memberExecutivePosition";
import CommunicationService from "../../service/communicationService";
import CommunicationFactory from "../../factory/admin/communication";
import MemberService from "../../../service/club/member/memberService";
import MemberFactory from "../../../factory/admin/club/member/member";
import MembershipService from "../../../service/club/member/membershipService";
import MembershipFactory from "../../../factory/admin/club/member/membership";
import MemberAwardService from "../../../service/club/member/memberAwardService";
import MemberAwardFactory from "../../../factory/admin/club/member/memberAward";
import MemberQualificationService from "../../../service/club/member/memberQualificationService";
import MemberQualificationFactory from "../../../factory/admin/club/member/memberQualification";
import MemberExecutivePositionService from "../../../service/club/member/memberExecutivePositionService";
import MemberExecutivePositionFactory from "../../../factory/admin/club/member/memberExecutivePosition";
import CommunicationService from "../../../service/club/member/communicationService";
import CommunicationFactory from "../../../factory/admin/club/member/communication";
import {
CreateMemberCommand,
DeleteMemberCommand,
UpdateMemberCommand,
UpdateMemberNewsletterCommand,
} from "../../command/memberCommand";
import MemberCommandHandler from "../../command/memberCommandHandler";
} from "../../../command/club/member/memberCommand";
import MemberCommandHandler from "../../../command/club/member/memberCommandHandler";
import {
CreateMembershipCommand,
DeleteMembershipCommand,
UpdateMembershipCommand,
} from "../../command/membershipCommand";
import MembershipCommandHandler from "../../command/membershipCommandHandler";
} from "../../../command/club/member/membershipCommand";
import MembershipCommandHandler from "../../../command/club/member/membershipCommandHandler";
import {
CreateMemberAwardCommand,
DeleteMemberAwardCommand,
UpdateMemberAwardCommand,
} from "../../command/memberAwardCommand";
import MemberAwardCommandHandler from "../../command/memberAwardCommandHandler";
} from "../../../command/club/member/memberAwardCommand";
import MemberAwardCommandHandler from "../../../command/club/member/memberAwardCommandHandler";
import {
CreateMemberExecutivePositionCommand,
DeleteMemberExecutivePositionCommand,
UpdateMemberExecutivePositionCommand,
} from "../../command/memberExecutivePositionCommand";
import MemberExecutivePositionCommandHandler from "../../command/memberExecutivePositionCommandHandler";
} from "../../../command/club/member/memberExecutivePositionCommand";
import MemberExecutivePositionCommandHandler from "../../../command/club/member/memberExecutivePositionCommandHandler";
import {
CreateMemberQualificationCommand,
DeleteMemberQualificationCommand,
UpdateMemberQualificationCommand,
} from "../../command/memberQualificationCommand";
import MemberQualificationCommandHandler from "../../command/memberQualificationCommandHandler";
} from "../../../command/club/member/memberQualificationCommand";
import MemberQualificationCommandHandler from "../../../command/club/member/memberQualificationCommandHandler";
import {
CreateCommunicationCommand,
DeleteCommunicationCommand,
UpdateCommunicationCommand,
} from "../../command/communicationCommand";
import CommunicationCommandHandler from "../../command/communicationCommandHandler";
} from "../../../command/club/member/communicationCommand";
import CommunicationCommandHandler from "../../../command/club/member/communicationCommandHandler";
import {PdfExport} from "../../../helpers/pdfExport";
import {PermissionModule} from "../../../type/permissionTypes";
/**
* @description get all members
@ -218,6 +220,33 @@ export async function getCommunicationByMemberAndRecord(req: Request, res: Respo
res.json(CommunicationFactory.mapToSingle(communication));
}
/**
* @description create member printout list
* @param req {Request} Express req object
* @param res {Response} Express res object
* @returns {Promise<*>}
*/
export async function createMemberPrintoutList(req: Request, res: Response): Promise<any> {
let members = await MemberService.getByRunningMembership()
let pdf = await PdfExport.renderFile({
title: "Mitgliederliste",
template: "member.list",
saveToDisk: false,
data: {
member: members
},
});
let pdfbuffer = Buffer.from(pdf);
res.setHeader("Content-Type", "application/pdf");
res.setHeader("Content-Length", pdfbuffer.byteLength);
res.setHeader("Content-Disposition", "inline; filename=preview.pdf");
res.send(pdfbuffer);
}
/**
* @description create member
* @param req {Request} Express req object

View file

@ -1,24 +1,24 @@
import { Request, Response } from "express";
import NewsletterService from "../../service/newsletterService";
import NewsletterFactory from "../../factory/admin/newsletter";
import NewsletterDatesService from "../../service/newsletterDatesService";
import NewsletterDatesFactory from "../../factory/admin/newsletterDates";
import NewsletterRecipientsService from "../../service/newsletterRecipientsService";
import NewsletterRecipientsFactory from "../../factory/admin/newsletterRecipients";
import { FileSystemHelper } from "../../helpers/fileSystemHelper";
import { CreateNewsletterCommand, SynchronizeNewsletterCommand } from "../../command/newsletterCommand";
import NewsletterCommandHandler from "../../command/newsletterCommandHandler";
import { SynchronizeNewsletterDatesCommand } from "../../command/newsletterDatesCommand";
import NewsletterDatesCommandHandler from "../../command/newsletterDatesCommandHandler";
import { SynchronizeNewsletterRecipientsCommand } from "../../command/newsletterRecipientsCommand";
import NewsletterRecipientsCommandHandler from "../../command/newsletterRecipientsCommandHandler";
import { NewsletterDatesViewModel } from "../../viewmodel/admin/newsletterDates.models";
import { PdfExport } from "../../helpers/pdfExport";
import UserService from "../../service/userService";
import { TemplateHelper } from "../../helpers/templateHelper";
import MailHelper from "../../helpers/mailHelper";
import { NewsletterEventType, NewsletterHelper } from "../../helpers/newsletterHelper";
import { Salutation } from "../../enums/salutation";
import NewsletterService from "../../../service/club/newsletter/newsletterService";
import NewsletterFactory from "../../../factory/admin/club/newsletter/newsletter";
import NewsletterDatesService from "../../../service/club/newsletter/newsletterDatesService";
import NewsletterDatesFactory from "../../../factory/admin/club/newsletter/newsletterDates";
import NewsletterRecipientsService from "../../../service/club/newsletter/newsletterRecipientsService";
import NewsletterRecipientsFactory from "../../../factory/admin/club/newsletter/newsletterRecipients";
import { FileSystemHelper } from "../../../helpers/fileSystemHelper";
import { CreateNewsletterCommand, SynchronizeNewsletterCommand } from "../../../command/club/newsletter/newsletterCommand";
import NewsletterCommandHandler from "../../../command/club/newsletter/newsletterCommandHandler";
import { SynchronizeNewsletterDatesCommand } from "../../../command/club/newsletter/newsletterDatesCommand";
import NewsletterDatesCommandHandler from "../../../command/club/newsletter/newsletterDatesCommandHandler";
import { SynchronizeNewsletterRecipientsCommand } from "../../../command/club/newsletter/newsletterRecipientsCommand";
import NewsletterRecipientsCommandHandler from "../../../command/club/newsletter/newsletterRecipientsCommandHandler";
import { NewsletterDatesViewModel } from "../../../viewmodel/admin/club/newsletter/newsletterDates.models";
import { PdfExport } from "../../../helpers/pdfExport";
import UserService from "../../../service/user/userService";
import { TemplateHelper } from "../../../helpers/templateHelper";
import MailHelper from "../../../helpers/mailHelper";
import { NewsletterEventType, NewsletterHelper } from "../../../helpers/newsletterHelper";
import { Salutation } from "../../../enums/salutation";
/**
* @description get all newsletters

View file

@ -1,33 +1,34 @@
import { Request, Response } from "express";
import ProtocolService from "../../service/protocolService";
import ProtocolFactory from "../../factory/admin/protocol";
import ProtocolAgendaService from "../../service/protocolAgendaService";
import ProtocolAgendaFactory from "../../factory/admin/protocolAgenda";
import ProtocolDecisionService from "../../service/protocolDecisionService";
import ProtocolDecisionFactory from "../../factory/admin/protocolDecision";
import ProtocolPresenceService from "../../service/protocolPrecenseService";
import ProtocolPresenceFactory from "../../factory/admin/protocolPresence";
import ProtocolVotingService from "../../service/protocolVotingService";
import ProtocolVotingFactory from "../../factory/admin/protocolVoting";
import { CreateProtocolCommand, SynchronizeProtocolCommand } from "../../command/protocolCommand";
import ProtocolCommandHandler from "../../command/protocolCommandHandler";
import { SynchronizeProtocolAgendaCommand } from "../../command/protocolAgendaCommand";
import ProtocolAgendaCommandHandler from "../../command/protocolAgendaCommandHandler";
import { ProtocolAgendaViewModel } from "../../viewmodel/admin/protocolAgenda.models";
import ProtocolDecisionCommandHandler from "../../command/protocolDecisionCommandHandler";
import { ProtocolDecisionViewModel } from "../../viewmodel/admin/protocolDecision.models";
import ProtocolPresenceCommandHandler from "../../command/protocolPresenceCommandHandler";
import { SynchronizeProtocolPresenceCommand } from "../../command/protocolPresenceCommand";
import { SynchronizeProtocolDecisionCommand } from "../../command/protocolDecisionCommand";
import { SynchronizeProtocolVotingCommand } from "../../command/protocolVotingCommand";
import { ProtocolVotingViewModel } from "../../viewmodel/admin/protocolVoting.models";
import ProtocolVotingCommandHandler from "../../command/protocolVotingCommandHandler";
import { PdfExport } from "../../helpers/pdfExport";
import ProtocolPrintoutService from "../../service/protocolPrintoutService";
import ProtocolPrintoutFactory from "../../factory/admin/protocolPrintout";
import { CreateProtocolPrintoutCommand } from "../../command/protocolPrintoutCommand";
import ProtocolPrintoutCommandHandler from "../../command/protocolPrintoutCommandHandler";
import { FileSystemHelper } from "../../helpers/fileSystemHelper";
import ProtocolService from "../../../service/club/protocol/protocolService";
import ProtocolFactory from "../../../factory/admin/club/protocol/protocol";
import ProtocolAgendaService from "../../../service/club/protocol/protocolAgendaService";
import ProtocolAgendaFactory from "../../../factory/admin/club/protocol/protocolAgenda";
import ProtocolDecisionService from "../../../service/club/protocol/protocolDecisionService";
import ProtocolDecisionFactory from "../../../factory/admin/club/protocol/protocolDecision";
import ProtocolPresenceService from "../../../service/club/protocol/protocolPrecenseService";
import ProtocolPresenceFactory from "../../../factory/admin/club/protocol/protocolPresence";
import ProtocolVotingService from "../../../service/club/protocol/protocolVotingService";
import ProtocolVotingFactory from "../../../factory/admin/club/protocol/protocolVoting";
import { CreateProtocolCommand, SynchronizeProtocolCommand } from "../../../command/club/protocol/protocolCommand";
import ProtocolCommandHandler from "../../../command/club/protocol/protocolCommandHandler";
import { SynchronizeProtocolAgendaCommand } from "../../../command/club/protocol/protocolAgendaCommand";
import ProtocolAgendaCommandHandler from "../../../command/club/protocol/protocolAgendaCommandHandler";
import { ProtocolAgendaViewModel } from "../../../viewmodel/admin/club/protocol/protocolAgenda.models";
import ProtocolDecisionCommandHandler from "../../../command/club/protocol/protocolDecisionCommandHandler";
import { ProtocolDecisionViewModel } from "../../../viewmodel/admin/club/protocol/protocolDecision.models";
import ProtocolPresenceCommandHandler from "../../../command/club/protocol/protocolPresenceCommandHandler";
import { SynchronizeProtocolPresenceCommand } from "../../../command/club/protocol/protocolPresenceCommand";
import { SynchronizeProtocolDecisionCommand } from "../../../command/club/protocol/protocolDecisionCommand";
import { SynchronizeProtocolVotingCommand } from "../../../command/club/protocol/protocolVotingCommand";
import { ProtocolVotingViewModel } from "../../../viewmodel/admin/club/protocol/protocolVoting.models";
import ProtocolVotingCommandHandler from "../../../command/club/protocol/protocolVotingCommandHandler";
import { PdfExport } from "../../../helpers/pdfExport";
import ProtocolPrintoutService from "../../../service/club/protocol/protocolPrintoutService";
import ProtocolPrintoutFactory from "../../../factory/admin/club/protocol/protocolPrintout";
import { CreateProtocolPrintoutCommand } from "../../../command/club/protocol/protocolPrintoutCommand";
import ProtocolPrintoutCommandHandler from "../../../command/club/protocol/protocolPrintoutCommandHandler";
import { FileSystemHelper } from "../../../helpers/fileSystemHelper";
import { ProtocolPresenceViewModel } from "../../../viewmodel/admin/club/protocol/protocolPresence.models";
/**
* @description get all protocols
@ -143,7 +144,9 @@ export async function getProtocolPrintoutByIdAndPrint(req: Request, res: Respons
let printout = await ProtocolPrintoutService.getById(printoutId, protocolId);
res.sendFile(process.cwd() + `/export/${printout.filename}.pdf`, {
let filepath = FileSystemHelper.formatPath("protocol", printout.filename);
res.sendFile(filepath, {
headers: {
"Content-Type": "application/pdf",
},
@ -226,7 +229,7 @@ export async function createProtocolPrintoutById(req: Request, res: Response): P
let votings = await ProtocolVotingService.getAll(protocolId);
let iteration = await ProtocolPrintoutService.getCount(protocolId);
let title = `Sitzungsprotokoll - ${new Date(protocol.date).toLocaleDateString("de-DE", {
let title = `${protocol.title} - ${new Date(protocol.date).toLocaleDateString("de-DE", {
day: "2-digit",
month: "long",
year: "numeric",
@ -256,7 +259,8 @@ export async function createProtocolPrintoutById(req: Request, res: Response): P
end: protocol.endtime,
agenda,
decisions,
presence: presence.map((p) => p.member),
presence: presence.filter((p) => !p.absent).map((p) => p.member),
absent: presence.filter((p) => p.absent).map((p) => p.member),
votings,
},
});
@ -264,7 +268,7 @@ export async function createProtocolPrintoutById(req: Request, res: Response): P
let printout: CreateProtocolPrintoutCommand = {
title,
iteration: iteration + 1,
filename: FileSystemHelper.normalizePath("protocol", filename),
filename: `${filename}.pdf`,
protocolId,
};
await ProtocolPrintoutCommandHandler.create(printout);
@ -379,10 +383,13 @@ export async function synchronizeProtocolVotingsById(req: Request, res: Response
*/
export async function synchronizeProtocolPrecenseById(req: Request, res: Response): Promise<any> {
let protocolId = parseInt(req.params.protocolId);
let presence = req.body.presence as Array<number>;
let presence = req.body.presence as Array<ProtocolPresenceViewModel>;
let syncPresence: SynchronizeProtocolPresenceCommand = {
memberIds: presence,
members: presence.map((p) => ({
memberId: p.memberId,
absent: p.absent,
})),
protocolId,
};
await ProtocolPresenceCommandHandler.sync(syncPresence);

View file

@ -0,0 +1,44 @@
import { Request, Response } from "express";
import DynamicQueryBuilder from "../../../helpers/dynamicQueryBuilder";
import { dataSource } from "../../../data-source";
/**
* @description get all table metas
* @param req {Request} Express req object
* @param res {Response} Express res object
* @returns {Promise<*>}
*/
export async function getAllTableMeta(req: Request, res: Response): Promise<any> {
let tableMetas = DynamicQueryBuilder.getAllTableMeta();
res.json(tableMetas);
}
/**
* @description get meta by tablename
* @param req {Request} Express req object
* @param res {Response} Express res object
* @returns {Promise<*>}
*/
export async function getTableMetaByTablename(req: Request, res: Response): Promise<any> {
const tablename = req.params.tablename;
let tableMeta = DynamicQueryBuilder.getTableMeta(tablename);
res.json(tableMeta);
}
/**
* @description execute Query
* @param req {Request} Express req object
* @param res {Response} Express res object
* @returns {Promise<*>}
*/
export async function executeQuery(req: Request, res: Response): Promise<any> {
let offset = parseInt((req.query.offset as string) ?? "0");
let count = parseInt((req.query.count as string) ?? "25");
const query = req.body.query;
let result = await DynamicQueryBuilder.executeQuery(query, offset, count);
res.json(result);
}

View file

@ -1,108 +0,0 @@
import { Request, Response } from "express";
import DynamicQueryBuilder from "../../helpers/dynamicQueryBuilder";
import { dataSource } from "../../data-source";
/**
* @description get all table metas
* @param req {Request} Express req object
* @param res {Response} Express res object
* @returns {Promise<*>}
*/
export async function getAllTableMeta(req: Request, res: Response): Promise<any> {
let tableMetas = DynamicQueryBuilder.getAllTableMeta();
res.json(tableMetas);
}
/**
* @description get meta by tablename
* @param req {Request} Express req object
* @param res {Response} Express res object
* @returns {Promise<*>}
*/
export async function getTableMetaByTablename(req: Request, res: Response): Promise<any> {
const tablename = req.params.tablename;
let tableMeta = DynamicQueryBuilder.getTableMeta(tablename);
res.json(tableMeta);
}
/**
* @description execute Query
* @param req {Request} Express req object
* @param res {Response} Express res object
* @returns {Promise<*>}
*/
export async function executeQuery(req: Request, res: Response): Promise<any> {
let offset = parseInt((req.query.offset as string) ?? "0");
let count = parseInt((req.query.count as string) ?? "25");
const query = req.body.query;
if (typeof query == "string") {
const upperQuery = query.trim().toUpperCase();
if (!upperQuery.startsWith("SELECT") || /INSERT|UPDATE|DELETE|ALTER|DROP|CREATE|TRUNCATE/.test(upperQuery)) {
return res.json({
stats: "error",
sql: query,
code: "UNALLOWED",
msg: "Not allowed to change rows",
});
}
try {
let data: Array<any> = [];
const result = await dataSource
.transaction(async (manager) => {
data = await manager.query(query);
throw new Error("AllwaysRollbackQuery");
})
.catch((error) => {
if (error.message === "AllwaysRollbackQuery") {
return {
stats: "success",
rows: data,
total: data.length,
offset: offset,
count: count,
};
} else {
return {
stats: "error",
sql: error.sql,
code: error.code,
msg: error.sqlMessage,
};
}
});
res.send(result);
} catch (error) {
res.json({
stats: "error",
sql: error.sql,
code: error.code,
msg: error.sqlMessage,
});
}
} else {
try {
let [rows, total] = await DynamicQueryBuilder.buildQuery(query, offset, count).getManyAndCount();
res.json({
stats: "success",
rows: DynamicQueryBuilder.flattenQueryResult(rows),
total: total,
offset: offset,
count: count,
});
} catch (error) {
res.json({
stats: "error",
sql: error.sql,
code: error.code,
msg: error.sqlMessage,
});
}
}
}

View file

@ -1,8 +1,8 @@
import { Request, Response } from "express";
import AwardService from "../../service/awardService";
import AwardFactory from "../../factory/admin/award";
import { CreateAwardCommand, DeleteAwardCommand, UpdateAwardCommand } from "../../command/awardCommand";
import AwardCommandHandler from "../../command/awardCommandHandler";
import AwardService from "../../../service/settings/awardService";
import AwardFactory from "../../../factory/admin/settings/award";
import { CreateAwardCommand, DeleteAwardCommand, UpdateAwardCommand } from "../../../command/settings/award/awardCommand";
import AwardCommandHandler from "../../../command/settings/award/awardCommandHandler";
/**
* @description get all awards

View file

@ -1,13 +1,13 @@
import { Request, Response } from "express";
import CommunicationTypeService from "../../service/communicationTypeService";
import CommunicationTypeFactory from "../../factory/admin/communicationType";
import CommunicationService from "../../service/communicationService";
import CommunicationTypeService from "../../../service/settings/communicationTypeService";
import CommunicationTypeFactory from "../../../factory/admin/settings/communicationType";
import CommunicationService from "../../../service/club/member/communicationService";
import {
CreateCommunicationTypeCommand,
DeleteCommunicationTypeCommand,
UpdateCommunicationTypeCommand,
} from "../../command/communicationTypeCommand";
import CommunicationTypeCommandHandler from "../../command/communicationTypeCommandHandler";
} from "../../../command/settings/communicationType/communicationTypeCommand";
import CommunicationTypeCommandHandler from "../../../command/settings/communicationType/communicationTypeCommandHandler";
/**
* @description get all communicationTypes

View file

@ -1,12 +1,12 @@
import { Request, Response } from "express";
import ExecutivePositionService from "../../service/executivePositionService";
import ExecutivePositionFactory from "../../factory/admin/executivePosition";
import ExecutivePositionService from "../../../service/settings/executivePositionService";
import ExecutivePositionFactory from "../../../factory/admin/settings/executivePosition";
import {
CreateExecutivePositionCommand,
DeleteExecutivePositionCommand,
UpdateExecutivePositionCommand,
} from "../../command/executivePositionCommand";
import ExecutivePositionCommandHandler from "../../command/executivePositionCommandHandler";
} from "../../../command/settings/executivePosition/executivePositionCommand";
import ExecutivePositionCommandHandler from "../../../command/settings/executivePosition/executivePositionCommandHandler";
/**
* @description get all executivePositions

View file

@ -1,12 +1,12 @@
import { Request, Response } from "express";
import MembershipStatusService from "../../service/membershipStatusService";
import MembershipStatusFactory from "../../factory/admin/membershipStatus";
import MembershipStatusService from "../../../service/settings/membershipStatusService";
import MembershipStatusFactory from "../../../factory/admin/settings/membershipStatus";
import {
CreateMembershipStatusCommand,
DeleteMembershipStatusCommand,
UpdateMembershipStatusCommand,
} from "../../command/membershipStatusCommand";
import MembershipStatusCommandHandler from "../../command/membershipStatusCommandHandler";
} from "../../../command/settings/membershipStatus/membershipStatusCommand";
import MembershipStatusCommandHandler from "../../../command/settings/membershipStatus/membershipStatusCommandHandler";
/**
* @description get all membershipStatus

View file

@ -1,8 +1,8 @@
import { Request, Response } from "express";
import NewsletterConfigService from "../../service/newsletterConfigService";
import NewsletterConfigFactory from "../../factory/admin/newsletterConfig";
import NewsletterConfigCommandHandler from "../../command/newsletterConfigCommandHandler";
import { DeleteNewsletterConfigCommand, SetNewsletterConfigCommand } from "../../command/newsletterConfigCommand";
import NewsletterConfigService from "../../../service/settings/newsletterConfigService";
import NewsletterConfigFactory from "../../../factory/admin/settings/newsletterConfig";
import NewsletterConfigCommandHandler from "../../../command/settings/newsletterConfig/newsletterConfigCommandHandler";
import { DeleteNewsletterConfigCommand, SetNewsletterConfigCommand } from "../../../command/settings/newsletterConfig/newsletterConfigCommand";
/**
* @description get all newsletterConfigs

View file

@ -1,12 +1,12 @@
import { Request, Response } from "express";
import QualificationService from "../../service/qualification";
import QualificationFactory from "../../factory/admin/qualification";
import QualificationService from "../../../service/settings/qualification";
import QualificationFactory from "../../../factory/admin/settings/qualification";
import {
CreateQualificationCommand,
DeleteQualificationCommand,
UpdateQualificationCommand,
} from "../../command/qualificationCommand";
import QualificationCommandHandler from "../../command/qualificationCommandHandler";
} from "../../../command/settings/qualification/qualificationCommand";
import QualificationCommandHandler from "../../../command/settings/qualification/qualificationCommandHandler";
/**
* @description get all qualifications

View file

@ -1,12 +1,12 @@
import { Request, Response } from "express";
import QueryStoreFactory from "../../factory/admin/queryStore";
import QueryStoreService from "../../service/queryStoreService";
import QueryStoreFactory from "../../../factory/admin/settings/queryStore";
import QueryStoreService from "../../../service/settings/queryStoreService";
import {
CreateQueryStoreCommand,
DeleteQueryStoreCommand,
UpdateQueryStoreCommand,
} from "../../command/queryStoreCommand";
import QueryStoreCommandHandler from "../../command/queryStoreCommandHandler";
} from "../../../command/settings/queryStore/queryStoreCommand";
import QueryStoreCommandHandler from "../../../command/settings/queryStore/queryStoreCommandHandler";
/**
* @description get all queryStores

View file

@ -1,8 +1,8 @@
import { Request, Response } from "express";
import TemplateService from "../../service/templateService";
import TemplateFactory from "../../factory/admin/template";
import { CreateTemplateCommand, DeleteTemplateCommand, UpdateTemplateCommand } from "../../command/templateCommand";
import TemplateCommandHandler from "../../command/templateCommandHandler";
import TemplateService from "../../../service/settings/templateService";
import TemplateFactory from "../../../factory/admin/settings/template";
import { CreateTemplateCommand, DeleteTemplateCommand, UpdateTemplateCommand } from "../../../command/settings/template/templateCommand";
import TemplateCommandHandler from "../../../command/settings/template/templateCommandHandler";
/**
* @description get all templates

View file

@ -1,13 +1,13 @@
import { Request, Response } from "express";
import TemplateUsageService from "../../service/templateUsageService";
import TemplateUsageFactory from "../../factory/admin/templateUsage";
import { UpdateTemplateUsageCommand } from "../../command/templateUsageCommand";
import TemplateUsageCommandHandler from "../../command/templateUsageCommandHandler";
import PermissionHelper from "../../helpers/permissionHelper";
import ForbiddenRequestException from "../../exceptions/forbiddenRequestException";
import { PermissionModule } from "../../type/permissionTypes";
import { PdfExport } from "../../helpers/pdfExport";
import { DemoDataHelper } from "../../helpers/demoDataHelper";
import TemplateUsageService from "../../../service/settings/templateUsageService";
import TemplateUsageFactory from "../../../factory/admin/settings/templateUsage";
import { UpdateTemplateUsageCommand } from "../../../command/settings/templateUsage/templateUsageCommand";
import TemplateUsageCommandHandler from "../../../command/settings/templateUsage/templateUsageCommandHandler";
import PermissionHelper from "../../../helpers/permissionHelper";
import ForbiddenRequestException from "../../../exceptions/forbiddenRequestException";
import { PermissionModule } from "../../../type/permissionTypes";
import { PdfExport } from "../../../helpers/pdfExport";
import { DemoDataHelper } from "../../../helpers/demoDataHelper";
/**
* @description get all templateUsages
@ -21,8 +21,8 @@ export async function getAllTemplateUsages(req: Request, res: Response): Promise
if (!req.isOwner) {
templateUsages = templateUsages.filter((tu) => {
return (
PermissionHelper.can(req.permissions, "update", "settings", tu.scope) ||
PermissionHelper.can(req.permissions, "update", "club", tu.scope)
PermissionHelper.can(req.permissions, "update", "settings", tu.scope.split(".")[0] as PermissionModule) ||
PermissionHelper.can(req.permissions, "update", "club", tu.scope.split(".")[0] as PermissionModule)
);
});
}

View file

@ -1,12 +1,12 @@
import { Request, Response } from "express";
import RoleService from "../../service/roleService";
import RoleFactory from "../../factory/admin/role";
import RolePermissionService from "../../service/rolePermissionService";
import PermissionHelper from "../../helpers/permissionHelper";
import { CreateRoleCommand, DeleteRoleCommand, UpdateRoleCommand } from "../../command/roleCommand";
import RoleCommandHandler from "../../command/roleCommandHandler";
import { UpdateRolePermissionsCommand } from "../../command/rolePermissionCommand";
import RolePermissionCommandHandler from "../../command/rolePermissionCommandHandler";
import RoleService from "../../../service/user/roleService";
import RoleFactory from "../../../factory/admin/user/role";
import RolePermissionService from "../../../service/user/rolePermissionService";
import PermissionHelper from "../../../helpers/permissionHelper";
import { CreateRoleCommand, DeleteRoleCommand, UpdateRoleCommand } from "../../../command/user/role/roleCommand";
import RoleCommandHandler from "../../../command/user/role/roleCommandHandler";
import { UpdateRolePermissionsCommand } from "../../../command/user/role/rolePermissionCommand";
import RolePermissionCommandHandler from "../../../command/user/role/rolePermissionCommandHandler";
/**
* @description get All roles

View file

@ -1,15 +1,15 @@
import { Request, Response } from "express";
import UserService from "../../service/userService";
import UserFactory from "../../factory/admin/user";
import UserPermissionService from "../../service/userPermissionService";
import PermissionHelper from "../../helpers/permissionHelper";
import RoleFactory from "../../factory/admin/role";
import { DeleteUserCommand, UpdateUserCommand, UpdateUserRolesCommand } from "../../command/userCommand";
import UserCommandHandler from "../../command/userCommandHandler";
import MailHelper from "../../helpers/mailHelper";
import { CLUB_NAME } from "../../env.defaults";
import { UpdateUserPermissionsCommand } from "../../command/userPermissionCommand";
import UserPermissionCommandHandler from "../../command/userPermissionCommandHandler";
import UserService from "../../../service/user/userService";
import UserFactory from "../../../factory/admin/user/user";
import UserPermissionService from "../../../service/user/userPermissionService";
import PermissionHelper from "../../../helpers/permissionHelper";
import RoleFactory from "../../../factory/admin/user/role";
import { DeleteUserCommand, UpdateUserCommand, UpdateUserRolesCommand } from "../../../command/user/user/userCommand";
import UserCommandHandler from "../../../command/user/user/userCommandHandler";
import MailHelper from "../../../helpers/mailHelper";
import { CLUB_NAME } from "../../../env.defaults";
import { UpdateUserPermissionsCommand } from "../../../command/user/user/userPermissionCommand";
import UserPermissionCommandHandler from "../../../command/user/user/userPermissionCommandHandler";
/**
* @description get All users

View file

@ -4,13 +4,13 @@ import { JWTToken } from "../type/jwtTypes";
import InternalException from "../exceptions/internalException";
import RefreshCommandHandler from "../command/refreshCommandHandler";
import { CreateRefreshCommand, DeleteRefreshCommand } from "../command/refreshCommand";
import UserService from "../service/userService";
import UserService from "../service/user/userService";
import speakeasy from "speakeasy";
import UnauthorizedRequestException from "../exceptions/unauthorizedRequestException";
import RefreshService from "../service/refreshService";
import UserPermissionService from "../service/userPermissionService";
import UserPermissionService from "../service/user/userPermissionService";
import PermissionHelper from "../helpers/permissionHelper";
import RolePermissionService from "../service/rolePermissionService";
import RolePermissionService from "../service/user/rolePermissionService";
/**
* @description Check authentication status by token

View file

@ -7,18 +7,18 @@ import { CreateRefreshCommand } from "../command/refreshCommand";
import speakeasy from "speakeasy";
import UnauthorizedRequestException from "../exceptions/unauthorizedRequestException";
import QRCode from "qrcode";
import { CreateUserCommand } from "../command/userCommand";
import UserCommandHandler from "../command/userCommandHandler";
import { CreateInviteCommand, DeleteInviteCommand } from "../command/inviteCommand";
import InviteCommandHandler from "../command/inviteCommandHandler";
import { CreateUserCommand } from "../command/user/user/userCommand";
import UserCommandHandler from "../command/user/user/userCommandHandler";
import { CreateInviteCommand, DeleteInviteCommand } from "../command/user/user/inviteCommand";
import InviteCommandHandler from "../command/user/user/inviteCommandHandler";
import MailHelper from "../helpers/mailHelper";
import InviteService from "../service/inviteService";
import UserService from "../service/userService";
import InviteService from "../service/user/inviteService";
import UserService from "../service/user/userService";
import CustomRequestException from "../exceptions/customRequestException";
import { CLUB_NAME } from "../env.defaults";
import { CreateUserPermissionCommand } from "../command/userPermissionCommand";
import UserPermissionCommandHandler from "../command/userPermissionCommandHandler";
import InviteFactory from "../factory/admin/invite";
import { CreateUserPermissionCommand } from "../command/user/user/userPermissionCommand";
import UserPermissionCommandHandler from "../command/user/user/userPermissionCommandHandler";
import InviteFactory from "../factory/admin/user/invite";
/**
* @description get all invites

View file

@ -1,11 +1,11 @@
import { Request, Response } from "express";
import CalendarService from "../service/calendarService";
import CalendarTypeService from "../service/calendarTypeService";
import { calendar } from "../entity/calendar";
import CalendarService from "../service/club/calendarService";
import CalendarTypeService from "../service/settings/calendarTypeService";
import { calendar } from "../entity/club/calendar";
import { createEvents } from "ics";
import moment from "moment";
import InternalException from "../exceptions/internalException";
import CalendarFactory from "../factory/admin/calendar";
import CalendarFactory from "../factory/admin/club/calendar";
import { CalendarHelper } from "../helpers/calendarHelper";
/**

View file

@ -11,13 +11,13 @@ import { CreateResetCommand, DeleteResetCommand } from "../command/resetCommand"
import ResetCommandHandler from "../command/resetCommandHandler";
import MailHelper from "../helpers/mailHelper";
import ResetService from "../service/resetService";
import UserService from "../service/userService";
import UserService from "../service/user/userService";
import { CLUB_NAME } from "../env.defaults";
import PermissionHelper from "../helpers/permissionHelper";
import RolePermissionService from "../service/rolePermissionService";
import UserPermissionService from "../service/userPermissionService";
import { UpdateUserSecretCommand } from "../command/userCommand";
import UserCommandHandler from "../command/userCommandHandler";
import RolePermissionService from "../service/user/rolePermissionService";
import UserPermissionService from "../service/user/userPermissionService";
import { UpdateUserSecretCommand } from "../command/user/user/userCommand";
import UserCommandHandler from "../command/user/user/userCommandHandler";
/**
* @description request totp reset

View file

@ -3,10 +3,10 @@ import speakeasy from "speakeasy";
import QRCode from "qrcode";
import InternalException from "../exceptions/internalException";
import { CLUB_NAME } from "../env.defaults";
import UserService from "../service/userService";
import UserFactory from "../factory/admin/user";
import { TransferUserOwnerCommand, UpdateUserCommand } from "../command/userCommand";
import UserCommandHandler from "../command/userCommandHandler";
import UserService from "../service/user/userService";
import UserFactory from "../factory/admin/user/user";
import { TransferUserOwnerCommand, UpdateUserCommand } from "../command/user/user/userCommand";
import UserCommandHandler from "../command/user/user/userCommandHandler";
import ForbiddenRequestException from "../exceptions/forbiddenRequestException";
/**

View file

@ -3,18 +3,18 @@ import "reflect-metadata";
import { DataSource } from "typeorm";
import { DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME, DB_TYPE } from "./env.defaults";
import { user } from "./entity/user";
import { user } from "./entity/user/user";
import { refresh } from "./entity/refresh";
import { invite } from "./entity/invite";
import { userPermission } from "./entity/user_permission";
import { role } from "./entity/role";
import { rolePermission } from "./entity/role_permission";
import { award } from "./entity/award";
import { communication } from "./entity/communication";
import { communicationType } from "./entity/communicationType";
import { executivePosition } from "./entity/executivePosition";
import { membershipStatus } from "./entity/membershipStatus";
import { qualification } from "./entity/qualification";
import { invite } from "./entity/user/invite";
import { userPermission } from "./entity/user/user_permission";
import { role } from "./entity/user/role";
import { rolePermission } from "./entity/user/role_permission";
import { award } from "./entity/settings/award";
import { communication } from "./entity/club/member/communication";
import { communicationType } from "./entity/settings/communicationType";
import { executivePosition } from "./entity/settings/executivePosition";
import { membershipStatus } from "./entity/settings/membershipStatus";
import { qualification } from "./entity/settings/qualification";
import { Initial1724317398939 } from "./migrations/1724317398939-initial";
import { RefreshPrimaryChange1724573307851 } from "./migrations/1724573307851-refreshPrimaryChange";
@ -22,48 +22,50 @@ import { Invite1724579024939 } from "./migrations/1724579024939-invite";
import { Permissions1724661484664 } from "./migrations/1724661484664-permissions";
import { RolePermission1724771491085 } from "./migrations/1724771491085-role_permission";
import { MemberBaseData1725435669492 } from "./migrations/1725435669492-member_base_data";
import { member } from "./entity/member";
import { memberAwards } from "./entity/memberAwards";
import { memberExecutivePositions } from "./entity/memberExecutivePositions";
import { memberQualifications } from "./entity/memberQualifications";
import { membership } from "./entity/membership";
import { member } from "./entity/club/member/member";
import { memberAwards } from "./entity/club/member/memberAwards";
import { memberExecutivePositions } from "./entity/club/member/memberExecutivePositions";
import { memberQualifications } from "./entity/club/member/memberQualifications";
import { membership } from "./entity/club/member/membership";
import { Memberdata1726301836849 } from "./migrations/1726301836849-memberdata";
import { CommunicationFields1727439800630 } from "./migrations/1727439800630-communicationFields";
import { Ownership1728313041449 } from "./migrations/1728313041449-ownership";
import { protocol } from "./entity/protocol";
import { protocolAgenda } from "./entity/protocolAgenda";
import { protocolDecision } from "./entity/protocolDecision";
import { protocolPresence } from "./entity/protocolPresence";
import { protocolVoting } from "./entity/protocolVoting";
import { protocolPrintout } from "./entity/protocolPrintout";
import { protocol } from "./entity/club/protocol/protocol";
import { protocolAgenda } from "./entity/club/protocol/protocolAgenda";
import { protocolDecision } from "./entity/club/protocol/protocolDecision";
import { protocolPresence } from "./entity/club/protocol/protocolPresence";
import { protocolVoting } from "./entity/club/protocol/protocolVoting";
import { protocolPrintout } from "./entity/club/protocol/protocolPrintout";
import { Protocol1729347911107 } from "./migrations/1729347911107-protocol";
import { calendar } from "./entity/calendar";
import { calendarType } from "./entity/calendarType";
import { calendar } from "./entity/club/calendar";
import { calendarType } from "./entity/settings/calendarType";
import { Calendar1729947763295 } from "./migrations/1729947763295-calendar";
import { reset } from "./entity/reset";
import { ResetToken1732358596823 } from "./migrations/1732358596823-resetToken";
import { SMSAlarming1732696919191 } from "./migrations/1732696919191-SMSAlarming";
import { SecuringCalendarType1733249553766 } from "./migrations/1733249553766-securingCalendarType";
import { query } from "./entity/query";
import { query } from "./entity/settings/query";
import { QueryStore1734187754677 } from "./migrations/1734187754677-queryStore";
import { memberView } from "./views/memberView";
import { memberExecutivePositionsView } from "./views/memberExecutivePositionView";
import { memberQualificationsView } from "./views/memberQualificationsView";
import { membershipView } from "./views/membershipsView";
import { MemberDataViews1734520998539 } from "./migrations/1734520998539-memberDataViews";
import { template } from "./entity/template";
import { template } from "./entity/settings/template";
import { Template1734854680201 } from "./migrations/1734854680201-template";
import { templateUsage } from "./entity/templateUsage";
import { templateUsage } from "./entity/settings/templateUsage";
import { TemplateUsage1734949173739 } from "./migrations/1734949173739-templateUsage";
import { newsletter } from "./entity/newsletter";
import { newsletterDates } from "./entity/newsletterDates";
import { newsletterRecipients } from "./entity/newsletterRecipients";
import { newsletter } from "./entity/club/newsletter/newsletter";
import { newsletterDates } from "./entity/club/newsletter/newsletterDates";
import { newsletterRecipients } from "./entity/club/newsletter/newsletterRecipients";
import { Newsletter1735118780511 } from "./migrations/1735118780511-newsletter";
import { newsletterConfig } from "./entity/newsletterConfig";
import { newsletterConfig } from "./entity/settings/newsletterConfig";
import { NewsletterConfig1735207446910 } from "./migrations/1735207446910-newsletterConfig";
import { TemplateMargins1735733514043 } from "./migrations/1735733514043-templateMargins";
import { InternalId1735822722235 } from "./migrations/1735822722235-internalId";
import { PostalCode1735927918979 } from "./migrations/1735927918979-postalCode";
import { ProtocolAbsent1736072179716 } from "./migrations/1736072179716-protocolAbsent";
import { Memberlist1736079005086 } from "./migrations/1736079005086-memberlist";
import { ExtendViewValues1736084198860 } from "./migrations/1736084198860-extendViewValues";
const dataSource = new DataSource({
type: DB_TYPE as any,
@ -135,9 +137,11 @@ const dataSource = new DataSource({
TemplateUsage1734949173739,
Newsletter1735118780511,
NewsletterConfig1735207446910,
TemplateMargins1735733514043,
InternalId1735822722235,
PostalCode1735927918979,
ProtocolAbsent1736072179716,
Memberlist1736079005086,
ExtendViewValues1736084198860,
],
migrationsRun: true,
migrationsTransactionMode: "each",

View file

@ -0,0 +1,13 @@
import { member } from "../entity/club/member/member";
import { protocolAgenda } from "../entity/club/protocol/protocolAgenda";
import { protocolDecision } from "../entity/club/protocol/protocolDecision";
import { protocolVoting } from "../entity/club/protocol/protocolVoting";
export const memberlistDemoData: { member: Array<Partial<member>> } = {
member: [
{
firstname: "Julian",
lastname: "Krauser",
},
]
}

View file

@ -1,5 +1,5 @@
import { calendar } from "../entity/calendar";
import { member } from "../entity/member";
import { calendar } from "../entity/club/calendar";
import { member } from "../entity/club/member/member";
import { Salutation } from "../enums/salutation";
export const newsletterDemoData: {

View file

@ -1,7 +1,7 @@
import { member } from "../entity/member";
import { protocolAgenda } from "../entity/protocolAgenda";
import { protocolDecision } from "../entity/protocolDecision";
import { protocolVoting } from "../entity/protocolVoting";
import { member } from "../entity/club/member/member";
import { protocolAgenda } from "../entity/club/protocol/protocolAgenda";
import { protocolDecision } from "../entity/club/protocol/protocolDecision";
import { protocolVoting } from "../entity/club/protocol/protocolVoting";
export const protocolDemoData: {
title: string;
@ -13,6 +13,7 @@ export const protocolDemoData: {
agenda: Array<Partial<protocolAgenda>>;
decisions: Array<Partial<protocolDecision>>;
presence: Array<Partial<member>>;
absent: Array<Partial<member>>;
votings: Array<Partial<protocolVoting>>;
} = {
title: "Beispiel Protokoll Daten",
@ -44,6 +45,7 @@ export const protocolDemoData: {
lastname: "Krauser",
},
],
absent: [],
votings: [
{
topic: "Abstimmung xy",

View file

@ -9,7 +9,7 @@ import {
AfterUpdate,
BeforeUpdate,
} from "typeorm";
import { calendarType } from "./calendarType";
import { calendarType } from "../settings/calendarType";
@Entity()
export class calendar {

View file

@ -1,6 +1,6 @@
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
import { member } from "./member";
import { communicationType } from "./communicationType";
import { communicationType } from "../../settings/communicationType";
@Entity()
export class communication {

View file

@ -1,11 +1,11 @@
import { Column, Entity, JoinColumn, ManyToOne, OneToMany, OneToOne, PrimaryColumn } from "typeorm";
import { Salutation } from "../enums/salutation";
import { Salutation } from "../../../enums/salutation";
import { membership } from "./membership";
import { memberAwards } from "./memberAwards";
import { memberQualifications } from "./memberQualifications";
import { memberExecutivePositions } from "./memberExecutivePositions";
import { communication } from "./communication";
import { CommunicationViewModel } from "../viewmodel/admin/communication.models";
import { CommunicationViewModel } from "../../../viewmodel/admin/club/member/communication.models";
@Entity()
export class member {

View file

@ -1,6 +1,6 @@
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
import { member } from "./member";
import { award } from "./award";
import { award } from "../../settings/award";
@Entity()
export class memberAwards {

View file

@ -1,6 +1,6 @@
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
import { member } from "./member";
import { executivePosition } from "./executivePosition";
import { executivePosition } from "../../settings/executivePosition";
@Entity()
export class memberExecutivePositions {

Some files were not shown because too many files have changed in this diff Show more