Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PGPI-entrega
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sergest
PGPI-entrega
Commits
22806f15
Commit
22806f15
authored
Jan 6, 2019
by
Álvaro Berruezo
Browse files
Options
Downloads
Patches
Plain Diff
Añadida fecha de cierre y modificados botones de info_incidencia
parent
8ba89dcd
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app.py
+5
-2
5 additions, 2 deletions
src/app.py
src/templates/info_incidencia.html
+6
-12
6 additions, 12 deletions
src/templates/info_incidencia.html
with
11 additions
and
14 deletions
src/app.py
+
5
−
2
View file @
22806f15
...
@@ -39,7 +39,6 @@ def logout():
...
@@ -39,7 +39,6 @@ def logout():
@app.route
(
'
/incidencia/<idIncidencia>
'
,
methods
=
[
'
GET
'
,
'
POST
'
])
@app.route
(
'
/incidencia/<idIncidencia>
'
,
methods
=
[
'
GET
'
,
'
POST
'
])
@login_required
@login_required
def
incidencia
(
idIncidencia
):
def
incidencia
(
idIncidencia
):
incidencia
=
get_incidencia
(
idIncidencia
)
if
request
.
method
==
'
POST
'
:
if
request
.
method
==
'
POST
'
:
if
request
.
form
[
'
action
'
]
==
"
completar
"
:
if
request
.
form
[
'
action
'
]
==
"
completar
"
:
return
redirect
(
url_for
(
'
completar_incidencia
'
,
idIncidencia
=
idIncidencia
))
return
redirect
(
url_for
(
'
completar_incidencia
'
,
idIncidencia
=
idIncidencia
))
...
@@ -59,7 +58,11 @@ def incidencia(idIncidencia):
...
@@ -59,7 +58,11 @@ def incidencia(idIncidencia):
cambioApertura
=
get_cambio_by_estado
(
idIncidencia
,
0
)
cambioApertura
=
get_cambio_by_estado
(
idIncidencia
,
0
)
cambioAsignada
=
get_cambio_by_estado
(
idIncidencia
,
1
)
cambioAsignada
=
get_cambio_by_estado
(
idIncidencia
,
1
)
cambioCierre
=
get_cambio_by_estado
(
idIncidencia
,
3
)
cambioCierreSolucion
=
get_cambio_by_estado
(
idIncidencia
,
4
)
cambioCierreNoSol
=
get_cambio_by_estado
(
idIncidencia
,
5
)
cambioCierre
=
cambioCierreSolucion
or
cambioCierreNoSol
incidencia
=
get_incidencia
(
idIncidencia
)
estado
=
get_estado
(
incidencia
.
estado
)
estado
=
get_estado
(
incidencia
.
estado
)
categoria
=
get_categoria
(
incidencia
.
categoria
)
categoria
=
get_categoria
(
incidencia
.
categoria
)
elementoInventario
=
get_elemento
(
incidencia
.
elementoInventario
)
elementoInventario
=
get_elemento
(
incidencia
.
elementoInventario
)
...
...
This diff is collapsed.
Click to expand it.
src/templates/info_incidencia.html
+
6
−
12
View file @
22806f15
...
@@ -190,7 +190,7 @@
...
@@ -190,7 +190,7 @@
<button
type=
"submit"
class=
"btn btn-outline-primary"
name=
"action"
value=
"add_comentario"
>
Añadir comentario
</button>
<button
type=
"submit"
class=
"btn btn-outline-primary"
name=
"action"
value=
"add_comentario"
>
Añadir comentario
</button>
{% endif %}}
{% endif %}}
{% if (current_user.tipo == 0) and (incidencia.estado
== 3 or
incidencia.estado
==2)
%}
{% if (current_user.tipo == 0) and (incidencia.estado
> 0) and (
incidencia.estado
<
4)
%}
<
button
type=
"submit"
class=
"btn btn-outline-primary"
name=
"action"
value=
"Solucion"
>
Cerrar Solucion
</button>
<
button
type=
"submit"
class=
"btn btn-outline-primary"
name=
"action"
value=
"Solucion"
>
Cerrar Solucion
</button>
<button
type=
"submit"
class=
"btn btn-outline-primary"
name=
"action"
value=
"n-Solucion"
>
Cerrar sin Solucion
</button>
<button
type=
"submit"
class=
"btn btn-outline-primary"
name=
"action"
value=
"n-Solucion"
>
Cerrar sin Solucion
</button>
{% endif %}}
{% endif %}}
...
@@ -202,13 +202,7 @@
...
@@ -202,13 +202,7 @@
<button
type=
"submit"
class=
"btn btn-outline-primary"
name=
"action"
value=
"cierre_tecnico"
>
Solicitar Cierre
</button>
<button
type=
"submit"
class=
"btn btn-outline-primary"
name=
"action"
value=
"cierre_tecnico"
>
Solicitar Cierre
</button>
{% endif %}}
{% endif %}}
{% if (current_user.tipo == 1) and (incidencia.estado!=1) %}
{% if (current_user.tipo == 2) and (incidencia.estado
<
2)
%}
<button
type=
"submit"
class=
"btn btn-outline-primary"
name=
"action"
value=
"add_comentario"
>
Añadir comentario
</button>
{% endif %}}
{% if (current_user.tipo == 2) and (incidencia.estado!=2) %}
<
button
type=
"submit"
class=
"btn btn-outline-primary"
name=
"action"
value=
"cierre_cliente"
>
Solicitar Cierre
</button>
<
button
type=
"submit"
class=
"btn btn-outline-primary"
name=
"action"
value=
"cierre_cliente"
>
Solicitar Cierre
</button>
{% endif %}
{% endif %}
</form>
</form>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment