Merge remote-tracking branch 'origin/master'

This commit is contained in:
argirok 2021-07-26 13:06:39 +03:00
commit 2007e12966
1 changed files with 8 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import {HelperFunctions} from "../utils/HelperFunctions.class";
import {Composer} from "../utils/email/composer";
export class NotificationUtils {
public static IMPORT_INDICATORS: Notification = new Notification('IMPORT', ['monitor'], 'User ((__user__)) has imported new indicators in ((__stakeholder__)) profile', 'section')
public static CREATE_STAKEHOLDER: Notification = new Notification('CREATE', ['monitor'], 'User ((__user__)) has created a new profile', 'stakeholder')
public static EDIT_STAKEHOLDER: Notification = new Notification('EDIT', ['monitor'], 'User ((__user__)) has updated ((__stakeholder__)) profile', 'stakeholder')
public static CREATE_INDICATOR: Notification = new Notification('CREATE', ['monitor'], 'User ((__user__)) has created a new indicator in ((__stakeholder__)) profile', 'indicator');
@ -11,6 +12,13 @@ export class NotificationUtils {
public static INVITE_MONITOR_MANAGER: Notification = new Notification('INVITE_MANAGER', ['monitor'], null, 'user');
public static INVITE_MONITOR_MEMBER: Notification = new Notification('INVITE_MEMBER', ['monitor'], null, 'user');
public static importIndicators(user: string, stakeholder: string): Notification {
let notification: Notification = HelperFunctions.copy(this.IMPORT_INDICATORS);
notification.message = notification.message.replace('((__user__))', user);
notification.message = notification.message.replace('((__stakeholder__))', stakeholder);
return notification;
}
public static createStakeholder(user: string): Notification {
let notification: Notification = HelperFunctions.copy(this.CREATE_STAKEHOLDER);
notification.message = notification.message.replace('((__user__))', user);