Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
Pruebas-RTO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 11bce73a
authored
2023-09-05 16:41:27 -0300
by
Juan Pablo dure
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
empesamos a tocar reportes
1 parent
208b02ca
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
apollo.py
main.py
static/src/pdf1.js
apollo.py
View file @
11bce73
...
@@ -11,6 +11,12 @@ class estaticos():
...
@@ -11,6 +11,12 @@ class estaticos():
return
(
rta
)
return
(
rta
)
@staticmethod
@staticmethod
def
Hora
():
"""Devuelve la fecha y hora en formato humano"""
rta
=
datetime
.
datetime
.
now
()
.
strftime
(
"
%
H:
%
M"
)
return
(
rta
)
@staticmethod
def
Fecha
():
def
Fecha
():
"""Devuelve la fecha con formatio humano"""
"""Devuelve la fecha con formatio humano"""
rta
=
datetime
.
datetime
.
now
()
.
strftime
(
"
%
d/
%
m/
%
Y"
)
rta
=
datetime
.
datetime
.
now
()
.
strftime
(
"
%
d/
%
m/
%
Y"
)
...
...
main.py
View file @
11bce73
...
@@ -8,17 +8,17 @@ ing = ingenieros.ingenieros()
...
@@ -8,17 +8,17 @@ ing = ingenieros.ingenieros()
app
=
Flask
(
__name__
)
app
=
Flask
(
__name__
)
def
create
():
def
create
():
if
not
os
.
path
.
exists
(
"users.json"
):
if
not
os
.
path
.
exists
(
"
data/
users.json"
):
with
open
(
"users.json"
,
"+w"
)
as
f
:
with
open
(
"
data/
users.json"
,
"+w"
)
as
f
:
f
.
write
(
"{}"
)
f
.
write
(
"{}"
)
def
usersave
(
usr
,
psw
):
def
usersave
(
usr
,
psw
):
create
()
create
()
content
=
""
content
=
""
with
open
(
"users.json"
,
"r"
)
as
u
:
with
open
(
"
data/
users.json"
,
"r"
)
as
u
:
content
=
u
.
read
()
content
=
u
.
read
()
with
open
(
"users.json"
,
"w"
)
as
u
:
with
open
(
"
data/
users.json"
,
"w"
)
as
u
:
try
:
try
:
content
=
json
.
loads
(
content
)
content
=
json
.
loads
(
content
)
except
:
except
:
...
@@ -30,7 +30,7 @@ def usersave(usr, psw):
...
@@ -30,7 +30,7 @@ def usersave(usr, psw):
def
userget
(
usr
):
def
userget
(
usr
):
create
()
create
()
content
=
""
content
=
""
with
open
(
"users.json"
,
"r"
)
as
u
:
with
open
(
"
data/
users.json"
,
"r"
)
as
u
:
content
=
u
.
read
()
content
=
u
.
read
()
try
:
try
:
...
@@ -157,7 +157,8 @@ def report():
...
@@ -157,7 +157,8 @@ def report():
answer
[
'header'
][
'patente'
]
=
plate
.
upper
()
answer
[
'header'
][
'patente'
]
=
plate
.
upper
()
answer
[
'header'
][
"fecha-hora"
]
=
apollo
.
estaticos
.
FechaHora
()
answer
[
'header'
][
"fecha-hora"
]
=
apollo
.
estaticos
.
FechaHora
()
answer
[
'header'
][
"ingeniero"
]
=
ing
.
LeerDatosUsuario
(
request
.
cookies
[
"login"
])
answer
[
'header'
][
"hora"
]
=
apollo
.
estaticos
.
Hora
()
answer
[
'header'
][
"ingeniero"
]
=
ing
.
LeerDatosUsuario
(
request
.
cookies
[
"login"
])[
'nombreyapellido'
]
try
:
try
:
login
(
login
(
...
...
static/src/pdf1.js
View file @
11bce73
...
@@ -139,8 +139,10 @@ class PDF1 {
...
@@ -139,8 +139,10 @@ class PDF1 {
"CP:Ciudad:"
,
"CP:Ciudad:"
,
"Teléfono:"
,
"Teléfono:"
,
`Fecha de Prueba:\t
${
data
[
'fecha'
]}
`
,
`Fecha de Prueba:\t
${
data
[
'fecha'
]}
`
,
"Hora de Prueba:"
,
`Hora de Prueba:\t
${
data
[
'hora'
]}
`
,
`Ingeniero:\t
${
data
[
'ingeniero'
]}
`
,
"Estado de Carga:\tVacio"
"Estado de Carga:\tVacio"
],
],
new
Vector
(
Pos
.
beg_margin
+
5
,
Pos
.
beg_margin
+
10
),
new
Vector
(
Pos
.
beg_margin
+
5
,
Pos
.
beg_margin
+
10
),
body_black
body_black
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment