> For the complete documentation index, see [llms.txt](https://docs.airdev.co/gig-marketplace-template/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airdev.co/gig-marketplace-template/assets/pages/task.md).

# task

Informational page for a task where users can apply for the task

## Task Page Overview

This is an informational page for a `Task`, where users can view task details and submit a bid for the task. Users can also use this page to flag a task and, if they are the owner of that task, have options to edit or delete the task. A user can only submit **one** application (or `Bid`) per task.&#x20;

## Key Workflows

#### Page is loaded and Current User's Newly registered? is "yes"

* This is effectively triggered when the user successfully completes the **Stripe seller registration** on this page
* This navigates the user to the dashboard to finish filling out profile details, specifically freelancer info

#### Button SUBMIT BID is clicked

* Creates a new Bid instance, including the user-inputted `Message` and `Amount`&#x20;
* Sends an email to the task `Owner`, notifying them of the new `Bid`
* Note that certain workflows relating to `Threads` and `Messages` have a `This url is not empty` conditional added to them - this is used to effectively disable these workflows but allow them to be easily re-enabled

#### Button REGISTER AS A FREELANCER is clicked

* Redirects the user to a Stripe-powered form that allows the user to sign up or connect a **Stripe** account for the purpose of registering their account as a **Stripe Seller**
* The user’s `Stripe Seller account ID property` should now be populated

#### Button Flag Task is clicked

* Creates a new `Flag` for that task
* Sends an email to app admins notifying them of the flag

#### Button REMOVE is clicked

* Removes the Task from the database
* This action is only available to the task owner

#### Group Option 2 - Edit is clicked

* Navigates the user to the [newtask page](/gig-marketplace-template/assets/pages/newtask.md) to edit the task (uses a `task` parameter containing the page's `Task`)
* This action is only available to the task owner
