DH-IT-Portal-Development / ethics

Ethical Committee web application in Django
http://fetc.hum.uu.nl
MIT License
2 stars 1 forks source link

Fix/diff and other minor issues. #711

Closed EdoStorm96 closed 1 month ago

EdoStorm96 commented 1 month ago

So this branch is just some odds and ends.

I firstly wanted to update the diff page, so that it makes use of Bootstrap's table class and such. I had to add some css to make the styling look like the old version. This is now in the diff.css static file.

When testing the diff, I noticed that different study types (sessions, interventions, observations) remain linked to the proposal, even though you might change your proposal's design to not include them. So I added the ability to StudyDesign to delete objects, as well as create them.

I found that TaskCreate did not receive a proposal, so I fixed this.

I also added the diff.css static file to the compare documents pages, so that it uses the same styling.

Finally I noticed that Session.net_duration(), did not take the repeats of the session into account. So I've implemented this as well.

Sorry for this chaotic PR ... I keep noticing small things and wanting to fix it right away ... Hope you can make sense of it. The commits help :)

EdoStorm96 commented 1 month ago

Ok, so I've adressed your comments. I've also merged major/4 into this branch to avoid conflicts.

So I implemented get_intervention, get_observation and get_sessions property methods on the Study model. For now we are only using these for the diff ... I guess it could remove some if-statements in other places ... What do you think? Have a look at other places where this can be used or just leave it?

EdoStorm96 commented 1 month ago

Added a little bonus fix for #701