216 lines
11 KiB
PHP
216 lines
11 KiB
PHP
@extends('Admin.layouts.master')
|
|
@section('content')
|
|
<!-- <style>
|
|
.dataTable td button {
|
|
padding: 5px 10px;
|
|
border-radius: 15px;
|
|
background: #fff !important;
|
|
border: 0;
|
|
color: #fff;
|
|
font-size: 12px;
|
|
}
|
|
</style>
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.0.1/css/toastr.css" rel="stylesheet" />
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> -->
|
|
<!--begin::Body-->
|
|
|
|
<!-- <body data-kt-name="metronic" id="kt_app_body" data-kt-app-layout="dark-sidebar" data-kt-app-header-fixed="true" data-kt-app-sidebar-enabled="true" data-kt-app-sidebar-fixed="true" data-kt-app-sidebar-hoverable="false" data-kt-app-sidebar-push-header="true" data-kt-app-sidebar-push-toolbar="true" data-kt-app-sidebar-push-footer="true" data-kt-app-toolbar-enabled="true" class="app-default"> -->
|
|
<!--begin::Theme mode setup on page load-->
|
|
<!--end::Theme mode setup on page load-->
|
|
<!--begin::App-->
|
|
<!-- <div class="d-flex flex-column flex-root app-root" id="kt_app_root"> -->
|
|
|
|
<!--begin::Page-->
|
|
<!-- <div class="app-page flex-column flex-column-fluid" id="kt_app_page"> -->
|
|
<!--begin::Header-->
|
|
|
|
<!--end::Header-->
|
|
<!--begin::Wrapper-->
|
|
<!-- <div class="app-wrapper flex-column flex-row-fluid" id="kt_app_wrapper"> -->
|
|
<!--begin::sidebar-->
|
|
|
|
<!--end::sidebar-->
|
|
<!--begin::Main-->
|
|
<div class="app-main flex-column flex-row-fluid" id="kt_app_main">
|
|
<!--begin::Content wrapper-->
|
|
<div class="d-flex flex-column flex-column-fluid">
|
|
<div id="kt_app_content_container" class="app-container container-xxl">
|
|
<div class="row max-w-100 mt-10 index_table">
|
|
<div class="top_header d-flex justify-content-between align-items-center">
|
|
<p class='fs-2 m-0 fw-bold'> Principal Role Link </p>
|
|
|
|
<div class="table_right_options d-flex">
|
|
<div class="d-flex align-items-center position-relative">
|
|
<!--begin::Svg Icon | path: icons/duotune/general/gen021.svg-->
|
|
{{-- <span class="svg-icon svg-icon-1 position-absolute ms-6">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
xmlns="http://www.w3.org/2000/svg">
|
|
<rect opacity="0.5" x="17.0365" y="15.1223" width="8.15546"
|
|
height="2" rx="1" transform="rotate(45 17.0365 15.1223)"
|
|
fill="currentColor" />
|
|
<path
|
|
d="M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z"
|
|
fill="currentColor" />
|
|
</svg>
|
|
</span> --}}
|
|
<!--end::Svg Icon-->
|
|
{{-- <input type="text" data-kt-user-table-filter="search"
|
|
class="form-control bg-white form-control-solid w-250px ps-14"
|
|
placeholder="Search user" />
|
|
--}}
|
|
</div>
|
|
|
|
{{-- @can('Permission create') --}}
|
|
|
|
<a href="{{route('admin.principal_role_link.create')}}" class="pointer">
|
|
<button type="button" class="btn btn-light-primary me-3" data-kt-menu-trigger="click" data-kt-menu-attach="parent" data-kt-menu-placement="bottom-start">
|
|
<!--begin::Svg Icon | path: icons/duotune/arrows/arr075.svg-->
|
|
|
|
<i class="fas fa-plus"></i> Add
|
|
</button>
|
|
</a>
|
|
{{-- @endcan --}}
|
|
</div>
|
|
</div>
|
|
{{-- @if(session('message'))
|
|
<div class="alert alert-success">
|
|
{{ session('message') }}
|
|
</div>
|
|
@endif --}}
|
|
<div class="dataTable_area my-5 mb-0">
|
|
<!--begin::Card-->
|
|
<div class="card">
|
|
<div class="card-header border-0 pt-0 h-0">
|
|
<!--begin::Card toolbar-->
|
|
|
|
<!--end::Card toolbar-->
|
|
</div>
|
|
<!--begin::Card body-->
|
|
<div class="card-body py-4 pt-0">
|
|
<!--begin::Table-->
|
|
<table class="table align-middle table-row-dashed fs-6 gy-5" id="faq-table">
|
|
<!--begin::Table head-->
|
|
<thead>
|
|
<!--begin::Table row-->
|
|
<tr class="text-center text-muted fw-bold fs-7 text-uppercase gs-0">
|
|
|
|
<th>SrNo.</th>
|
|
<th>Principal Name</th>
|
|
<th>Principal Role Name</th>
|
|
|
|
|
|
<th>Action</th>
|
|
</tr>
|
|
<!--end::Table row-->
|
|
</thead>
|
|
<!--end::Table head-->
|
|
<!--begin::Table body-->
|
|
<tbody class="text-gray-600 fw-semibold">
|
|
<!--begin::Table row-->
|
|
@php($count=0)
|
|
|
|
|
|
@forelse($principalRoleLinks as $principalRoleLink)
|
|
@php($count++)
|
|
<tr class="text-center">
|
|
|
|
<td>{{ $count }}</td>
|
|
<td>{{$principalRoleLink->users->name }}</td>
|
|
|
|
<td>{{$principalRoleLink->roles->name }}</td>
|
|
<td>
|
|
|
|
<a href="{{route('admin.principal_role_link.edit',$principalRoleLink->id)}}" class="text-grey-lighter font-bold py-1 px-3 rounded text-xs bg-green hover:bg-green-dark text-blue-400">
|
|
<i class="fa fa-edit"></i></a>
|
|
|
|
|
|
<form action="{{route('admin.principal_role_link.destroy',$principalRoleLink->id)}}" method="POST" style="display: inline" onsubmit="return confirm('Are you sure?');">
|
|
<input type="hidden" name="_method" value="DELETE">
|
|
{{ csrf_field() }}
|
|
<button class="btn btn-sm" style="color:black"><i class="fa fa-trash"></i> </button>
|
|
</form>
|
|
</td>
|
|
|
|
</tr>
|
|
@empty
|
|
<tr align="center">
|
|
<td colspan="6">No entries found.</td>
|
|
</tr>
|
|
@endforelse
|
|
|
|
|
|
|
|
<!--end::Table row-->
|
|
</tbody>
|
|
<!--end::Table body-->
|
|
</table>
|
|
<!--end::Table-->
|
|
</div>
|
|
<!--end::Card body-->
|
|
</div>
|
|
<!--end::Card-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<!--end::Content wrapper-->
|
|
|
|
</div>
|
|
<!--end:::Main-->
|
|
<!-- </div> -->
|
|
<!--end::Wrapper-->
|
|
<!-- </div> -->
|
|
<!--end::Page-->
|
|
<!-- </div> -->
|
|
<!--end::App-->
|
|
|
|
|
|
<!-- </body> -->
|
|
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.0.1/js/toastr.js"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
toastr.options.timeOut = 3000;
|
|
@if(Session::has('error'))
|
|
toastr.error('{{ Session::get('
|
|
error ') }}');
|
|
{
|
|
{
|
|
Session::forget('error')
|
|
}
|
|
} // Clear the 'error' session
|
|
setTimeout(function() {
|
|
location.reload();
|
|
}, 1000);
|
|
@elseif(Session::has('message'))
|
|
toastr.success('{{ Session::get('
|
|
message ') }}');
|
|
{
|
|
{
|
|
Session::forget('message')
|
|
}
|
|
}
|
|
setTimeout(function() {
|
|
location.reload();
|
|
}, 1000);
|
|
// window.location.reload();// Clear the 'message' session data
|
|
@endif
|
|
});
|
|
</script>
|
|
|
|
|
|
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
|
|
|
|
|
<script src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js" defer></script>
|
|
|
|
<script src="https://cdn.datatables.net/1.10.24/js/dataTables.bootstrap4.min.js" defer></script> -->
|
|
@endsection
|
|
@section('scripts')
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#faq-table').DataTable();
|
|
});
|
|
</script>
|
|
@endsection |