fix bug pager created notification
This commit is contained in:
@@ -5,15 +5,19 @@ import { PagerCreatedEvent } from '../events/pager.events';
|
||||
import { Permission } from 'src/common/enums/permission.enum';
|
||||
import { NotifTitleEnum } from 'src/modules/notifications/interfaces/notification.interface';
|
||||
import { NotificationService } from 'src/modules/notifications/services/notification.service';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
|
||||
@Injectable()
|
||||
export class PagerListeners {
|
||||
private readonly logger = new Logger(PagerListeners.name);
|
||||
|
||||
private readonly smsPatternPagerCreated: string
|
||||
constructor(
|
||||
private readonly adminService: AdminRepository,
|
||||
private readonly notificationService: NotificationService,
|
||||
) {}
|
||||
private readonly configService: ConfigService,
|
||||
) {
|
||||
this.smsPatternPagerCreated = this.configService.get<string>('SMS_PATTERN_PAGER_CREATED') ?? '123';
|
||||
}
|
||||
|
||||
@OnEvent(PagerCreatedEvent.name)
|
||||
async handlePagerCreated(event: PagerCreatedEvent) {
|
||||
@@ -30,7 +34,7 @@ export class PagerListeners {
|
||||
title: NotifTitleEnum.PAGER_CREATED,
|
||||
content: `میز شماره ${event.tableNumber} پیج جدیدی انجام داد`,
|
||||
sms: {
|
||||
templateId: '1234567890',
|
||||
templateId: this.smsPatternPagerCreated,
|
||||
parameters: {
|
||||
tableNumber: event.tableNumber.toString(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user