chartManD commited on
Commit
d21ee1b
·
1 Parent(s): 4708f29

Se establcen campos basidcos y eleccion de tecnica para panel de configuracion

Browse files
tecnicas/controllers/__init__.py CHANGED
@@ -1 +1,2 @@
1
- from .tecnica_controller import TecnicaController
 
 
1
+ from .tecnica_controller import TecnicaController
2
+ from .escala_controller import EscalaController
tecnicas/controllers/escala_controller.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from ..models import TipoEscala
2
+
3
+ class EscalaController():
4
+ def __init__(self):
5
+ pass
6
+
7
+ def getTypesScale():
8
+ tipos = TipoEscala.objects.all()
9
+ return tipos
tecnicas/templates/tecnicas/configuracion-panel.html CHANGED
@@ -2,8 +2,83 @@
2
 
3
  {% block title %}Panel Configuracion{% endblock %}
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  {% block content %}
6
- <article class="w-full flex flex-col justify-center items-center bg-gray-600 mt-10 mb-10">
7
- <h1>Panel de configuracion</h1>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  </article>
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  {% endblock %}
 
2
 
3
  {% block title %}Panel Configuracion{% endblock %}
4
 
5
+ <!--
6
+ ||||Debe tener los siguietens campos para:
7
+ -- Convenvionales tipo escalas
8
+ - Preguntar si desea darle un nombre a la sesion
9
+ - Numero produtos
10
+ - Numero jueces
11
+ - Numero repeticiones, debe ser mayor a 1, no validar si es menos
12
+ - Agregar palabras o Elejir vocabulario
13
+ - Instrucciones
14
+ - Tipo de escala, seran dos, de rango o estructurada
15
+ - Orden de presentacion
16
+ - Presentar un orden basico segun el numero de catadores y los productos, esta se le muestra el presentador
17
+ -->
18
+
19
  {% block content %}
20
+ <article class="w-full flex flex-col justify-center items-center bg-gray-600 my-10">
21
+ <article class="flex flex-col gap-4 bg-gray-400 md:p-10 p-5 rounded-2xl lg:w-4xl w-full">
22
+ <h1 class="text-center font-bold text-4xl">Panel de configuracion</h1>
23
+ <hr>
24
+ <form class="[&>article]:not-last:mb-4 [&>article]:not-first:pt-4 [&>article]:px-6">
25
+ <article>
26
+ <h2 class="text-2xl mb-2 font-bold">Basica informacion</h2>
27
+ <section
28
+ class="flex flex-row justify-around flex-wrap gap-4 [&>label]:text-lg [&>label]:flex [&>label]:flex-row [&>label]:items-center [&>label]:px-2 [&>label]:gap-2 [&>label]:font-medium [&>label]:tracking-wide">
29
+ <label for="num_productos">
30
+ <p>Número de Productos:</p>
31
+ <input name="num_productos" id="num_productos" type="number" placeholder="Ingrese"
32
+ class="bg-gray-200 border-b-3 rounded-lg w-25 text-right" required>
33
+ </label>
34
+ <label for="num_productos">
35
+ <p>Número de Jueces:</p>
36
+ <input name="num_jueces" id="num_jueces" type="number" placeholder="Ingrese"
37
+ class="bg-gray-200 border-b-3 rounded-lg w-25 text-right" required>
38
+ </label>
39
+ <label for="num_productos">
40
+ <p>Número de Repeticiones:</p>
41
+ <input name="num_repeticiones" id="num_repeticiones" type="number" placeholder="Ingrese"
42
+ class="bg-gray-200 border-b-3 rounded-lg w-25 text-right" required>
43
+ </label>
44
+ </section>
45
+ </article>
46
+ <hr>
47
+ {% if escalas %}
48
+ <article class="cs-escalas-radio flex flex-col gap-4">
49
+ <h2 class="text-2xl font-bold">Selecciona una escala</h2>
50
+ <section class="flex flex-row justify-around flex-wrap">
51
+ <!-- {% for escala in escalas %}
52
+ <label for="tipo-{{escala.nombre_escala}}" class="uppercase text-lg tracking-wider font-medium p-2 px-4 active:px-5 transition-all rounded-xl bg-blue-500 text-white"><input id="tipo-{{escala.nombre_escala}}" type="radio" name="tipo_escala" value="{{escala.id}}"> {{ escala.nombre_escala }}</label>
53
+ {% endfor %} -->
54
+ <label for="tipo-esca"
55
+ class="uppercase text-lg tracking-wider font-medium p-2 px-4 active:px-5 transition-all rounded-xl bg-blue-500 text-white"><input
56
+ id="tipo-esca" type="radio" name="tipo_escala" value="miuw"> estructurada</label>
57
+ <label for="tipo_as"
58
+ class="uppercase text-lg tracking-wider font-medium p-2 px-4 active:px-5 transition-all rounded-xl bg-blue-500 text-white"><input
59
+ id="tipo_as" type="radio" name="tipo_escala" value="guau"> estructurada</label>
60
+ </section>
61
+
62
+ <section>
63
+
64
+ </section>
65
+ </article>
66
+ {% endif %}
67
+ <hr>
68
+ </form>
69
+ </article>
70
  </article>
71
+ {% endblock %}
72
+
73
+ {% block extra_js %}
74
+ <script>
75
+ const radios = document.getElementsByName("tipo_escala")
76
+ if (radios) {
77
+ radios[0].checked = true
78
+ }
79
+
80
+ radios.forEach(radio => {
81
+ console.log(radio.value)
82
+ });
83
+ </script>
84
  {% endblock %}
tecnicas/views/configuracion_panel.py CHANGED
@@ -1,4 +1,8 @@
1
  from django.shortcuts import render
 
2
 
3
  def configuracionPanel(req):
4
- return render(req, "tecnicas/configuracion-panel.html")
 
 
 
 
1
  from django.shortcuts import render
2
+ from ..controllers import EscalaController
3
 
4
  def configuracionPanel(req):
5
+ # escalas = EscalaController.getTypesScale()
6
+ escalas = [1,1]
7
+
8
+ return render(req, "tecnicas/configuracion-panel.html", { "escalas":escalas })