feat: interapt
This commit is contained in:
@@ -5,7 +5,6 @@ namespace App\Http\Controllers\Admin;
|
||||
use App\Http\Controllers\Concerns\PortalAware;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\MnemonicFinding;
|
||||
use App\Models\User;
|
||||
use App\Services\MnemonicScanService;
|
||||
use App\Support\AgentScope;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
@@ -15,18 +14,23 @@ class MnemonicFindingController extends Controller
|
||||
{
|
||||
use PortalAware;
|
||||
|
||||
public function index(MnemonicScanService $scan)
|
||||
public function index()
|
||||
{
|
||||
$this->denyHiddenAgentScan();
|
||||
$agents = $this->isAgentPortal()
|
||||
? collect()
|
||||
: User::query()->orderBy('username')->get(['id', 'username']);
|
||||
|
||||
return view('admin.findings.index', [
|
||||
'portal' => $this->portal(),
|
||||
'agents' => $agents,
|
||||
'photoProgress' => $scan->photoProgress(null, $this->agent()),
|
||||
'noteProgress' => $scan->noteProgress(null, $this->agent()),
|
||||
]);
|
||||
}
|
||||
|
||||
public function progress(MnemonicScanService $scan)
|
||||
{
|
||||
$this->denyHiddenAgentScan();
|
||||
|
||||
return response()->json([
|
||||
'code' => 0,
|
||||
'photo' => $scan->photoProgress(null, $this->agent()),
|
||||
'note' => $scan->noteProgress(null, $this->agent()),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user