Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
pad-upe
Commits
0337fed1
Commit
0337fed1
authored
Jun 26, 2023
by
PedroLopesUPE
Browse files
Bug fix, mudança na maneira de armazenar os dados de usuário
parent
3ca111fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/UserPadController.php
View file @
0337fed1
...
...
@@ -111,11 +111,6 @@ class UserPadController extends Controller
public
function
generatePDF
(
$user_pad_id
)
{
$user_id
=
UserPad
::
whereId
(
$user_pad_id
)
->
first
()
->
{
'id'
};
$user_data
=
[
'nome'
=>
User
::
whereId
(
$user_id
)
->
first
()
->
{
'name'
},
'email'
=>
User
::
whereId
(
$user_id
)
->
first
()
->
{
'email'
}
];
$ensinoTotalHoras
=
EnsinoAtendimentoDiscente
::
whereUserPadId
(
$user_pad_id
)
->
sum
(
'ch_semanal'
)
+
EnsinoAula
::
whereUserPadId
(
$user_pad_id
)
->
sum
(
'ch_semanal'
)
...
...
@@ -382,7 +377,10 @@ class UserPadController extends Controller
$data
=
array
(
'date'
=>
$dateTime
,
'user'
=>
$user_data
,
'user'
=>
[
'nome'
=>
$userPad
->
user
->
{
'name'
},
'email'
=>
$userPad
->
user
->
{
'email'
}
],
'model'
=>
$treated_model
,
'horas'
=>
$horas
);
...
...
@@ -393,7 +391,11 @@ class UserPadController extends Controller
// // public_path('\images\estado_pe_logo.png'),
// // url('images\estado_pe_logo.png'),
// // asset('images\estado_pe_logo.png'),
// UserPad::wherePadId($user_pad_id)->first()->{'id'},
// "user_pad_id: " . $user_pad_id,
// "user data",
// User::whereId($user_pad_id)->first(),
// $userPad->user->{'name'},
// "User name: " . $data['user']['nome'],
// $user_data,
// $treated_model,
// // array_values($model['ensino'])[0],
...
...
resources/views/pad/teacher/report_pdf.blade.php
View file @
0337fed1
...
...
@@ -5,7 +5,7 @@
<img
style=
"width: 300px; height: max-content"
src=
"{{public_path('images\estado_pe_logo.png')}}"
alt=
"Logo Pernambuco"
>
</div>
<div
style=
"display: flex; flex-direction: column
; max-width: 100mm
"
>
<div
style=
"display: flex; flex-direction: column"
>
<p
style=
"margin: 1.1mm"
><span>
Autor do PAD: {{$data['user']['nome']}}
</span></p>
<p
style=
"margin: 1.1mm"
><span>
E-mail do Autor: {{$data['user']['email']}}
</span></p>
<p
style=
"margin: 1.1mm"
><span>
PDF gerado em: {{$data['date']}}
</span></p>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment