stateStatus
This commit is contained in:
@@ -39,7 +39,9 @@ class LoginController extends Controller
|
||||
'password' => 'required|string',
|
||||
]);
|
||||
|
||||
$user = IamPrincipal::where('email_address', $validatedData['email'])->first();
|
||||
$user = IamPrincipal::where('email_address', $validatedData['email'])
|
||||
->whereIn('principal_type_xid', [1, 2])
|
||||
->first();
|
||||
|
||||
if ($user) {
|
||||
if (Hash::check($validatedData['password'], $user->password)) {
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class CheckStatus
|
||||
@@ -17,7 +18,8 @@ class CheckStatus
|
||||
{
|
||||
|
||||
$admin = auth()->guard('admin')->user();
|
||||
if ($admin && $admin->is_active == 1) {
|
||||
Log::info($admin);
|
||||
if ($admin && $admin->is_active == 1 && ($admin->principal_type_xid == 1 || $admin->principal_type_xid == 2)) {
|
||||
return $next($request);
|
||||
} else {
|
||||
return redirect('/')->with('error_msg', 'You must be logged in..');
|
||||
|
||||
@@ -108,14 +108,11 @@
|
||||
</div>
|
||||
<i class="fa fa-angle-down mr-3" aria-hidden="true"></i>
|
||||
</button>
|
||||
|
||||
<div class="dropdown-container">
|
||||
<div class="dropdown-container"
|
||||
style="{{ $currentPage == 'manage-customer' || $currentPage == 'manage-restaurant_app' || $currentPage == 'sub-admins' ? 'display: block;' : 'display: none;' }}">
|
||||
<ul>
|
||||
<li class="tooltip-element <?php
|
||||
if ($currentPage == 'manage-patient') {
|
||||
echo 'active';
|
||||
}
|
||||
?>" data-tooltip="1">
|
||||
<li class="tooltip-element {{ $currentPage == 'manage-customer' ? 'active' : '' }}"
|
||||
data-tooltip="1">
|
||||
<a href="{{ route('manage.customer') }}" data-active="1">
|
||||
<div class="icons">
|
||||
<img src="{{ asset('public/assets/img/single-user.svg') }}" />
|
||||
@@ -124,11 +121,8 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="tooltip-element <?php
|
||||
if ($currentPage == 'manage-restaurant_app') {
|
||||
echo 'active';
|
||||
}
|
||||
?>" data-tooltip="1">
|
||||
<li class="tooltip-element {{ $currentPage == 'manage-restaurant_app' ? 'active' : '' }}"
|
||||
data-tooltip="1">
|
||||
<a href="{{ route('restraunt_users') }}" data-active="1">
|
||||
<div class="icons">
|
||||
<img src="{{ asset('public/assets/img/restraunt.svg') }}" />
|
||||
@@ -137,19 +131,15 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="tooltip-element <?php
|
||||
if ($currentPage == 'sub-admins') {
|
||||
echo 'active';
|
||||
}
|
||||
?>" data-tooltip="1">
|
||||
<li class="tooltip-element {{ $currentPage == 'sub-admins' ? 'active' : '' }}"
|
||||
data-tooltip="1">
|
||||
<a href="{{ route('manage.subAdmin') }}" data-active="1">
|
||||
<div class="icons">
|
||||
<img src="{{ asset('public/assets/img/Group 57906.svg') }}">
|
||||
<span class=" text">Sub Admins</span>
|
||||
<span class="text">Sub Admins</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@@ -195,7 +185,7 @@
|
||||
</a>
|
||||
</li> --}}
|
||||
@endif
|
||||
@if (Auth::guard('admin')->user()->getPermissionGranted(Auth::guard('admin')->user()->id, 'manage-contact-us'))
|
||||
@if (Auth::guard('admin')->user()->getPermissionGranted(Auth::guard('admin')->user()->id, 'manage-contact-us'))
|
||||
<li class="tooltip-element <?php
|
||||
if ($currentPage == 'manage-contact-us') {
|
||||
echo 'active';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$currentPage = 'manage-patient';
|
||||
$currentPage = 'manage-customer';
|
||||
@endphp
|
||||
|
||||
<div class="layout-px-spacing">
|
||||
@@ -17,7 +17,7 @@
|
||||
<h6 class="card-title p-0">Archive Manage Customers</h6>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
|
||||
@@ -52,7 +52,7 @@
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$currentPage = 'manage-patient';
|
||||
$currentPage = 'manage-customer';
|
||||
@endphp
|
||||
<style>
|
||||
/* CSS for action icons */
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$currentPage = 'manage-customer-restaurant';
|
||||
$currentPage = 'manage-customer';
|
||||
|
||||
$requestValue = request('id');
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$currentPage = 'manage-patient';
|
||||
$currentPage = 'manage-customer';
|
||||
@endphp
|
||||
<style>
|
||||
.error-message {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$currentPage = 'manage-patient';
|
||||
$currentPage = 'manage-customer';
|
||||
@endphp
|
||||
<div class="layout-px-spacing">
|
||||
<div class="middle-content container-xxl p-0">
|
||||
@@ -118,4 +118,4 @@ $currentPage = 'manage-patient';
|
||||
|
||||
@section('section_script')
|
||||
<script src="{{ asset('assets/js/admin/manage_customer/main.js') }}"></script>
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="col-md-4">
|
||||
<!-- <h6 class="card-title">Edit Manage Customers</h6> -->
|
||||
<a class="d-flex align-items-center justify-content-center pl-2"
|
||||
href="">
|
||||
href="{{ route('manage.subAdmin') }}">
|
||||
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg')}}">
|
||||
<h6 class="card-title p-0">Edit Sub Admins</h6>
|
||||
</a>
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
<div class="widget-content widget-content-area br-8 position-btn" style="overflow: auto;">
|
||||
<table id="zero-config" class="table dt-table-hover sub_admin_table" style="width:100%">
|
||||
<thead class="text-center">
|
||||
<th class="w-10px pe-2">
|
||||
{{-- <th class="w-10px pe-2">
|
||||
<div class="form-check form-check-sm form-check-custom form-check-solid me-3">
|
||||
<input class="form-check-input" type="checkbox" data-kt-check="true"
|
||||
data-kt-check-target="#kt_table_users .form-check-input" value="1" />
|
||||
</div>
|
||||
</th>
|
||||
</th> --}}
|
||||
<th class="text-start">Sr no</th>
|
||||
<th class="text-start">Name</th>
|
||||
<th class="text-start">Email Id</th>
|
||||
@@ -41,11 +41,11 @@
|
||||
<tbody class="text-center">
|
||||
@foreach ( $sub_admins_data as $sub_admins)
|
||||
<tr>
|
||||
<td>
|
||||
{{-- <td>
|
||||
<div class="form-check form-check-sm form-check-custom form-check-solid">
|
||||
<input class="form-check-input" type="checkbox" value="1" />
|
||||
</div>
|
||||
</td>
|
||||
</td> --}}
|
||||
<td class="text-start">1</td>
|
||||
<td class="text-start">{{ $sub_admins->first_name }}</td>
|
||||
<td class="text-start">{{ $sub_admins->email_address }}</td>
|
||||
|
||||
Reference in New Issue
Block a user