API Documentation
  • 🦸User
    • 🐔requestDeveloperVerification
    • ☑️Accept Developer verification
    • 🚫Reject developer verification
    • 🆕NEW Authentication Trigger
  • 📧Send emails
  • 📂Projects
    • 📩Invite a new Team member
  • 📔Tasks
    • 💣Cancel Task
    • 🔎Submit task
    • 👨‍💻Assign Task
  • Step 1 taskflow
    • ✅Accept task
    • ❌Reject task
    • ⏳Deadline reached
  • Step 2 taskflow
    • ✅Accept developer (creator)
    • ❌Reject developer (creator)
  • Step 3 taskflow
    • 🚦Submit for review
    • ⏳Review Deadline reached
    • ✅Accept work result
    • ❌Reject work result
  • Step 4 Taskflow
    • 💸Generate Invoice
    • 💸Mark invoice as paid
Powered by GitBook
On this page
  • Input parameters
  • How to call from app
  • Logic
  1. Step 3 taskflow

Reject work result

As a creator, I want to reject the work a developer submitted because the solution is not working

Input parameters

  • taskId
  • rejectionReason

How to call from app

HTTP request to: /reject-work-result/TASKID

import { httpsCallable } from 'firebase/functions';

await httpsCallable(functions, 'rejectWorkResult')({ 
    taskId: task.id,
    rejectionReason: currentTask.rejectionReason,
})

Logic

  1. The frontend (app.tasksource.io) calls the API (/reject-work-result/TASK-ID)

  2. the backend should now set a field in the task document (workResultIsAccepted = false) as well as the (workResultRejectionReason = workResultRejectionReason) field and the (submittedForReview = false)

  3. Send First Email:

    • to_email_adress = email_of_assigned_person

    • template_name = "work-result-rejected->developer"

    • data = {taskData: taskData, taskId: taskId, rejectionReason: rejectionReason}

  4. Send Second Email:

    • to_email_adress = email_of_task_creator

    • template_name = "work-result-rejected->creator"

    • data = {taskData: taskData, taskId: taskId, rejectionReason: rejectionReason}

PreviousAccept work resultNextGenerate Invoice

Last updated 2 years ago

❌