improve approval notify + add approval_status filter

This commit is contained in:
xiaomlove
2022-06-27 13:22:16 +08:00
parent 1aca20070d
commit f88f0787f9
21 changed files with 153 additions and 32 deletions
@@ -77,7 +77,7 @@ class ExamResource extends Resource
//
])
->actions([
Tables\Actions\EditAction::make(),
// Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\DeleteBulkAction::make(),
@@ -95,8 +95,8 @@ class ExamResource extends Resource
{
return [
'index' => Pages\ListExams::route('/'),
'create' => Pages\CreateExam::route('/create'),
'edit' => Pages\EditExam::route('/{record}/edit'),
// 'create' => Pages\CreateExam::route('/create'),
// 'edit' => Pages\EditExam::route('/{record}/edit'),
];
}
}
@@ -14,7 +14,7 @@ class ListExams extends PageList
protected function getActions(): array
{
return [
Actions\CreateAction::make(),
// Actions\CreateAction::make(),
];
}
}
@@ -24,6 +24,8 @@ class SettingResource extends Resource
protected static ?string $navigationGroup = 'System';
protected static bool $shouldRegisterNavigation = false;
protected static function getNavigationLabel(): string
{
return __('admin.sidebar.settings');
+5 -4
View File
@@ -32,14 +32,14 @@ class UserResource extends Resource
public static function form(Form $form): Form
{
return $form
->schema(Forms\Components\Card::make()->schema([
->schema([
Forms\Components\TextInput::make('username')->required(),
Forms\Components\TextInput::make('email')->required(),
Forms\Components\TextInput::make('password')->password()->required(),
Forms\Components\TextInput::make('password_confirmation')->password()->required()->same('password'),
Forms\Components\TextInput::make('password')->password()->required()->visibleOn(Pages\CreateUser::class),
Forms\Components\TextInput::make('password_confirmation')->password()->required()->same('password')->visibleOn(Pages\CreateUser::class),
Forms\Components\TextInput::make('id')->integer(),
Forms\Components\Select::make('class')->options(array_column(User::$classes, 'text')),
]));
]);
}
public static function table(Table $table): Table
@@ -90,6 +90,7 @@ class UserResource extends Resource
'index' => Pages\ListUsers::route('/'),
'create' => Pages\CreateUser::route('/create'),
// 'edit' => Pages\EditUser::route('/{record}/edit'),
'view' => Pages\ViewUser::route('/{record}'),
];
}
@@ -0,0 +1,12 @@
<?php
namespace App\Filament\Resources\User\UserResource\Pages;
use App\Filament\Resources\User\UserResource;
use Filament\Pages\Actions;
use Filament\Resources\Pages\ViewRecord;
class ViewUser extends ViewRecord
{
protected static string $resource = UserResource::class;
}
+2
View File
@@ -12,6 +12,8 @@ class TorrentTrend extends LineChartWidget
{
protected static ?int $sort = 4;
protected static ?string $pollingInterval = null;
protected function getHeading(): ?string
{
return __('dashboard.torrent_trend.page_title');
+2
View File
@@ -14,6 +14,8 @@ class UserTrend extends LineChartWidget
protected static ?int $sort = 3;
protected static ?string $pollingInterval = null;
protected function getHeading(): ?string
{
return __('dashboard.user_trend.page_title');