| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace App\Filament\Pages;
- use App\Models\PreQuestionCandidate;
- use App\Services\QuestionReviewService;
- use Filament\Pages\Page;
- use UnitEnum;
- class QuestionReviewWorkbench extends Page
- {
- protected static bool $shouldRegisterNavigation = false;
- protected static ?string $navigationLabel = '题目审核工作台';
- protected static UnitEnum|string|null $navigationGroup = '卷子导入流程';
- protected static ?int $navigationSort = 3;
- protected string $view = 'filament.pages.question-review-workbench';
- public function approve(int $candidateId, QuestionReviewService $service): void
- {
- $service->promoteCandidateToQuestion($candidateId);
- }
- public function reject(int $candidateId): void
- {
- PreQuestionCandidate::where('id', $candidateId)->update([
- 'status' => PreQuestionCandidate::STATUS_REJECTED,
- ]);
- }
- }
|