Spaces:
Sleeping
Sleeping
Detalles basicos para sesion con Napping
Browse files
tecnicas/controllers/__init__.py
CHANGED
|
@@ -31,6 +31,7 @@ from .views_controller.session_management.details.details_rata_controller import
|
|
| 31 |
from .views_controller.session_management.details.details_cata_controller import DetallesCATAController
|
| 32 |
from .views_controller.session_management.details.details_pf_controller import DetallesPFController
|
| 33 |
from .views_controller.session_management.details.details_sort_controller import DetallesSortController
|
|
|
|
| 34 |
|
| 35 |
from .views_controller.session_management.monitor.monitor_escalas_controller import MonitorEscalasController
|
| 36 |
from .views_controller.session_management.monitor.monitor_rata_controller import MonitorRATAController
|
|
|
|
| 31 |
from .views_controller.session_management.details.details_cata_controller import DetallesCATAController
|
| 32 |
from .views_controller.session_management.details.details_pf_controller import DetallesPFController
|
| 33 |
from .views_controller.session_management.details.details_sort_controller import DetallesSortController
|
| 34 |
+
from .views_controller.session_management.details.details_napping_controller import DetallesNappingController
|
| 35 |
|
| 36 |
from .views_controller.session_management.monitor.monitor_escalas_controller import MonitorEscalasController
|
| 37 |
from .views_controller.session_management.monitor.monitor_rata_controller import MonitorRATAController
|
tecnicas/controllers/views_controller/session_management/details/details_napping_controller.py
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from django.http import HttpRequest
|
| 2 |
+
from .details_controller import DetallesController
|
| 3 |
+
from tecnicas.models import SesionSensorial, Presentador
|
| 4 |
+
from collections import defaultdict
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
class DetallesNappingController(DetallesController):
|
| 8 |
+
def __init__(self, session: SesionSensorial):
|
| 9 |
+
super().__init__(session)
|
| 10 |
+
self.url_template = "tecnicas/manage_sesions/details-session-napping.html"
|
| 11 |
+
self.url_next = "cata_system:monitor_sesion"
|
| 12 |
+
|
| 13 |
+
def getContext(self):
|
| 14 |
+
self.context = {
|
| 15 |
+
"session": self.session,
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
self.defineStatus()
|
| 19 |
+
|
| 20 |
+
return self.context
|
| 21 |
+
|
| 22 |
+
def defineStatus(self):
|
| 23 |
+
repetition = self.session.tecnica.repeticion
|
| 24 |
+
|
| 25 |
+
if not repetition and not self.session.activo:
|
| 26 |
+
self.context["status"] = "Listo para iniciar la sesión con Napping"
|
| 27 |
+
elif not repetition and self.session.activo:
|
| 28 |
+
self.context["status"] = "Sesión con Napping en curso"
|
| 29 |
+
elif repetition == 1 and not self.session.activo:
|
| 30 |
+
self.context["status"] = "En espera de la siguiente acción"
|
| 31 |
+
else:
|
| 32 |
+
self.context["status"] = "En espera de la siguiente acción"
|
| 33 |
+
|
| 34 |
+
def controllPostResponse(self, request: HttpRequest, action: str):
|
| 35 |
+
if action == "start_session":
|
| 36 |
+
response = self.startRepetition(
|
| 37 |
+
presenter=request.user.user_presentador, request=request)
|
| 38 |
+
|
| 39 |
+
elif action == "delete_session":
|
| 40 |
+
self.deleteSesorialSession()
|
| 41 |
+
response = redirect(
|
| 42 |
+
reverse("cata_system:panel_sesiones", kwargs={"page": 1}))
|
| 43 |
+
|
| 44 |
+
return response
|
| 45 |
+
|
| 46 |
+
def startRepetition(self, presenter: Presentador, request: HttpRequest):
|
| 47 |
+
creator = presenter
|
| 48 |
+
technique = self.session.tecnica
|
| 49 |
+
|
| 50 |
+
repetition = technique.repeticion
|
| 51 |
+
|
| 52 |
+
if not repetition == 0:
|
| 53 |
+
return self.startNapping(request=request)
|
| 54 |
+
|
| 55 |
+
def startNapping(self, request: HttpRequest):
|
| 56 |
+
if request.user.user_presentador.user.username != self.session.creadoPor.user.username:
|
| 57 |
+
return self.controllGetResponse(error="Solo el presentador que crea la sesión puede iniciar la repetición", request=request)
|
| 58 |
+
elif self.session.activo:
|
| 59 |
+
return self.controllGetResponse(error="La sesión ya está activada", request=request)
|
| 60 |
+
|
| 61 |
+
self.session.activo = True
|
| 62 |
+
self.session.tecnica.repeticion = self.session.tecnica.repeticion + 1
|
| 63 |
+
|
| 64 |
+
self.session.save()
|
| 65 |
+
self.session.tecnica.save()
|
| 66 |
+
|
| 67 |
+
parameters = {
|
| 68 |
+
"session_code": self.session.codigo_sesion
|
| 69 |
+
}
|
| 70 |
+
return redirect(
|
| 71 |
+
reverse(self.url_next, kwargs=parameters))
|
tecnicas/templates/tecnicas/manage_sesions/details-session-napping.html
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends 'tecnicas/layouts/base.html' %}
|
| 2 |
+
{% load static %}
|
| 3 |
+
|
| 4 |
+
{% block title %}Detalles Sesion{% endblock %}
|
| 5 |
+
|
| 6 |
+
{% block content %}
|
| 7 |
+
<article class="cts-container-main">
|
| 8 |
+
<article class="cts-wrap-content relative max-w-4xl">
|
| 9 |
+
<header class="text-center flex-row max-sm:flex-col w-full flex justify-around items-center flex-wrap gap-10">
|
| 10 |
+
<h1 class="text-black rounded-xl font-bold text-2xl bg-surface-card shadow-lg p-4 flex-1">
|
| 11 |
+
Detalles de la sesión
|
| 12 |
+
</h1>
|
| 13 |
+
<a href="{% url 'cata_system:panel_sesiones' page=1 %}">
|
| 14 |
+
<button class="cts-btn-general cts-btn-error btn-push">
|
| 15 |
+
Volver a las Sesiones
|
| 16 |
+
</button>
|
| 17 |
+
</a>
|
| 18 |
+
</header>
|
| 19 |
+
|
| 20 |
+
{% if message %}
|
| 21 |
+
{% include "../components/error-message.html" with message=message %}
|
| 22 |
+
{% endif %}
|
| 23 |
+
{% if error %}
|
| 24 |
+
{% include "../components/error-message.html" with message=error %}
|
| 25 |
+
{% endif %}
|
| 26 |
+
|
| 27 |
+
<p class="text-black font-bold text-2xl border-b-2">
|
| 28 |
+
Información general
|
| 29 |
+
</p>
|
| 30 |
+
<article
|
| 31 |
+
class="text-black rounded-xl grid grid-cols-2 max-sm:grid-cols-1 gap-3 max-sm:gap-1 text-xl max-sm:text-base">
|
| 32 |
+
<section
|
| 33 |
+
class="col-span-2 max-sm:col-span-1 bg-surface-ligt flex flex-wrap items-center justify-center max-sm:justify-normal gap-x-2 p-4 rounded-2xl">
|
| 34 |
+
<p class="font-bold">
|
| 35 |
+
Código:
|
| 36 |
+
</p>
|
| 37 |
+
<p class="font-sans">
|
| 38 |
+
{{ session.codigo_sesion }}
|
| 39 |
+
</p>
|
| 40 |
+
</section>
|
| 41 |
+
|
| 42 |
+
<section
|
| 43 |
+
class="col-span-2 max-sm:col-span-1 bg-surface-card flex flex-wrap items-center justify-center max-sm:justify-normal gap-x-2 p-4 rounded-2xl">
|
| 44 |
+
<p class="font-bold">
|
| 45 |
+
Nombre:
|
| 46 |
+
</p>
|
| 47 |
+
<p class="antialiased">
|
| 48 |
+
{% if session.nombre_sesion %}
|
| 49 |
+
{{ session.nombre_sesion }}
|
| 50 |
+
{% else %}
|
| 51 |
+
Sin nombre
|
| 52 |
+
{% endif %}
|
| 53 |
+
</p>
|
| 54 |
+
</section>
|
| 55 |
+
|
| 56 |
+
<section
|
| 57 |
+
class="bg-surface-card flex flex-wrap items-center justify-center max-sm:justify-normal gap-x-2 p-4 rounded-2xl">
|
| 58 |
+
<p class="font-bold">
|
| 59 |
+
Fecha creación:
|
| 60 |
+
</p>
|
| 61 |
+
<p class="font-sans font-normal uppercase">
|
| 62 |
+
{{ session.fechaCreacion }}
|
| 63 |
+
</p>
|
| 64 |
+
</section>
|
| 65 |
+
|
| 66 |
+
<section
|
| 67 |
+
class="bg-surface-card flex flex-wrap items-center justify-center max-sm:justify-normal gap-x-2 p-4 rounded-2xl">
|
| 68 |
+
<p class="font-bold">
|
| 69 |
+
Estado:
|
| 70 |
+
</p>
|
| 71 |
+
<p class="font-sans text-lg max-sm:text-base font-normal">
|
| 72 |
+
{{ status }}
|
| 73 |
+
</p>
|
| 74 |
+
</section>
|
| 75 |
+
|
| 76 |
+
<section
|
| 77 |
+
class="bg-surface-ligt flex flex-wrap items-center justify-center max-sm:justify-normal gap-x-2 p-4 rounded-2xl">
|
| 78 |
+
<p class="font-bold">
|
| 79 |
+
Técnica:
|
| 80 |
+
</p>
|
| 81 |
+
<p class="font-sans text-lg max-sm:text-base font-normal uppercase">
|
| 82 |
+
{{ session.tecnica.tipo_tecnica }}
|
| 83 |
+
</p>
|
| 84 |
+
</section>
|
| 85 |
+
|
| 86 |
+
<section
|
| 87 |
+
class="bg-surface-card flex flex-wrap items-center justify-center max-sm:justify-normal gap-x-2 p-4 rounded-2xl">
|
| 88 |
+
<p class="font-sans">
|
| 89 |
+
<b>Catadores Max.</b> {{ session.tecnica.limite_catadores }}
|
| 90 |
+
</p>
|
| 91 |
+
</section>
|
| 92 |
+
|
| 93 |
+
{% if repetition %}
|
| 94 |
+
<section
|
| 95 |
+
class="bg-surface-card flex flex-wrap items-center justify-center max-sm:justify-normal gap-x-2 p-4 rounded-2xl">
|
| 96 |
+
<p class="font-sans">
|
| 97 |
+
<b>Repetición:</b> {{ repetition }}
|
| 98 |
+
</p>
|
| 99 |
+
</section>
|
| 100 |
+
{% endif %}
|
| 101 |
+
|
| 102 |
+
<section
|
| 103 |
+
class="col-span-2 max-sm:col-span-1 bg-surface-card flex flex-wrap items-center justify-center max-sm:justify-normal gap-x-2 p-4 rounded-2xl">
|
| 104 |
+
<p class="font-bold">
|
| 105 |
+
Instrucciones:
|
| 106 |
+
</p>
|
| 107 |
+
<p class="font-sans text-xl max-sm:text-base font-normal">
|
| 108 |
+
{{ session.tecnica.instrucciones }}
|
| 109 |
+
</p>
|
| 110 |
+
</section>
|
| 111 |
+
</article>
|
| 112 |
+
|
| 113 |
+
<p class="text-black font-bold text-2xl border-b-2">
|
| 114 |
+
Acciones disponibles
|
| 115 |
+
</p>
|
| 116 |
+
<article class="flex flex-wrap gap-10 max-sm:gap-2">
|
| 117 |
+
{% if finished %}
|
| 118 |
+
<div
|
| 119 |
+
class="text-2xl font-semibold flex-1 cts-btn-secondary p-4 flex justify-center items-center rounded-lg select-none text-center">
|
| 120 |
+
<p class=" text-black">
|
| 121 |
+
Sesión finalizada
|
| 122 |
+
</p>
|
| 123 |
+
</div>
|
| 124 |
+
{% else %}
|
| 125 |
+
{% if not sesion.activo %}
|
| 126 |
+
<button
|
| 127 |
+
class="ct-btn-start-repition flex-1 uppercase text-lg max-sm:text-base tracking-wider p-4 border-b-2 active:border-b-0 active:border-t-2 active:border-green-500 border-green-800 transition-all rounded-xl bg-green-600 text-white font-bold disabled:bg-amber-600 flex flex-col justify-center items-center gap-2"
|
| 128 |
+
onclick="startRepetition()">
|
| 129 |
+
Iniciar fase o repetición
|
| 130 |
+
<figure class="w-10">
|
| 131 |
+
<img src="{% static 'img/giro.svg' %}" alt="flechas girando" class="invert">
|
| 132 |
+
</figure>
|
| 133 |
+
</button>
|
| 134 |
+
{% else %}
|
| 135 |
+
<a href="{% url 'cata_system:monitor_sesion' session_code=sesion.codigo_sesion %}" class="flex-1 w-fit">
|
| 136 |
+
<button
|
| 137 |
+
class="ct-btn-start-repition w-full uppercase text-lg max-sm:text-base tracking-wider p-4 border-b-2 active:border-b-0 active:border-t-2 active:border-orange-500 border-orange-800 transition-all rounded-xl bg-orange-600 text-white font-bold disabled:bg-amber-600 flex flex-col justify-center items-center gap-2">
|
| 138 |
+
Monitorear repetición
|
| 139 |
+
<figure class="w-10">
|
| 140 |
+
<img src="{% static 'img/monitor.svg' %}" alt="flechas girando" class="invert">
|
| 141 |
+
</figure>
|
| 142 |
+
</button>
|
| 143 |
+
</a>
|
| 144 |
+
{% endif %}
|
| 145 |
+
{% endif %}
|
| 146 |
+
<button
|
| 147 |
+
class="flex-1 uppercase text-lg cts-btn-general cts-btn-error btn-push flex flex-col justify-center items-center gap-2"
|
| 148 |
+
onclick="showWarningDialog('cts-warnig-dialog')">
|
| 149 |
+
borrar
|
| 150 |
+
<figure class="w-10">
|
| 151 |
+
<img src="{% static 'img/basura.svg' %}" alt="bote de basura" class="invert">
|
| 152 |
+
</figure>
|
| 153 |
+
</button>
|
| 154 |
+
</article>
|
| 155 |
+
|
| 156 |
+
<section
|
| 157 |
+
class="absolute w-full h-full flex justify-center items-center bg-surface-alter-card/70 top-0 left-0 p-6 rounded-xl cts-warnig-dialog hidden">
|
| 158 |
+
<article class="bg-surface-card p-4 space-y-6 rounded-xl">
|
| 159 |
+
<h2 class="text-4xl text-black text-center">
|
| 160 |
+
¡¡¡Cuidado!!!
|
| 161 |
+
</h2>
|
| 162 |
+
<p class="text-2xl text-black text-center">
|
| 163 |
+
Esta acción no es reversible, si la continua también borrara todos los datos recopilados
|
| 164 |
+
relacionados a esta sesión y no podrá volver a recuperarlos
|
| 165 |
+
</p>
|
| 166 |
+
<section class="text-black font-bold text-xl space-y-4">
|
| 167 |
+
<p class="text-center">
|
| 168 |
+
¿Estás seguro de continuar?
|
| 169 |
+
</p>
|
| 170 |
+
<div class="flex max-sm:flex-col gap-4 justify-center">
|
| 171 |
+
<button class="cts-btn-general cts-btn-error btn-push" onclick="deleteSession()">
|
| 172 |
+
Estoy seguro
|
| 173 |
+
</button>
|
| 174 |
+
<button class="cts-btn-general cts-btn-primary btn-push"
|
| 175 |
+
onclick="hiddenWarningDialog('cts-warnig-dialog')">
|
| 176 |
+
No, cancelar
|
| 177 |
+
</button>
|
| 178 |
+
</div>
|
| 179 |
+
</section>
|
| 180 |
+
</article>
|
| 181 |
+
</section>
|
| 182 |
+
|
| 183 |
+
<p class="text-black font-bold text-2xl border-b-2">
|
| 184 |
+
Datos obtenidos
|
| 185 |
+
</p>
|
| 186 |
+
|
| 187 |
+
{% include "../components/error-message.html" with message='Sin datos por mostrar aún' %}
|
| 188 |
+
|
| 189 |
+
<form action="" method="post" class="form-action-session hidden">
|
| 190 |
+
<input type="hidden" name="action" class="action-option">
|
| 191 |
+
{% csrf_token %}
|
| 192 |
+
</form>
|
| 193 |
+
</article>
|
| 194 |
+
</article>
|
| 195 |
+
{% endblock %}
|
| 196 |
+
|
| 197 |
+
{% block extra_js %}
|
| 198 |
+
<script src="{% static 'js/details-session.js' %}"></script>
|
| 199 |
+
<script src="{% static 'js/showHiddenElement.js' %}"></script>
|
| 200 |
+
{% endblock %}
|
tecnicas/views/sessions_management/session_details.py
CHANGED
|
@@ -3,7 +3,7 @@ from django.shortcuts import redirect
|
|
| 3 |
from django.urls import reverse
|
| 4 |
from tecnicas.models import SesionSensorial
|
| 5 |
from tecnicas.utils import noValidTechnique
|
| 6 |
-
from tecnicas.controllers import DetallesController, DetallesEscalasController, DetallesCATAController, DetallesPFController, DetallesSortController
|
| 7 |
|
| 8 |
|
| 9 |
def sessionDetails(req: HttpRequest, session_code: str):
|
|
@@ -43,6 +43,12 @@ def sessionDetails(req: HttpRequest, session_code: str):
|
|
| 43 |
response = controller_view.controllGetResponse(
|
| 44 |
request=req, message=message)
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
else:
|
| 47 |
response = noValidTechnique(
|
| 48 |
params={"page": 1},
|
|
@@ -51,6 +57,7 @@ def sessionDetails(req: HttpRequest, session_code: str):
|
|
| 51 |
},
|
| 52 |
name_view="cata_system:panel_sesiones"
|
| 53 |
)
|
|
|
|
| 54 |
return response
|
| 55 |
|
| 56 |
elif req.method == "POST":
|
|
@@ -58,19 +65,27 @@ def sessionDetails(req: HttpRequest, session_code: str):
|
|
| 58 |
codigo_sesion=session_code)
|
| 59 |
|
| 60 |
use_techinique = sensorial_session.tecnica.tipo_tecnica.nombre_tecnica
|
| 61 |
-
|
| 62 |
controller_view = DetallesController(sensorial_session)
|
| 63 |
|
|
|
|
|
|
|
| 64 |
if use_techinique in ["escalas", "rata", "cata", "perfil flash", "sort"]:
|
| 65 |
-
if
|
| 66 |
response = controller_view.startRepetition(
|
| 67 |
presenter=req.user.user_presentador, request=req)
|
| 68 |
|
| 69 |
-
elif
|
| 70 |
controller_view.deleteSesorialSession()
|
| 71 |
response = redirect(
|
| 72 |
reverse("cata_system:panel_sesiones", kwargs={"page": 1}))
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
else:
|
| 75 |
response = controller_view.controllGetResponse(
|
| 76 |
error="No se reconoce la acción a realizar")
|
|
|
|
| 3 |
from django.urls import reverse
|
| 4 |
from tecnicas.models import SesionSensorial
|
| 5 |
from tecnicas.utils import noValidTechnique
|
| 6 |
+
from tecnicas.controllers import DetallesController, DetallesEscalasController, DetallesCATAController, DetallesPFController, DetallesSortController, DetallesNappingController
|
| 7 |
|
| 8 |
|
| 9 |
def sessionDetails(req: HttpRequest, session_code: str):
|
|
|
|
| 43 |
response = controller_view.controllGetResponse(
|
| 44 |
request=req, message=message)
|
| 45 |
|
| 46 |
+
elif use_techinique == "napping":
|
| 47 |
+
controller_view = DetallesNappingController(
|
| 48 |
+
session=sensorial_session)
|
| 49 |
+
response = controller_view.controllGetResponse(
|
| 50 |
+
request=req, message=message)
|
| 51 |
+
|
| 52 |
else:
|
| 53 |
response = noValidTechnique(
|
| 54 |
params={"page": 1},
|
|
|
|
| 57 |
},
|
| 58 |
name_view="cata_system:panel_sesiones"
|
| 59 |
)
|
| 60 |
+
|
| 61 |
return response
|
| 62 |
|
| 63 |
elif req.method == "POST":
|
|
|
|
| 65 |
codigo_sesion=session_code)
|
| 66 |
|
| 67 |
use_techinique = sensorial_session.tecnica.tipo_tecnica.nombre_tecnica
|
|
|
|
| 68 |
controller_view = DetallesController(sensorial_session)
|
| 69 |
|
| 70 |
+
action = req.POST.get("action")
|
| 71 |
+
|
| 72 |
if use_techinique in ["escalas", "rata", "cata", "perfil flash", "sort"]:
|
| 73 |
+
if action == "start_session":
|
| 74 |
response = controller_view.startRepetition(
|
| 75 |
presenter=req.user.user_presentador, request=req)
|
| 76 |
|
| 77 |
+
elif action == "delete_session":
|
| 78 |
controller_view.deleteSesorialSession()
|
| 79 |
response = redirect(
|
| 80 |
reverse("cata_system:panel_sesiones", kwargs={"page": 1}))
|
| 81 |
|
| 82 |
+
elif use_techinique == "napping":
|
| 83 |
+
controller_view = DetallesNappingController(
|
| 84 |
+
session=sensorial_session)
|
| 85 |
+
|
| 86 |
+
response = controller_view.controllPostResponse(
|
| 87 |
+
request=req, action=action)
|
| 88 |
+
|
| 89 |
else:
|
| 90 |
response = controller_view.controllGetResponse(
|
| 91 |
error="No se reconoce la acción a realizar")
|