131 lines
6.6 KiB
PHP
Executable file
131 lines
6.6 KiB
PHP
Executable file
@extends('Layouts.layout')
|
|
@section('Title', 'Employees')
|
|
@section('css')
|
|
|
|
<link href="{{ asset('/css/employees.css') }}" rel="stylesheet">
|
|
<link href="{{ asset('/css/admin-employees.css') }}" rel="stylesheet">
|
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.3/dist/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
|
@stop
|
|
@section('Content')
|
|
|
|
<body>
|
|
<div id="loadOverlay" style="background-color:#ffffff; position:absolute; top:0px; left:0px; width:100%; min-height:1500vh; z-index:2000;"></div>
|
|
|
|
<div id="loading"></div>
|
|
<div class="d-flex justify-content-center">
|
|
<div class="spinner-border" id="spinner" role="status">
|
|
</div>
|
|
</div>
|
|
|
|
@include('Components.sidenav', ['state' => 'Admin'])
|
|
<div class="main">
|
|
|
|
<div class="header">
|
|
<p id="title">Employees</p>
|
|
<p id="logged-user"><svg id="user"width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.16 10.87C12.06 10.86 11.94 10.86 11.83 10.87C9.45 10.79 7.56 8.84 7.56 6.44C7.56 3.99 9.54 2 12 2C14.45 2 16.44 3.99 16.44 6.44C16.43 8.84 14.54 10.79 12.16 10.87Z" stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M7.15997 14.56C4.73997 16.18 4.73997 18.82 7.15997 20.43C9.90997 22.27 14.42 22.27 17.17 20.43C19.59 18.81 19.59 16.17 17.17 14.56C14.43 12.73 9.91997 12.73 7.15997 14.56Z" stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
{{$data['curr_user']}}</p>
|
|
</div>
|
|
|
|
<div class="action-bar">
|
|
<form method="POST" action={{ action('App\Http\Controllers\AdminController@search') }} enctype="multipart/form-data">
|
|
@csrf
|
|
@method('post')
|
|
|
|
<div class="input-group">
|
|
<input type="text" class="form-control" id="search" name="search" placeholder="Search..."/>
|
|
<div class="input-group-append">
|
|
<button class="btn btn-secondary" type="submit" style="background: #23A6F0; border-radius: 0px 5px 5px 0px;"><svg id="search-icon" xmlns="http://www.w3.org/2000/svg" width="17.49" height="17.49" fill="rgba(255, 255, 255)" class="bi bi-search" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg></button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
|
|
<div class="dropdown">
|
|
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
Sort by
|
|
</a>
|
|
|
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
|
|
|
|
<form method="POST" action={{ route('sort', ['sortBy' => 'name']) }} enctype="multipart/form-data">
|
|
@csrf
|
|
@method('post')
|
|
<input type="hidden" class="form-control" id="data" name="data" value="{{ json_encode($data['users'],TRUE)}}"/>
|
|
<button class="dropdown-item" type="submit">Name</a></button>
|
|
</form>
|
|
|
|
<form method="POST" action={{ route('sort', ['sortBy' => 'position']) }} enctype="multipart/form-data">
|
|
@csrf
|
|
@method('post')
|
|
<input type="hidden" class="form-control" id="data" name="data" value="{{ json_encode($data['users'],TRUE)}}"/>
|
|
<button class="dropdown-item" type="submit">Position</a></button>
|
|
</form>
|
|
|
|
<form method="POST" action={{ route('sort', ['sortBy' => 'department']) }} enctype="multipart/form-data">
|
|
@csrf
|
|
@method('post')
|
|
<input type="hidden" class="form-control" id="data" name="data" value="{{ json_encode($data['users'],TRUE)}}"/>
|
|
<button class="dropdown-item" type="submit">Department</a></button>
|
|
</form>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<button class="btn btn-primary"><a class="btn-link" href=" {{route('import')}}" onclick="spinner()">Import Users</a></button>
|
|
|
|
{{-- <form method="POST" action={{ action('App\Http\Controllers\AdminController@export') }} enctype="multipart/form-data">
|
|
@csrf
|
|
@method('post')
|
|
|
|
|
|
|
|
<input type="hidden" class="form-control" id="data" name="data" value="{{ json_encode($data['users'],TRUE)}}"/>
|
|
|
|
<button class="btn btn-primary" type="submit">Export Data</a></button>
|
|
</form> --}}
|
|
|
|
|
|
</div>
|
|
|
|
<div class="table-container">
|
|
<table>
|
|
<tr>
|
|
<th>Full Name</th>
|
|
<th>Email</th>
|
|
<th>Extension</th>
|
|
<th>Position</th>
|
|
<th>Department</th>
|
|
</tr>
|
|
|
|
@foreach ($data['users'] as $user)
|
|
|
|
<tr>
|
|
<td>{{$user->name}}</td>
|
|
<td><a href="mailto:{{$user->email}}">{{$user->email}}</a></td>
|
|
<td>{{$user->ext}}</td>
|
|
<td>{{$user->position}}</td>
|
|
<td>{{$user->department}}</td>
|
|
</tr>
|
|
@endforeach
|
|
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
function spinner() {
|
|
let spinnner = document.getElementById("spinner").style.display="block";
|
|
let backdrop = document.getElementById("loading").style.display="block";
|
|
document.body.style.overflow="hidden";
|
|
}
|
|
</script>
|
|
</body>
|
|
@stop
|
|
|
|
|