add redirecturl link
This commit is contained in:
parent
f537a54ec2
commit
ef0876d058
@ -5,6 +5,7 @@ import { Service } from "typedi";
|
|||||||
import NotificationsService from "@Services/common/NotificationsService/NotificationsService";
|
import NotificationsService from "@Services/common/NotificationsService/NotificationsService";
|
||||||
import UsersService from "@Services/super-admin/UsersService/UsersService";
|
import UsersService from "@Services/super-admin/UsersService/UsersService";
|
||||||
import OfficeFoldersService from "@Services/super-admin/OfficeFoldersService/OfficeFoldersService";
|
import OfficeFoldersService from "@Services/super-admin/OfficeFoldersService/OfficeFoldersService";
|
||||||
|
import { BackendVariables } from "@Common/config/variables/Variables";
|
||||||
|
|
||||||
@Service()
|
@Service()
|
||||||
export default class NotificationBuilder {
|
export default class NotificationBuilder {
|
||||||
@ -13,6 +14,7 @@ export default class NotificationBuilder {
|
|||||||
private documentsService: DocumentsService,
|
private documentsService: DocumentsService,
|
||||||
private usersService: UsersService,
|
private usersService: UsersService,
|
||||||
private foldersService: OfficeFoldersService,
|
private foldersService: OfficeFoldersService,
|
||||||
|
private backendVariables: BackendVariables
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public async sendDocumentDepositedNotification(documentEntity: Documents) {
|
public async sendDocumentDepositedNotification(documentEntity: Documents) {
|
||||||
@ -32,7 +34,7 @@ export default class NotificationBuilder {
|
|||||||
" " +
|
" " +
|
||||||
document.depositor?.contact?.last_name +
|
document.depositor?.contact?.last_name +
|
||||||
" vous a envoyé un document à valider",
|
" vous a envoyé un document à valider",
|
||||||
redirection_url: "",
|
redirection_url: `${this.backendVariables.APP_HOST}/office/folders/${document.folder?.uid}/documents/${document.uid}`,
|
||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
updated_at: new Date(),
|
updated_at: new Date(),
|
||||||
user: document.folder!.stakeholders || [],
|
user: document.folder!.stakeholders || [],
|
||||||
@ -55,7 +57,7 @@ export default class NotificationBuilder {
|
|||||||
" - " +
|
" - " +
|
||||||
document.folder?.name +
|
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.",
|
" 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}/office/folders/${document.folder?.uid}/documents/${document.uid}`,
|
||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
updated_at: new Date(),
|
updated_at: new Date(),
|
||||||
user: document.folder!.stakeholders || [],
|
user: document.folder!.stakeholders || [],
|
||||||
@ -80,7 +82,7 @@ export default class NotificationBuilder {
|
|||||||
|
|
||||||
this.notificationsService.create({
|
this.notificationsService.create({
|
||||||
message: message,
|
message: message,
|
||||||
redirection_url: "",
|
redirection_url: `${this.backendVariables.APP_HOST}/users/${vote.appointment.targeted_user.uid}`,
|
||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
updated_at: new Date(),
|
updated_at: new Date(),
|
||||||
user: superAdminList || [],
|
user: superAdminList || [],
|
||||||
@ -131,7 +133,7 @@ export default class NotificationBuilder {
|
|||||||
" avant le " +
|
" avant le " +
|
||||||
formattedDate +
|
formattedDate +
|
||||||
" (date limite d'expiration des documents).",
|
" (date limite d'expiration des documents).",
|
||||||
redirection_url: "",
|
redirection_url: `${this.backendVariables.APP_HOST}/office/folders/${folder.uid}`,
|
||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
updated_at: new Date(),
|
updated_at: new Date(),
|
||||||
user: folder.stakeholders || [],
|
user: folder.stakeholders || [],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user