104 lines
4.1 KiB
PHP
Executable File
104 lines
4.1 KiB
PHP
Executable File
@extends('Templates/templateAdmin')
|
|
|
|
@section('Main-content')
|
|
<section class="content-header">
|
|
<div class="container-fluid">
|
|
<div class="row mb-2">
|
|
<div class="col-sm-6">
|
|
@if($user->type_users == 3)
|
|
<h1 class="text-primary">Detalhes da Empresa</h1>
|
|
@else
|
|
<h1 class="text-primary">Detalhes do Utilizador</h1>
|
|
@endif
|
|
</div>
|
|
<div class="col-sm-6">
|
|
|
|
<ol class="breadcrumb float-sm-right">
|
|
<li class="breadcrumb-item active">Administração</li>
|
|
@if($user->type_users == 3)
|
|
<li class="breadcrumb-item"><a href="{{ route('users.company') }}"> Empresas</a></li>
|
|
<li class="breadcrumb-item active">Detalhes da Empresa</li>
|
|
@else
|
|
<li class="breadcrumb-item"><a href="{{ route('users.list') }}"> Utilizadores</a></li>
|
|
<li class="breadcrumb-item active">Detalhes do Empresa</li>
|
|
@endif
|
|
</ol>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="content">
|
|
<div class="container-fluid">
|
|
<div class="card card-primary">
|
|
<div class="card-header">
|
|
@if ($user->type_users == 3)
|
|
Empresa : {{ $user->user_name }}
|
|
@else
|
|
Utilizador : {{ $user->user_name }}
|
|
@endif
|
|
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered table-striped">
|
|
|
|
<tr>
|
|
<th>Nome</th>
|
|
<td>{{ $user->user_name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Email</th>
|
|
<td>{{ $user->email }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Tipo de utilizador</th>
|
|
<td>{{ $user->userType->type_user }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Telemovel</th>
|
|
<td>{{ $user->user_phone }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>NIF</th>
|
|
<td>{{ $user->user_nif }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Criado em : </th>
|
|
<td>{{ $user->created_at }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Atualizado em : </th>
|
|
<td>{{ $user->updated_at }}</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
<!-- Apenas os Super Admin e Admin devem poder editar perfis -->
|
|
@if (Auth::user()->type_users == 1 || Auth::user()->type_users == 2)
|
|
<!-- Se for um Admin não deve editar -->
|
|
@if ($user->type_users != 1)
|
|
|
|
@if ($user->type_users == 3)
|
|
<a href="{{ route('users.edit', ['id' => $user->user_id]) }}"
|
|
class="btn btn-light float-right">Editar Empresa</a>
|
|
@else
|
|
<a href="{{ route('users.edit', ['id' => $user->user_id]) }}"
|
|
class="btn btn-light float-right">Editar Utilizador</a>
|
|
@endif
|
|
@endif
|
|
@endif
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
{{-- /.container-fluid --}}
|
|
|
|
</section>
|
|
{{-- /.content --}}
|
|
@endsection
|