Ag Grid anpassungen

This commit is contained in:
Bastian Wagner
2026-02-19 12:21:30 +01:00
parent d7cfc89ba5
commit ef45e91141
31 changed files with 469 additions and 75 deletions

View File

@@ -11,6 +11,7 @@ import { HelperService } from 'src/shared/service/system.helper.service';
import { FindOperator, IsNull, Not } from 'typeorm';
import { faker } from '@faker-js/faker';
import { ConfigService } from '@nestjs/config';
import { MailService } from '../mail/mail.service';
@Injectable()
export class KeyService {
@@ -20,7 +21,8 @@ export class KeyService {
private readonly handoverRepo: KeyHandoutRepository,
private readonly activityService: ActivityHelperService,
private readonly helper: HelperService,
private readonly configService: ConfigService
private readonly configService: ConfigService,
private readonly mailService: MailService,
) {}
get isDevelopMode(): boolean {
@@ -109,6 +111,21 @@ export class KeyService {
);
this.activityService.logKeyHandover(user, key, key.cylinder[0].system, res);
try {
if (key && key.cylinder && key.cylinder[0].system) {
const managerOb: Key = await this.keyrepository.findOne({
where: { id: keyID },
relations: [ 'cylinder', 'cylinder.system', 'cylinder.system.managers', 'cylinder.system.managers.settings' ]
});
console.log(managerOb.cylinder[0].system.managers)
managerOb.cylinder[0].system.managers.filter(m => m.settings.sendSystemUpdateMails).forEach(m => {
this.mailService.sendKeyHandoutMail({ to: m, key, handoutAction: res })
})
}
} catch (e){
console.log(e)
}
return res;
}