mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
seeding bonus log save to click house
This commit is contained in:
@@ -198,6 +198,18 @@ class EditSetting extends Page implements Forms\Contracts\HasForms
|
||||
->label(__('label.setting.system.is_invite_pre_email_and_username'))
|
||||
->helperText(__('label.setting.system.is_invite_pre_email_and_username_help'))
|
||||
,
|
||||
Forms\Components\Radio::make('system.is_record_announce_log')
|
||||
->options(self::$yesOrNo)
|
||||
->inline(true)
|
||||
->label(__('label.setting.system.is_record_announce_log'))
|
||||
->helperText(__('label.setting.system.is_record_announce_log_help'))
|
||||
,
|
||||
Forms\Components\Radio::make('system.is_record_seeding_bonus_log')
|
||||
->options(self::$yesOrNo)
|
||||
->inline(true)
|
||||
->label(__('label.setting.system.is_record_seeding_bonus_log'))
|
||||
->helperText(__('label.setting.system.is_record_seeding_bonus_log_help'))
|
||||
,
|
||||
Forms\Components\Select::make('system.access_admin_class_min')
|
||||
->options(User::listClass(User::CLASS_VIP))
|
||||
->label(__('label.setting.system.access_admin_class_min'))
|
||||
|
||||
@@ -12,6 +12,8 @@ use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use Illuminate\Support\Arr;
|
||||
use function Filament\Support\get_model_label;
|
||||
|
||||
class BonusLogResource extends Resource
|
||||
{
|
||||
@@ -28,9 +30,9 @@ class BonusLogResource extends Resource
|
||||
return __('admin.sidebar.bonus_log');
|
||||
}
|
||||
|
||||
public static function getBreadcrumb(): string
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return self::getNavigationLabel();
|
||||
return sprintf('%s(%s)', get_model_label(static::getModel()), __('bonus-log.exclude_seeding_bonus'));
|
||||
}
|
||||
|
||||
public static function form(Form $form): Form
|
||||
@@ -85,19 +87,19 @@ class BonusLogResource extends Resource
|
||||
})
|
||||
,
|
||||
Tables\Filters\SelectFilter::make('business_type')
|
||||
->options(BonusLogs::listStaticProps(BonusLogs::$businessTypes, 'bonus-log.business_types', true))
|
||||
->options(BonusLogs::listStaticProps(Arr::except(BonusLogs::$businessTypes, BonusLogs::$businessTypeBonus), 'bonus-log.business_types', true))
|
||||
->label(__('bonus-log.fields.business_type'))
|
||||
,
|
||||
Tables\Filters\Filter::make('exclude_seeding_bonus')
|
||||
->toggle()
|
||||
->label(__('bonus-log.exclude_seeding_bonus'))
|
||||
->query(function (Builder $query, array $data) {
|
||||
if ($data['isActive']) {
|
||||
$query->whereNotIn("business_type", BonusLogs::$businessTypeBonus);
|
||||
}
|
||||
})
|
||||
->default()
|
||||
,
|
||||
// Tables\Filters\Filter::make('exclude_seeding_bonus')
|
||||
// ->toggle()
|
||||
// ->label(__('bonus-log.exclude_seeding_bonus'))
|
||||
// ->query(function (Builder $query, array $data) {
|
||||
// if ($data['isActive']) {
|
||||
// $query->whereNotIn("business_type", BonusLogs::$businessTypeBonus);
|
||||
// }
|
||||
// })
|
||||
// ->default()
|
||||
// ,
|
||||
])
|
||||
->actions([
|
||||
// Tables\Actions\EditAction::make(),
|
||||
|
||||
Reference in New Issue
Block a user