Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim-the-Diamond authored and github-actions[bot] committed Aug 28, 2024
1 parent 833e3cf commit 024a3a8
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 45 deletions.
19 changes: 9 additions & 10 deletions app/Providers/Filament/PressPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

namespace App\Providers\Filament;

use Filament\Http\Middleware\Authenticate;
use Filament\Http\Middleware\DisableBladeIconComponents;
use Filament\Http\Middleware\DispatchServingFilamentEvent;
use Filament\Pages;
use Filament\Panel;
use Filament\PanelProvider;
use Moox\Security\Services\Login;
use Filament\Support\Colors\Color;
use Moox\Security\Services\ResetPassword;
use Filament\Http\Middleware\Authenticate;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
use Illuminate\Cookie\Middleware\EncryptCookies;
use Moox\Security\Services\RequestPasswordReset;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Session\Middleware\AuthenticateSession;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\View\Middleware\ShareErrorsFromSession;
use Filament\Http\Middleware\DisableBladeIconComponents;
use Filament\Http\Middleware\DispatchServingFilamentEvent;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
use Moox\Security\Services\Login;
use Moox\Security\Services\RequestPasswordReset;
use Moox\Security\Services\ResetPassword;

class PressPanelProvider extends PanelProvider
{
Expand Down Expand Up @@ -117,7 +117,6 @@ public function panel(Panel $panel): Panel
\Moox\PressWiki\WpWikiDepartmentTopicPlugin::make(),
\Moox\PressWiki\WpWikiLocationTopicPlugin::make(),


\Moox\PressTrainings\WpTrainingPlugin::make(),
\Moox\PressTrainings\WpTrainingsTopicPlugin::make(),

Expand Down
10 changes: 5 additions & 5 deletions packages/press-trainings/src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function handle()
if ($panelsToregister != null) {
if (is_array($panelsToregister)) {
foreach ($panelsToregister as $panelprovider) {
$this->registerPlugins($providerPath . '/' . $panelprovider);
$this->registerPlugins($providerPath.'/'.$panelprovider);
}
} else {
$this->registerPlugins($panelsToregister);
Expand Down Expand Up @@ -114,11 +114,11 @@ public function registerPlugins(string $providerPath): void
$newPlugins = '';

foreach ($pluginsToAdd as $plugin) {
$searchPlugin = '/' . $plugin . '/';
$searchPlugin = '/'.$plugin.'/';
if (preg_match($searchPlugin, $content)) {
warning("$plugin already registered.");
} else {
$newPlugins .= $intend . $namespace . '\\' . $plugin . $function . "\n";
$newPlugins .= $intend.$namespace.'\\'.$plugin.$function."\n";
}
}

Expand All @@ -133,7 +133,7 @@ public function registerPlugins(string $providerPath): void

$pluginsSection = " ->plugins([\n$newPlugins\n ]);";
$placeholderPattern = '/(\->authMiddleware\(\[.*?\]\))\s*\;/s';
$replacement = "$1\n" . $pluginsSection;
$replacement = "$1\n".$pluginsSection;
$newContent = preg_replace($placeholderPattern, $replacement, $content, 1);
}

Expand All @@ -160,7 +160,7 @@ public function getPanelProviderPath(): string|array
);
}
if (count($providers) == 1) {
$providerPath .= '/' . $providers[0]->getBasename();
$providerPath .= '/'.$providers[0]->getBasename();
}

return $providerPath;
Expand Down
4 changes: 2 additions & 2 deletions packages/press-trainings/src/Models/WpTraining.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Moox\PressTrainings\Models;

use Moox\Press\Models\WpBasePost;
use Illuminate\Database\Eloquent\Builder;
use Moox\Press\Models\WpBasePost;

class WpTraining extends WpBasePost
{
Expand All @@ -21,6 +21,6 @@ public static function boot()

public function trainingsTopic()
{
return $this->belongsToMany(WpTrainingsTopic::class, config('press.wordpress_prefix') . 'term_relationships', 'object_id', 'term_taxonomy_id');
return $this->belongsToMany(WpTrainingsTopic::class, config('press.wordpress_prefix').'term_relationships', 'object_id', 'term_taxonomy_id');
}
}
19 changes: 9 additions & 10 deletions packages/press-trainings/src/Resources/WpTrainingResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

namespace Moox\PressTrainings\Resources;

use Filament\Tables;
use Filament\Forms\Form;
use Filament\Tables\Table;
use Filament\Resources\Resource;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\Grid;
use Filament\Tables\Actions\Action;
use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\RichEditor;
use Moox\PressTrainings\Models\WpTraining;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Actions\Action;
use Filament\Tables\Actions\DeleteBulkAction;
use Filament\Tables\Table;
use Moox\PressTrainings\Models\WpTraining;
use Moox\PressTrainings\Resources\WpTrainingResource\Pages;
use Moox\PressTrainings\Resources\WpTrainingResource\RelationManagers;

Expand Down Expand Up @@ -282,14 +282,13 @@ public static function table(Table $table): Table
->sortable()
->searchable(),


