feat: interapt

This commit is contained in:
hashbro
2026-10-12 05:48:19 +08:00
parent 8ae3b6884d
commit c97a61d51f
11 changed files with 500 additions and 72 deletions
@@ -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()),
]);
}