113 lines
4.2 KiB
PHP
113 lines
4.2 KiB
PHP
@extends('layouts.master')
|
|
@section('page-title')
|
|
Admin | {{ $page_title }}
|
|
@endsection
|
|
@section('page-css')
|
|
<link rel="stylesheet" href="{{ url('public/assets/libs/select2/dist/css/select2.css') }}">
|
|
|
|
@endsection
|
|
@section('page-content')
|
|
@include('admin.partials.create-user')
|
|
@include('admin.partials.edit-user')
|
|
@include('admin.partials.view-user')
|
|
@include('layouts.partials.navbar')
|
|
|
|
|
|
<div class="container py-4">
|
|
<div class="main">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<h3>Users</h3>
|
|
<!-- <a href="" class="float-end">Add User</a> -->
|
|
<div class="float-end pb-2" >
|
|
<!-- <form action="{{ url('admin/search') }}" method="GET">
|
|
<input type="text" name="search" placeholder="Search items..." value="{{ request('search') }}">
|
|
<button type="submit">Search</button>
|
|
</form> -->
|
|
|
|
<button type="button" class="btn btn-warning btn-sm" data-bs-toggle="modal" data-bs-target="#addUserModal">
|
|
<i class="bi bi-plus-circle"></i> Add User</button>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<!-- Search form on the left -->
|
|
<div class="col-md-4">
|
|
<form action="{{ url('admin/home') }}" method="GET">
|
|
<div class="input-group">
|
|
<input type="text" name="search" class="form-control" placeholder="Search..." value="{{ request('search') }}">
|
|
<button class="btn btn-primary btn-sm" type="submit">
|
|
<i class="bi bi-search"></i>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="col-md-4">
|
|
|
|
</div>
|
|
</div>
|
|
<table class="table table-hover table-bordered table-condensed">
|
|
<thead class="">
|
|
<tr class="table-active">
|
|
<th scope="col">Fullname</th>
|
|
<th scope="col">Username</th>
|
|
<th scope="col">Email</th>
|
|
<th scope="col">Phone</th>
|
|
<th scope="col">Position</th>
|
|
<th scope="col">Allowed Apps</th>
|
|
<th scope="col">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if (count($items) < 1): ?>
|
|
<tr>
|
|
<td colspan="7">No users found</td>
|
|
|
|
</tr>
|
|
<?php else: ?>
|
|
<?php foreach ($items as $row): ?>
|
|
<?php $ua_id = $row['ua_id']; ?>
|
|
<tr>
|
|
<td><?php echo $row['full_name'] ?></td>
|
|
<td><?php echo $row['username'] ?></td>
|
|
<td><?php echo $row['email'] ?></td>
|
|
<td><?php echo $row['phone'] ?></td>
|
|
<td><?php echo $row['ua_position'] ?></td>
|
|
<td><?php echo $row['allowed_apps'] ?></td>
|
|
<td>
|
|
@csrf
|
|
<input type="hidden" class="userIdinput" value="<?php echo $row['user_id'] ?>" name="userId">
|
|
|
|
<!-- <a href="" data-bs-toggle="modal" data-bs-target="#viewUserModal" ><img src="{{ url('public/assets/libs/bootstrap-icons/eye.svg') }}" alt="view icon" width="16" height="16"></a> -->
|
|
<a href="" class="editUserBtn" data-bs-toggle="modal" data-bs-target="#editUserModal"><img src="{{ url('public/assets/libs/bootstrap-icons/pencil-square.svg') }}" alt="edit icon" width="16" height="16"></a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach ?>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
<div class="float-end pb-2" >
|
|
Showing {{ $items->currentPage() }} of {{ $items->lastPage() }} pages | {{ $items->total() }} records
|
|
</div>
|
|
<div class="d-flex justify-content-centerw">
|
|
{{ $items->links() }}
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<footer class="py-5">
|
|
<div class="row">
|
|
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
|
|
@endsection
|
|
@section('page-js')
|
|
<script src="{{ url('public/assets/libs/select2/dist/js/select2.full.min.js') }}" type="text/javascript" ></script>
|
|
<script src="{{ url('public/assets/js/usermgt.js') }}" type="text/javascript" ></script>
|
|
|
|
|
|
|
|
@endsection
|