pmeng / therapy-scheme-generator

1 stars 2 forks source link

Deleting Therapy Stub - Show deleted stub as notice in therapy scheme #100

Open pmeng opened 1 month ago

pmeng commented 1 month ago

At the moment a therapy stub can only be deleted when it is not used in a therapy scheme. It pointed out, that this disrupts the workflow.

image

I want this to be adapted. When I want to delete a therapy stub, it should show all the therapy schemes where the therapy stub is in use (like currently), but please add a third button with the option "Delete stub, mark as deleted in therapy schemes" It should then mark the stub as deleted. Now, when a saved therapy scheme is opened where the deleted stub is still in use, it should show this stub highlighted in light-red, without a checkbox for selection and only with the option to delete it from the scheme. This way, the user sees the deleted stub when opening the stub next time and can manually remove it and if necessary exchange it with a different therapy stub.

Mahmoudnaoum commented 1 month ago

If a stub is used in any saved schemes, the Delete button will be replaced with 'Mark as Deleted.' If the stub is not used in any schemes, the standard delete pop-up will appear.

Mahmoudnaoum commented 1 month ago

If a stub is marked as deleted, should it still appear on the stub list page? Additionally, should it be included in the generated HTML and PDF for any schemes that use it?

pmeng commented 1 month ago

If a stub is deleted it shall only appear on the stubs list page when the button "show deleted stubs" is being clicked.

When a stub is deleted and in a therapy scheme it should print on the generated HTML/PDF unless the user deleted it from the scheme.