diff --git a/app/Filament/Admin/Resources/DnsSettingResource.php b/app/Filament/Admin/Resources/DnsSettingResource.php new file mode 100644 index 00000000..2d745f31 --- /dev/null +++ b/app/Filament/Admin/Resources/DnsSettingResource.php @@ -0,0 +1,97 @@ +schema([ + Forms\Components\TextInput::make('domain_id') + ->required() + ->numeric(), + Forms\Components\TextInput::make('record_type') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('name') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('value') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('ttl') + ->required() + ->numeric(), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('domain_id') + ->numeric() + ->sortable(), + Tables\Columns\TextColumn::make('record_type') + ->searchable(), + Tables\Columns\TextColumn::make('name') + ->searchable(), + Tables\Columns\TextColumn::make('value') + ->searchable(), + Tables\Columns\TextColumn::make('ttl') + ->numeric() + ->sortable(), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListDnsSettings::route('/'), + 'create' => Pages\CreateDnsSetting::route('/create'), + 'edit' => Pages\EditDnsSetting::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Admin/Resources/DnsSettingResource/Pages/CreateDnsSetting.php b/app/Filament/Admin/Resources/DnsSettingResource/Pages/CreateDnsSetting.php new file mode 100644 index 00000000..650274bc --- /dev/null +++ b/app/Filament/Admin/Resources/DnsSettingResource/Pages/CreateDnsSetting.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\TextInput::make('user_id') + ->required() + ->numeric(), + Forms\Components\TextInput::make('domain_name') + ->required() + ->maxLength(255), + Forms\Components\DatePicker::make('registration_date') + ->required(), + Forms\Components\DatePicker::make('expiration_date') + ->required(), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('user_id') + ->numeric() + ->sortable(), + Tables\Columns\TextColumn::make('domain_name') + ->searchable(), + Tables\Columns\TextColumn::make('registration_date') + ->date() + ->sortable(), + Tables\Columns\TextColumn::make('expiration_date') + ->date() + ->sortable(), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListDomains::route('/'), + 'create' => Pages\CreateDomain::route('/create'), + 'edit' => Pages\EditDomain::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Admin/Resources/DomainResource/Pages/CreateDomain.php b/app/Filament/Admin/Resources/DomainResource/Pages/CreateDomain.php new file mode 100644 index 00000000..d04017fb --- /dev/null +++ b/app/Filament/Admin/Resources/DomainResource/Pages/CreateDomain.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\TextInput::make('name') + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description') + ->columnSpanFull(), + Forms\Components\TextInput::make('disk_space') + ->required() + ->numeric(), + Forms\Components\TextInput::make('bandwidth') + ->required() + ->numeric(), + Forms\Components\TextInput::make('price') + ->required() + ->numeric() + ->prefix('$'), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('name') + ->searchable(), + Tables\Columns\TextColumn::make('disk_space') + ->numeric() + ->sortable(), + Tables\Columns\TextColumn::make('bandwidth') + ->numeric() + ->sortable(), + Tables\Columns\TextColumn::make('price') + ->money() + ->sortable(), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListHostingPlans::route('/'), + 'create' => Pages\CreateHostingPlan::route('/create'), + 'edit' => Pages\EditHostingPlan::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Admin/Resources/HostingPlanResource/Pages/CreateHostingPlan.php b/app/Filament/Admin/Resources/HostingPlanResource/Pages/CreateHostingPlan.php new file mode 100644 index 00000000..f65913e7 --- /dev/null +++ b/app/Filament/Admin/Resources/HostingPlanResource/Pages/CreateHostingPlan.php @@ -0,0 +1,12 @@ +schema([ + // + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + // + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListResources::route('/'), + 'create' => Pages\CreateResource::route('/create'), + 'edit' => Pages\EditResource::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Admin/Resources/ResourceResource/Pages/CreateResource.php b/app/Filament/Admin/Resources/ResourceResource/Pages/CreateResource.php new file mode 100644 index 00000000..0c25a3d1 --- /dev/null +++ b/app/Filament/Admin/Resources/ResourceResource/Pages/CreateResource.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\TextInput::make('user_id') + ->required() + ->numeric(), + Forms\Components\TextInput::make('hosting_plan_id') + ->required() + ->numeric(), + Forms\Components\DatePicker::make('start_date') + ->required(), + Forms\Components\DatePicker::make('end_date'), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('user_id') + ->numeric() + ->sortable(), + Tables\Columns\TextColumn::make('hosting_plan_id') + ->numeric() + ->sortable(), + Tables\Columns\TextColumn::make('start_date') + ->date() + ->sortable(), + Tables\Columns\TextColumn::make('end_date') + ->date() + ->sortable(), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListUserHostingPlans::route('/'), + 'create' => Pages\CreateUserHostingPlan::route('/create'), + 'edit' => Pages\EditUserHostingPlan::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Admin/Resources/UserHostingPlanResource/Pages/CreateUserHostingPlan.php b/app/Filament/Admin/Resources/UserHostingPlanResource/Pages/CreateUserHostingPlan.php new file mode 100644 index 00000000..2a2277b8 --- /dev/null +++ b/app/Filament/Admin/Resources/UserHostingPlanResource/Pages/CreateUserHostingPlan.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\TextInput::make('name') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('email') + ->email() + ->required() + ->maxLength(255), + Forms\Components\DateTimePicker::make('email_verified_at'), + Forms\Components\TextInput::make('password') + ->password() + ->maxLength(255) + ->default(null), + Forms\Components\Textarea::make('two_factor_secret') + ->columnSpanFull(), + Forms\Components\Textarea::make('two_factor_recovery_codes') + ->columnSpanFull(), + Forms\Components\DateTimePicker::make('two_factor_confirmed_at'), + Forms\Components\TextInput::make('current_team_id') + ->numeric() + ->default(null), + Forms\Components\TextInput::make('profile_photo_path') + ->maxLength(2048) + ->default(null), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('name') + ->searchable(), + Tables\Columns\TextColumn::make('email') + ->searchable(), + Tables\Columns\TextColumn::make('email_verified_at') + ->dateTime() + ->sortable(), + Tables\Columns\TextColumn::make('two_factor_confirmed_at') + ->dateTime() + ->sortable(), + Tables\Columns\TextColumn::make('current_team_id') + ->numeric() + ->sortable(), + Tables\Columns\TextColumn::make('profile_photo_path') + ->searchable(), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListUsers::route('/'), + 'create' => Pages\CreateUser::route('/create'), + 'edit' => Pages\EditUser::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Admin/Resources/UserResource/Pages/CreateUser.php b/app/Filament/Admin/Resources/UserResource/Pages/CreateUser.php new file mode 100644 index 00000000..330d3996 --- /dev/null +++ b/app/Filament/Admin/Resources/UserResource/Pages/CreateUser.php @@ -0,0 +1,12 @@ +