Commit 21ddcd6a authored by José Bascuñan's avatar José Bascuñan

Merge branch '3-agregar-descripcion-en-detalle-notificaciones-de-super' into 'develop'

Resolve "Agregar descripción en detalle notificaciones de super"

See merge request !14
parents 0de95da1 4deabff9
Pipeline #7321 passed with stages
in 13 minutes and 51 seconds
......@@ -11,6 +11,7 @@ from django import template
# enums
from companies.enums import AddManagerRequestStatuses
from permit_requests.models import PermitRequestStatus
register = template.Library()
......@@ -52,3 +53,11 @@ def is_url_with_parameter(url):
return False
else:
return True
@register.filter
def get_description(id):
try:
status = PermitRequestStatus.objects.get(id=id)
return status.description
except AttributeError:
return ''
......@@ -409,6 +409,7 @@ class UpdatePermitRequestStatusView(BaseAPIView):
extra_data['stage'] = status.stage
extra_data['status'] = status.base_status.name
extra_data['permit_request_status_id'] = status.id
if not message:
message = (
......
extends base.pug
- load i18n
- load i18n utils
block options
......@@ -82,6 +82,12 @@ block content
b Estado
.col-md-8
| {{ permit_request.status.base_status.name }}
if permit_request.status
.row.py-2
.col-md-4
b Descripción
.col-md-8
| {{ permit_request.status.description }}
section.section-colored
.section-header
......@@ -98,9 +104,13 @@ block content
p.mb-0
| Emisor:
b {{permit_request.permit.public_service}}
p.mb-0
| Estado:
b {{notification.status}}
p
| Estado:
b {{notification.status}}
if notification.extra_data.permit_request_status_id
| Descripción:
b {{notification.extra_data.permit_request_status_id|get_description}}
.col-lg-3.text-right
small.text-success.font-weight-medium
| {{permit_request.get_status_display|capfirst}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment