Topcoder - Support Custom Copilot Fee For Challenge In Direct App

Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Currently, the Copilot Fee For challenges is pre-configured for different challenge type. For this challenge, we'd like to make the copilot fee editable when launching and edit challenges.

1. Launch Challenge (/launch/home)
- In the launch challenge wizard, we'd like have the copilot fee part editable similar like the prizes.
- By default, it will fill with the copilot fee from configuration.
- User can edit custom copilot fee (proper validation should be added)
- When Save the Draft or Submit and Launch, if the copilot fee entered is same as what from configuration, do nothing (which is the current behavior), otherwise, We'd like to turn "Manual Payments" for copilot resource to true,  and Create a Project Payment For the copilot resource with the amount set to copilot fee
- If copilot is not selected, the copilot fee part is not need to editable, and just shown as zero.
- The Copilot Cost property for challenge should be properly updated.


2. Edit Challenge (/direct/contest/detail.action?projectId=xxxxx)
- In the challenge detail page, in Prizes section, the copilot fee should be displayed properly
- When switch to edit mode, the copilot fee part should be editable.
- When save, if the copilot fee is different what from the configuration, We'd like to turn "Manual Payments" for copilot resource to true,  and Create/Update the Project Payment For the copilot resource with the amount set to copilot fee entered.
- if the copilot fee is same as what from the configuration, We'd like to turn "Manual Payments" for copilot resource to false, and Remove the Project Payment For the copilot resource if exists.
- If copilot is not selected, the copilot fee part is not need to editable, and just shown as zero.
- The Copilot Cost property for challenge should be properly updated.

3. About Project Payment Management
 - We can use the project_payment_management component (which is used in Online Review application), the source code will be attached in forum.
 - Usage example can be found in Online Review (https://github.com/topcoder-platform/tc-online-review/search?utf8=%E2%9C%93&q=ProjectPayment&type=)

How To Verify
To verification, you can check database or login into Online Review to verify the copilot 

Local Setup

- Please follow Build and Run with Docker compose to build and run direct app locally
- run-online-review should also be up if you want to verify with Online Review

Final Submission Guidelines

- Code change 
- Verification Steps

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30057453