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

atualização da pagina de edição de diretor

parent c91c35f5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Unidade; use App\Models\Campus;
use App\Models\User; use App\Models\User;
use App\Models\Util\MenuItemsAdmin; use App\Models\Util\MenuItemsAdmin;
use Illuminate\Http\Request; use Illuminate\Http\Request;
...@@ -82,7 +82,7 @@ class DiretorController extends Controller ...@@ -82,7 +82,7 @@ class DiretorController extends Controller
$user = User::findOrFail($id); $user = User::findOrFail($id);
return view('diretor.update', [ return view('diretor.update', [
'index_menu' => MenuItemsAdmin::DIRETORES, 'index_menu' => MenuItemsAdmin::DIRETORES,
'unidades' => Unidade::all(), 'campus' => Campus::all(),
'user' => $user, 'user' => $user,
]); ]);
} }
......
:root{ :root {
--main-bg-color: pink; --main-bg-color: #dfdfdf;
--main-bg-light-color: #f7f7f7;
--main-border-grey-color: #dee2e6;
--main-default-link-color: #2e4363;
--main-success-color: #0d6efd;
--main-danger-color: #c43c3c;
--main-warning-color: #dacc53;
} }
*{ * {
font-family: "Electrolize", sans-serif; font-family: "Electrolize", sans-serif;
} }
...@@ -13,82 +19,110 @@ ...@@ -13,82 +19,110 @@
width: 100%; width: 100%;
padding: 18px 6% 10px 6%; padding: 18px 6% 10px 6%;
margin: 0 0 30px 0; margin: 0 0 30px 0;
border-bottom: 1px solid #dee2e6 !important; border-bottom: 1px solid var(--main-border-grey-color) !important;
} }
body{
body {
position: relative; position: relative;
} }
/*Main header - top*/
header { header {
background-color: #dfdfdf; background-color: var(--main-bg-color);
margin-bottom: 30px; margin-bottom: 30px;
-webkit-box-shadow: 0px 1px 6px 0px rgba(50, 50, 50, 0.5); -webkit-box-shadow: 0px 1px 6px 0px rgba(50, 50, 50, 0.5);
-moz-box-shadow: 0px 1px 6px 0px rgba(50, 50, 50, 0.5); -moz-box-shadow: 0px 1px 6px 0px rgba(50, 50, 50, 0.5);
box-shadow: 0px 1px 6px 0px rgba(50, 50, 50, 0.5); box-shadow: 0px 1px 6px 0px rgba(50, 50, 50, 0.5);
position: sticky!important; position: sticky !important;
} }
header .header-left-side { header .header-left-side {
background-color: #f7f7f7; background-color: var(--main-bg-light-color);
padding: 1em 3em 1em 15vh; padding: 1em 3em 1em 15vh;
background: linear-gradient(110deg, #f7f7f7 90%, #dfdfdf 0%); background: linear-gradient(110deg, var(--main-bg-light-color) 90%, var(--main-bg-color) 0%);
} }
header .header-right-side { header .header-right-side {
padding-right: 15vh; padding-right: 15vh;
} }
/***************************/
/* Nav bar and content main*/
.main-container { .main-container {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
/**************/
/*content main*/
main { main {
min-height: 70vh; min-height: 70vh;
margin-right: 15vh!important; margin-right: 15vh !important;
/* max-height: 70vh; */
} }
/****************/
/* Left nav bar */
nav { nav {
margin-left: 13vh; margin-left: 13vh;
margin-right: 1em; margin-right: 1em;
border-radius: 0.5em; border-radius: 0.5em;
border: 2px solid #dee2e6 !important; border: 2px solid var(--main-border-grey-color) !important;
padding: .5em; padding: .5em;
} }
nav ul li a { nav ul li a {
color: #17223b; color: var(--main-default-link-color);
font-size: large; font-size: large;
} }
nav ul .active { nav ul .active {
background-color: #dfdfdf !important; background-color: var(--main-bg-color) !important;
color: #17223b !important; color: var(--main-default-link-color) !important;
font-weight: bold; font-weight: bold;
border-left: solid 3px #0d6efd; border-left: solid 3px var(--main-success-color);
/* border: 1px solid #007bff; */
} }
nav .content-user-info { nav .content-user-info {
font-weight: bold; font-weight: bold;
} }
nav .custom-nav-link{ nav .custom-nav-link {
display: block; display: block;
padding: .5rem 1rem; padding: .5rem 1rem;
color: #2e4363; color: var(--main-default-link-color);
text-decoration: none; text-decoration: none;
border-radius: .2em; border-radius: .2em;
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out; transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
} }
nav .custom-nav-link:hover{ nav .custom-nav-link:hover {
color: #0d6efd; color: var(--main-success-color);
} }
/*
.custom-btn-create:hover {
background-color: #f1f1f1 !important;
color: var(--main-success-color) !important;
border-bottom: solid 3px var(--main-success-color);
}*/
/*************************/
@media (min-width: 768px) { @media (min-width: 768px) {
.bd-placeholder-img-lg { .bd-placeholder-img-lg {
font-size: 3.5rem; font-size: 3.5rem;
} }
} }
\ No newline at end of file
<a class="btn {{$class}}" href="{{$route}}" id="{{$id}}"> <a class="btn btn-outline-success {{$class}}" href="{{$route}}" id="{{$id}}">
<i class="bi bi-plus-circle"></i> <i class="bi bi-plus-circle"></i>
{{$content}} {{$content}}
</a> </a>
@extends('layouts.main') @extends('layouts.main')
@section('title', 'Atulizar Perfil') @section('title', 'Atualizar Perfil')
@section('header') @section('header')
@include('layouts.header', [ @include('layouts.header', [
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
@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>
<div class="content"> <div class="content">
<form class="" method="post" action="{{ route('diretor_update', $user->id ) }}"> <form class="" method="post" action="{{ route('diretor_update', $user->id) }}">
@csrf @csrf
@method('POST') @method('POST')
...@@ -57,13 +57,13 @@ ...@@ -57,13 +57,13 @@
<div class="form-group"> <div class="form-group">
<label for="selectUnidade">Unidade</label> <label for="selectUnidade">Unidade</label>
<select class="custom-select mr-sm-2" name="unidade_id" id="selectUnidade" <select class="form-select form-select" name="campus_id" id="selectCampus"
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 ($campus as $camp)
<option value="{{ $camp->id }}" {{ $user->campus_id == $camp->id ? 'selected' : '' }}>
<option value="{{ $unidade->id }}" {{ $user->unidade_id == $unidade->id ? 'selected' : '' }}> {{ $user->unidade_id }} - {{ $unidade->id }}</option> {{ $camp->name }}</option>
@endforeach @endforeach
</select> </select>
@error('unidade_id') @error('unidade_id')
...@@ -71,21 +71,29 @@ ...@@ -71,21 +71,29 @@
@enderror @enderror
</div> </div>
{{-- <div class="row"> <div class="form-check mt-3">
<div class="col-6"> <input class="form-check-input" type="checkbox" value="" name="alter-password" id="alter-password">
<div class="form-group"> <label class="form-check-label" for="flexCheckDefault">
<label for="password"> Senha </label> Alterar senha
<input type="password" class="form-control" name="password" id="password" placeholder="Senha" value=""> </label>
<small id="password_information" class="form-text text-muted"> {{-- --}} </small> </div>
@error('password')
<span class="text-danger"> {{ $message }} </span> <div class="col-6">
@enderror <div class="form-group">
</div> <label for="password"> Senha </label>
<input type="password" class="form-control" name="password" id="password" placeholder="Senha"
value="" disabled>
<small id="password_information" class="form-text text-muted"> {{-- --}} </small>
@error('password')
<span class="text-danger"> {{ $message }} </span>
@enderror
</div> </div>
</div> --}} </div>
<div class="d-flex justify-content-end"> <div class="form-group">
<button class="btn btn-success" type="submit"> Atualizar </button> <div class="d-flex justify-content-end mt-3">
<button class="btn btn-success" type="submit"> Atualizar </button>
</div>
</div> </div>
</form> </form>
</div> </div>
......
...@@ -68,6 +68,14 @@ $("#btn-update-perfil").on('click', () => { ...@@ -68,6 +68,14 @@ $("#btn-update-perfil").on('click', () => {
$("#update-perfil-tab").click() $("#update-perfil-tab").click()
}) })
// Update director and coordinators profile from admin page
$('#alter-password').on('change', function() {
if($('#alter-password').is(':checked') ){
$("#password").removeAttr('disabled');
}else{
$("#password").attr('disabled','disabled');
}
});
// $('#') // $('#')
</script> </script>
......
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