Feat/notifications redirecturl (#103)
This commit is contained in:
commit
c5f64c3d29
@ -5,6 +5,7 @@ import { Service } from "typedi";
|
||||
import NotificationsService from "@Services/common/NotificationsService/NotificationsService";
|
||||
import UsersService from "@Services/super-admin/UsersService/UsersService";
|
||||
import OfficeFoldersService from "@Services/super-admin/OfficeFoldersService/OfficeFoldersService";
|
||||
import { BackendVariables } from "@Common/config/variables/Variables";
|
||||
|
||||
@Service()
|
||||
export default class NotificationBuilder {
|
||||
@ -13,6 +14,7 @@ export default class NotificationBuilder {
|
||||
private documentsService: DocumentsService,
|
||||
private usersService: UsersService,
|
||||
private foldersService: OfficeFoldersService,
|
||||
private backendVariables: BackendVariables
|
||||
) {}
|
||||
|
||||
public async sendDocumentDepositedNotification(documentEntity: Documents) {
|
||||
@ -32,7 +34,7 @@ export default class NotificationBuilder {
|
||||
" " +
|
||||
document.depositor?.contact?.last_name +
|
||||
" vous a envoyé un document à valider",
|
||||
redirection_url: "",
|
||||
redirection_url: `${this.backendVariables.APP_HOST}/folders/${document.folder?.uid}/documents/${document.uid}`,
|
||||
created_at: new Date(),
|
||||
updated_at: new Date(),
|
||||
user: document.folder!.stakeholders || [],
|
||||
@ -55,7 +57,7 @@ export default class NotificationBuilder {
|
||||
" - " +
|
||||
document.folder?.name +
|
||||
" a été certifié. Vous pouvez désormais télécharger le certificat de dépôt pour le mettre dans la GED de votre logiciel de rédaction d'acte.",
|
||||
redirection_url: "",
|
||||
redirection_url: `${this.backendVariables.APP_HOST}/folders/${document.folder?.uid}/documents/${document.uid}`,
|
||||
created_at: new Date(),
|
||||
updated_at: new Date(),
|
||||
user: document.folder!.stakeholders || [],
|
||||
@ -80,7 +82,7 @@ export default class NotificationBuilder {
|
||||
|
||||
this.notificationsService.create({
|
||||
message: message,
|
||||
redirection_url: "",
|
||||
redirection_url: `${this.backendVariables.APP_HOST}/users/${vote.appointment.targeted_user.uid}`,
|
||||
created_at: new Date(),
|
||||
updated_at: new Date(),
|
||||
user: superAdminList || [],
|
||||
@ -131,7 +133,7 @@ export default class NotificationBuilder {
|
||||
" avant le " +
|
||||
formattedDate +
|
||||
" (date limite d'expiration des documents).",
|
||||
redirection_url: "",
|
||||
redirection_url: `${this.backendVariables.APP_HOST}/folders/${folder.uid}`,
|
||||
created_at: new Date(),
|
||||
updated_at: new Date(),
|
||||
user: folder.stakeholders || [],
|
||||
|
Loading…
x
Reference in New Issue
Block a user