fix: add notif type to create notification
This commit is contained in:
@@ -124,7 +124,7 @@ export class NotificationsService {
|
||||
await this.smsService.sendLoginSms(sendNotifData.userPhone, loginDate);
|
||||
//send email too
|
||||
}
|
||||
return this.createNotification({ title: NotificationMessage.LOGIN, message, recipientId });
|
||||
return this.createNotification({ title: NotificationMessage.LOGIN, type: NotifType.USER_LOGIN, message, recipientId });
|
||||
}
|
||||
|
||||
//************************ */
|
||||
@@ -147,7 +147,10 @@ export class NotificationsService {
|
||||
);
|
||||
//send email too
|
||||
}
|
||||
return this.createNotification({ title: NotificationMessage.INVOICE_CREATION, message, recipientId }, queryRunner);
|
||||
return this.createNotification(
|
||||
{ title: NotificationMessage.INVOICE_CREATION, type: NotifType.CREATE_INVOICE, message, recipientId },
|
||||
queryRunner,
|
||||
);
|
||||
}
|
||||
//************************ */
|
||||
|
||||
@@ -163,7 +166,7 @@ export class NotificationsService {
|
||||
await this.smsService.sendAnnouncementSms(data.userPhone, data.title, data.description, dateFormat(data.date));
|
||||
//send email too
|
||||
}
|
||||
return this.createNotification({ title: NotificationMessage.ANNOUNCEMENT, message, recipientId });
|
||||
return this.createNotification({ title: NotificationMessage.ANNOUNCEMENT, type: NotifType.ANNOUNCEMENT, message, recipientId });
|
||||
}
|
||||
|
||||
//************************ */
|
||||
@@ -185,7 +188,7 @@ export class NotificationsService {
|
||||
);
|
||||
//send email too
|
||||
}
|
||||
return this.createNotification({ title: NotificationMessage.WALLET_CHARGE, message, recipientId });
|
||||
return this.createNotification({ title: NotificationMessage.WALLET_CHARGE, type: NotifType.WALLET_CHARGE, message, recipientId });
|
||||
}
|
||||
|
||||
//************************ */
|
||||
@@ -208,7 +211,7 @@ export class NotificationsService {
|
||||
);
|
||||
//send email too
|
||||
}
|
||||
return this.createNotification({ title: NotificationMessage.WALLET_DEDUCTION, message, recipientId });
|
||||
return this.createNotification({ title: NotificationMessage.WALLET_DEDUCTION, type: NotifType.WALLET_DEDUCTION, message, recipientId });
|
||||
}
|
||||
|
||||
// //************************ */
|
||||
@@ -225,7 +228,7 @@ export class NotificationsService {
|
||||
await this.smsService.sendAnswerTicketSms(data.userPhone, data.ticketId, data.subject);
|
||||
//send email too
|
||||
}
|
||||
return this.createNotification({ title: NotificationMessage.ANSWER_TICKET, message, recipientId });
|
||||
return this.createNotification({ title: NotificationMessage.ANSWER_TICKET, type: NotifType.ANSWER_TICKET, message, recipientId });
|
||||
}
|
||||
|
||||
// //************************ */
|
||||
@@ -242,7 +245,7 @@ export class NotificationsService {
|
||||
await this.smsService.sendCreateTicketSms(data.userPhone, data.ticketId, data.subject, dateFormat(data.date));
|
||||
//send email too
|
||||
}
|
||||
return this.createNotification({ title: NotificationMessage.CREATE_TICKET, message, recipientId });
|
||||
return this.createNotification({ title: NotificationMessage.CREATE_TICKET, type: NotifType.CREATE_TICKET, message, recipientId });
|
||||
}
|
||||
|
||||
//************************ */
|
||||
|
||||
Reference in New Issue
Block a user