Skip to content

Resolve "Permission and button to unfinish visit or to add appointment."

Carlos Vega requested to merge 351-unfinish-visit into master

Closes #351 (closed)

So, visits can only be unfinished if:

  • there is only one visit after the finished visit
  • such future visit has no appointments
  • the user has the permission to do so (or superuser)
  • the visit is indeed finished

When unfinishing a visit:

  • The next visit will be removed
  • The visit will be marked as not finished

Visits that cannot be unfinished:

  • those with more than 1 subsequent visit
  • those with 1 subsequent visit with appointments set
  • if the user has no permissions

Please check this comment: https://git-r3lab.uni.lu/NCER-PD/scheduling-system/-/blob/351-unfinish-visit/smash/web/models/visit.py#L50

Some tooltips and help has been added for the user.

Screenshot_2020-11-06_at_13.51.49

Screenshot_2020-11-06_at_13.49.20

Screenshot_2020-11-06_at_13.49.02

Edited by Carlos Vega

Merge request reports