bloom-housing / bloom

Bloom is Exygy’s affordable housing platform. Bloom's goal is to be a single entry point for affordable housing seekers and a hub for application and listing management for developers.
https://bloomhousing.com
Apache License 2.0
33 stars 25 forks source link

feat: lottery status (released to partners / retracted) #4167

Closed mcgarrye closed 4 months ago

mcgarrye commented 4 months ago

This PR addresses #(4057)

Description

Create lottery status enums and status change endpoint. Setup business logic for releasing to partners and retracting actions.

To understand how the status flow works, check out this Miro board

How Can This Be Tested/Reviewed?

Run migration and run backend in the terminal. Use the swagger open api for the following flows. Flow 1: Login as an admin, attempt to change the status of a active listing to releasedToPartners, you should receive an error since listing is not closed. Flow 2: Login as an admin, attempt to change the status of a closed listing to releasedToPartners, you should receive an error since it must be in approved. Flow 3: Change the status manually in the db to approved, login as an admin, attempt to change the status of a closed listing to releasedToPartners, confirm change was successful, attempt to change status to ran (this is retracting the lottery), confirm success. Flow 4: Attempt flow 3 as a partner or juris admin, confirm you receive permission errors.

Author Checklist:

Review Process:

netlify[bot] commented 4 months ago

Deploy Preview for partners-bloom-dev ready!

Name Link
Latest commit 273cf7a0d9fb1098b49734cecce946c66b482764
Latest deploy log https://app.netlify.com/sites/partners-bloom-dev/deploys/66846a2c1948870007ff5e75
Deploy Preview https://deploy-preview-4167--partners-bloom-dev.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 4 months ago

Deploy Preview for bloom-exygy-dev ready!

Name Link
Latest commit 273cf7a0d9fb1098b49734cecce946c66b482764
Latest deploy log https://app.netlify.com/sites/bloom-exygy-dev/deploys/66846a2c1d04c7000807e2ad
Deploy Preview https://deploy-preview-4167--bloom-exygy-dev.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.