From eb43b35873de6b70a2015f5ea2a32f30345db802 Mon Sep 17 00:00:00 2001 From: Jonathan van Rij Date: Mon, 16 Feb 2026 13:37:37 +0100 Subject: [PATCH] fixes issues --- .claude/settings.local.json | 3 +- app/Nova/CategoryResource.php | 2 +- app/Nova/QuestionResource.php | 35 +++++++++---------- app/Policies/CategoryPolicy.php | 4 +-- app/Policies/QuestionGroupPolicy.php | 4 +-- app/Policies/QuestionPolicy.php | 2 +- app/Providers/NovaServiceProvider.php | 2 ++ database/seeders/JonathanSeeder.php | 2 +- resources/js/Components/RadioButtonGroup.vue | 2 ++ selected-state.png | Bin 0 -> 1707 bytes 10 files changed, 30 insertions(+), 26 deletions(-) create mode 100644 selected-state.png diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 26b3f37..ccda790 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -28,7 +28,8 @@ "mcp__playwright__browser_run_code", "mcp__playwright__browser_wait_for", "WebFetch(domain:www.bakertilly.nl)", - "mcp__playwright__browser_type" + "mcp__playwright__browser_type", + "mcp__playwright__browser_hover" ] } } diff --git a/app/Nova/CategoryResource.php b/app/Nova/CategoryResource.php index 5fb42ec..005905c 100644 --- a/app/Nova/CategoryResource.php +++ b/app/Nova/CategoryResource.php @@ -40,7 +40,7 @@ final class CategoryResource extends Resource * * @var bool */ - public static $displayInNavigation = false; + public static $displayInNavigation = true; /** * Get the displayable label of the resource. diff --git a/app/Nova/QuestionResource.php b/app/Nova/QuestionResource.php index 1d24e43..ba62c71 100644 --- a/app/Nova/QuestionResource.php +++ b/app/Nova/QuestionResource.php @@ -10,7 +10,7 @@ use Laravel\Nova\Fields\HasMany; use Laravel\Nova\Fields\ID; use Laravel\Nova\Fields\Number; -use Laravel\Nova\Fields\Text; +use Laravel\Nova\Fields\Select; use Laravel\Nova\Fields\Textarea; use Laravel\Nova\Http\Requests\NovaRequest; use Maatwebsite\LaravelNovaExcel\Actions\DownloadExcel; @@ -80,8 +80,7 @@ public function fields(NovaRequest $request): array BelongsTo::make('Question Group', 'questionGroup', QuestionGroupResource::class) ->sortable() - ->filterable() - ->readonly(), + ->filterable(), Textarea::make('Text') ->rules('required') @@ -89,35 +88,35 @@ public function fields(NovaRequest $request): array Boolean::make('Has Yes') ->sortable() - ->filterable() - ->readonly(), + ->filterable(), Boolean::make('Has No') ->sortable() - ->filterable() - ->readonly(), + ->filterable(), Boolean::make('Has NA', 'has_na') ->sortable() - ->filterable() - ->readonly(), + ->filterable(), - Text::make('Details') + Select::make('Details') + ->options([ + 'optional' => 'Optional', + 'required' => 'Required', + 'req_on_yes' => 'Required on Yes', + 'req_on_no' => 'Required on No', + ]) + ->displayUsingLabels() + ->nullable() ->sortable() - ->filterable() - ->copyable() - ->readonly(), + ->filterable(), Number::make('Sort Order') ->sortable() - ->filterable() - ->copyable() - ->readonly(), + ->filterable(), Boolean::make('Is Scored') ->sortable() - ->filterable() - ->readonly(), + ->filterable(), DateTime::make('Created At') ->exceptOnForms() diff --git a/app/Policies/CategoryPolicy.php b/app/Policies/CategoryPolicy.php index 1cd74ae..52d02ee 100644 --- a/app/Policies/CategoryPolicy.php +++ b/app/Policies/CategoryPolicy.php @@ -30,7 +30,7 @@ public function view(User $user, Category $category): bool */ public function create(User $user): bool { - return false; + return true; } /** @@ -38,7 +38,7 @@ public function create(User $user): bool */ public function update(User $user, Category $category): bool { - return false; + return true; } /** diff --git a/app/Policies/QuestionGroupPolicy.php b/app/Policies/QuestionGroupPolicy.php index 6f1c0c3..05a63e7 100644 --- a/app/Policies/QuestionGroupPolicy.php +++ b/app/Policies/QuestionGroupPolicy.php @@ -30,7 +30,7 @@ public function view(User $user, QuestionGroup $questionGroup): bool */ public function create(User $user): bool { - return false; + return true; } /** @@ -38,7 +38,7 @@ public function create(User $user): bool */ public function update(User $user, QuestionGroup $questionGroup): bool { - return false; + return true; } /** diff --git a/app/Policies/QuestionPolicy.php b/app/Policies/QuestionPolicy.php index 179a054..323cef7 100644 --- a/app/Policies/QuestionPolicy.php +++ b/app/Policies/QuestionPolicy.php @@ -30,7 +30,7 @@ public function view(User $user, Question $question): bool */ public function create(User $user): bool { - return false; + return true; } /** diff --git a/app/Providers/NovaServiceProvider.php b/app/Providers/NovaServiceProvider.php index f9a856a..210b3f0 100644 --- a/app/Providers/NovaServiceProvider.php +++ b/app/Providers/NovaServiceProvider.php @@ -3,6 +3,7 @@ namespace App\Providers; use App\Models\User; +use App\Nova\CategoryResource; use App\Nova\Dashboards\Main; use App\Nova\LogResource; use App\Nova\QuestionResource; @@ -30,6 +31,7 @@ public function boot(): void MenuSection::dashboard(Main::class)->icon('home'), MenuSection::make('Questionnaire', [ + MenuItem::resource(CategoryResource::class), MenuItem::resource(QuestionResource::class), MenuItem::resource(ScreeningResource::class), MenuItem::resource(SessionResource::class), diff --git a/database/seeders/JonathanSeeder.php b/database/seeders/JonathanSeeder.php index 53ae341..6fa8857 100644 --- a/database/seeders/JonathanSeeder.php +++ b/database/seeders/JonathanSeeder.php @@ -19,7 +19,7 @@ public function run(): void User::factory()->create([ 'name' => 'Jonathan', - 'email' => 'jonathan@blijnder.nl', + 'email' => 'jonathan.van.rij@agerion.nl', 'password' => bcrypt('secret'), 'email_verified_at' => now(), 'role_id' => $adminRole->id, diff --git a/resources/js/Components/RadioButtonGroup.vue b/resources/js/Components/RadioButtonGroup.vue index 440c7e5..a1931bd 100644 --- a/resources/js/Components/RadioButtonGroup.vue +++ b/resources/js/Components/RadioButtonGroup.vue @@ -43,6 +43,8 @@ const getSegmentClasses = (index) => { 'cursor-pointer', 'hover:bg-white/10', 'hover:text-gray-200', + 'peer-checked:hover:bg-primary-dark', + 'peer-checked:hover:text-gray-900', 'peer-checked:bg-primary', 'peer-checked:text-gray-900', 'peer-checked:font-semibold', diff --git a/selected-state.png b/selected-state.png new file mode 100644 index 0000000000000000000000000000000000000000..b66089f920e98d00e1050c6ce1569824595fc8b3 GIT binary patch literal 1707 zcmV;c22}ZpP)yobb zefs>K>s=2|%U%tp5I8QE%Se*IFdT#?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