The user should be able to select a targeted strategy. This issue is containing the proper handling of the empty case on the dashboard view.
Technical details
The API endpoints already exist here (GET /dashboard/strategies and POST /dashboard/strategies/select-strategy)
The payload format is { strategy: number (ID) }
Theoretically, the strategies list cannot be empty as we create some default public strategies on every system, so the fronted don't have to prepare for that use-case.
[x] If the user has no selected target strategy, we should display an explanation message and an option to select.
[x] The functionality should be placed on the dashboard view.
[x] When the user tries to select a target strategy, they should be presented with a list of their strategies and the public strategies.
[x] After the user selected a strategy, update the UI on dashboard to present the new target and current strategy (/dashboard/strategies/me)
[x] Loading state should be handled properly.
[x] Possible errors:
[x] 400 - malformed payload
[x] ~401 - the user is not autheticated~ (this is a possible error, but should not happen in this state of the frontend)
[x] 403 - the user is not allowed to list/select strategies
Description
The user should be able to select a targeted strategy. This issue is containing the proper handling of the empty case on the dashboard view.
Technical details
GET /dashboard/strategies
andPOST /dashboard/strategies/select-strategy
){ strategy: number (ID) }
/dashboard/strategies/me
)