wip fix
This commit is contained in:
1 parent
9bcd4432c6
commit
6f92f9e1d5
1209 files changed
+220940
No files matched your search
+45
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\StaticData\Resources\StatistikoImports\Schemas;
|
||||
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Schemas\Components\Icon;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class StatistikoImportForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('data_type')
|
||||
->required()
|
||||
->allowHtml()
|
||||
->options([
|
||||
'details' => '<span class="text-blue-500">Player Details</span>',
|
||||
'player' => '<span class="text-pink-600">Player History</span>',
|
||||
'fixtures' => '<span class="text-orange-500">Fixtures Upcoming</span>',
|
||||
'events' => '<span class="text-green-500">Events History</span>',
|
||||
]),
|
||||
|
||||
FileUpload::make('file_name')
|
||||
->label('Select File')
|
||||
->disk('public')
|
||||
->directory('statistiko')
|
||||
->visibility('public')
|
||||
->required()
|
||||
->storeFileNamesIn('file_name_original')
|
||||
->beforeContent(Icon::make('phosphor-microsoft-excel-logo'))
|
||||
->belowContent(Schema::end([
|
||||
'Only excel files accepted.',
|
||||
'First row contains column titles.',
|
||||
]))
|
||||
->acceptedFileTypes([
|
||||
'application/vnd.ms-excel',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
// 'text/csv', // Optional: include if you accept CSV too
|
||||
]),
|
||||
])->columns(1);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user