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
b9cf790c
Commit
b9cf790c
authored
Aug 08, 2023
by
PedroLopesUPE
Browse files
Bug fix: erro de anexo b vazio
parent
faf98b0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/UserPadController.php
View file @
b9cf790c
...
...
@@ -315,36 +315,39 @@ class UserPadController extends Controller
}
}
$treated_anexo_pad
=
[];
f
oreach
(
$anexoPad
as
$nome_valor
=>
$valor
)
i
f
(
$anexoPad
!=
null
)
{
if
(
in_array
(
$nome_valor
,
$valor
es_lista_negra
)
)
foreach
(
$anexoPad
as
$nome_valor
=>
$valor
)
{
continue
;
}
elseif
(
$nome_valor
==
'campus_id'
)
{
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
Campus
::
whereId
(
$valor
)
->
first
()
->
{
'name'
};
$treated_anexo_pad
[
$nomes_valores
[
'unidade'
]]
=
$unidades_ensino
[
Campus
::
whereId
(
$valor
)
->
first
()
->
{
'unidade_id'
}];
}
elseif
(
$nome_valor
==
'curso_id'
)
{
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
Curso
::
whereId
(
$valor
)
->
first
()
->
{
'name'
};
}
elseif
(
$nome_valor
==
'semestre'
)
{
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
$semestres
[
$valor
];
}
elseif
(
$nome_valor
==
'afastamento_total'
||
$nome_valor
==
'afastamento_parcial'
||
$nome_valor
==
'direcao_sindical'
)
{
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
$valor
==
1
?
'Sim'
:
'Não'
;
}
elseif
(
array_key_exists
(
$nome_valor
,
$nomes_valores
))
{
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
$valor
;
}
else
{
$treated_anexo_pad
[
$nome_valor
]
=
$valor
;
if
(
in_array
(
$nome_valor
,
$valores_lista_negra
))
{
continue
;
}
elseif
(
$nome_valor
==
'campus_id'
)
{
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
Campus
::
whereId
(
$valor
)
->
first
()
->
{
'name'
};
$treated_anexo_pad
[
$nomes_valores
[
'unidade'
]]
=
$unidades_ensino
[
Campus
::
whereId
(
$valor
)
->
first
()
->
{
'unidade_id'
}];
}
elseif
(
$nome_valor
==
'curso_id'
)
{
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
Curso
::
whereId
(
$valor
)
->
first
()
->
{
'name'
};
}
elseif
(
$nome_valor
==
'semestre'
)
{
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
$semestres
[
$valor
];
}
elseif
(
$nome_valor
==
'afastamento_total'
||
$nome_valor
==
'afastamento_parcial'
||
$nome_valor
==
'direcao_sindical'
)
{
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
$valor
==
1
?
'Sim'
:
'Não'
;
}
elseif
(
array_key_exists
(
$nome_valor
,
$nomes_valores
))
{
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
$valor
;
}
else
{
$treated_anexo_pad
[
$nome_valor
]
=
$valor
;
}
}
}
...
...
resources/views/pad/teacher/report_pdf.blade.php
View file @
b9cf790c
...
...
@@ -13,15 +13,17 @@
</header>
<div
style=
"display: flex; flex-direction: column; padding-left:5mm; gap: 10mm"
>
<h1
style=
"font-size: 16px; font-weight: bold; text-align: center"
>
ANEXO B
</h1>
@foreach ($data['anexo'] as $nome=>$valor)
<h4
style=
"font-size: 12px; font-weight: normal; padding-bottom: 5px"
>
<b>
{{$nome}}
</b>
: {{$valor}}
</h4>
@endforeach
<hr>
@if ($data['anexo'] != null || $data['anexo'] != [])
<h1
style=
"font-size: 16px; font-weight: bold; text-align: center"
>
ANEXO B
</h1>
@foreach ($data['anexo'] as $nome=>$valor)
<h4
style=
"font-size: 12px; font-weight: normal; padding-bottom: 5px"
>
<b>
{{$nome}}
</b>
: {{$valor}}
</h4>
@endforeach
<hr>
@endif
@foreach ($data['model'] as $nome_dimensao=>$dimensao)
<h1
style=
"font-size: 16px; font-weight: bold"
>
{{$nome_dimensao}}
...
...
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