Files
freeu-project/resources/views/Admin/app_resource_action/index.blade.php
Ritikesh yadav c661166e1d first commit
2024-03-28 14:52:40 +05:30

201 lines
9.3 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'> App Resource Action 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-->
</div>
{{-- @can('Permission create') --}}
<a href="{{route('admin.app_resource_action.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>App Resource Name</th>
<th>App Action/Permission 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($appResourceActions as $appResourceAction)
@php($count++)
<tr class="text-center">
<td>{{ $count }}</td>
<td>{{$appResourceAction->resource->name }}</td>
<td>{{$appResourceAction->permission->name }}</td>
<td>
<a href="{{route('admin.app_resource_action.edit',$appResourceAction->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.app_resource_action.destroy',$appResourceAction->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();
}, 3000);
@elseif(Session::has('message'))
toastr.success('{{ Session::get('
message ') }}');
{
{
Session::forget('message')
}
}
setTimeout(function() {
location.reload();
}, 3000);
// 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