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
89a754fa
Commit
89a754fa
authored
Jun 29, 2022
by
Abraão Barbosa
Browse files
Correções no layout, ajuste de nome de layouts e ajuste na migration de panejamentos_pads
parent
509b3e44
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/DashboardController.php
View file @
89a754fa
...
...
@@ -14,15 +14,16 @@ class DashboardController extends Controller
$user
=
Auth
::
user
();
if
(
$user
->
isTypeAdmin
())
{
if
(
$user
->
isTypeAdmin
()){
return
view
(
'dashboard'
,
[
'unidades'
=>
UnidadeQuery
::
all
(),
'unidade_index'
=>
1
]);
}
if
(
$user
->
isTypeTeacher
())
{
}
elseif
(
$user
->
isTypeTeacher
())
{
return
view
(
'dashboard'
,
[
'PADs'
=>
PAD
::
all
(),
'menu_index'
=>
0
]);
}
}
}
elseif
(
$user
->
isTypeDirector
())
{
return
view
(
'dashboard'
,
[
'PADs'
=>
PAD
::
all
(),
'menu_index'
=>
0
]);
}
elseif
(
$user
->
isTypeCoordinator
())
{
return
view
(
'dashboard'
,
[
'PADs'
=>
PAD
::
all
(),
'menu_index'
=>
0
]);
}
//return redirect()->route('login');
}
}
app/Http/Controllers/P
AD
Controller.php
→
app/Http/Controllers/P
ad
Controller.php
View file @
89a754fa
File moved
app/Models/User.php
View file @
89a754fa
...
...
@@ -16,7 +16,7 @@ class User extends Authenticatable
const
TYPE_ADMIN
=
1
;
// Administrador
const
TYPE_TEACHER
=
2
;
// Professor
const
TYPE_
MANAGER
=
3
;
// Diretor
const
TYPE_
DIRECTOR
=
3
;
// Diretor
const
TYPE_COORDINATOR
=
4
;
// Coordenador
const
STATUS_ACTIVE
=
1
;
...
...
@@ -117,8 +117,8 @@ class User extends Authenticatable
/**
* @return bool
*/
public
function
isType
Menage
r
()
{
return
$this
->
type
===
self
::
TYPE_
MANAGE
R
;
public
function
isType
Directo
r
()
{
return
$this
->
type
===
self
::
TYPE_
DIRECTO
R
;
}
/**
...
...
composer.lock
View file @
89a754fa
This diff is collapsed.
Click to expand it.
database/migrations/2022_03_20_233345_create_ref_planejamento_ches_table.php
View file @
89a754fa
...
...
@@ -20,7 +20,7 @@ class CreateRefPlanejamentoChesTable extends Migration
$table
->
float
(
"ch_semanal"
,
5
,
2
);
$table
->
float
(
"ch_maxima"
,
5
,
2
);
$table
->
foreignId
(
'PAD_id'
)
->
constrained
()
->
constrained
(
'pads'
)
->
onUpdate
(
'cascade'
)
->
onDelete
(
'cascade'
);
...
...
database/seeders/UserSeeder.php
View file @
89a754fa
...
...
@@ -47,5 +47,31 @@ class UserSeeder extends Seeder
'campus_id'
=>
NULL
,
'curso_id'
=>
NULL
,
]);
//UserDirector
User
::
create
([
'type'
=>
User
::
TYPE_DIRECTOR
,
'name'
=>
"Director"
,
'email'
=>
"director@upe.br"
,
'email_verified_at'
=>
null
,
'password'
=>
Hash
::
make
(
'@director'
),
'document'
=>
"100000000"
,
'status'
=>
User
::
STATUS_ACTIVE
,
'campus_id'
=>
1
,
'curso_id'
=>
1
,
]);
//UserDirector
User
::
create
([
'type'
=>
User
::
TYPE_COORDINATOR
,
'name'
=>
"Coordinator"
,
'email'
=>
"coordinator@upe.br"
,
'email_verified_at'
=>
null
,
'password'
=>
Hash
::
make
(
'@coordinator'
),
'document'
=>
"100000000"
,
'status'
=>
User
::
STATUS_ACTIVE
,
'campus_id'
=>
1
,
'curso_id'
=>
1
,
]);
}
}
public/css/dashboard.css
View file @
89a754fa
...
...
@@ -29,9 +29,9 @@ header {
}
header
.header-left-side
{
width
:
60vw
;
background
:
linear-gradient
(
110deg
,
#f7f7f7
60%
,
#dfdfdf
60%
)
;
padding-left
:
15vh
;
background-color
:
#f7f7f7
;
padding
:
1em
3em
1em
15vh
;
background
:
linear-gradient
(
110deg
,
#f7f7f7
90%
,
#dfdfdf
0%
)
;
}
header
.header-right-side
{
...
...
@@ -53,7 +53,9 @@ nav {
margin-left
:
13vh
;
margin-right
:
1em
;
border-radius
:
0.5em
;
border
:
1px
solid
#dee2e6
!important
;
border
:
2px
solid
#dee2e6
!important
;
padding
:
.5em
;
}
nav
ul
li
a
{
...
...
@@ -65,6 +67,7 @@ nav ul .active {
background-color
:
#dfdfdf
!important
;
color
:
#17223b
!important
;
font-weight
:
bold
;
border-left
:
solid
3px
#0d6efd
;
/* border: 1px solid #007bff; */
}
...
...
@@ -72,6 +75,19 @@ nav .content-user-info {
font-weight
:
bold
;
}
nav
.custom-nav-link
{
display
:
block
;
padding
:
.5rem
1rem
;
color
:
#2e4363
;
text-decoration
:
none
;
border-radius
:
.2em
;
transition
:
color
.15s
ease-in-out
,
background-color
.15s
ease-in-out
,
border-color
.15s
ease-in-out
;
}
nav
.custom-nav-link
:hover
{
color
:
#0d6efd
;
}
@media
(
min-width
:
768px
)
{
.bd-placeholder-img-lg
{
font-size
:
3.5rem
;
...
...
public/css/layout.css
deleted
100644 → 0
View file @
509b3e44
/* content que contem o preview do perfil */
.content
{
position
:
relative
;
top
:
0px
;
width
:
100%
;
padding
:
18px
6%
10px
6%
;
margin
:
0
0
30px
0
;
border-bottom
:
1px
solid
#dee2e6
!important
;
}
header
{
background-color
:
#DFDFDF
;
margin-bottom
:
30px
;
}
header
.header-left-side
{
width
:
60vw
;
font-family
:
'Electrolize'
,
sans-serif
;
background
:
linear-gradient
(
110deg
,
#F7F7F7
60%
,
#DFDFDF
60%
);
padding-left
:
15vh
;
}
header
.header-right-side
{
padding-right
:
15vh
;
}
.main-container
{
display
:
flex
;
flex-direction
:
row
;
}
main
{
min-height
:
70vh
;
}
nav
{
margin-left
:
13vh
;
margin-right
:
1em
;
border-radius
:
.5em
;
border
:
1px
solid
#dee2e6
!important
;
}
nav
ul
li
a
{
color
:
#17223b
;
font-size
:
large
;
}
nav
ul
.active
{
background-color
:
#DFDFDF
!important
;
color
:
#17223b
!important
;
font-weight
:
bold
;
}
nav
.content-user-info
{
font-weight
:
bold
;
}
@media
(
min-width
:
768px
)
{
.bd-placeholder-img-lg
{
font-size
:
3.5rem
;
}
}
\ No newline at end of file
resources/views/dashboard.blade.php
View file @
89a754fa
<x-app-layout>
@section('title', 'Home')
@section('title', 'Home')
sdfsdfsdfsf
<x-slot
name=
"main"
>
<div
class=
"tab-content"
>
@if(Auth::user()->isTypeAdmin())
...
...
@@ -10,8 +10,8 @@
@include('layouts.user-dashboard.dashboard_teacher', ['user' => Auth::user()])
@endif
@if(Auth::user()->isType
Menage
r())
@include('layouts.user-dashboard.dashboard_
menage
r')
@if(Auth::user()->isType
Directo
r())
@include('layouts.user-dashboard.dashboard_
directo
r')
@endif
@if(Auth::user()->isTypeCoordinator())
...
...
resources/views/layouts/app.blade.php
View file @
89a754fa
...
...
@@ -44,8 +44,8 @@
@include('layouts.user-jquery.jquery_teacher')
@endif
@if(Auth::user()->isType
Menage
r())
@include('layouts.user-jquery.jquery_
menage
r')
@if(Auth::user()->isType
Directo
r())
@include('layouts.user-jquery.jquery_
directo
r')
@endif
@if(Auth::user()->isTypeCoordinator())
...
...
resources/views/layouts/header.blade.php
View file @
89a754fa
...
...
@@ -7,6 +7,7 @@
class=
"img-fluid"
width=
"268"
height=
"100"
alt=
""
/>
</a>
</div>
<div
class=
"header-divider"
></div>
<div
class=
"mt-3 space-y-1 header-right-side"
>
<!-- Authentication -->
<form
method=
"POST"
action=
"{{ route('logout') }}"
>
...
...
resources/views/layouts/main.blade.php
View file @
89a754fa
...
...
@@ -46,8 +46,8 @@
@include('layouts.user-jquery.jquery_teacher')
@endif
@if (Auth::user()->isType
Menage
r())
@include('layouts.user-jquery.jquery_
menage
r')
@if (Auth::user()->isType
Directo
r())
@include('layouts.user-jquery.jquery_
directo
r')
@endif
@if (Auth::user()->isTypeCoordinator())
...
...
resources/views/layouts/navigation.blade.php
View file @
89a754fa
...
...
@@ -24,8 +24,8 @@
@endif
<!-- SidebarMenu : Diretor -->
@if (Auth::user()->isType
Menage
r())
@include('layouts.user-navigation.navigation_
menage
r')
@if (Auth::user()->isType
Directo
r())
@include('layouts.user-navigation.navigation_
directo
r')
@endif
<!-- SidebarMenu : Coordenador -->
...
...
resources/views/layouts/user-dashboard/dashboard_coordinator.blade.php
View file @
89a754fa
<div
class=
"tab-pane active"
id=
"home"
role=
"tabpanel"
aria-labelledby=
"home-tab"
>
<div
class=
"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"
>
<h1
class=
"h2"
>
Bem Vindo ao PAD
</h1>
</div>
<div
class=
"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3"
>
<h2
class=
"h3"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"26"
height=
"26"
fill=
"currentColor"
class=
"bi bi-exclamation-octagon-fill"
viewBox=
"0 0 16 16"
>
<path
d=
"M11.46.146A.5.5 0 0 0 11.107 0H4.893a.5.5 0 0 0-.353.146L.146 4.54A.5.5 0 0 0 0 4.893v6.214a.5.5 0 0 0 .146.353l4.394 4.394a.5.5 0 0 0 .353.146h6.214a.5.5 0 0 0 .353-.146l4.394-4.394a.5.5 0 0 0 .146-.353V4.893a.5.5 0 0 0-.146-.353L11.46.146zM8 4c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995A.905.905 0 0 1 8 4zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"
/>
</svg>
Atividades a serem realizdas
</h2>
</div>
<div
class=
"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-top"
>
<ul
class=
"inf-list"
>
<li><a
href=
""
rel=
"noopener"
target=
"_blank"
>
Cronograma de atividades PAD 2022
</a></li>
<li><a
href=
""
rel=
"noopener"
target=
"_blank"
>
Informações sobre o processo PAD 2022
</a></li>
</ul>
</div>
</div>
<div
class=
"tab-pane"
id=
"pad"
role=
"tabpanel"
aria-labelledby=
"pad-tab"
>
<div
class=
"d-flex flex-column justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"
>
<h1
class=
"h2"
>
Dimenções-PAD
</h1>
</div>
<div
class=
"d-flex justify-content-start "
>
<div
class=
"card text-center"
style=
"width: 18rem;"
>
<div
class=
"card-body"
>
<h5
class=
"card-title"
>
Special title treatment
</h5>
<p
class=
"card-text"
>
With supporting text below as a natural lead-in to additional content.
</p>
<a
href=
"#"
class=
"btn btn-primary"
>
Go somewhere
</a>
</div>
</div>
<div
class=
"card text-center"
style=
"width: 18rem;"
>
<div
class=
"card-body"
>
<h5
class=
"card-title"
>
Special title treatment
</h5>
<p
class=
"card-text"
>
With supporting text below as a natural lead-in to additional content.
</p>
</div>
</div>
<div
class=
"card text-center"
style=
"width: 18rem;"
>
<div
class=
"card-body"
>
<h5
class=
"card-title"
>
Special title treatment
</h5>
<p
class=
"card-text"
>
With supporting text below as a natural lead-in to additional content.
</p>
<a
href=
"#"
class=
"btn btn-primary"
>
Go somewhere
</a>
</div>
</div>
</div>
</div>
resources/views/layouts/user-dashboard/dashboard_
menage
r.blade.php
→
resources/views/layouts/user-dashboard/dashboard_
directo
r.blade.php
View file @
89a754fa
File moved
resources/views/layouts/user-navigation/navigation_admin.blade.php
View file @
89a754fa
<!-- SidebarMenu : Vertical Options -->
<ul
class=
"nav flex-column nav-pills"
id=
"myTab"
role=
"tablist"
aria-orientation=
"vertical"
>
<li
class=
"nav-item"
>
<a
href=
"{{ route('dashboard') }}"
class=
"nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 0? "
active
"
:
"")
}}"
>
<a
href=
"{{ route('dashboard') }}"
class=
"
custom-
nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 0? "
active
"
:
"")
}}"
>
<i
class=
"bi bi-house-fill"
></i>
Home
</a>
</li>
<li
class=
"nav-item"
>
<a
href=
"{{ route('campus_index') }}"
class=
"nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 1? "
active
"
:
"")
}}"
>
<a
href=
"{{ route('campus_index') }}"
class=
"
custom-
nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 1? "
active
"
:
"")
}}"
>
<i
class=
"bi bi-bank2"
></i>
Campus
</a>
</li>
<li
class=
"nav-item"
>
<a
href=
"{{ route('curso_index') }}"
class=
"nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 2? "
active
"
:
"")
}}"
>
<a
href=
"{{ route('curso_index') }}"
class=
"
custom-
nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 2? "
active
"
:
"")
}}"
>
<i
class=
"bi bi-mortarboard-fill"
></i>
Cursos
</a>
</li>
<li
class=
"nav-item"
>
<a
href=
"{{ route('unidade_index') }}"
class=
"nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 3? "
active
"
:
"")
}}"
>
<a
href=
"{{ route('unidade_index') }}"
class=
"
custom-
nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 3? "
active
"
:
"")
}}"
>
<i
class=
"bi bi-geo-fill"
></i>
Unidades
</a>
</li>
<li
class=
"nav-item"
>
<a
href=
"{{ route('diretor_index') }}"
class=
"nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 4? "
active
"
:
"")
}}"
>
<a
href=
"{{ route('diretor_index') }}"
class=
"
custom-
nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 4? "
active
"
:
"")
}}"
>
<i
class=
"bi bi-people-fill"
></i>
Diretores
</a>
</li>
<li
class=
"nav-item"
>
<a
href=
"{{ route('coordenador_index') }}"
class=
"nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 5? "
active
"
:
"")
}}"
>
<a
href=
"{{ route('coordenador_index') }}"
class=
"
custom-
nav-link {{ ((($index_menu ?? 0) == 0 ? 0: $index_menu ) == 5? "
active
"
:
"")
}}"
>
<i
class=
"bi bi-person-video3"
></i>
Coordenadores
</a>
...
...
resources/views/layouts/user-navigation/navigation_coordinator.blade.php
View file @
89a754fa
<!--
SidebarMenu : Vertical Options
-->
<!--
Botoes link lista vertical sidebarMenu
-->
<ul
class=
"nav flex-column nav-pills"
id=
"myTab"
role=
"tablist"
aria-orientation=
"vertical"
>
<li
class=
"nav-item"
>
<a
class=
"custom-nav-link {{ ((!empty($index_menu) ? $index_menu : 0) == 0? "
active
"
:
"")
}}"
href=
"{{ route('dashboard') }}"
aria-selected=
"true"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-house-fill"
viewBox=
"0 0 16 16"
>
<path
fill-rule=
"evenodd"
d=
"m8 3.293 6 6V13.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 13.5V9.293l6-6zm5-.793V6l-2-2V2.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5z"
/>
<path
fill-rule=
"evenodd"
d=
"M7.293 1.5a1 1 0 0 1 1.414 0l6.647 6.646a.5.5 0 0 1-.708.708L8 2.207 1.354 8.854a.5.5 0 1 1-.708-.708L7.293 1.5z"
/>
</svg>
Home
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"custom-nav-link {{ ((!empty($index_menu) ? $index_menu : 0) == 1? "
active
"
:
"")
}}"
id=
"pad-tab"
href=
"{{ route('pad_index') }}"
aria-controls=
"pad"
aria-selected=
"false"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-book-half"
viewBox=
"0 0 16 16"
>
<path
d=
"M8.5 2.687c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"
/>
</svg>
PAD
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
id=
"update-perfil-tab"
data-toggle=
"tab"
href=
"#update-perfil"
role=
"tab"
aria-controls=
"update-perfil"
aria-selected=
"true"
>
<a
class=
"custom-nav-link"
id=
"update-perfil-tab"
data-toggle=
"tab"
href=
"#update-perfil"
role=
"tab"
aria-controls=
"update-perfil"
aria-selected=
"true"
>
<!-- Update Perfil - Hidden -->
</a>
</li>
...
...
resources/views/layouts/user-navigation/navigation_
menage
r.blade.php
→
resources/views/layouts/user-navigation/navigation_
directo
r.blade.php
View file @
89a754fa
...
...
@@ -2,7 +2,7 @@
<ul
class=
"nav flex-column nav-pills"
id=
"myTab"
role=
"tablist"
aria-orientation=
"vertical"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
id=
"update-perfil-tab"
data-toggle=
"tab"
href=
"#update-perfil"
role=
"tab"
aria-controls=
"update-perfil"
aria-selected=
"true"
>
<a
class=
"
custom-
nav-link"
id=
"update-perfil-tab"
data-toggle=
"tab"
href=
"#update-perfil"
role=
"tab"
aria-controls=
"update-perfil"
aria-selected=
"true"
>
<!-- Update Perfil - Hidden -->
</a>
</li>
...
...
resources/views/layouts/user-navigation/navigation_teacher.blade.php
View file @
89a754fa
<!-- Botoes link lista vertical sidebarMenu -->
<ul
class=
"nav flex-column nav-pills"
id=
"myTab"
role=
"tablist"
aria-orientation=
"vertical"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link {{ ((!empty($index_menu) ? $index_menu : 0) == 0? "
active
"
:
"")
}}"
href=
"{{ route('dashboard') }}"
<a
class=
"
custom-
nav-link {{ ((!empty($index_menu) ? $index_menu : 0) == 0? "
active
"
:
"")
}}"
href=
"{{ route('dashboard') }}"
aria-selected=
"true"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-house-fill"
viewBox=
"0 0 16 16"
>
...
...
@@ -15,7 +15,7 @@
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link {{ ((!empty($index_menu) ? $index_menu : 0) == 1? "
active
"
:
"")
}}"
id=
"pad-tab"
href=
"{{ route('pad_index') }}"
<a
class=
"
custom-
nav-link {{ ((!empty($index_menu) ? $index_menu : 0) == 1? "
active
"
:
"")
}}"
id=
"pad-tab"
href=
"{{ route('pad_index') }}"
aria-controls=
"pad"
aria-selected=
"false"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-book-half"
viewBox=
"0 0 16 16"
>
...
...
@@ -27,7 +27,7 @@
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
id=
"update-perfil-tab"
data-toggle=
"tab"
href=
"#update-perfil"
role=
"tab"
<a
class=
"
custom-
nav-link"
id=
"update-perfil-tab"
data-toggle=
"tab"
href=
"#update-perfil"
role=
"tab"
aria-controls=
"update-perfil"
aria-selected=
"true"
>
<!-- Update Perfil - Hidden -->
</a>
...
...
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