From 466496afcf74f0441f3052f070c706d6dafe15a3 Mon Sep 17 00:00:00 2001 From: Pradip-p Date: Thu, 25 Jul 2024 15:22:42 +0545 Subject: [PATCH] feat: add email notification for mapping request approval & mapping request rejection --- .../app/email_templates/mapping_approved.html | 140 ++++++++++++++++++ .../app/email_templates/mapping_requests.html | 6 +- src/backend/app/projects/project_crud.py | 4 +- src/backend/app/tasks/task_crud.py | 11 +- src/backend/app/tasks/task_routes.py | 63 +++++++- 5 files changed, 210 insertions(+), 14 deletions(-) create mode 100644 src/backend/app/email_templates/mapping_approved.html diff --git a/src/backend/app/email_templates/mapping_approved.html b/src/backend/app/email_templates/mapping_approved.html new file mode 100644 index 00000000..c7bf1b35 --- /dev/null +++ b/src/backend/app/email_templates/mapping_approved.html @@ -0,0 +1,140 @@ + + + + + + {{ email_subject }} + + + +
+
+

{{ email_subject }}

+
+
+

Dear {{ drone_operator_name }},

+

+ {{ email_body }} +

+

Please find below the details of the {{ task_status }} task:

+
+

{{ task_status|capitalize }} Task Details

+
+

Project: {{ project_name }}

+

Task ID: {{ task_id }}

+

Description: {{ description }}

+
+ {% if task_status == 'approved' %} + Start Mapping + {% endif %} +
+
+ +
+ + diff --git a/src/backend/app/email_templates/mapping_requests.html b/src/backend/app/email_templates/mapping_requests.html index d4feec04..6c9de9b9 100644 --- a/src/backend/app/email_templates/mapping_requests.html +++ b/src/backend/app/email_templates/mapping_requests.html @@ -125,11 +125,11 @@

Drone Tasking Manager Invite

Mapping Task Details

+

Drone Operator: {{drone_operator_name}}

+

Task ID: {{task_id}}

Project:{{project_name}}

- Description: Drone Tasking Manager Project - Description -

+ Description: {{description}}

Start Mapping