Skip to content
Snippets Groups Projects
Commit cf3519d7 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

visit list contain description what kind of list is it

parent c0058f4b
No related branches found
No related tags found
1 merge request!129Resolve "list shown after clicking on notifications"
Pipeline #
...@@ -12,7 +12,7 @@ VISIT_LIST_APPROACHING_WITHOUT_APPOINTMENTS = "APPROACHING_WITHOUT_APPOINTMENTS" ...@@ -12,7 +12,7 @@ VISIT_LIST_APPROACHING_WITHOUT_APPOINTMENTS = "APPROACHING_WITHOUT_APPOINTMENTS"
VISIT_LIST_APPROACHING_FOR_MAIL_CONTACT = "APPROACHING_FOR_MAIL_CONTACT" VISIT_LIST_APPROACHING_FOR_MAIL_CONTACT = "APPROACHING_FOR_MAIL_CONTACT"
VISIT_LIST_CHOICES = { VISIT_LIST_CHOICES = {
VISIT_LIST_GENERIC: 'Generic', VISIT_LIST_GENERIC: 'Generic visit list',
VISIT_LIST_EXCEEDED_TIME: 'exceeded visit time', VISIT_LIST_EXCEEDED_TIME: 'exceeded visit time',
VISIT_LIST_UNFINISHED: 'unfinished visits', VISIT_LIST_UNFINISHED: 'unfinished visits',
VISIT_LIST_MISSING_APPOINTMENTS: 'visits with missing appointments', VISIT_LIST_MISSING_APPOINTMENTS: 'visits with missing appointments',
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
{% endblock styles %} {% endblock styles %}
{% block ui_active_tab %}'visits'{% endblock ui_active_tab %} {% block ui_active_tab %}'visits'{% endblock ui_active_tab %}
{% block page_header %}Visits{% endblock page_header %} {% block page_header %}{{ list_description }}{% endblock page_header %}
{% block page_description %}{% endblock page_description %} {% block page_description %}{% endblock page_description %}
{% block title %}{{ block.super }} - Visits{% endblock %} {% block title %}{{ block.super }} - {{ list_description }}{% endblock %}
{% block breadcrumb %} {% block breadcrumb %}
{% include "visits/breadcrumb.html" %} {% include "visits/breadcrumb.html" %}
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
function getVisitEditUrl(id) { function getVisitEditUrl(id) {
return "{% url 'web.views.visit_details' 12345678 %}".replace(/12345678/, id); return "{% url 'web.views.visit_details' 12345678 %}".replace(/12345678/, id);
} }
$.get("{% url 'web.api.visits.columns' visit_list_type %}", function (data) { $.get("{% url 'web.api.visits.columns' visit_list_type %}", function (data) {
createVisitsTable({ createVisitsTable({
locations_url: "{% url 'web.api.locations' %}", locations_url: "{% url 'web.api.locations' %}",
......
...@@ -6,7 +6,7 @@ from django.shortcuts import get_object_or_404, redirect ...@@ -6,7 +6,7 @@ from django.shortcuts import get_object_or_404, redirect
from notifications import waiting_for_appointment from notifications import waiting_for_appointment
from web.models.study_visit_list import VISIT_LIST_GENERIC, VISIT_LIST_MISSING_APPOINTMENTS, \ from web.models.study_visit_list import VISIT_LIST_GENERIC, VISIT_LIST_MISSING_APPOINTMENTS, \
VISIT_LIST_APPROACHING_WITHOUT_APPOINTMENTS, VISIT_LIST_APPROACHING_FOR_MAIL_CONTACT, VISIT_LIST_EXCEEDED_TIME, \ VISIT_LIST_APPROACHING_WITHOUT_APPOINTMENTS, VISIT_LIST_APPROACHING_FOR_MAIL_CONTACT, VISIT_LIST_EXCEEDED_TIME, \
VISIT_LIST_UNFINISHED VISIT_LIST_UNFINISHED, VISIT_LIST_CHOICES
from . import wrap_response from . import wrap_response
from ..forms import VisitDetailForm, VisitAddForm, SubjectDetailForm, StudySubjectDetailForm from ..forms import VisitDetailForm, VisitAddForm, SubjectDetailForm, StudySubjectDetailForm
from ..models import Visit, Appointment, StudySubject, MailTemplate from ..models import Visit, Appointment, StudySubject, MailTemplate
...@@ -15,7 +15,11 @@ logger = logging.getLogger(__name__) ...@@ -15,7 +15,11 @@ logger = logging.getLogger(__name__)
def show_visits(request, visit_list_type): def show_visits(request, visit_list_type):
return wrap_response(request, 'visits/index.html', {'visit_list_type': visit_list_type}) context = {
'visit_list_type': visit_list_type,
'list_description': VISIT_LIST_CHOICES[visit_list_type]
}
return wrap_response(request, 'visits/index.html', context)
def visits(request): def visits(request):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment