hackforla / hackforla/HomeUniteUs

Dev: Implement Guest Workflow Tasks Endpoints

Open
#572 21 comments 0 reactions 0 assignees View on GitHub
Complexity: Large draft p-Feature: Guest Dashboard Ready for: Dev Lead Role: Back End Section: 2 size: 2pt
Dominant language
Python
Stars
45
Forks
22
Avg merge
15d 1h
Merged PRs (30d)
1

Description

Note: added draft label until dev team is ready to identify next steps for this issue. 9/12/24 Ariel Lasry

### Overview
The API shall manage the HUU housing Workflow. API clients (e.g. the front-end application) should be able to view Tasks (name, description, status) assigned to Guests by the Workflow. The API clients should also allow Guests to navigate to Tasks to view and work on.

Tasks are an abstract concept and their concrete implementations represent such things as Forms, Training/Lessons, Scheduling, Matching, etc. The Tasks in the Workflow are logically grouped together into Task Groups. The Task Groups represent major sub-processes of the Workflow such as "Application & Onboarding process", "Host Matching process", "Match Finalization process", etc.

For this issue, all Task Groups and Tasks up until the matching process should be returned by the API.

Task Groups and Tasks go through phases represented by the following statuses:
1. Locked
2. Start
3. In progress
4. More information is needed
5. Complete

The API shall maintain the following invariants imposed by the Workflow:

1. The order of the Task Groups represents the order in which the Guest must complete the Task Groups.
2. The order of the Tasks represents the order in which the Guest must complete the Tasks within a Task Group.
3. The Tasks in a Task Group can not be unlocked until the Task Group is unlocked and the Task before it has been completed. If it's the first Task in the Task Group, then it is automatically unlocked only if the Task Group is unlocked.
6. A Task Group is completed only when all of its Tasks are completed. The next Task Group can then be unlocked.

### Action Items
Domain concerns:
- [ ] Implement object model for Guests, Task Groups, Tasks, Workflow and their associations
- [ ] Implement state machine representing the (Guest) Workflow

The following data must be available in the endpoint(s):
- [ ] Guest Task Groups and their Tasks up until the matching process.
- [ ] Task Group ID, Title, Status, and Tasks.
- [ ] Task ID, Title, Description, Status, Link Text, Link URL Path

Database concerns:
- [ ] Implement a persistence layer retrieve, store, and update Tasks
- [ ] Remove unused tables
- [ ] Implement relational model for Task Groups, Tasks, Workflow and associations with Guests
- [ ] Implement migration script(s)

### Resources/Instructions
- [Section 2 Epic](https://github.com/hackforla/HomeUniteUs/issues/500)
- [Section 2 Guest Epic Google Doc](https://docs.google.com/document/d/141qIw7FDyk3BoVAfc7iBsdhMqtLKp_y5MA082ouc2Fk/edit)
- [Frontend Work](https://github.com/hackforla/HomeUniteUs/issues/566)
- [Frontend Designs](https://www.figma.com/file/BNWqZk8SHKbtN1nw8BB7VM/HUU-Everything-Figma-Nov-2022?type=design&node-id=8700%3A7901&mode=design&t=RYccU4PYyIHb5Qe7-1)
- [Workflow on Figma](https://www.figma.com/file/BNWqZk8SHKbtN1nw8BB7VM/HUU-Everything-Figma-Nov-2022?type=design&node-id=2353-17312&mode=design&t=EcEz499oYWUpyIyw-0)
- [State machine issue](https://github.com/hackforla/HomeUniteUs/issues/391)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.