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.
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