forked from fs/task_tracker_itis_2023
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
088c13b
commit e6620f1
Showing
8 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
class TaskMailer < ApplicationMailer | ||
def task_created_owner(user, task) | ||
@user = user | ||
@task = task | ||
@project = task.project | ||
|
||
mail(to: @user.email, subject: "A new task has been successfully created") | ||
end | ||
|
||
def task_created_member(user, task) | ||
@user = user | ||
@task = task | ||
@project = task.project | ||
|
||
mail(to: @user.email, subject: "A new task has been created in your project") | ||
end | ||
|
||
def task_updated(user, task) | ||
@user = user | ||
@task = task | ||
@project = task.project | ||
mail(to: @user.email, subject: "A task in your project has been updated") | ||
end | ||
|
||
def task_deleted(user) | ||
@user = user | ||
mail(to: @user.email, subject: "A task in your project has been deleted") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<h1>A new task has been created in your project!</h1> | ||
<ul> | ||
<li><strong>Task Name:</strong> <%= @task.name %></li> | ||
<li><strong>Description:</strong> <%= @task.description %></li> | ||
<li><strong>Deadline:</strong> <%= @task.deadline_at.strftime('%B %d, %Y') %></li> | ||
<li><strong>Status:</strong> <%= @task.status.text %></li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<h1>A new task "<%= @task.name %>" has been successfully created in your project "<%= @project.name %>"!</h1> | ||
<p>Only for project owner</p> | ||
<ul> | ||
<li><strong>Task Name:</strong> <%= @task.name %></li> | ||
<li><strong>Description:</strong> <%= @task.description %></li> | ||
<li><strong>Deadline:</strong> <%= @task.deadline_at.strftime('%B %d, %Y') %></li> | ||
<li><strong>Status:</strong> <%= @task.status.text %></li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>A task in your project has been deleted!</h1> | ||
<p>The task "<%= @task.name %>" in the project "<%= @project.name %>" has been deleted.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>A task in your project has been updated!</h1> | ||
<p>The task "<%= @task.name %>" in the project "<%= @project.name %>" has recently been updated.</p> |