Commit ec98ed8d authored by Abraão Barbosa's avatar Abraão Barbosa
Browse files

Save to merge

parent a95e9172
...@@ -46,14 +46,14 @@ class DiretorController extends Controller ...@@ -46,14 +46,14 @@ class DiretorController extends Controller
{ {
$model = new User(); $model = new User();
$validator = User::validator($request->all()); $validator = User::validator($request->all());
$validator->type = User::TYPE_MANAGER; $validator->type = User::TYPE_DIRECTOR;
if ($validator->fails()) { if ($validator->fails()) {
return redirect()->back()->withErrors($validator->errors())->withInput(); return redirect()->back()->withErrors($validator->errors())->withInput();
} }
$model->fill($request->all()); $model->fill($request->all());
$model->type = User::TYPE_MANAGER; $model->type = User::TYPE_DIRECTOR;
$model->password = Hash::make($model->password); $model->password = Hash::make($model->password);
$model->save(); $model->save();
......
...@@ -48,9 +48,9 @@ ...@@ -48,9 +48,9 @@
'route' => route('campus_index'), 'route' => route('campus_index'),
]) ])
@include('components.buttons.btn-save', [ @include('components.buttons.btn-save', [
'content' => 'Cadastrar' 'content' => 'Cadastrar',
'btn_class' => 'btn btn-outline-success' 'btn_class' => 'btn btn-outline-success',
'i_class' => '' 'i_class' => '',
]) ])
</div> </div>
</form> </form>
......
...@@ -47,9 +47,9 @@ ...@@ -47,9 +47,9 @@
'route' => route('campus_index'), 'route' => route('campus_index'),
]) ])
@include('components.buttons.btn-save', [ @include('components.buttons.btn-save', [
'content' => 'Cadastrar' 'content' => 'Atualizar',
'btn_class' => 'btn btn-outline-success' 'btn_class' => 'btn btn-outline-success',
'i_class' => '' 'i_class' => '',
]) ])
</div> </div>
</form> </form>
......
...@@ -47,9 +47,9 @@ ...@@ -47,9 +47,9 @@
'route' => route('curso_index'), 'route' => route('curso_index'),
]) ])
@include('components.buttons.btn-save', [ @include('components.buttons.btn-save', [
'content' => 'Cadastrar' 'content' => 'Cadastrar',
'btn_class' => 'btn btn-outline-success' 'btn_class' => 'btn btn-outline-success',
'i_class' => '' 'i_class' => '',
]) ])
</div> </div>
</form> </form>
......
...@@ -40,7 +40,11 @@ ...@@ -40,7 +40,11 @@
@include('components.buttons.btn-cancel', [ @include('components.buttons.btn-cancel', [
'route' => route('curso_index'), 'route' => route('curso_index'),
]) ])
@include('components.buttons.btn-save') @include('components.buttons.btn-save', [
'content' => 'Atualizar',
'btn_class' => 'btn btn-outline-success',
'i_class' => '',
])
</div> </div>
</form> </form>
</div> </div>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
@include('components.alerts') @include('components.alerts')
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> <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"> Atualizar Perfil </h1> <h1 class="h2"> Cadastrar novo diretor</h1>
</div> </div>
<div class="content"> <div class="content">
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
@section('body') @section('body')
@include('components.alerts') @include('components.alerts')
{{ dd($user) }}
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> <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"> Atualizar Perfil </h1> <h1 class="h2"> Atualizar Perfil </h1>
</div> </div>
...@@ -60,8 +60,10 @@ ...@@ -60,8 +60,10 @@
<select class="custom-select mr-sm-2" name="unidade_id" id="selectUnidade" <select class="custom-select mr-sm-2" name="unidade_id" id="selectUnidade"
aria-label="Default select example"> aria-label="Default select example">
<option value="" disabled selected hidden> selecione... </option> <option value="" disabled selected hidden> selecione... </option>
@foreach ($unidades as $unidade) @foreach ($unidades as $unidade)
<option value="{{ $unidade->id }}" {{ $user->unidade_id == $unidade->id ? 'selected' : '' }}>{{ $unidade->name }}</option>
<option value="{{ $unidade->id }}" {{ $user->unidade_id == $unidade->id ? 'selected' : '' }}> {{ $user->unidade_id }} - {{ $unidade->id }}</option>
@endforeach @endforeach
</select> </select>
@error('unidade_id') @error('unidade_id')
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<path <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" /> 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> </svg>
Atividades a serem realizdas Atividades a serem realizadas
</h2> </h2>
</div> </div>
<div <div
...@@ -20,125 +20,4 @@ ...@@ -20,125 +20,4 @@
<li><a href="" rel="noopener" target="_blank">Informações sobre o processo PAD 2022</a></li> <li><a href="" rel="noopener" target="_blank">Informações sobre o processo PAD 2022</a></li>
</ul> </ul>
</div> </div>
</div>
<div class="tab-pane" id="campus" role="tabpanel" aria-labelledby="campus-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">Gestão de Campus</h1>
</div>
<a class="btn btn-secondary btn-lg" onclick="redirecionamentoCadastroCampos()" data-toggle="tooltip"
data-placement="bottom" title="Click para Cadastrar Novo Campus">
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" fill="currentColor"
class="bi bi-plus-circle" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" />
<path
d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z" />
</svg>
Cadastrar Novo Campus
</a>
<a class="btn btn-secondary btn-lg" onclick="redirecionamentoListaCampos()" data-toggle="tooltip"
data-placement="bottom" title="Click para Listar Campus">
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" fill="currentColor"
class="bi bi-list-task" viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M2 2.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5H2zM3 3H2v1h1V3z" />
<path
d="M5 3.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zM5.5 7a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1h-9zm0 4a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1h-9z" />
<path fill-rule="evenodd"
d="M1.5 7a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5V7zM2 7h1v1H2V7zm0 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5H2zm1 .5H2v1h1v-1z" />
</svg>
Listar Campus
</a>
@include('components.tables.table', ['id' => 'list_campus', 'css' => 'table'])
</div>
<div class="tab-pane" id="cursos" role="tabpanel" aria-labelledby="cursos-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">Gestão de Cursos</h1>
</div>
<a class="btn btn-secondary btn-lg" onclick="redirecionamentoCadastroCurso()" data-toggle="tooltip"
data-placement="bottom" title="Click para Cadastrar Novo Curso">
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" fill="currentColor"
class="bi bi-plus-circle" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" />
<path
d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z" />
</svg>
Cadastrar Novo Curso
</a>
<a class="btn btn-secondary btn-lg" onclick="redirecionamentoListaCurso()" data-toggle="tooltip"
data-placement="bottom" title="Click para Listar Cursos">
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" fill="currentColor"
class="bi bi-list-task" viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M2 2.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5H2zM3 3H2v1h1V3z" />
<path
d="M5 3.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zM5.5 7a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1h-9zm0 4a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1h-9z" />
<path fill-rule="evenodd"
d="M1.5 7a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5V7zM2 7h1v1H2V7zm0 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5H2zm1 .5H2v1h1v-1z" />
</svg>
Listar Cursos
</a>
</div>
<div class="tab-pane" id="unidade" role="tabpanel" aria-labelledby="unidade-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">Gestão de Unidades</h1>
</div>
@include('components.buttons.btn-create', ['route' => route('unidade_create'), 'id' => 'btn-create-unidade', 'class' => 'btn btn-primary', 'content' => 'Cadastrar Nova Unidade'])
@section('form-unidade-create')
@show
</div>
<div class="tab-pane" id="diretoria" role="tabpanel" aria-labelledby="diretoria-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">Gestão de Diretoria</h1>
</div>
<a class="btn btn-secondary btn-lg" onclick="redirecionamentoCadastroCoordenador()"
data-toggle="tooltip" data-placement="bottom" title="Click para Cadastrar Novo Coordenador">
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" fill="currentColor"
class="bi bi-person-plus-fill" viewBox="0 0 16 16">
<path d="M1 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" />
<path fill-rule="evenodd"
d="M13.5 5a.5.5 0 0 1 .5.5V7h1.5a.5.5 0 0 1 0 1H14v1.5a.5.5 0 0 1-1 0V8h-1.5a.5.5 0 0 1 0-1H13V5.5a.5.5 0 0 1 .5-.5z" />
</svg>
Cadastrar Novo Diretor
</a>
<a class="btn btn-secondary btn-lg" onclick="redirecionamentoListaCoordenador()" data-toggle="tooltip"
data-placement="bottom" title="Click para Listar Coordenador">
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" fill="currentColor"
class="bi bi-person-lines-fill" viewBox="0 0 16 16">
<path
d="M6 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-5 6s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zM11 3.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm.5 2.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4zm2 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2zm0 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2z" />
</svg>
Listar Diretores
</a>
</div>
<div class="tab-pane" id="coordenador" role="tabpanel" aria-labelledby="coordenador-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">Gestão de Coordenador</h1>
</div>
<a class="btn btn-secondary btn-lg" onclick="redirecionamentoCadastroCoordenador()"
data-toggle="tooltip" data-placement="bottom" title="Click para Cadastrar Novo Coordenador">
<i class="bi bi-xbox"></i>
Cadastrar Novo Coordenador
</a>
<a class="btn btn-secondary btn-lg" onclick="redirecionamentoListaCoordenador()" data-toggle="tooltip"
data-placement="bottom" title="Click para Listar Coordenador">
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" fill="currentColor"
class="bi bi-person-lines-fill" viewBox="0 0 16 16">
<path
d="M6 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-5 6s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zM11 3.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm.5 2.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4zm2 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2zm0 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2z" />
</svg>
Listar Coordenador
</a>
</div> </div>
\ No newline at end of file
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
'route' => route('unidade_index'), 'route' => route('unidade_index'),
]) ])
@include('components.buttons.btn-save', [ @include('components.buttons.btn-save', [
'content' => 'Cadastrar' 'content' => 'Cadastrar',
'btn_class' => 'btn btn-outline-success' 'btn_class' => 'btn btn-outline-success',
'i_class' => '' 'i_class' => '',
]) ])
</div> </div>
</form> </form>
......
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
'route' => route('unidade_index'), 'route' => route('unidade_index'),
]) ])
@include('components.buttons.btn-save', [ @include('components.buttons.btn-save', [
'content' => 'Cadastrar' 'content' => 'Atualizar',
'btn_class' => 'btn btn-outline-success' 'btn_class' => 'btn btn-outline-success',
'i_class' => '' 'i_class' => '',
]) ])
</div> </div>
</form> </form>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment