Initial commit: Angular frontend and Expressjs backend
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import {INotification} from "../interfaces";
|
||||
|
||||
export class TaskAdd implements INotification {
|
||||
private template = `<user> added "<task>" to the "<project>".`;
|
||||
user_ids!: string[];
|
||||
message!: string;
|
||||
|
||||
constructor(userIds: string[], userName: string, taskName: string, projectName: string) {
|
||||
this.user_ids = userIds;
|
||||
this.message = this.template
|
||||
.replace(/<user>/g, userName)
|
||||
.replace(/<task>/g, taskName)
|
||||
.replace(/<project>/g, projectName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import {INotification} from "../interfaces";
|
||||
|
||||
class TaskRemove implements INotification {
|
||||
private template = `<user> removed "<task>" from the "<project>".`;
|
||||
user_ids!: string[];
|
||||
message!: string;
|
||||
|
||||
constructor(userIds: string[], userName: string, taskName: string, projectName: string) {
|
||||
this.user_ids = userIds;
|
||||
this.message = this.template
|
||||
.replace(/<user>/g, userName)
|
||||
.replace(/<task>/g, taskName)
|
||||
.replace(/<project>/g, projectName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user