# 308 To share info message

* adds needs-to-be-shared info message on entries which are only shared with the current user
This commit is contained in:
2023-03-07 07:17:08 +01:00
parent 4d3831f30b
commit f22b45b82b
9 changed files with 212 additions and 119 deletions

View File

@@ -22,7 +22,7 @@ from konova.forms.modals import RemoveModalForm
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from konova.utils.message_templates import DATA_CHECKED_PREVIOUSLY_TEMPLATE, RECORDED_BLOCKS_EDIT, \
CHECKED_RECORDED_RESET, FORM_INVALID, IDENTIFIER_REPLACED
CHECKED_RECORDED_RESET, FORM_INVALID, IDENTIFIER_REPLACED, DO_NOT_FORGET_TO_SHARE
from konova.utils.user_checks import in_group
@@ -167,6 +167,13 @@ def detail_view(request: HttpRequest, id: str):
has_payment_without_document = intervention.payments.exists() and not intervention.get_documents()[1].exists()
requesting_user_is_only_shared_user = intervention.is_only_shared_with(_user)
if requesting_user_is_only_shared_user:
messages.info(
request,
DO_NOT_FORGET_TO_SHARE
)
context = {
"obj": intervention,
"last_checked": last_checked,