|
@@ -3,8 +3,27 @@
|
|
@section('content')
|
|
@section('content')
|
|
|
|
|
|
<div class="p-3 mcp-theme-1">
|
|
<div class="p-3 mcp-theme-1">
|
|
|
|
+
|
|
|
|
+ <div class="d-flex align-items-center mb-3">
|
|
|
|
+ <h4 class="font-weight-bold m-0 font-size-16">
|
|
|
|
+ Log in as
|
|
|
|
+ </h4>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<div class="row">
|
|
<div class="row">
|
|
<div class="col-12 col-md-6">
|
|
<div class="col-12 col-md-6">
|
|
|
|
+
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ {{ $logInAsPros->withQueryString()->links() }}
|
|
|
|
+ <span class="{{ $logInAsPros->lastPage() > 1 ? 'ml-3' : '' }} mb-3">
|
|
|
|
+ Total records: <b>{{ $logInAsPros->total() }}</b> @if($logInAsPros->lastPage() > 1) ({{ $logInAsPros->perPage() }} per page) @endif
|
|
|
|
+ </span>
|
|
|
|
+ <form class="ml-auto width-200px mb-3 log-in-as-form" method="GET" action="/log_in_as" target="_top">
|
|
|
|
+ <input type="text" placeholder="Name/email/phone" class="form-control form-control-sm" name="q"
|
|
|
|
+ value="{{request()->input('q')}}">
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<div class="card">
|
|
<div class="card">
|
|
@if(session('message'))
|
|
@if(session('message'))
|
|
<div class="alert alert-info">{{session('message')}}</div>
|
|
<div class="alert alert-info">{{session('message')}}</div>
|
|
@@ -19,11 +38,11 @@
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody>
|
|
<tbody>
|
|
- @foreach($pros as $pro)
|
|
|
|
|
|
+ @foreach($logInAsPros as $pro)
|
|
<tr>
|
|
<tr>
|
|
<td class="pl-2">{{$pro->displayName()}}</td>
|
|
<td class="pl-2">{{$pro->displayName()}}</td>
|
|
<td>{{$pro->cell_number}}</td>
|
|
<td>{{$pro->cell_number}}</td>
|
|
- <td>{{$pro->email}}</td>
|
|
|
|
|
|
+ <td>{{$pro->email_address}}</td>
|
|
<td class="text-right pr-2">
|
|
<td class="text-right pr-2">
|
|
<form action="{{route('process-log-in-as')}}" onsubmit="saveProUid('{{$pro->uid}}')" method="POST" target="_top">
|
|
<form action="{{route('process-log-in-as')}}" onsubmit="saveProUid('{{$pro->uid}}')" method="POST" target="_top">
|
|
@csrf
|
|
@csrf
|
|
@@ -38,6 +57,14 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <div class="d-flex align-items-center mt-3">
|
|
|
|
+ {{ $logInAsPros->withQueryString()->links() }}
|
|
|
|
+ <span class="{{ $logInAsPros->lastPage() > 1 ? 'ml-3' : '' }} mb-3">
|
|
|
|
+ Total records: <b>{{ $logInAsPros->total() }}</b> @if($logInAsPros->lastPage() > 1) ({{ $logInAsPros->perPage() }} per page) @endif
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -45,6 +72,16 @@
|
|
window.top.localStorage.currentProUid = _uid;
|
|
window.top.localStorage.currentProUid = _uid;
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
+ (function() {
|
|
|
|
+ function init() {
|
|
|
|
+ $('.log-in-as-form').on('submit', function() {
|
|
|
|
+ let q = $.trim($('[name="q"]').val());
|
|
|
|
+ fastLoad('/log_in_as?q=' + encodeURIComponent(q));
|
|
|
|
+ return false;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ addMCInitializer('log-in-as', init, '.log-in-as-form');
|
|
|
|
+ }).call(window);
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@endsection
|
|
@endsection
|