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
2f293d6e
Commit
2f293d6e
authored
Mar 25, 2022
by
alissonalbuquerque
Browse files
add listagens de colunas
parent
c6f51e2f
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/Dimensao/EnsinoController.php
View file @
2f293d6e
...
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Dimensao;
...
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Dimensao;
use
App\Http\Controllers\Controller
;
use
App\Http\Controllers\Controller
;
use
App\Models\Curso
;
use
App\Models\Curso
;
use
App\Models\Tabelas\Ensino\EnsinoAula
;
use
App\Queries\CursoQuery
;
use
App\Queries\CursoQuery
;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Auth
;
use
Illuminate\Support\Facades\Auth
;
...
@@ -23,10 +24,15 @@ class EnsinoController extends Controller
...
@@ -23,10 +24,15 @@ class EnsinoController extends Controller
$user
=
Auth
::
user
();
$user
=
Auth
::
user
();
$cursos
=
(
new
CursoQuery
())
->
getQuery
()
->
get
();
$cursos
=
(
new
CursoQuery
())
->
getQuery
()
->
get
();
$niveis
=
EnsinoAula
::
listNivel
();
$modalidades
=
EnsinoAula
::
listModalidade
();
return
view
(
'pad.dimensao.ensino'
,
[
return
view
(
'pad.dimensao.ensino'
,
[
'
index_menu'
=>
self
::
MENU_PAD
,
'
pad_id'
=>
1
,
'cursos'
=>
$cursos
,
'cursos'
=>
$cursos
,
'pad_id'
=>
1
'niveis'
=>
$niveis
,
'modalidades'
=>
$modalidades
,
'index_menu'
=>
self
::
MENU_PAD
,
]);
]);
}
}
}
}
app/Models/Tabelas/Ensino/EnsinoAula.php
View file @
2f293d6e
...
@@ -42,7 +42,7 @@ class EnsinoAula extends Model
...
@@ -42,7 +42,7 @@ class EnsinoAula extends Model
/**
/**
* @return array|string
* @return array|string
*/
*/
public
function
listNivel
(
$value
=
null
)
{
public
static
function
listNivel
(
$value
=
null
)
{
$values
=
[
$values
=
[
self
::
NIVEL_GRADUACAO
=>
'Graduação'
,
self
::
NIVEL_GRADUACAO
=>
'Graduação'
,
self
::
NIVEL_POS_GRADUACAO_LATO_SENSU
=>
'Pós-graduação Stricto Sensu'
,
self
::
NIVEL_POS_GRADUACAO_LATO_SENSU
=>
'Pós-graduação Stricto Sensu'
,
...
@@ -56,7 +56,7 @@ class EnsinoAula extends Model
...
@@ -56,7 +56,7 @@ class EnsinoAula extends Model
/**
/**
* @return array|string
* @return array|string
*/
*/
public
function
listModalidade
(
$value
=
null
)
{
public
static
function
listModalidade
(
$value
=
null
)
{
$values
=
[
$values
=
[
self
::
MODALIDADE_EAD
=>
'EAD'
,
self
::
MODALIDADE_EAD
=>
'EAD'
,
self
::
MODALIDADE_PRESENCIAL
=>
'Presencial'
,
self
::
MODALIDADE_PRESENCIAL
=>
'Presencial'
,
...
...
resources/views/layouts/pad-ensino-jquery/ensino-aula.blade.php
View file @
2f293d6e
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
'
#curso_id
'
).
change
(()
=>
{
$
(
document
).
ready
(()
=>
{
const
curso_id
=
$
(
'
#curso_id
'
).
val
()
if
(
$
(
'
#curso_id
'
).
val
()
===
'
0
'
)
{
$
(
'
#componente_curricular
'
).
prop
(
'
disabled
'
,
true
)
}
const
endpoint
=
"
{{ route('get_disciplina_by_curso', 'curso_id') }}
"
})
const
url
=
endpoint
.
replace
(
'
curso_id
'
,
curso_id
)
$
(
'
#curso_id
'
).
change
(()
=>
{
$
(
'
#componente_curricular
'
).
children
(
'
option
'
).
remove
();
const
_curso_id
=
$
(
'
#curso_id
'
).
val
()
const
_endpoint
=
"
{{ route('get_disciplina_by_curso', 'curso_id') }}
"
const
_url
=
_endpoint
.
replace
(
'
curso_id
'
,
_curso_id
)
if
(
$
(
'
#curso_id
'
).
val
()
===
'
0
'
)
{
$
(
'
#componente_curricular
'
).
prop
(
'
disabled
'
,
true
)
}
else
{
$
(
'
#componente_curricular
'
).
prop
(
'
disabled
'
,
false
)
}
$
.
ajax
({
type
:
"
get
"
,
url
:
_url
,
success
:
(
disciplinas
)
=>
{
$
(
'
#componente_curricular
'
).
append
(
`<option value='0' selected> Selecionar Disciplina </option>`
)
disciplinas
.
forEach
(
(
disciplina
)
=>
{
$
(
'
#componente_curricular
'
).
append
(
`<option value=
${
disciplina
.
id
}
>
${
disciplina
.
name
}
</option>`
)
})
},
});
})
})
</script>
</script>
resources/views/pad/dimensao/ensino.blade.php
View file @
2f293d6e
...
@@ -93,30 +93,33 @@
...
@@ -93,30 +93,33 @@
<
form
class
=
"form-add-new-dimencao"
>
<
form
class
=
"form-add-new-dimencao"
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
>
<
label
for
=
"inputNameProfessor"
>
CÓDIGO
ATIVIDADE
</
label
>
<
label
for
=
"inputNameProfessor"
>
CÓDIGO
ATIVIDADE
</
label
>
<
input
type
=
"text"
name
=
"cod_atividade"
class
=
"form-control"
disable
id
=
"cod_atividade"
placeholder
=
"Nome"
>
<
input
type
=
"text"
name
=
"cod_atividade"
class
=
"form-control"
disable
id
=
"cod_atividade"
placeholder
=
"Nome"
disabled
>
</
div
>
</
div
>
<
div
class
=
"form-row"
>
<
div
class
=
"form-row"
>
<
div
class
=
"form-group col-md-6"
>
<
div
class
=
"form-group col-md-6"
>
<
label
for
=
"selectCurso"
>
CURSO
</
label
>
<
label
for
=
"selectCurso"
>
CURSO
</
label
>
<
select
name
=
"curso_id"
class
=
"custom-select mr-sm-2"
id
=
"curso_id"
aria
-
label
=
"Default select example"
>
<
select
name
=
"curso_id"
class
=
"custom-select mr-sm-2"
id
=
"curso_id"
aria
-
label
=
"Default select example"
>
<
option
selected
>
Selecionar
Curso
</
option
>
<
option
value
=
"0"
selected
>
Selecionar
Curso
</
option
>
@
foreach
(
$cursos
as
$curso
)
@
foreach
(
$cursos
as
$curso
)
<
option
value
=
"{{
$curso->id
}}"
>
{{
$curso
->
name
}}
</
option
>
<
option
value
=
"{{
$curso->id
}}"
>
{{
$curso
->
name
}}
</
option
>
@
endforeach
@
endforeach
</
select
>
</
select
>
</
div
>
</
div
>
<
div
class
=
"form-group col-md-6"
>
<
div
class
=
"form-group col-md-6"
>
<
label
for
=
"selectCurso"
>
COMPONENTE
CURRICULAR
(
NOME
DO
COMPONENTE
)
</
label
>
<
label
for
=
"selectCurso"
>
COMPONENTE
CURRICULAR
</
label
>
<
select
class
=
"custom-select mr-sm-2"
name
=
"componente_curricular"
id
=
"componente_curricular"
<
select
name
=
"componente_curricular"
class
=
"custom-select mr-sm-2"
id
=
"componente_curricular"
aria
-
label
=
"Default select example"
>
aria
-
label
=
"Default select example"
>
<
option
selected
>
Selecionar
</
option
>
</
select
>
</
select
>
</
div
>
</
div
>
<
div
class
=
"form-group col-md-6"
>
<
div
class
=
"form-group col-md-6"
>
<
label
for
=
"selectCurso"
>
NÍVEL
</
label
>
<
label
for
=
"selectCurso"
>
NÍVEL
</
label
>
<
select
class
=
"custom-select mr-sm-2"
name
=
"nivel"
id
=
"nivel"
<
select
class
=
"custom-select mr-sm-2"
name
=
"nivel"
id
=
"nivel"
aria
-
label
=
"Default select example"
>
aria
-
label
=
"Default select example"
>
<
option
selected
>
Selecionar
</
option
>
<
option
value
=
"0"
selected
>
Selecionar
Nível
</
option
>
@
foreach
(
$niveis
as
$key
=>
$nivel
)
<
option
value
=
"{{
$key
}}"
>
{{
$nivel
}}
</
option
>
@
endforeach
</
select
>
</
select
>
</
div
>
</
div
>
...
@@ -124,25 +127,21 @@
...
@@ -124,25 +127,21 @@
<
label
for
=
"selectCurso"
>
Modalidade
</
label
>
<
label
for
=
"selectCurso"
>
Modalidade
</
label
>
<
select
class
=
"custom-select mr-sm-2"
name
=
"modalidade"
id
=
"modalidade"
<
select
class
=
"custom-select mr-sm-2"
name
=
"modalidade"
id
=
"modalidade"
aria
-
label
=
"Default select example"
>
aria
-
label
=
"Default select example"
>
<
option
selected
>
Selecionar
</
option
>
<
option
value
=
"0"
selected
>
Selecionar
Modalidade
</
option
>
@
foreach
(
$modalidades
as
$key
=>
$modalidade
)
<
option
value
=
"{{
$key
}}"
>
{{
$modalidade
}}
</
option
>
@
endforeach
</
select
>
</
select
>
</
div
>
</
div
>
<
div
class
=
"form-group col-md-4"
>
<
div
class
=
"form-group col-md-4"
>
<
label
for
=
"selectCurso"
>
CARGA
HORÁRIA
SEMANAL
</
label
>
<
label
for
=
"selectCurso"
>
CARGA
HORÁRIA
SEMANAL
</
label
>
<
select
class
=
"custom-select mr-sm-2"
name
=
"ch_semanal"
id
=
"ch_semanal"
<
input
type
=
"number"
name
=
"ch_semanal"
id
=
"ch_semanal"
>
aria
-
label
=
"Default select example"
>
<
option
selected
>
Selecionar
</
option
>
</
select
>
</
div
>
</
div
>
<
div
class
=
"form-group col-md-4"
>
<
div
class
=
"form-group col-md-4"
>
<
label
for
=
"selectCurso"
>
CARGA
HORÁRIA
TOTAL
</
label
>
<
label
for
=
"selectCurso"
>
CARGA
HORÁRIA
TOTAL
</
label
>
<
select
class
=
"custom-select mr-sm-2"
name
=
"ch_total"
id
=
"ch_total"
<
input
type
=
"number"
name
=
"ch_total"
id
=
"ch_semanal"
>
aria
-
label
=
"Default select example"
>
<
option
selected
>
Selecionar
</
option
>
</
select
>
</
div
>
</
div
>
<
input
type
=
"hidden"
value
=
"{{
$pad_id
}}"
>
<
input
type
=
"hidden"
value
=
"{{
$pad_id
}}"
>
...
...
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