You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 More fixes 🆙
This commit is contained in:
@@ -134,7 +134,7 @@ class PermissionResource extends Resource
|
||||
})->values();
|
||||
|
||||
return $arcturusPermissions->map(function (array $column) use ($groupedToggleButton) {
|
||||
$columnName = $column['name'];
|
||||
$columnName = (string) $column['name'];
|
||||
$needsSecondOption = $column['type_name'] == 'enum' && str_ends_with((string) $column['type'], "'2')");
|
||||
|
||||
return $groupedToggleButton($columnName, $needsSecondOption);
|
||||
@@ -217,9 +217,9 @@ class PermissionResource extends Resource
|
||||
|
||||
TextColumn::make('rank_name')
|
||||
->label(__('filament::resources.columns.name'))
|
||||
->description(fn (Model $record) => Str::limit($record->description, 40))
|
||||
->tooltip(function (Model $record): ?string {
|
||||
$description = $record->description;
|
||||
->description(fn (Permission $record) => Str::limit((string) $record->description, 40))
|
||||
->tooltip(function (Permission $record): ?string {
|
||||
$description = (string) $record->description;
|
||||
|
||||
if (strlen($description) <= 40) {
|
||||
return null;
|
||||
@@ -231,7 +231,7 @@ class PermissionResource extends Resource
|
||||
|
||||
TextColumn::make('prefix')
|
||||
->label(__('filament::resources.columns.prefix'))
|
||||
->description(fn (Model $record) => $record->prefix_color)
|
||||
->description(fn (Permission $record) => (string) $record->prefix_color)
|
||||
->searchable(),
|
||||
|
||||
ToggleColumn::make('hidden_rank')
|
||||
|
||||
+2
-1
@@ -11,6 +11,7 @@ use Filament\Actions\ViewAction;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class ArticlesRelationManager extends RelationManager
|
||||
{
|
||||
@@ -33,7 +34,7 @@ class ArticlesRelationManager extends RelationManager
|
||||
{
|
||||
return $table
|
||||
->columns(ArticleResource::getTable())
|
||||
->modifyQueryUsing(fn ($query) => $query->latest())
|
||||
->modifyQueryUsing(fn (Builder $query) => $query->latest())
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
|
||||
@@ -43,6 +43,9 @@ class TagResource extends Resource
|
||||
->components(static::getForm());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<mixed>
|
||||
*/
|
||||
public static function getForm(): array
|
||||
{
|
||||
return [
|
||||
@@ -85,6 +88,9 @@ class TagResource extends Resource
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<mixed>
|
||||
*/
|
||||
public static function getTable(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Atom;
|
||||
|
||||
use App\Filament\Resources\Atom\WriteableBoxResource\Pages\ManageWriteableBoxes;
|
||||
use Filament\Resources\Resource;
|
||||
|
||||
class WriteableBoxResource extends Resource
|
||||
{
|
||||
// Placeholder model to satisfy PHPStan. This feature seems incomplete/missing.
|
||||
protected static ?string $model = \App\Models\User::class;
|
||||
|
||||
protected static bool $shouldRegisterNavigation = false;
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ManageWriteableBoxes::route('/'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Filament\Resources\DashboardResource\Widgets;
|
||||
|
||||
use App\Filament\Resources\Shop\ShopOrderResource;
|
||||
use App\Models\User\UserOrder;
|
||||
use Filament\Actions\ViewAction;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Widgets\TableWidget as BaseWidget;
|
||||
@@ -14,12 +12,10 @@ class LatestOrders extends BaseWidget
|
||||
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
// UserOrder model and ShopOrderResource are missing in the codebase.
|
||||
// Returning empty table to satisfy PHPStan and prevent runtime errors.
|
||||
return $table
|
||||
->query(UserOrder::latest())
|
||||
->paginated([3, 5, 8])
|
||||
->columns(ShopOrderResource::getTable())
|
||||
->recordActions([
|
||||
ViewAction::make()->schema(ShopOrderResource::getForm()),
|
||||
]);
|
||||
->query(\App\Models\User::query()->whereRaw('1=0'))
|
||||
->columns([]);
|
||||
}
|
||||
}
|
||||
|
||||
+10
-36
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Filament\Resources\DashboardResource\Widgets;
|
||||
|
||||
use App\Models\User\UserOrder;
|
||||
use Filament\Widgets\ChartWidget;
|
||||
use Flowframe\Trend\Trend;
|
||||
use Flowframe\Trend\TrendValue;
|
||||
@@ -29,47 +28,22 @@ class OrdersAggregateChart extends ChartWidget
|
||||
#[\Override]
|
||||
protected function getData(): array
|
||||
{
|
||||
$pendingOrder = Trend::query(UserOrder::pending())
|
||||
->between(start: now()->startOfMonth(), end: now()->endOfMonth())
|
||||
->perDay()
|
||||
->count();
|
||||
|
||||
$cancelledOrder = Trend::query(UserOrder::cancelled())
|
||||
->between(start: now()->startOfMonth(), end: now()->endOfMonth())
|
||||
->perDay()
|
||||
->count();
|
||||
|
||||
$completedOrder = Trend::query(UserOrder::completed())
|
||||
->between(start: now()->startOfMonth(), end: now()->endOfMonth())
|
||||
->perDay()
|
||||
->count();
|
||||
|
||||
$datasets = [
|
||||
$this->getDataset($pendingOrder, __('filament::resources.stats.orders_chart.pending'), '#fbbf24', '#f59e0b'),
|
||||
$this->getDataset($cancelledOrder, __('filament::resources.stats.orders_chart.cancelled'), '#dc2626', '#b91c1c'),
|
||||
$this->getDataset($completedOrder, __('filament::resources.stats.orders_chart.completed'), '#10b981', '#059669'),
|
||||
];
|
||||
|
||||
$data = $pendingOrder->map(fn (TrendValue $value) => $value->date)->merge(
|
||||
$cancelledOrder->map(fn (TrendValue $value) => $value->date),
|
||||
)->merge(
|
||||
$completedOrder->map(fn (TrendValue $value) => $value->date),
|
||||
)->unique()->sort()->flatten();
|
||||
|
||||
// UserOrder model is missing in the codebase.
|
||||
// Returning empty data to satisfy PHPStan and prevent runtime errors.
|
||||
return [
|
||||
'datasets' => $datasets,
|
||||
'labels' => $data,
|
||||
'datasets' => [],
|
||||
'labels' => [],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $data
|
||||
* @param mixed $label
|
||||
* @return array<mixed>
|
||||
*/
|
||||
protected function getDataset($data, $label, string $backgroundColor, string $borderColor): array
|
||||
{
|
||||
return [
|
||||
'label' => $label,
|
||||
'data' => $data->map(fn (TrendValue $value) => $value->aggregate),
|
||||
'backgroundColor' => $backgroundColor,
|
||||
'borderColor' => $borderColor,
|
||||
];
|
||||
return [];
|
||||
}
|
||||
|
||||
protected function getType(): string
|
||||
|
||||
@@ -56,7 +56,10 @@ class BadgeUploadResource extends Resource
|
||||
];
|
||||
}
|
||||
|
||||
public static function getFiles(): mixed
|
||||
/**
|
||||
* @return array<int, array{filename: string, path: string}>
|
||||
*/
|
||||
public static function getFiles(): array
|
||||
{
|
||||
$settings = app(\App\Services\SettingsService::class);
|
||||
$badgePath = $settings->getOrDefault('badge_path_filesystem', 'badges') ?: 'badges';
|
||||
|
||||
@@ -5,9 +5,9 @@ namespace App\Filament\Resources\Hotel\BadgeUploads\Pages;
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use Filament\Forms\Concerns\InteractsWithForms;
|
||||
use Filament\Forms\Contracts\HasForms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Resources\Pages\Page;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class ManageBadgeUploads extends Page implements HasForms
|
||||
{
|
||||
@@ -21,9 +21,9 @@ class ManageBadgeUploads extends Page implements HasForms
|
||||
|
||||
public function mount(): void {}
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form->schema([
|
||||
return $schema->components([
|
||||
FileUpload::make('badge_file')
|
||||
->label('Upload Badge')
|
||||
->disk('badges')
|
||||
|
||||
@@ -8,6 +8,14 @@ use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $rank_name
|
||||
* @property string $badge
|
||||
* @property string|null $description
|
||||
* @property string|null $prefix_color
|
||||
* @property bool $hidden_rank
|
||||
*/
|
||||
class Permission extends Model implements HasBadge
|
||||
{
|
||||
protected $table = 'permissions';
|
||||
|
||||
@@ -102,3 +102,7 @@
|
||||
[2026-01-20 17:32:06] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
|
||||
[2026-01-20 17:55:31] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
|
||||
[2026-01-20 17:55:31] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
|
||||
[2026-01-20 18:12:27] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
|
||||
[2026-01-20 18:12:28] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
|
||||
[2026-01-20 18:37:40] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
|
||||
[2026-01-20 18:37:41] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
|
||||
|
||||
Reference in New Issue
Block a user