stakwork / sphinx-tribes-frontend

Frontend for sphinx tribes and bounties. The bounty platform that pays out in bitcoin. Sign up with Sphinx Chat, complete a bounty, and earn bitcoin! Go to our website for available bounties.
https://community.sphinx.chat/bounties
11 stars 42 forks source link

Add Bounties to Phases #545

Closed fvalentiner closed 1 month ago

fvalentiner commented 1 month ago

Context

We need to add functionality to the page feature/{feature_uuid} to manage bounties inside Feature Phases.

Design

Figma url: https://www.figma.com/design/1aL3lgG5Rpkti4b0j42fwf/Bounties---FINAL-DESIGNS?node-id=11865-1033

image

1- Modify the Tab section to match the design. 3- To add a bounty to a phase you can use the same Modal as in the [Post a Bounty Button] in /bounties. Make sure you add functionality to pass the phase_uuid to the create bounty component so that you can pass the phase_uuid when calling the add bounty endpoint in: POST /gobounties/ with the body including the phase_uuid.

If no phase_uuid is specified then the bounty will not be related to the phase.

4- Use the component src/people/widgetViews/WidgetSwitchViewer.tsx to display the list of bounties for a phase. It contains all the logic for displaying bounties on a list.

You can see how this component is used in src/pages/tickets/Tickets.tsx image

We need only the get people bounties APi call to populate the bounties data

main.getPeopleBounties({
        page: 1,
        resetPage: true,
        ...checkboxIdToSelectedMap,
        languages: languageString });

5- The list of bounties to pass to the component related to the phase_uuid can be obtained in: GET /features/{feature_uuid}/phase/{phase_uuid}/bounty


No need to create a cypress test for this bounty.


Acceptance Criteria

Here is an example unit test

Here is an example component test

MahtabBukhari commented 1 month ago

@fvalentiner Could you assign me ?

AbdulWahab3181 commented 1 month ago

@fvalentiner Could you please assign me?

MirzaHanan commented 1 month ago

@fvalentiner please assign me?

MirzaHanan commented 1 month ago

@fvalentiner, Please assign this issue to me because the deadline has passed. image

aliraza556 commented 1 month ago

Hi @fvalentiner, Please assign me?