Bellegend
Bellegend
FFilament
Created by lodeki on 10/19/2023 in #❓┊help
Page widget showing on dashboard
i found a another way and its working fine now i created custom page for the DocumentRecordResource and a widgets for that custom page as below
php artisan make:filament-page StatsDocumentRecord --resource=Cataloging/DocumentRecordResource --type=custom
php artisan make:filament-widget DocumentRecordsByYearTable --chart --resource=Cataloging/DocumentRecordResource
php artisan make:filament-page StatsDocumentRecord --resource=Cataloging/DocumentRecordResource --type=custom
php artisan make:filament-widget DocumentRecordsByYearTable --chart --resource=Cataloging/DocumentRecordResource
and i added a navigation to that custom page in the AdminServiceProvider like this
->navigationItems([
NavigationItem::make('Analytics')
->label(fn () => __('panel.pages.DocumentStatistics'))
->url(fn (): string => StatsDocumentRecord::getUrl())
->icon('heroicon-o-presentation-chart-line')
->group(fn () => __('panel.groups.statistics'))
->sort(0),
])
->navigationItems([
NavigationItem::make('Analytics')
->label(fn () => __('panel.pages.DocumentStatistics'))
->url(fn (): string => StatsDocumentRecord::getUrl())
->icon('heroicon-o-presentation-chart-line')
->group(fn () => __('panel.groups.statistics'))
->sort(0),
])
hope this help someone but the other way i think it has a bug
32 replies
FFilament
Created by lodeki on 10/19/2023 in #❓┊help
Page widget showing on dashboard
I got a work around it but not good i need multiple dashboards
32 replies
FFilament
Created by lodeki on 10/19/2023 in #❓┊help
Page widget showing on dashboard
I'm interested if you find a solution
32 replies
FFilament
Created by lodeki on 10/19/2023 in #❓┊help
Page widget showing on dashboard
Check my post
32 replies
FFilament
Created by lodeki on 10/19/2023 in #❓┊help
Page widget showing on dashboard
32 replies
FFilament
Created by lodeki on 10/19/2023 in #❓┊help
Page widget showing on dashboard
Happened to me same problem
32 replies
FFilament
Created by MiR on 10/12/2023 in #❓┊help
Apperance changed in production environment
Try npm run build
30 replies
FFilament
Created by Bellegend on 10/9/2023 in #❓┊help
Custom Page as a Dashboard Unable to find component: [app.filament.admin.widgets
i found a another way and its working fine now i created custom page for the DocumentRecordResource and a widgets for that custom page as below
php artisan make:filament-page StatsDocumentRecord --resource=Cataloging/DocumentRecordResource --type=custom
php artisan make:filament-widget DocumentRecordsByYearTable --chart --resource=Cataloging/DocumentRecordResource
php artisan make:filament-page StatsDocumentRecord --resource=Cataloging/DocumentRecordResource --type=custom
php artisan make:filament-widget DocumentRecordsByYearTable --chart --resource=Cataloging/DocumentRecordResource
and i added a navigation to that custom page in the AdminServiceProvider like this
->navigationItems([
NavigationItem::make('Analytics')
->label(fn () => __('panel.pages.DocumentStatistics'))
->url(fn (): string => StatsDocumentRecord::getUrl())
->icon('heroicon-o-presentation-chart-line')
->group(fn () => __('panel.groups.statistics'))
->sort(0),
])
->navigationItems([
NavigationItem::make('Analytics')
->label(fn () => __('panel.pages.DocumentStatistics'))
->url(fn (): string => StatsDocumentRecord::getUrl())
->icon('heroicon-o-presentation-chart-line')
->group(fn () => __('panel.groups.statistics'))
->sort(0),
])
hope this help someone but the other way i think it has a bug
5 replies
FFilament
Created by Bellegend on 10/9/2023 in #❓┊help
Custom Page as a Dashboard Unable to find component: [app.filament.admin.widgets
up anyone got this problem or am i missing somthing?
5 replies
FFilament
Created by Bellegend on 10/9/2023 in #❓┊help
Custom Page as a Dashboard Unable to find component: [app.filament.admin.widgets
Stats.php
<?php

namespace App\Filament\Admin\Widgets;

use App\Models\Cataloging\DocumentCopy;
use App\Models\Cataloging\DocumentRecord;
use App\Models\Cataloging\Editor;
use App\Models\Circulation\Reader;
use App\Models\Log\ReadersLibraryLog;
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Stat;

class Stats extends BaseWidget
{
protected static ?int $sort = 1;

protected function getStats(): array
{
return [
Stat::make(__('cruds.documentRecord.title'), number_format(DocumentRecord::count(), 0, ',', ','))
->label(__('global.number') .' '.__('cruds.documentRecord.title'))
->description(__('global.number').__('panel.widgets.PaperDocuments').' : '. number_format(DocumentRecord::where('document_type_id','1')->count(), 0, ',', ','))
->descriptionIcon('heroicon-m-arrow-trending-up')
->chart([7, 2, 10, 3, 15, 4, 17])
->color('warning')
->extraAttributes([
'class' => 'cursor-pointer bg-[radial-gradient(ellipse_at_bottom_left,_var(--tw-gradient-stops))] from-blue-100 via-blue-50 to-orange-200 dark:from-blue-700 dark:via-blue-800 dark:to-gray-900 ',
'wire:click' => "\$dispatch('setStatusFilter', { filter: 'processed' })",
]),
Stat::make(__('global.number') .' '.__('cruds.documentCopy.title'), number_format(DocumentCopy::count(), 0, ',', ','))
->description('7% increase')
->descriptionIcon('heroicon-m-arrow-trending-up')
->chart([7, 2, 10, 3, 15, 4, 17])
->color('success'),

];
}
}
<?php

namespace App\Filament\Admin\Widgets;

use App\Models\Cataloging\DocumentCopy;
use App\Models\Cataloging\DocumentRecord;
use App\Models\Cataloging\Editor;
use App\Models\Circulation\Reader;
use App\Models\Log\ReadersLibraryLog;
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Stat;

class Stats extends BaseWidget
{
protected static ?int $sort = 1;

protected function getStats(): array
{
return [
Stat::make(__('cruds.documentRecord.title'), number_format(DocumentRecord::count(), 0, ',', ','))
->label(__('global.number') .' '.__('cruds.documentRecord.title'))
->description(__('global.number').__('panel.widgets.PaperDocuments').' : '. number_format(DocumentRecord::where('document_type_id','1')->count(), 0, ',', ','))
->descriptionIcon('heroicon-m-arrow-trending-up')
->chart([7, 2, 10, 3, 15, 4, 17])
->color('warning')
->extraAttributes([
'class' => 'cursor-pointer bg-[radial-gradient(ellipse_at_bottom_left,_var(--tw-gradient-stops))] from-blue-100 via-blue-50 to-orange-200 dark:from-blue-700 dark:via-blue-800 dark:to-gray-900 ',
'wire:click' => "\$dispatch('setStatusFilter', { filter: 'processed' })",
]),
Stat::make(__('global.number') .' '.__('cruds.documentCopy.title'), number_format(DocumentCopy::count(), 0, ',', ','))
->description('7% increase')
->descriptionIcon('heroicon-m-arrow-trending-up')
->chart([7, 2, 10, 3, 15, 4, 17])
->color('success'),

];
}
}
5 replies
TLCTuto's Laravel Corner
Created by Virgil on 10/8/2023 in #💡filament
Multitenant/Company plugin
at AdminPanelProvider add this Function Video link here https://youtu.be/4ugMYpzLA0c?t=5799
return $panel
->profile();
->....
//-------------------------------------
public function boot()
{
Filament::serving(function (){
Filament::registerUserMenuItems([
'account' => MenuItem::make()
->label('Your Profile')
->url(UserResource::getUrl('edit',['record' => auth()->user()]))
]);
});
}
return $panel
->profile();
->....
//-------------------------------------
public function boot()
{
Filament::serving(function (){
Filament::registerUserMenuItems([
'account' => MenuItem::make()
->label('Your Profile')
->url(UserResource::getUrl('edit',['record' => auth()->user()]))
]);
});
}
or use this from docs https://filamentphp.com/docs/3.x/panels/users#customizing-the-authentication-features
3 replies