Jerome V
Create & create another button is still enabled
Problem description
I have two observation
If the internet is slow and you upload a video and when it's still not 100% uploaded the Create button is clickable
If you upload a video and while it's uploading in progress the Create & create another button is clickable
Expected behavior
On the slow internet connection if the video is not 100% in progress the create button should still be disabled and display error instead that the internet is slow and cannot be uploaded
On uploading video while in progress the Create & create another button should be disabled same on the create button
Steps to reproduce
Just used the typical file upload entry
Forms\Components\FileUpload::make('new_advertisement')
->label('New Video')
->maxSize(80000)
->acceptedFileTypes([
'video/mp4',
'video/mpeg'
])
->storeFiles(false)
->moveFiles(),
2 replies
Is this possible in dashboard? instead using Date picker I will use tab?
Tabs::make('Date Range')
->tabs([
Tabs\Tab::make('Yesterday')
->label('Yesterday')
->icon('heroicon-o-calendar')
->schema([
// Apply logic for "Yesterday"
Select::make('dateFilter')
->default('yesterday')
->hidden()
->afterStateUpdated(fn () => $this->applyDateFilter('yesterday')),
]),
Tabs\Tab::make('This Week')
->label('This Week')
->icon('heroicon-o-calendar')
->schema([
// Apply logic for "This Week"
Select::make('dateFilter')
->default('this_week')
->hidden()
->afterStateUpdated(fn () => $this->applyDateFilter('this_week')),
]),
Tabs\Tab::make('Last 30 Days')
->label('Last 30 Days')
->icon('heroicon-o-calendar')
->schema([
// Apply logic for "Last 30 Days"
Select::make('dateFilter')
->default('last_30_days')
->hidden()
->afterStateUpdated(fn () => $this->applyDateFilter('last_30_days')),
]),
])->columnSpanFull(),
3 replies
How to prevent the select in filter?
The case is I want to select the platform first and get the value and map it in another select. The problem is there is no platform column it just a based on the select type which is in Settings
example if select platform "web". I want to fetch it in the Type select and in there I want to get the key and value
->filters([
Tables\Filters\SelectFilter::make('platform')
->options(Platform::class)
->searchable()
->optionsLimit(10),
Tables\Filters\SelectFilter::make('type')
->options(function ($get) {
$platform = $get('platform');
if (!$platform) {
return [];
}
// Fetch the settings key based on the selected platform
$settingsKey = "{$platform}_report_types";
$reportTypes = Setting::where('key', $settingsKey)->value('value');
if ($reportTypes) {
return collect(json_decode($reportTypes, true))->mapWithKeys(function ($value, $key) {
return [$key => $value]; // Format as [key => value]
})->toArray();
}
return [];
})
->searchable()
->optionsLimit(10),
])
2 replies
No data on textarea, input and select on modal when update or view
I have same issue with this https://github.com/filamentphp/filament/discussions/13488
The case is in my local it's ok but on prod there is no data and got error
How to fix this when you want to use view action or even custom action
either of the two is not working on prod and even local from another dev
6 replies
How to add additional stacked bar widget?
Since there are default widgets
Bar chart - Chart.js documentation
Bubble chart - Chart.js documentation
Doughnut chart - Chart.js documentation
Line chart - Chart.js documentation
Pie chart - Chart.js documentation
Polar area chart - Chart.js documentation
Radar chart - Chart.js documentation
Scatter chart - Chart.js documentation
how to add additional staked bar chart?
4 replies
How to make navigation in cluster to topNavigation?
I have cluster for advertisement and they want to make the cluster navigation top instead of the usuall left menu..
<?php
namespace App\Filament\Clusters;
use Filament\Clusters\Cluster;
class Advertisement extends Cluster
{
protected static ?string $navigationIcon = 'heroicon-o-squares-2x2';
}
7 replies
Cannot store select options data in another table
Good day, in some modules it's working... but in this module is not working,, I want to add gender of the user but the userDetails is separate from users table
code
Resource
user model
UserDetail
4 replies
Custom JS is not working in custom view page in RelationshipManager
So the case is this
1. We use video js using CDN
What I did
on my adminPanelProvider I register the CDN
and on the custom view for (EpisodesRelationManger) infolist, I want to include the custom scripts
This the custom view video.blade.php (The below scripts is not seen in devtools elements)
1 replies
How to register CDN in Laravel-Filament?
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/video.min.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/video-js.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/videojs-contrib-eme.min.js"></script>
I tried to include it in app.blade.php but when I check it in dev tools elements it's not there
8 replies
How to add table inside the tab content?
I have a task to create a view page on users. The scope is every tab content is different page/component so that it will not load heavily..
All the tabs are tables content
example.. in my UserResource I created infolist for tab
How to attached/make users table in the user tab? I want to test this first and follow other tabs
1. by inserting directy the table? or
2. make a livewire component then render ?
9 replies