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
3e54aa53
Commit
3e54aa53
authored
Jul 18, 2022
by
alissonalbuquerque
Browse files
Add atualizações de projeto
parent
bbc48f36
Changes
78
Hide whitespace changes
Inline
Side-by-side
app/Queries/Tabelas/Pesquisa/PesquisaCoordenacaoQuery.php
0 → 100644
View file @
3e54aa53
<?php
namespace
App\Queries\Tabelas\Pesquisa
;
use
App\Models\Tabelas\Pesquisa\PesquisaCoordenacao
;
use
App\Queries\CustomQuery
;
class
PesquisaCoordenacaoQuery
extends
CustomQuery
{
public
function
__construct
()
{
$this
->
query
=
PesquisaCoordenacao
::
where
([]);
self
::
$instance
=
$this
;
}
public
function
whereUserPad
(
$user_pad_id
,
$operator
=
'='
)
{
$this
->
query
=
$this
->
query
->
where
(
'user_pad_id'
,
$operator
,
$user_pad_id
);
return
self
::
$instance
;
}
}
\ No newline at end of file
app/Queries/Tabelas/Pesquisa/PesquisaLiderancaQuery.php
0 → 100644
View file @
3e54aa53
<?php
namespace
App\Queries\Tabelas\Pesquisa
;
use
App\Models\Tabelas\Pesquisa\PesquisaLideranca
;
use
App\Queries\CustomQuery
;
class
PesquisaLiderancaQuery
extends
CustomQuery
{
public
function
__construct
()
{
$this
->
query
=
PesquisaLideranca
::
where
([]);
self
::
$instance
=
$this
;
}
public
function
whereUserPad
(
$user_pad_id
,
$operator
=
'='
)
{
$this
->
query
=
$this
->
query
->
where
(
'user_pad_id'
,
$operator
,
$user_pad_id
);
return
self
::
$instance
;
}
}
\ No newline at end of file
app/Queries/Tabelas/Pesquisa/PesquisaOrientacaoQuery.php
0 → 100644
View file @
3e54aa53
<?php
namespace
App\Queries\Tabelas\Pesquisa
;
use
App\Models\Tabelas\Pesquisa\PesquisaOrientacao
;
use
App\Queries\CustomQuery
;
class
PesquisaOrientacaoQuery
extends
CustomQuery
{
public
function
__construct
()
{
$this
->
query
=
PesquisaOrientacao
::
where
([]);
self
::
$instance
=
$this
;
}
public
function
whereUserPad
(
$user_pad_id
,
$operator
=
'='
)
{
$this
->
query
=
$this
->
query
->
where
(
'user_pad_id'
,
$operator
,
$user_pad_id
);
return
self
::
$instance
;
}
}
\ No newline at end of file
app/Queries/UnidadeQuery.php
View file @
3e54aa53
...
...
@@ -4,6 +4,13 @@ namespace App\Queries;
use
App\Models\Unidade
;
class
UnidadeQuery
extends
Unidade
{
class
UnidadeQuery
extends
CustomQuery
{
public
function
__construct
()
{
$this
->
query
=
Unidade
::
where
([]);
self
::
$instance
=
$this
;
}
}
\ No newline at end of file
app/Queries/UserPadQuery.php
View file @
3e54aa53
...
...
@@ -4,7 +4,8 @@ namespace App\Queries;
use
App\Models\UserPad
;
class
UserPadQuery
extends
CustomQuery
{
class
UserPadQuery
extends
CustomQuery
{
public
function
__construct
()
{
...
...
app/Queries/UserQuery.php
View file @
3e54aa53
...
...
@@ -4,13 +4,14 @@ namespace App\Queries;
use
App\Models\User
;
class
UserQuery
{
private
$query
;
class
UserQuery
extends
CustomQuery
{
public
function
__construct
()
{
$this
->
query
=
User
::
where
([]);
self
::
$instance
=
$this
;
}
/**
...
...
@@ -20,7 +21,7 @@ class UserQuery {
public
function
whereId
(
$id
,
$expression
=
'='
)
{
$this
->
query
=
$this
->
query
->
where
(
'id'
,
$expression
,
$id
);
return
$this
->
query
;
return
self
::
$instance
;
}
/**
...
...
@@ -30,14 +31,7 @@ class UserQuery {
public
function
whereType
(
$type
,
$expression
=
'='
)
{
$this
->
query
=
$this
->
query
->
where
(
'type'
,
$expression
,
$type
);
return
$this
->
query
;
return
self
::
$instance
;
}
/**
* @return Builder
*/
public
function
getQuery
()
{
return
$this
->
query
;
}
}
\ No newline at end of file
database/migrations/2022_07_17_021525_create_pesquisa_coordenacao_table.php
0 → 100644
View file @
3e54aa53
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreatePesquisaCoordenacaoTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'pesquisa_coordenacao'
,
function
(
Blueprint
$table
)
{
$table
->
id
();
$table
->
tinyInteger
(
'dimensao'
);
$table
->
foreignId
(
'user_pad_id'
)
->
notNull
();
$table
->
string
(
'cod_atividade'
)
->
notNull
();
$table
->
string
(
'titulo_projeto'
)
->
notNull
();
$table
->
string
(
'linha_grupo_pesquisa'
)
->
notNull
();
$table
->
tinyInteger
(
'funcao'
)
->
notNull
();
$table
->
integer
(
'ch_semanal'
)
->
notNull
();
$table
->
softDeletes
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'pesquisa_coordenacao'
);
}
}
database/migrations/2022_07_17_023304_create_pesquisa_lideranca_table.php
0 → 100644
View file @
3e54aa53
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreatePesquisaLiderancaTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'pesquisa_lideranca'
,
function
(
Blueprint
$table
)
{
$table
->
id
();
$table
->
tinyInteger
(
'dimensao'
);
$table
->
foreignId
(
'user_pad_id'
)
->
notNull
();
$table
->
string
(
'cod_atividade'
)
->
notNull
();
$table
->
string
(
'grupo_pesquisa'
)
->
notNull
();
$table
->
string
(
'atividade'
)
->
notNull
();
$table
->
tinyInteger
(
'funcao'
)
->
notNull
();
$table
->
integer
(
'ch_semanal'
)
->
notNull
();
$table
->
softDeletes
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'pesquisa_lideranca'
);
}
}
database/migrations/2022_07_17_024129_create_pesquisa_orientacao_table.php
0 → 100644
View file @
3e54aa53
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreatePesquisaOrientacaoTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'pesquisa_orientacao'
,
function
(
Blueprint
$table
)
{
$table
->
id
();
$table
->
tinyInteger
(
'dimensao'
);
$table
->
foreignId
(
'user_pad_id'
)
->
notNull
();
$table
->
string
(
'cod_atividade'
)
->
notNull
();
$table
->
string
(
'titulo_projeto'
)
->
notNull
();
$table
->
string
(
'nome_orientando'
)
->
notNull
();
$table
->
tinyInteger
(
'funcao'
)
->
notNull
();
$table
->
integer
(
'ch_semanal'
)
->
notNull
();
$table
->
softDeletes
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'pesquisa_orientacao'
);
}
}
resources/views/campus/create.blade.php
View file @
3e54aa53
...
...
@@ -22,37 +22,50 @@
<
form
action
=
"{{ route('campus_store') }}"
method
=
"post"
>
@
csrf
@
method
(
'POST'
)
<
div
class
=
"form-group"
>
<
label
for
=
"inputNameCampus"
>
Nome
do
Campus
</
label
>
<
input
type
=
"text"
name
=
"name"
class
=
"form-control"
id
=
"inputNameCampus"
placeholder
=
"Insira o nome do Campus"
value
=
"{{ old('name') }}"
>
@
error
(
'name'
)
<
span
class
=
"text-danger"
>
{{
$message
}}
</
span
>
@
enderror
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"selectCampus"
>
Campus
</
label
>
<
select
class
=
"custom-select"
name
=
"unidade_id"
id
=
"unidade_id"
>
<
option
value
=
""
disabled
selected
hidden
>
selecione
...
</
option
>
@
foreach
(
$unidades
as
$unidade
)
<
option
value
=
"{{
$unidade->id
}}"
{{
old
(
'unidade_id'
)
==
$unidade
->
id
?
'selected'
:
''
}}
>
{{
$unidade
->
name
}}
</
option
>
@
endforeach
</
select
>
@
error
(
'unidade_id'
)
<
span
class
=
"text-danger"
>
{{
$message
}}
</
span
>
@
enderror
</
div
>
<
div
class
=
"d-flex justify-content-between"
>
@
include
(
'components.buttons.btn-cancel'
,
[
'route'
=>
route
(
'campus_index'
),
])
@
include
(
'components.buttons.btn-save'
,
[
'content'
=>
'Cadastrar'
,
'btn_class'
=>
'btn btn-outline-success'
,
'i_class'
=>
''
,
])
<
div
class
=
'row'
>
<
div
class
=
'mb-3 col-sm-6'
>
<
div
class
=
"form-group"
>
<
label
for
=
"name"
>
Nome
do
Campus
</
label
>
<
input
type
=
"text"
name
=
"name"
class
=
"form-control"
id
=
"name"
placeholder
=
"Campus"
value
=
"{{ old('name') }}"
>
@
error
(
'name'
)
<
span
class
=
"text-danger"
>
{{
$message
}}
</
span
>
@
enderror
</
div
>
</
div
>
<
div
class
=
'mb-3 col-sm-6'
>
<
div
class
=
"form-group"
>
<
label
for
=
"unidade_id"
>
Unidade
</
label
>
<
select
class
=
"form-select"
name
=
"unidade_id"
id
=
"unidade_id"
>
<
option
value
=
""
disabled
selected
hidden
>
selecione
...
</
option
>
@
foreach
(
$unidades
as
$unidade
)
<
option
value
=
"{{
$unidade->id
}}"
{{
old
(
'unidade_id'
)
==
$unidade
->
id
?
'selected'
:
''
}}
>
{{
$unidade
->
name
}}
</
option
>
@
endforeach
</
select
>
@
error
(
'unidade_id'
)
<
span
class
=
"text-danger"
>
{{
$message
}}
</
span
>
@
enderror
</
div
>
</
div
>
<
div
class
=
'mt-1 text-end'
>
@
include
(
'components.buttons.btn-cancel'
,
[
'route'
=>
route
(
'campus_index'
),
'content'
=>
'Cancelar'
])
@
include
(
'components.buttons.btn-save'
,
[
'content'
=>
'Cadastrar'
])
</
div
>
</
div
>
</
form
>
</
div
>
@
endsection
\ No newline at end of file
resources/views/campus/index.blade.php
View file @
3e54aa53
...
...
@@ -17,9 +17,9 @@
<
h2
class
=
""
>
TODOS
OS
CAMPUS
</
h2
>
@
include
(
'components.buttons.btn-create'
,
[
'route'
=>
route
(
'campus_create'
),
'class'
=>
''
,
'class'
=>
'
btn btn-success
'
,
'content'
=>
'Novo Campus'
,
'id'
=>
''
,
'id'
=>
'
campus_create
'
,
])
</
div
>
...
...
@@ -41,11 +41,12 @@
<
td
>
{{
$camp
->
unidade
}}
</
td
>
<
td
>
@
include
(
'components.buttons.btn-edit'
,
[
'btn_class'
=>
'btn btn-warning'
,
'route'
=>
route
(
'campus_edit'
,
[
'id'
=>
$camp
->
id
]),
])
@
include
(
'components.buttons.btn-soft-delete'
,
[
'modal_id'
=>
$camp
->
id
,
'route'
=>
route
(
'campus_delete'
,
[
'id'
=>
$camp
->
id
])
@
include
(
'components.buttons.btn-delete'
,
[
'id'
=>
$camp
->
id
,
'route'
=>
route
(
'campus_delete'
,
[
'id'
=>
$camp
->
id
])
])
</
td
>
</
tr
>
...
...
resources/views/campus/update.blade.php
View file @
3e54aa53
...
...
@@ -21,37 +21,52 @@
<
form
action
=
"{{ route('campus_update',
$campus->id
) }}"
method
=
"post"
>
@
csrf
@
method
(
'POST'
)
<
div
class
=
"form-group"
>
<
label
for
=
"inputNameCampus"
>
Nome
do
Campus
</
label
>
<
input
type
=
"text"
name
=
"name"
class
=
"form-control"
id
=
"inputNameCampus"
placeholder
=
"Insira o nome do Campus"
value
=
"{{
$campus->name
}}{{ old('name') }}"
>
@
error
(
'name'
)
<
span
class
=
"text-danger"
>
{{
$message
}}
</
span
>
@
enderror
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"selectCampus"
>
Campus
</
label
>
<
select
class
=
"custom-select"
name
=
"unidade_id"
id
=
"unidade_id"
>
<
option
value
=
""
disabled
selected
hidden
>
selecione
...
</
option
>
@
foreach
(
$unidades
as
$unidade
)
<
option
value
=
"{{
$unidade->id
}}"
{{
$campus
->
unidade
->
id
==
$unidade
->
id
?
'selected'
:
''
}}
>
{{
$unidade
->
name
}}
</
option
>
@
endforeach
</
select
>
@
error
(
'unidade_id'
)
<
span
class
=
"text-danger"
>
{{
$message
}}
</
span
>
@
enderror
</
div
>
<
div
class
=
"d-flex justify-content-between"
>
@
include
(
'components.buttons.btn-cancel'
,
[
'route'
=>
route
(
'campus_index'
),
])
@
include
(
'components.buttons.btn-save'
,
[
'content'
=>
'Atualizar'
,
'btn_class'
=>
'btn btn-outline-success'
,
'i_class'
=>
''
,
])
<
div
class
=
'row'
>
<
div
class
=
'mb-3 col-sm-6'
>
<
div
class
=
"form-group"
>
<
label
for
=
"name"
>
Nome
do
Campus
</
label
>
<
input
type
=
"text"
id
=
"name"
name
=
"name"
class
=
"form-control"
id
=
"name"
placeholder
=
"Campus"
value
=
"{{
$campus->name
}}{{ old('name') }}"
>
@
error
(
'name'
)
<
span
class
=
"text-danger"
>
{{
$message
}}
</
span
>
@
enderror
</
div
>
</
div
>
<
div
class
=
'mb-3 col-sm-6'
>
<
div
class
=
"form-group"
>
<
label
for
=
"unidade_id"
>
Unidade
</
label
>
<
select
class
=
"form-select"
name
=
"unidade_id"
id
=
"unidade_id"
>
<
option
value
=
""
disabled
selected
hidden
>
selecione
...
</
option
>
@
foreach
(
$unidades
as
$unidade
)
@
if
(
$campus
->
unidade_id
==
$unidade
->
id
)
<
option
selected
value
=
"{{
$unidade->id
}}"
>
{{
$unidade
->
name
}}
</
option
>
@
else
<
option
value
=
"{{
$unidade->id
}}"
>
{{
$unidade
->
name
}}
</
option
>
@
endif
@
endforeach
</
select
>
@
error
(
'unidade_id'
)
<
span
class
=
"text-danger"
>
{{
$message
}}
</
span
>
@
enderror
</
div
>
</
div
>
<
div
class
=
'mt-1 text-end'
>
@
include
(
'components.buttons.btn-cancel'
,
[
'route'
=>
route
(
'campus_index'
),
'content'
=>
'Cancelar'
])
@
include
(
'components.buttons.btn-save'
,
[
'content'
=>
'Atualizar'
,
])
</
div
>
</
div
>
</
form
>
</
div
>
@
endsection
\ No newline at end of file
resources/views/components/buttons/btn-cancel.blade.php
View file @
3e54aa53
<a
class=
"btn btn-secondary"
href=
"{{$route}}"
>
<i
class=
"bi bi-x-square-fill"
></i>
Cancelar
{{
--
@
include
(
'components.buttons.btn-cancel'
,
[
'route'
=>
''
,
'content'
=>
''
])
--
}}
<
a
class
=
"btn btn-secondary"
href
=
"{{
$route
}}"
>
<
i
class
=
"bi bi-x-circle"
></
i
>
{{
$content
}}
</
a
>
resources/views/components/buttons/btn-close_modal.blade.php
0 → 100644
View file @
3e54aa53
{{
--
@
include
(
'components.buttons.btn-close_modal'
)
--
}}
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
bs
-
dismiss
=
"modal"
>
<
i
class
=
"bi bi-x-circle"
></
i
>
Cancelar
</
button
>
\ No newline at end of file
resources/views/components/buttons/btn-create.blade.php
View file @
3e54aa53
<a
class=
"btn {{$class}}"
href=
"{{$route}}"
id=
"{{$id}}"
>
{{
--
@
include
(
'components.buttons.btn-create'
,
[
'id'
=>
''
,
'route'
=>
''
,
'content'
=>
''
])
--
}}
<
a
class
=
"btn btn-success"
href
=
"
{
{$route}
}
"
id
=
"
{
{$id}
}
"
>
<
i
class
=
"bi bi-plus-circle"
></
i
>
{{
$content
}}
</
a
>
resources/views/components/buttons/btn-delete.blade.php
View file @
3e54aa53
{{
--
@
include
(
'components.buttons.btn-delete'
,
[
'id'
=>
$id
,
'route'
=>
route
(
''
)
])
--
}}
<!--
Button
trigger
modal
-->
<button
type=
"button"
class=
"
{{ $btn_class }}
"
data-bs-toggle=
"modal"
data-bs-target=
"#modal-delete-{{ $id }}"
>
<
button
type
=
"button"
class
=
"
btn btn-danger
"
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal-delete-{{
$id
}}"
>
<
i
class
=
"bi bi-trash"
></
i
>
</
button
>
...
...
@@ -8,7 +17,7 @@
<
div
class
=
"modal-dialog"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<h5
class=
"modal-title"
id=
"
$
modal-label-title-{{ $id }}"
>
Excluir Item
</h5>
<
h5
class
=
"modal-title"
id
=
"modal-label-title-{{
$id
}}"
>
Excluir
Item
</
h5
>
<
button
type
=
"button"
class
=
"btn-close"
data
-
bs
-
dismiss
=
"modal"
aria
-
label
=
"Close"
></
button
>
</
div
>
<
div
class
=
"modal-body"
>
...
...
resources/views/components/buttons/btn-edit-task.blade.php
0 → 100644
View file @
3e54aa53
{{
--
@
include
(
'components.buttons.btn-edit-task'
,
[
'btn_class'
=>
''
,
'btn_id'
=>
''
])
--
}}
<
div
class
=
"btn-edit-tasks"
>
<
button
type
=
"button"
class
=
"btn btn-primary {{
$btn_class
}}"
id
=
"{{
$btn_id
}}"
>
<
i
class
=
"bi bi-pencil-square"
></
i
>
</
button
>
</
div
>
\ No newline at end of file
resources/views/components/buttons/btn-edit.blade.php
View file @
3e54aa53
<a
class=
"{{$btn_class}}"
href=
"{{$route}}"
><i
class=
"bi bi-pencil-square"
></i></a>
\ No newline at end of file
{{
--
@
include
(
'components.buttons.btn-edit'
,
[
'route'
=>
''
])
--
}}
<
a
class
=
"btn btn-warning"
href
=
"
{
{$route}
}
"
>
<
i
class
=
"bi bi-pencil-square"
></
i
>
</
a
>
\ No newline at end of file
resources/views/components/buttons/btn-save.blade.php
View file @
3e54aa53
<button
class=
"{{$btn_class}}"
type=
"submit"
>
<i
class=
"{{$i_class}}"
></i>
{{$content}}
{{
--
@
include
(
'components.buttons.btn-save'
,
[
'id'
=>
''
,
'content'
=>
''
,
])
--
}}
@
php
if
(
!
isset
(
$id
))
{
$id
=
''
;
}
@
endphp
<
button
class
=
"btn btn-success"
id
=
"{{
$id
}}"
type
=
"submit"
>
<
i
class
=
""
></
i
>
{{
$content
}}
</
button
>
resources/views/components/buttons/btn-soft-delete.blade.php
View file @
3e54aa53
<!-- Button trigger modal -->
<button
type=
"button"
class=
"btn btn-danger"
data-toggle=
"modal"
data-target=
"#modal-delete-{{ $modal_id }}"
>
<i
class=
"
fas fa
-trash"
></i>
<i
class=
"
bi bi
-trash"
></i>
</button>
<!-- Modal -->
...
...
Prev
1
2
3
4
Next
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