Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/requested tasks #95

Merged
merged 4 commits into from
Jul 25, 2024
Merged

Feat/requested tasks #95

merged 4 commits into from
Jul 25, 2024

Conversation

Pradip-p
Copy link
Collaborator

@Pradip-p Pradip-p commented Jul 25, 2024

Description

This PR adds functionality to send email notifications when a mapping request is either approved or rejected. It also includes an endpoint to fetch pending tasks for a specific project and user. The email template has been updated to dynamically handle both scenarios using conditional logic.

Changes

  • Email Notifications:
    • Updated event_handler to include logic for sending approval and rejection email notifications.
    • Modified email template to handle both approval and rejection scenarios.
    • Passed necessary context variables from the code to the template to dynamically adjust the content.
  • Pending Tasks Endpoint:
    • Added /requested_tasks/{project_id}/pending endpoint to fetch a list of pending tasks for a specific project and user.

Copy link
Member

@spwoodcock spwoodcock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Just to clarify for my understanding, will this send an email every time a task is locked for mapping? (the MAP event)

@nrjadkry
Copy link
Member

Yes, @spwoodcock An email to the project creator will be send when someone requests to lock it, and when accepted, another email to the drone operator will be send

@nrjadkry nrjadkry merged commit 245d383 into main Jul 25, 2024
1 check failed
@nrjadkry nrjadkry deleted the feat/requested-tasks branch July 25, 2024 13:45
@spwoodcock
Copy link
Member

Damm, that's a lot of emails and red tape.

I guess it was a requirement!

Otherwise we could just notify the project manager, but not prevent the user from starting the task.

The task could be auto-unlocked after a certain timeout time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants