JesseMattson / PurrgentCare

0 stars 0 forks source link

Feature: UI-account-disable-enable #53

Closed RandallKeur closed 2 months ago

RandallKeur commented 4 months ago

Title: Create user functionality to disable/enable an account

User Story: As a worker at Purrgent Care, I would like a quick button or toggle to activate or de-activate an account. If the account is already active, then the button should be de-activate. If the account is already inactive, the button should be activate. When I press the activate or de-activate button it should update the account in the database and re-load the page to show all accounts.

Technical details - Frontend:

Update the frontend to have 'Activate|De-activate' for actions instead of the 'Edit | Delete' options for accounts. Ideally, Activate|De-activate option should only show one of them based upon the current status of the account: ex. if account is active --> display De-activate, if account is inactive --> display Activate When pressed, the button should contact the back-end endpoint with the account number and status (True for Activate and False for De-activate) After updating the account, the user should be re-directed back to the accounts page.

Depends on: https://github.com/JesseMattson/PurrgentCare/issues/39

JesseMattson commented 2 months ago

Closed by #39 and #49