Refactor Step 3 trial workflow
Problem to solve
Step 3 of trial form allows user to create a new group and apply trial to it.
Currently, the backend api does both actions in one api. The idea is to isolate functionality of the apis.
If a user opts to apply trial to a new group, the workflow can be refactored to:
- User enters name of new group
- Invoke existing api to create new group (https://docs.gitlab.com/ee/api/groups.html#new-group)
- If it fails - redirect back to (1) with errors
- If succeeds, call api to apply trial
/-/trials/apply
Remove group creation code from apply
api in trials
Edited by 🤖 GitLab Bot 🤖