From 830bb3837cae97b0476789935ca7a2d481f78647 Mon Sep 17 00:00:00 2001 From: Alfred Nutile Date: Mon, 30 Sep 2024 07:12:01 -0700 Subject: [PATCH] add collection id --- app/Models/Event.php | 14 ++++++++++++-- tests/fixtures/.DS_Store | Bin 14340 -> 14340 bytes 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/Models/Event.php b/app/Models/Event.php index a481408c..30759bcb 100644 --- a/app/Models/Event.php +++ b/app/Models/Event.php @@ -6,6 +6,7 @@ use Carbon\Carbon; use Filament\Forms\Components\DateTimePicker; use Filament\Forms\Components\Section; +use Filament\Forms\Components\Select; use Filament\Forms\Components\TextInput; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; @@ -38,6 +39,11 @@ public static function getForm(): array ->columns(1) ->schema([ TextInput::make('title')->required(), + Select::make('collection_id') + ->searchable() + ->preload() + ->relationship(name: 'collection', titleAttribute: 'name') + ->label('Collection'), TextInput::make('description')->required(), TextInput::make('location'), ]), @@ -46,8 +52,12 @@ public static function getForm(): array ->columns(2) ->schema([ - DateTimePicker::make('start_date')->required(), - DateTimePicker::make('end_date')->required(), + DateTimePicker::make('start_date') + ->native(false) + ->required(), + DateTimePicker::make('end_date') + ->native(false) + ->required(), ]), ]; } diff --git a/tests/fixtures/.DS_Store b/tests/fixtures/.DS_Store index 5fb14f776abfccb74c3a7b1507e559338be85783..c89c512da2a48f66093d1a2cf5eca0826b2bea68 100644 GIT binary patch delta 1092 zcmc&yPfQe79R7WyW#8;r8CaHKX@OM|HR)<0B(73)g?z+|k=_ zrY-wNDlDLg^x+)N!%^>gq}nq>iTanRj42#99{(NEf`uQH1ehFD7HP>~XHeK1*r<#WBNI_U5YZtAYc z@y)u+9k02fc2o%|;jWx;M9SoyL&9(m?a`e+ZW+Ql*dq*Xx#BCqv$Fb|oV4^bpIuz4 zmT6U5HB;+Z_h3p43<~$_0;|+$b+S6m_8Ix;ZMNYHjpF+nt)8*HKHrk%`MpRh%e2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