Tables\Columns\TextColumn::make('post_date')
->label(__('core::post.post_date'))
->toggleable()
->dateTime(),
])
->actions([
Action::make('Edit')->url(fn($record): string => "/wp/wp-admin/post.php?post={$record->ID}&action=edit"),
Action::make('Edit')->url(fn ($record): string => "/wp/wp-admin/post.php?post={$record->ID}&action=edit"),
])
->bulkActions([DeleteBulkAction::make()]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Filament\Resources\Pages\ListRecords;
use Moox\Core\Traits\HasDynamicTabs;
use Moox\PressTrainings\Models\WpTraining;
use Moox\PressWiki\Models\WpWiki;
use Moox\PressTrainings\Resources\WpTrainingResource;

class ListWpTrainings extends ListRecords
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Filament\Resources\Pages\ListRecords;
use Moox\Core\Traits\HasDynamicTabs;
use Moox\PressTrainings\Models\WpTraining;
use Moox\PressWiki\Models\WpWiki;
use Moox\PressTrainings\Resources\WpTrainingResource;

class ListWpTrainings extends ListRecords
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

namespace Moox\PressTrainings\Resources;

use Filament\Tables;
use Filament\Forms\Form;
use Filament\Tables\Table;
use Filament\Resources\Resource;
use Filament\Forms\Components\Grid;
use Filament\Forms\Components\Section;
use Filament\Tables\Actions\EditAction;
use Filament\Tables\Actions\ViewAction;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Actions\DeleteBulkAction;
use Filament\Tables\Actions\EditAction;
use Filament\Tables\Actions\ViewAction;
use Filament\Tables\Table;
use Moox\PressTrainings\Models\WpTrainingsTopic;
use Moox\PressTrainings\Resources\WpTrainingsTopicResource\Pages;

Expand Down
2 changes: 1 addition & 1 deletion packages/press-trainings/src/WpTrainingsTopicPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Moox\PressTrainings;

use Filament\Panel;
use Filament\Contracts\Plugin;
use Filament\Panel;
use Filament\Support\Concerns\EvaluatesClosures;
use Moox\PressTrainings\Resources\WpTrainingsTopicResource;

Expand Down
2 changes: 1 addition & 1 deletion packages/press-wiki/config/press-wiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
'field' => 'post_status',
'operator' => '!=',
'value' => 'trash',
]
],
],
],

Expand Down
13 changes: 6 additions & 7 deletions packages/press-wiki/src/Models/WpWiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

namespace Moox\PressWiki\Models;

use Moox\Press\Models\WpBasePost;
use Illuminate\Database\Eloquent\Builder;
use Moox\PressTrainings\Models\WpTrainingsTopic;
use Moox\Press\Models\WpBasePost;

class WpWiki extends WpBasePost
{
Expand All @@ -22,26 +21,26 @@ public static function boot()

public function letterTopics()
{
return $this->belongsToMany(WpWikiLetterTopic::class, config('press.wordpress_prefix') . 'term_relationships', 'object_id', 'term_taxonomy_id');
return $this->belongsToMany(WpWikiLetterTopic::class, config('press.wordpress_prefix').'term_relationships', 'object_id', 'term_taxonomy_id');
}

public function companyTopics()
{
return $this->belongsToMany(WpWikiCompanyTopic::class, config('press.wordpress_prefix') . 'term_relationships', 'object_id', 'term_taxonomy_id');
return $this->belongsToMany(WpWikiCompanyTopic::class, config('press.wordpress_prefix').'term_relationships', 'object_id', 'term_taxonomy_id');
}

public function departmentTopics()
{
return $this->belongsToMany(WpWikiDepartmentTopic::class, config('press.wordpress_prefix') . 'term_relationships', 'object_id', 'term_taxonomy_id');
return $this->belongsToMany(WpWikiDepartmentTopic::class, config('press.wordpress_prefix').'term_relationships', 'object_id', 'term_taxonomy_id');
}

public function locationTopics()
{
return $this->belongsToMany(WpWikiLocationTopic::class, config('press.wordpress_prefix') . 'term_relationships', 'object_id', 'term_taxonomy_id');
return $this->belongsToMany(WpWikiLocationTopic::class, config('press.wordpress_prefix').'term_relationships', 'object_id', 'term_taxonomy_id');
}

public function wikiTopics()
{
return $this->belongsToMany(WpWikiTopic::class, config('press.wordpress_prefix') . 'term_relationships', 'object_id', 'term_taxonomy_id');
return $this->belongsToMany(WpWikiTopic::class, config('press.wordpress_prefix').'term_relationships', 'object_id', 'term_taxonomy_id');
}
}
2 changes: 1 addition & 1 deletion packages/press-wiki/src/Resources/WpWikiResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public static function table(Table $table): Table
->sortable(),
])
->actions([
Action::make('Edit')->url(fn($record): string => "/wp/wp-admin/post.php?post={$record->ID}&action=edit"),
Action::make('Edit')->url(fn ($record): string => "/wp/wp-admin/post.php?post={$record->ID}&action=edit"),
])
->bulkActions([DeleteBulkAction::make()]);
}
Expand Down

0 comments on commit 024a3a8

Please sign in to comment.