Filament V3
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Ploi Core
|
||||
|
||||
With Ploi Core, you'll power-launch your webhosting company.
|
||||
With Ploi Core, you'll power-launch your webhosting company.
|
||||
Using the ploi.io system as backbone you will be able to serve your customers your custom panel & feeling.
|
||||
|
||||
<p align="center"><img src="https://ploi-core.io/images/og.jpg" width="100%"></p>
|
||||
@@ -17,4 +17,4 @@ https://ploi.io
|
||||
|
||||
The contribution guide can be found inside our documentation:
|
||||
|
||||
https://docs.ploi-core.io/getting-started/contribution-guide
|
||||
https://docs.ploi-core.io/261-getting-started/639-contribution-guide
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Actions\Server;
|
||||
use App\Models\Server;
|
||||
use App\Services\Ploi\Ploi;
|
||||
use Filament\Notifications\Notification;
|
||||
use Throwable;
|
||||
|
||||
class SynchronizeServerAction
|
||||
{
|
||||
@@ -12,9 +13,9 @@ class SynchronizeServerAction
|
||||
{
|
||||
try {
|
||||
$serverData = Ploi::make()->server()->get($ploiServerId)->getData();
|
||||
} catch (\Throwable $exception) {
|
||||
} catch (Throwable $exception) {
|
||||
Notification::make()
|
||||
->body('An error has occurred: ' . $exception->getMessage())
|
||||
->title('An error has occurred: ' . $exception->getMessage())
|
||||
->danger()
|
||||
->send();
|
||||
|
||||
@@ -33,9 +34,9 @@ class SynchronizeServerAction
|
||||
'internal_ip' => $serverData->internal_ip,
|
||||
'available_php_versions' => $serverData->installed_php_versions,
|
||||
]);
|
||||
} catch (\Throwable $exception) {
|
||||
} catch (Throwable $exception) {
|
||||
Notification::make()
|
||||
->body('An error has occurred: ' . $exception->getMessage())
|
||||
->title('An error has occurred: ' . $exception->getMessage())
|
||||
->danger()
|
||||
->send();
|
||||
|
||||
@@ -43,7 +44,7 @@ class SynchronizeServerAction
|
||||
}
|
||||
|
||||
Notification::make()
|
||||
->body(__('Server :server synchronized successfully.', ['server' => $server->name]))
|
||||
->title(__('Server :server synchronized successfully.', ['server' => $server->name]))
|
||||
->success()
|
||||
->send();
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Actions\Site;
|
||||
|
||||
use App\Models\Site;
|
||||
use App\Models\Server;
|
||||
use App\Models\Site;
|
||||
use App\Services\Ploi\Ploi;
|
||||
use Filament\Notifications\Notification;
|
||||
|
||||
@@ -46,7 +46,7 @@ class SynchronizeSiteAction
|
||||
}
|
||||
|
||||
Notification::make()
|
||||
->body(__('Site :site synchronized successfully.', ['site' => $site->domain]))
|
||||
->title(__('Site :site synchronized successfully.', ['site' => $site->domain]))
|
||||
->success()
|
||||
->send();
|
||||
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
|
||||
namespace App\Console\Commands\Core;
|
||||
|
||||
use Exception;
|
||||
use App\Models\User;
|
||||
use RuntimeException;
|
||||
use App\Models\Package;
|
||||
use App\Models\User;
|
||||
use App\Services\Ploi\Ploi;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Services\VersionChecker;
|
||||
use Exception;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Str;
|
||||
use RuntimeException;
|
||||
|
||||
class Install extends Command
|
||||
{
|
||||
@@ -43,8 +43,8 @@ class Install extends Command
|
||||
$this->writeSeparationLine();
|
||||
$this->info('Make sure to also setup emailing, the cronjob and the queue worker.');
|
||||
$this->line(' ');
|
||||
$this->info('Setting up emailing: https://docs.ploi-core.io/getting-started/setting-up-email');
|
||||
$this->info('Setting up cronjob & queue worker: https://docs.ploi-core.io/getting-started/installation');
|
||||
$this->info('Setting up emailing: https://docs.ploi-core.io/261-getting-started/918-setting-up-email');
|
||||
$this->info('Setting up cronjob & queue worker: https://docs.ploi-core.io/261-getting-started/638-installation');
|
||||
$this->writeSeparationLine();
|
||||
$this->line(' ');
|
||||
$this->info('Visit your platform at ' . env('APP_URL'));
|
||||
|
||||
@@ -2,19 +2,17 @@
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use App\Models\Server;
|
||||
use App\Models\Package;
|
||||
use Filament\Pages\Page;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Filament\Forms\Components\Grid;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use App\Models\Server;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Components\Actions\Action;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Pages\Page;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Settings extends Page
|
||||
{
|
||||
@@ -40,15 +38,15 @@ class Settings extends Page
|
||||
'default_package' => setting('default_package'),
|
||||
'default_language' => setting('default_language'),
|
||||
'rotate_logs_after' => setting('rotate_logs_after'),
|
||||
'trial' => (bool) setting('trial'),
|
||||
'support' => (bool) setting('support'),
|
||||
'documentation' => (bool) setting('documentation'),
|
||||
'allow_registration' => (bool) setting('allow_registration'),
|
||||
'receive_email_on_server_creation' => (bool) setting('receive_email_on_server_creation'),
|
||||
'receive_email_on_site_creation' => (bool) setting('receive_email_on_site_creation'),
|
||||
'enable_api' => (bool) setting('enable_api'),
|
||||
'trial' => (bool)setting('trial'),
|
||||
'support' => (bool)setting('support'),
|
||||
'documentation' => (bool)setting('documentation'),
|
||||
'allow_registration' => (bool)setting('allow_registration'),
|
||||
'receive_email_on_server_creation' => (bool)setting('receive_email_on_server_creation'),
|
||||
'receive_email_on_site_creation' => (bool)setting('receive_email_on_site_creation'),
|
||||
'enable_api' => (bool)setting('enable_api'),
|
||||
'api_token' => setting('api_token'),
|
||||
'isolate_per_site_per_user' => (bool) setting('isolate_per_site_per_user'),
|
||||
'isolate_per_site_per_user' => (bool)setting('isolate_per_site_per_user'),
|
||||
'default_os' => setting('default_os', Server::OS_UBUNTU_22),
|
||||
]);
|
||||
}
|
||||
@@ -56,35 +54,34 @@ class Settings extends Page
|
||||
public function getFormSchema(): array
|
||||
{
|
||||
return [
|
||||
Grid::make(2)
|
||||
Forms\Components\Grid::make(2)
|
||||
->schema([
|
||||
|
||||
Grid::make(1)
|
||||
Forms\Components\Grid::make(1)
|
||||
->schema([
|
||||
TextInput::make('name')
|
||||
Forms\Components\TextInput::make('name')
|
||||
->label(__('Company name'))
|
||||
->required(),
|
||||
TextInput::make('email')
|
||||
Forms\Components\TextInput::make('email')
|
||||
->label(__('E-mail address'))
|
||||
->email(),
|
||||
TextInput::make('support_emails')
|
||||
Forms\Components\TextInput::make('support_emails')
|
||||
->label(__('Support email address'))
|
||||
->helperText('Separate by comma to allow more email addresses'),
|
||||
])
|
||||
->columnSpan(2),
|
||||
Select::make('default_package')
|
||||
->options(fn () => Package::orderBy('name')->get()->mapWithKeys(fn (Package $package) => [$package->id => $package->name]))
|
||||
Forms\Components\Select::make('default_package')
|
||||
->options(fn() => Package::orderBy('name')->pluck('name', 'id'))
|
||||
->label(__('Select default package'))
|
||||
->helperText(__('Select the default package a user should get when you create or they register')),
|
||||
Select::make('default_language')
|
||||
->options(collect(languages())->mapWithKeys(fn (string $language) => [$language => $language]))
|
||||
Forms\Components\Select::make('default_language')
|
||||
->options(collect(languages())->mapWithKeys(fn(string $language) => [$language => $language]))
|
||||
->label('Select default language')
|
||||
->helperText('Select the default language a user should get when you create or they register'),
|
||||
FileUpload::make('logo')
|
||||
Forms\Components\FileUpload::make('logo')
|
||||
->label(__('Logo'))
|
||||
->disk('logos')
|
||||
->columnSpan(2),
|
||||
Select::make('rotate_logs_after')
|
||||
Forms\Components\Select::make('rotate_logs_after')
|
||||
->label(__('This will rotate any logs older than selected, this helps cleanup your database'))
|
||||
->options([
|
||||
null => __("Don't rotate logs"),
|
||||
@@ -98,7 +95,7 @@ class Settings extends Page
|
||||
'years-4' => __('Older than 4 years'),
|
||||
])
|
||||
->columnSpan(1),
|
||||
Select::make('default_os')
|
||||
Forms\Components\Select::make('default_os')
|
||||
->label(__('Select the default OS that should be used when users create a server'))
|
||||
->default(Server::OS_UBUNTU_22)
|
||||
->options([
|
||||
@@ -107,30 +104,30 @@ class Settings extends Page
|
||||
Server::OS_UBUNTU_22 => __('Ubuntu 22'),
|
||||
])
|
||||
->columnSpan(1),
|
||||
Toggle::make('trial')
|
||||
Forms\Components\Toggle::make('trial')
|
||||
->label(__('Enable trial'))
|
||||
->helperText(__('This will allow you to have users with trials.')),
|
||||
Toggle::make('allow_registration')
|
||||
Forms\Components\Toggle::make('allow_registration')
|
||||
->label(__('Allow registration'))
|
||||
->helperText(__('Allow customer registration')),
|
||||
Toggle::make('support')
|
||||
Forms\Components\Toggle::make('support')
|
||||
->label(__('Enable support platform'))
|
||||
->helperText(__('This will allow your customers to make support requests to you.')),
|
||||
Toggle::make('documentation')
|
||||
Forms\Components\Toggle::make('documentation')
|
||||
->label(__('Enable documentation platform'))
|
||||
->helperText(__('This will allow you to create articles for your users to look at.')),
|
||||
Toggle::make('receive_email_on_server_creation')
|
||||
Forms\Components\Toggle::make('receive_email_on_server_creation')
|
||||
->label(__('Receive email when customers create server'))
|
||||
->helperText(__('This will send an email to all admins notifying them about a new server installation.')),
|
||||
Toggle::make('receive_email_on_site_creation')
|
||||
Forms\Components\Toggle::make('receive_email_on_site_creation')
|
||||
->label(__('Receive email when customers create site'))
|
||||
->helperText(__('This will send an email to all admins notifying them about a new site installation.')),
|
||||
Toggle::make('enable_api')
|
||||
Forms\Components\Toggle::make('enable_api')
|
||||
->label(__('Enable API'))
|
||||
->helperText(new HtmlString(__('This will allow you to interact with your system via the API. ') . '<a href="https://docs.ploi-core.io/core-api/introduction" target="_blank" class="text-primary-600">' . __('More information') . '</a>')),
|
||||
TextInput::make('api_token')
|
||||
->helperText(new HtmlString(__('This will allow you to interact with your system via the API. ') . '<a href="https://docs.ploi-core.io/304-core-api/737-introduction" target="_blank" class="text-primary-600">' . __('More information') . '</a>')),
|
||||
Forms\Components\TextInput::make('api_token')
|
||||
->label(__('API token'))
|
||||
->afterStateHydrated(function (?string $state, TextInput $component) {
|
||||
->afterStateHydrated(function (?string $state, Forms\Components\TextInput $component) {
|
||||
$state = filled($state) ? decrypt($state) : null;
|
||||
|
||||
$component->state($state);
|
||||
@@ -148,7 +145,7 @@ class Settings extends Page
|
||||
->tooltip('Generate'),
|
||||
])
|
||||
->suffixAction($generateAction),
|
||||
Toggle::make('isolate_per_site_per_user')
|
||||
Forms\Components\Toggle::make('isolate_per_site_per_user')
|
||||
->label(__('Enable site isolation per site & user'))
|
||||
->helperText(__('This will make sure each site created by one user is always isolated from another.')),
|
||||
]),
|
||||
@@ -178,11 +175,11 @@ class Settings extends Page
|
||||
|
||||
Notification::make()
|
||||
->success()
|
||||
->body(__('Settings saved.'))
|
||||
->title(__('Settings saved.'))
|
||||
->send();
|
||||
|
||||
if ($state['logo'] !== $oldLogo || $state['documentation'] !== $oldDocumentation || $state['support'] !== $oldSupport) {
|
||||
$this->redirectRoute('filament.pages.settings');
|
||||
$this->redirect(Settings::getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use Filament\Pages\Page;
|
||||
use App\Services\VersionChecker;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Pages\Page;
|
||||
use Laravel\Horizon\Contracts\MasterSupervisorRepository;
|
||||
|
||||
class System extends Page
|
||||
{
|
||||
protected static ?string $navigationIcon = 'heroicon-o-adjustments';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-adjustments-vertical';
|
||||
|
||||
protected static string $view = 'filament.pages.system';
|
||||
|
||||
@@ -33,13 +33,13 @@ class System extends Page
|
||||
|
||||
Notification::make()
|
||||
->success()
|
||||
->body(__('Refreshed versions'))
|
||||
->title(__('Refreshed versions'))
|
||||
->send();
|
||||
}
|
||||
|
||||
public function getHorizonWorkerStatus(): bool
|
||||
{
|
||||
return rescue(fn () => (bool) app(MasterSupervisorRepository::class)->all(), false, false);
|
||||
return rescue(fn() => (bool)app(MasterSupervisorRepository::class)->all(), false, false);
|
||||
}
|
||||
|
||||
public function hasAvailableUpdate(): bool
|
||||
@@ -47,7 +47,7 @@ class System extends Page
|
||||
return app(VersionChecker::class)->getVersions()->isOutOfDate();
|
||||
}
|
||||
|
||||
protected static function getNavigationBadge(): ?string
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
$systemChecker = app(VersionChecker::class);
|
||||
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use Filament\Actions;
|
||||
use Filament\Forms;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Pages\Page;
|
||||
use Illuminate\Support\Str;
|
||||
use Filament\Pages\Actions\Action;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Forms\Components\MarkdownEditor;
|
||||
|
||||
class Terms extends Page
|
||||
{
|
||||
@@ -26,7 +25,7 @@ class Terms extends Page
|
||||
cache()->forget('core.settings');
|
||||
|
||||
$this->form->fill([
|
||||
'accept_terms_required' => (bool) setting('accept_terms_required'),
|
||||
'accept_terms_required' => (bool)setting('accept_terms_required'),
|
||||
'terms' => setting('terms'),
|
||||
'privacy' => setting('privacy'),
|
||||
]);
|
||||
@@ -35,20 +34,20 @@ class Terms extends Page
|
||||
protected function getFormSchema(): array
|
||||
{
|
||||
return [
|
||||
Toggle::make('accept_terms_required')
|
||||
Forms\Components\Toggle::make('accept_terms_required')
|
||||
->label(__(' Require users to accept terms of service on registration'))
|
||||
->helperText(__('This will require newly registered users to accept the terms of service.')),
|
||||
MarkdownEditor::make('terms')
|
||||
Forms\Components\MarkdownEditor::make('terms')
|
||||
->label(__('Content Terms Of Service')),
|
||||
MarkdownEditor::make('privacy')
|
||||
Forms\Components\MarkdownEditor::make('privacy')
|
||||
->label(__('Content Privacy Policy')),
|
||||
];
|
||||
}
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('load_terms_template')
|
||||
Actions\Action::make('load_terms_template')
|
||||
->label(__('Load Terms Of Service Template'))
|
||||
->action(function (self $livewire) {
|
||||
$template = Str::of(file_get_contents(storage_path('templates/terms-of-service.md')))
|
||||
@@ -67,7 +66,7 @@ class Terms extends Page
|
||||
|
||||
Notification::make()
|
||||
->success()
|
||||
->body(__('Loaded Terms Of Service Template'))
|
||||
->title(__('Loaded Terms Of Service Template'))
|
||||
->send();
|
||||
}),
|
||||
];
|
||||
@@ -88,7 +87,7 @@ class Terms extends Page
|
||||
|
||||
Notification::make()
|
||||
->success()
|
||||
->body(__('Terms saved.'))
|
||||
->title(__('Terms saved.'))
|
||||
->send();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,15 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use App\Models\Alert;
|
||||
use Illuminate\Support\Str;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Columns\BadgeColumn;
|
||||
use Filament\Forms\Components\DateTimePicker;
|
||||
use Filament\Forms\Components\MarkdownEditor;
|
||||
use App\Filament\Resources\AlertResource\Pages;
|
||||
use App\Models\Alert;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class AlertResource extends Resource
|
||||
{
|
||||
@@ -31,11 +28,11 @@ class AlertResource extends Resource
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
MarkdownEditor::make('message')
|
||||
Forms\Components\MarkdownEditor::make('message')
|
||||
->label(__('Content'))
|
||||
->columnSpan(2)
|
||||
->required(),
|
||||
Select::make('type')
|
||||
Forms\Components\Select::make('type')
|
||||
->label(__('Type'))
|
||||
->options([
|
||||
Alert::TYPE_INFO => __('Informational'),
|
||||
@@ -43,9 +40,9 @@ class AlertResource extends Resource
|
||||
Alert::TYPE_DANGER => __('Danger'),
|
||||
])
|
||||
->required(),
|
||||
DateTimePicker::make('expires_at')
|
||||
Forms\Components\DateTimePicker::make('expires_at')
|
||||
->label(__('Expires at'))
|
||||
->withoutSeconds(),
|
||||
->seconds(false),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -53,24 +50,25 @@ class AlertResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('message')
|
||||
Tables\Columns\TextColumn::make('message')
|
||||
->label(__('Content'))
|
||||
->formatStateUsing(fn (?string $state) => new HtmlString(Str::markdown($state))),
|
||||
BadgeColumn::make('type')
|
||||
->formatStateUsing(fn(?string $state) => new HtmlString(Str::markdown($state))),
|
||||
Tables\Columns\TextColumn::make('type')
|
||||
->label(__('Type'))
|
||||
->enum([
|
||||
->badge()
|
||||
->formatStateUsing(fn(string $state) => match ($state) {
|
||||
Alert::TYPE_INFO => __('Informational'),
|
||||
Alert::TYPE_WARNING => __('Warning'),
|
||||
Alert::TYPE_DANGER => __('Danger'),
|
||||
])
|
||||
})
|
||||
->colors([
|
||||
'primary' => Alert::TYPE_INFO,
|
||||
'warning' => Alert::TYPE_WARNING,
|
||||
'danger' => Alert::TYPE_DANGER,
|
||||
]),
|
||||
TextColumn::make('expires_at')
|
||||
Tables\Columns\TextColumn::make('expires_at')
|
||||
->label('Expires Date')
|
||||
->formatStateUsing(fn (?string $state) => filled($state) ? $state : '-'),
|
||||
->default('-'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\AlertResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions\DeleteAction;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use App\Filament\Resources\AlertResource;
|
||||
|
||||
@@ -10,10 +10,10 @@ class EditAlert extends EditRecord
|
||||
{
|
||||
protected static string $resource = AlertResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make(),
|
||||
Actions\DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\AlertResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions\CreateAction;
|
||||
use Filament\Actions;
|
||||
use App\Filament\Resources\AlertResource;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
@@ -10,10 +10,10 @@ class ListAlerts extends ListRecords
|
||||
{
|
||||
protected static string $resource = AlertResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
Actions\CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Tables;
|
||||
use App\Models\Certificate;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use App\Filament\Resources\CertificateResource\Pages;
|
||||
use App\Models\Certificate;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
class CertificateResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Certificate::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-annotation';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-chat-bubble-bottom-center-text';
|
||||
|
||||
protected static ?string $navigationGroup = 'Site management';
|
||||
|
||||
@@ -28,15 +28,12 @@ class CertificateResource extends Resource
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('site.name'),
|
||||
Forms\Components\TextInput::make('server_id'),
|
||||
Forms\Components\TextInput::make('status')
|
||||
->maxLength(255),
|
||||
Forms\Components\TextInput::make('status'),
|
||||
Forms\Components\TextInput::make('ploi_id'),
|
||||
Forms\Components\TextInput::make('domain')
|
||||
->maxLength(255),
|
||||
Forms\Components\TextInput::make('domain'),
|
||||
Forms\Components\Textarea::make('certificate'),
|
||||
Forms\Components\Textarea::make('private'),
|
||||
Forms\Components\TextInput::make('type')
|
||||
->maxLength(255),
|
||||
Forms\Components\TextInput::make('type'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -52,11 +49,12 @@ class CertificateResource extends Resource
|
||||
->label(__('Main domain')),
|
||||
Tables\Columns\TextColumn::make('type')
|
||||
->label('Type'),
|
||||
Tables\Columns\BadgeColumn::make('status')
|
||||
->enum([
|
||||
Tables\Columns\TextColumn::make('status')
|
||||
->badge()
|
||||
->formatStateUsing(fn(string $state) => match ($state) {
|
||||
Certificate::STATUS_BUSY => __('Busy'),
|
||||
Certificate::STATUS_ACTIVE => __('Active'),
|
||||
])
|
||||
})
|
||||
->colors([
|
||||
'warning' => Certificate::STATUS_BUSY,
|
||||
'success' => Certificate::STATUS_ACTIVE,
|
||||
@@ -81,6 +79,7 @@ class CertificateResource extends Resource
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\CertificateResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use App\Filament\Resources\CertificateResource;
|
||||
|
||||
@@ -10,7 +10,7 @@ class ListCertificates extends ListRecords
|
||||
{
|
||||
protected static string $resource = CertificateResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Tables;
|
||||
use App\Models\Cronjob;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use App\Filament\Resources\CronjobResource\Pages;
|
||||
use App\Models\Cronjob;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class CronjobResource extends Resource
|
||||
{
|
||||
@@ -34,11 +34,12 @@ class CronjobResource extends Resource
|
||||
Tables\Columns\TextColumn::make('site.domain')
|
||||
->searchable()
|
||||
->label(__('Site')),
|
||||
Tables\Columns\BadgeColumn::make('status')
|
||||
->enum([
|
||||
Tables\Columns\TextColumn::make('status')
|
||||
->badge()
|
||||
->formatStateUsing(fn(string $state) => match ($state) {
|
||||
Cronjob::STATUS_BUSY => __('Busy'),
|
||||
Cronjob::STATUS_ACTIVE => __('Active'),
|
||||
])
|
||||
})
|
||||
->colors([
|
||||
'warning' => Cronjob::STATUS_BUSY,
|
||||
'success' => Cronjob::STATUS_ACTIVE,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\CronjobResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use App\Filament\Resources\CronjobResource;
|
||||
|
||||
@@ -10,7 +10,7 @@ class EditCronjob extends EditRecord
|
||||
{
|
||||
protected static string $resource = CronjobResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\DeleteAction::make(),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\CronjobResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use App\Filament\Resources\CronjobResource;
|
||||
|
||||
@@ -10,7 +10,7 @@ class ListCronjobs extends ListRecords
|
||||
{
|
||||
protected static string $resource = CronjobResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Tables;
|
||||
use App\Models\Database;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use App\Filament\Resources\DatabaseResource\Pages;
|
||||
use App\Models\Database;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class DatabaseResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Database::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-database';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-circle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Site management';
|
||||
|
||||
@@ -40,17 +40,17 @@ class DatabaseResource extends Resource
|
||||
Tables\Columns\TextColumn::make('site.domain')
|
||||
->label(__('Site'))
|
||||
->searchable(),
|
||||
Tables\Columns\BadgeColumn::make('status')
|
||||
->enum([
|
||||
Tables\Columns\TextColumn::make('status')
|
||||
->badge()
|
||||
->formatStateUsing(fn(string $state) => match ($state) {
|
||||
Database::STATUS_BUSY => __('Busy'),
|
||||
Database::STATUS_ACTIVE => __('Active'),
|
||||
])
|
||||
})
|
||||
->colors([
|
||||
'warning' => Database::STATUS_BUSY,
|
||||
'success' => Database::STATUS_ACTIVE,
|
||||
])
|
||||
->label(__('Status')),
|
||||
|
||||
Tables\Columns\TextColumn::make('created_at')
|
||||
->label(__('Date'))
|
||||
->sortable()
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
namespace App\Filament\Resources\DatabaseResource\Pages;
|
||||
|
||||
use App\Filament\Resources\DatabaseResource;
|
||||
use App\Mail\Database\PasswordReset;
|
||||
use App\Models\Database;
|
||||
use App\Services\Ploi\Ploi;
|
||||
use Filament\Resources\Pages\Page;
|
||||
use App\Mail\Database\PasswordReset;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Notifications\Notification;
|
||||
use App\Filament\Resources\DatabaseResource;
|
||||
use Filament\Resources\Pages\Page;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class EditDatabase extends Page
|
||||
{
|
||||
@@ -56,7 +56,7 @@ class EditDatabase extends Page
|
||||
$this->recentlyUpdatedPassword = $data->new_password;
|
||||
|
||||
Notification::make()
|
||||
->body(__('Successfully reset database password.'))
|
||||
->title(__('Successfully reset database password.'))
|
||||
->success()
|
||||
->send();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\DatabaseResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use App\Filament\Resources\DatabaseResource;
|
||||
|
||||
@@ -10,7 +10,7 @@ class ListDatabases extends ListRecords
|
||||
{
|
||||
protected static string $resource = DatabaseResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
|
||||
@@ -2,17 +2,16 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use App\Models\DocumentationCategory;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\MarkdownEditor;
|
||||
use App\Filament\Resources\DocumentationCategoryResource\Pages;
|
||||
use App\Filament\Resources\DocumentationCategoryResource\RelationManagers\DocumentationItemsRelationManager;
|
||||
use App\Filament\Resources\DocumentationCategoryResource\RelationManagers;
|
||||
use App\Models\DocumentationCategory;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class DocumentationCategoryResource extends Resource
|
||||
{
|
||||
@@ -28,21 +27,21 @@ class DocumentationCategoryResource extends Resource
|
||||
|
||||
protected static ?string $label = 'Category';
|
||||
|
||||
protected static function shouldRegisterNavigation(): bool
|
||||
public static function shouldRegisterNavigation(): bool
|
||||
{
|
||||
return (bool) setting('documentation');
|
||||
return (bool)setting('documentation');
|
||||
}
|
||||
|
||||
public static function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
TextInput::make('title')
|
||||
Forms\Components\TextInput::make('title')
|
||||
->label(__('Title'))
|
||||
->unique(table: DocumentationCategory::class, column: 'title', ignoreRecord: true)
|
||||
->required()
|
||||
->columnSpan(2),
|
||||
MarkdownEditor::make('description')
|
||||
Forms\Components\MarkdownEditor::make('description')
|
||||
->label(__('Description'))
|
||||
->required()
|
||||
->columnSpan(2),
|
||||
@@ -53,20 +52,20 @@ class DocumentationCategoryResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('title')
|
||||
Tables\Columns\TextColumn::make('title')
|
||||
->searchable()
|
||||
->sortable()
|
||||
->label(__('Title')),
|
||||
TextColumn::make('description')
|
||||
Tables\Columns\TextColumn::make('description')
|
||||
->label(__('Description'))
|
||||
->formatStateUsing(fn (string $state) => new HtmlString(Str::markdown($state))),
|
||||
->formatStateUsing(fn(string $state) => new HtmlString(Str::markdown($state))),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
DocumentationItemsRelationManager::class,
|
||||
RelationManagers\DocumentationItemsRelationManager::class,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\DocumentationCategoryResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions\DeleteAction;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use App\Filament\Resources\DocumentationCategoryResource;
|
||||
|
||||
@@ -10,10 +10,10 @@ class EditDocumentationCategory extends EditRecord
|
||||
{
|
||||
protected static string $resource = DocumentationCategoryResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make(),
|
||||
Actions\DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\DocumentationCategoryResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions\CreateAction;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use App\Filament\Resources\DocumentationCategoryResource;
|
||||
|
||||
@@ -10,10 +10,10 @@ class ListDocumentationCategories extends ListRecords
|
||||
{
|
||||
protected static string $resource = DocumentationCategoryResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
Actions\CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace App\Filament\Resources\DocumentationCategoryResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Tables;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
|
||||
class DocumentationItemsRelationManager extends RelationManager
|
||||
@@ -18,7 +18,7 @@ class DocumentationItemsRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $pluralLabel = 'Articles';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
@@ -28,7 +28,7 @@ class DocumentationItemsRelationManager extends RelationManager
|
||||
]);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
|
||||
@@ -2,15 +2,13 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use App\Models\DocumentationItem;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\MarkdownEditor;
|
||||
use App\Filament\Resources\DocumentationItemResource\Pages;
|
||||
use App\Models\DocumentationItem;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class DocumentationItemResource extends Resource
|
||||
{
|
||||
@@ -26,23 +24,23 @@ class DocumentationItemResource extends Resource
|
||||
|
||||
protected static ?string $label = 'Article';
|
||||
|
||||
protected static function shouldRegisterNavigation(): bool
|
||||
public static function shouldRegisterNavigation(): bool
|
||||
{
|
||||
return (bool) setting('documentation');
|
||||
return (bool)setting('documentation');
|
||||
}
|
||||
|
||||
public static function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
TextInput::make('title')
|
||||
Forms\Components\TextInput::make('title')
|
||||
->label(__('Title'))
|
||||
->required(),
|
||||
Select::make('documentation_category_id')
|
||||
Forms\Components\Select::make('documentation_category_id')
|
||||
->relationship('category', 'title')
|
||||
->searchable()
|
||||
->preload(),
|
||||
MarkdownEditor::make('content')
|
||||
Forms\Components\MarkdownEditor::make('content')
|
||||
->label(__('Content'))
|
||||
->required()
|
||||
->columnSpan(2),
|
||||
@@ -53,11 +51,10 @@ class DocumentationItemResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('title')
|
||||
Tables\Columns\TextColumn::make('title')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('category.title')
|
||||
Tables\Columns\TextColumn::make('category.title')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
]);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\DocumentationItemResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions\DeleteAction;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use App\Filament\Resources\DocumentationItemResource;
|
||||
|
||||
@@ -10,10 +10,10 @@ class EditDocumentationItem extends EditRecord
|
||||
{
|
||||
protected static string $resource = DocumentationItemResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make(),
|
||||
Actions\DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\DocumentationItemResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions\CreateAction;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use App\Filament\Resources\DocumentationItemResource;
|
||||
|
||||
@@ -10,10 +10,10 @@ class ListDocumentationItems extends ListRecords
|
||||
{
|
||||
protected static string $resource = DocumentationItemResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
Actions\CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,25 +2,20 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Tables;
|
||||
use App\Models\Package;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Forms\Components\Grid;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Section;
|
||||
use Filament\Forms\Components\Checkbox;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\CheckboxList;
|
||||
use App\Filament\Resources\PackageResource\Pages;
|
||||
use App\Filament\Resources\PackageResource\RelationManagers;
|
||||
use App\Models\Package;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class PackageResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Package::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-color-swatch';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-swatch';
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
|
||||
@@ -28,31 +23,31 @@ class PackageResource extends Resource
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
TextInput::make('name')
|
||||
Forms\Components\TextInput::make('name')
|
||||
->label(__('Name'))
|
||||
->required()
|
||||
->columnSpan(2),
|
||||
TextInput::make('maximum_sites')
|
||||
Forms\Components\TextInput::make('maximum_sites')
|
||||
->helperText(__('Set to 0 for unlimited'))
|
||||
->integer()
|
||||
->required(),
|
||||
TextInput::make('maximum_servers')
|
||||
Forms\Components\TextInput::make('maximum_servers')
|
||||
->helperText(__('Set to 0 for unlimited'))
|
||||
->integer()
|
||||
->required(),
|
||||
TextInput::make('stripe_plan_id')
|
||||
Forms\Components\TextInput::make('stripe_plan_id')
|
||||
->helperText(__('Enter the pricing ID from Stripe here') . ' - <a href="https://docs.ploi-core.io/digging-deeper/using-stripe" target="ploi-docs-stripe" class="text-primary-500">How does this work?</a>')
|
||||
->label(__('Stripe ID'))
|
||||
->columnSpan(2),
|
||||
TextInput::make('price_monthly')
|
||||
Forms\Components\TextInput::make('price_monthly')
|
||||
->label(__('Monthly price'))
|
||||
->helperText(__('Fill this in if you want it to be monthly payments'))
|
||||
->required(),
|
||||
TextInput::make('price_yearly')
|
||||
Forms\Components\TextInput::make('price_yearly')
|
||||
->label(__('Yearly price'))
|
||||
->helperText(__('Fill this in if you want it to be yearly payments'))
|
||||
->required(),
|
||||
Select::make('currency')
|
||||
Forms\Components\Select::make('currency')
|
||||
->label(__('Currency'))
|
||||
->options([
|
||||
'usd' => 'USD $',
|
||||
@@ -67,43 +62,43 @@ class PackageResource extends Resource
|
||||
'nz' => 'NZD $ (New Zealand Dollar)',
|
||||
])
|
||||
->required(),
|
||||
Grid::make()
|
||||
Forms\Components\Grid::make()
|
||||
->schema([
|
||||
Section::make(__('Server permissions'))
|
||||
Forms\Components\Section::make(__('Server permissions'))
|
||||
->schema([
|
||||
Checkbox::make('server_permissions.create')
|
||||
Forms\Components\Checkbox::make('server_permissions.create')
|
||||
->reactive()
|
||||
->label('Allow server creation')
|
||||
->helperText('This will allow users to create servers'),
|
||||
Checkbox::make('server_permissions.update')
|
||||
Forms\Components\Checkbox::make('server_permissions.update')
|
||||
->label('Allow server updates')
|
||||
->helperText('This will allow users to update servers'),
|
||||
Checkbox::make('server_permissions.delete')
|
||||
Forms\Components\Checkbox::make('server_permissions.delete')
|
||||
->label('Allow server deletion')
|
||||
->helperText('This will allow users to delete servers'),
|
||||
])
|
||||
->columnSpan(1),
|
||||
Section::make(__('Site permissions'))
|
||||
Forms\Components\Section::make(__('Site permissions'))
|
||||
->schema([
|
||||
Checkbox::make('site_permissions.create')
|
||||
Forms\Components\Checkbox::make('site_permissions.create')
|
||||
->label('Allow site creation')
|
||||
->helperText('This will allow users to create sites'),
|
||||
Checkbox::make('site_permissions.update')
|
||||
Forms\Components\Checkbox::make('site_permissions.update')
|
||||
->label('Allow site updates')
|
||||
->helperText('This will allow users to update sites'),
|
||||
Checkbox::make('site_permissions.delete')
|
||||
Forms\Components\Checkbox::make('site_permissions.delete')
|
||||
->label('Allow site deletion')
|
||||
->helperText('This will allow users to delete sites'),
|
||||
])
|
||||
->columnSpan(1),
|
||||
]),
|
||||
|
||||
Grid::make()
|
||||
Forms\Components\Grid::make()
|
||||
->schema([
|
||||
Section::make(__('Available server providers'))
|
||||
Forms\Components\Section::make(__('Available server providers'))
|
||||
->description(__('These server providers will be available for users that are attached to this package.'))
|
||||
->schema([
|
||||
CheckboxList::make('providers')
|
||||
Forms\Components\CheckboxList::make('providers')
|
||||
->relationship('providers', 'name')
|
||||
])
|
||||
->columnSpan(1)
|
||||
@@ -118,7 +113,9 @@ class PackageResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('id')->label('ID')->searchable(),
|
||||
Tables\Columns\TextColumn::make('id')
|
||||
->label('ID')
|
||||
->searchable(),
|
||||
Tables\Columns\TextColumn::make('name')
|
||||
->label(__('Name'))
|
||||
->description(function (Package $record) {
|
||||
@@ -129,10 +126,10 @@ class PackageResource extends Resource
|
||||
return "Attached to stripe - {$record->price_monthly} {$record->currency}";
|
||||
}),
|
||||
Tables\Columns\TextColumn::make('maximum_sites')
|
||||
->formatStateUsing(fn (int $state) => $state === 0 ? __('Unlimited') : $state)
|
||||
->formatStateUsing(fn(int $state) => $state === 0 ? __('Unlimited') : $state)
|
||||
->label(__('Maximum sites')),
|
||||
Tables\Columns\TextColumn::make('maximum_servers')
|
||||
->formatStateUsing(fn (int $state) => $state === 0 ? __('Unlimited') : $state)
|
||||
->formatStateUsing(fn(int $state) => $state === 0 ? __('Unlimited') : $state)
|
||||
->label(__('Maximum servers')),
|
||||
Tables\Columns\TextColumn::make('users_count')
|
||||
->counts('users'),
|
||||
@@ -142,6 +139,7 @@ class PackageResource extends Resource
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\PackageResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use App\Filament\Resources\PackageResource;
|
||||
|
||||
@@ -10,7 +10,7 @@ class EditPackage extends EditRecord
|
||||
{
|
||||
protected static string $resource = PackageResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\DeleteAction::make(),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\PackageResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use App\Filament\Resources\PackageResource;
|
||||
|
||||
@@ -10,7 +10,7 @@ class ListPackages extends ListRecords
|
||||
{
|
||||
protected static string $resource = PackageResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
namespace App\Filament\Resources\PackageResource\RelationManagers;
|
||||
|
||||
use App\Models\User;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables\Actions\Action;
|
||||
use Filament\Forms\Components\Select;
|
||||
use App\Filament\Resources\UserResource;
|
||||
@@ -16,12 +16,12 @@ class UsersRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return UserResource::form($form);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return UserResource::table($table)
|
||||
->appendHeaderActions([
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Tables;
|
||||
use App\Filament\Resources\ProviderPlanResource\Pages;
|
||||
use App\Models\Provider;
|
||||
use App\Models\ProviderPlan;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use App\Filament\Resources\ProviderPlanResource\Pages;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class ProviderPlanResource extends Resource
|
||||
{
|
||||
@@ -25,7 +25,7 @@ class ProviderPlanResource extends Resource
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
TextInput::make('label'),
|
||||
Forms\Components\TextInput::make('label'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,9 @@ class ProviderPlanResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('id')->label('ID')->searchable(),
|
||||
Tables\Columns\TextColumn::make('id')
|
||||
->label('ID')
|
||||
->searchable(),
|
||||
Tables\Columns\TextColumn::make('provider.name')
|
||||
->label(__('Provider'))
|
||||
->searchable(),
|
||||
@@ -51,7 +53,7 @@ class ProviderPlanResource extends Resource
|
||||
->filters([
|
||||
Tables\Filters\SelectFilter::make('provider_id')
|
||||
->label(__('Provider'))
|
||||
->options(fn () => Provider::orderBy('name')->get()->mapWithKeys(fn (Provider $provider) => [$provider->id => $provider->name])),
|
||||
->options(fn() => Provider::orderBy('name')->get()->mapWithKeys(fn(Provider $provider) => [$provider->id => $provider->name])),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
|
||||
@@ -9,7 +9,7 @@ class ListProviderPlans extends ListRecords
|
||||
{
|
||||
protected static string $resource = ProviderPlanResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Tables;
|
||||
use App\Models\Provider;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use App\Models\ProviderRegion;
|
||||
use Filament\Resources\Resource;
|
||||
use App\Filament\Resources\ProviderRegionResource\Pages;
|
||||
use App\Models\Provider;
|
||||
use App\Models\ProviderRegion;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class ProviderRegionResource extends Resource
|
||||
{
|
||||
protected static ?string $model = ProviderRegion::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-globe';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-globe-americas';
|
||||
|
||||
protected static ?string $navigationGroup = 'Providers';
|
||||
|
||||
@@ -32,7 +32,9 @@ class ProviderRegionResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('id')->label('ID')->searchable(),
|
||||
Tables\Columns\TextColumn::make('id')
|
||||
->label('ID')
|
||||
->searchable(),
|
||||
Tables\Columns\TextColumn::make('provider.name')
|
||||
->label(__('Provider'))
|
||||
->searchable(),
|
||||
@@ -46,7 +48,7 @@ class ProviderRegionResource extends Resource
|
||||
->filters([
|
||||
Tables\Filters\SelectFilter::make('provider_id')
|
||||
->label(__('Provider'))
|
||||
->options(fn () => Provider::orderBy('name')->get()->mapWithKeys(fn (Provider $provider) => [$provider->id => $provider->name])),
|
||||
->options(fn() => Provider::orderBy('name')->pluck('name', 'id'))
|
||||
])
|
||||
->actions([
|
||||
//
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\ProviderRegionResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use App\Filament\Resources\ProviderRegionResource;
|
||||
|
||||
@@ -10,7 +10,7 @@ class ListProviderRegions extends ListRecords
|
||||
{
|
||||
protected static string $resource = ProviderRegionResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Tables;
|
||||
use App\Actions\Provider\SynchronizeProviderAction;
|
||||
use App\Filament\Resources\ProviderResource\Pages;
|
||||
use App\Filament\Resources\ProviderResource\Widgets\AvailableProvidersOverview;
|
||||
use App\Models\Provider;
|
||||
use App\Models\ProviderPlan;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use App\Filament\Resources\ProviderResource\Pages;
|
||||
use App\Actions\Provider\SynchronizeProviderAction;
|
||||
use App\Filament\Resources\ProviderResource\Widgets\AvailableProvidersOverview;
|
||||
|
||||
class ProviderResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Provider::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-cloud-upload';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-cloud-arrow-up';
|
||||
|
||||
protected static ?string $navigationGroup = 'Providers';
|
||||
|
||||
@@ -35,11 +35,11 @@ class ProviderResource extends Resource
|
||||
->columnSpan(2),
|
||||
Forms\Components\CheckboxList::make('allowed_plans')
|
||||
->options(function (Provider $record) {
|
||||
return $record->plans->mapWithKeys(fn (ProviderPlan $plan) => [$plan->id => $plan->label ?? $plan->plan_id]);
|
||||
return $record->plans->mapWithKeys(fn(ProviderPlan $plan) => [$plan->id => $plan->label ?? $plan->plan_id]);
|
||||
})
|
||||
->label(__('Allowed Plans')),
|
||||
Forms\Components\CheckboxList::make('allowed_regions')
|
||||
->options(fn (Provider $record) => $record->regions->pluck('label', 'id'))
|
||||
->options(fn(Provider $record) => $record->regions->pluck('label', 'id'))
|
||||
->label(__('Allowed Regions')),
|
||||
]);
|
||||
}
|
||||
@@ -48,7 +48,9 @@ class ProviderResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('id')->label('ID')->searchable(),
|
||||
Tables\Columns\TextColumn::make('id')
|
||||
->label('ID')
|
||||
->searchable(),
|
||||
Tables\Columns\TextColumn::make('name')
|
||||
->description(function (Provider $record) {
|
||||
return "{$record->plans_count} plan(s) · {$record->regions_count} region(s)";
|
||||
@@ -71,12 +73,12 @@ class ProviderResource extends Resource
|
||||
Tables\Actions\Action::make('synchronize_provider')
|
||||
->label(__('Synchronize'))
|
||||
->tooltip(__('This will synchronize the latest data from this provider to your Ploi Core installation'))
|
||||
->icon('heroicon-o-refresh')
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->action(function (Provider $record) {
|
||||
$provider = app(SynchronizeProviderAction::class)->execute($record->ploi_id);
|
||||
|
||||
Notification::make()
|
||||
->body(__('Provider :provider synchronized successfully.', ['provider' => $provider->name]))
|
||||
->title(__('Provider :provider synchronized successfully.', ['provider' => $provider->name]))
|
||||
->success()
|
||||
->send();
|
||||
}),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\ProviderResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions\Action;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use App\Filament\Resources\ProviderResource;
|
||||
|
||||
@@ -14,14 +14,14 @@ class ListProviders extends ListRecords
|
||||
|
||||
protected static string $resource = ProviderResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('synchronize_providers')
|
||||
Actions\Action::make('synchronize_providers')
|
||||
->label(__('Synchronize providers'))
|
||||
->icon('heroicon-o-refresh')
|
||||
->color('secondary')
|
||||
->url(route('filament.resources.providers.synchronize')),
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->color('gray')
|
||||
->url(ProviderResource::getUrl('synchronize')),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class SynchronizeProviders extends Page
|
||||
];
|
||||
}
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
namespace App\Filament\Resources\ProviderResource\Widgets;
|
||||
|
||||
use App\Actions\Provider\SynchronizeProviderAction;
|
||||
use App\Models\AvailableProvider;
|
||||
use Filament\Widgets\TableWidget;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Tables\Actions\Action;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Widgets\TableWidget;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use App\Actions\Provider\SynchronizeProviderAction;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
|
||||
class AvailableProvidersOverview extends TableWidget
|
||||
@@ -46,14 +46,14 @@ class AvailableProvidersOverview extends TableWidget
|
||||
return [
|
||||
Action::make('synchronize_provider')
|
||||
->label(__('Synchronize'))
|
||||
->icon('heroicon-o-refresh')
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->action(function (AvailableProvider $record, self $livewire) {
|
||||
$provider = app(SynchronizeProviderAction::class)->execute($record->id);
|
||||
|
||||
$livewire->emit('$refresh');
|
||||
$livewire->dispatch('$refresh');
|
||||
|
||||
Notification::make()
|
||||
->body(__('Provider :provider synchronized successfully.', ['provider' => $provider->name]))
|
||||
->title(__('Provider :provider synchronized successfully.', ['provider' => $provider->name]))
|
||||
->success()
|
||||
->send();
|
||||
}),
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Tables;
|
||||
use App\Models\Redirect;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use App\Filament\Resources\RedirectResource\Pages;
|
||||
use App\Models\Redirect;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class RedirectResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Redirect::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-external-link';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-arrow-top-right-on-square';
|
||||
|
||||
protected static ?string $navigationGroup = 'Site management';
|
||||
|
||||
@@ -26,15 +26,11 @@ class RedirectResource extends Resource
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('site_id'),
|
||||
Forms\Components\TextInput::make('server_id'),
|
||||
Forms\Components\TextInput::make('status')
|
||||
->maxLength(255),
|
||||
Forms\Components\TextInput::make('status'),
|
||||
Forms\Components\TextInput::make('ploi_id'),
|
||||
Forms\Components\TextInput::make('redirect_from')
|
||||
->maxLength(255),
|
||||
Forms\Components\TextInput::make('redirect_to')
|
||||
->maxLength(255),
|
||||
Forms\Components\TextInput::make('type')
|
||||
->maxLength(255),
|
||||
Forms\Components\TextInput::make('redirect_from'),
|
||||
Forms\Components\TextInput::make('redirect_to'),
|
||||
Forms\Components\TextInput::make('type'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -58,11 +54,12 @@ class RedirectResource extends Resource
|
||||
->searchable(),
|
||||
Tables\Columns\TextColumn::make('type')
|
||||
->label(__('Type')),
|
||||
Tables\Columns\BadgeColumn::make('status')
|
||||
->enum([
|
||||
Tables\Columns\TextColumn::make('status')
|
||||
->badge()
|
||||
->formatStateUsing(fn(string $state) => match ($state) {
|
||||
Redirect::STATUS_BUSY => __('Busy'),
|
||||
Redirect::STATUS_ACTIVE => __('Active'),
|
||||
])
|
||||
})
|
||||
->colors([
|
||||
'warning' => Redirect::STATUS_BUSY,
|
||||
'success' => Redirect::STATUS_ACTIVE,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\RedirectResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use App\Filament\Resources\RedirectResource;
|
||||
|
||||
@@ -10,7 +10,7 @@ class ListRedirects extends ListRecords
|
||||
{
|
||||
protected static string $resource = RedirectResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Forms;
|
||||
use App\Models\User;
|
||||
use Filament\Tables;
|
||||
use App\Models\Server;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use App\Actions\Server\SynchronizeServerAction;
|
||||
use App\Filament\Resources\ServerResource\Pages;
|
||||
use App\Filament\Resources\ServerResource\RelationManagers;
|
||||
use App\Models\Server;
|
||||
use App\Models\User;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
class ServerResource extends Resource
|
||||
{
|
||||
@@ -61,12 +61,13 @@ class ServerResource extends Resource
|
||||
Tables\Columns\TextColumn::make('name')
|
||||
->label(__('Name'))
|
||||
->searchable(),
|
||||
Tables\Columns\BadgeColumn::make('status')
|
||||
Tables\Columns\TextColumn::make('status')
|
||||
->label(__('Status'))
|
||||
->enum([
|
||||
->badge()
|
||||
->formatStateUsing(fn(string $state) => match ($state) {
|
||||
Server::STATUS_BUSY => __('Busy'),
|
||||
Server::STATUS_ACTIVE => __('Active'),
|
||||
])
|
||||
})
|
||||
->colors([
|
||||
'warning' => Server::STATUS_BUSY,
|
||||
'success' => Server::STATUS_ACTIVE,
|
||||
@@ -74,19 +75,26 @@ class ServerResource extends Resource
|
||||
Tables\Columns\TextColumn::make('users')
|
||||
->label(__('Users'))
|
||||
->wrap()
|
||||
->getStateUsing(function (Server $record) {
|
||||
->formatStateUsing(function (Server $record) {
|
||||
$state = $record
|
||||
->users
|
||||
->map(function (User $user) {
|
||||
return '<a href="' . route('filament.resources.users.edit', ['record' => $user]) . '" class="text-primary-600">' . $user->name . '</a>';
|
||||
return '<a href="' . UserResource::getUrl('edit', ['record' => $user]) . '" class="text-primary-600" style="white-space: nowrap">' . $user->name . '</a>';
|
||||
})
|
||||
->implode(', ') ?: '-';
|
||||
|
||||
return new HtmlString($state);
|
||||
})
|
||||
->searchable(query: function (Builder $query, string $search) {
|
||||
return $query->whereHas('users', function (Builder $query) use ($search) {
|
||||
return $query
|
||||
->where('name', 'LIKE', "%{$search}%")
|
||||
->orWhere('email', 'LIKE', "%{$search}%");
|
||||
});
|
||||
}),
|
||||
Tables\Columns\TextColumn::make('maximum_sites')
|
||||
->label(__('Max sites'))
|
||||
->formatStateUsing(fn (Server $record) => $record->maximum_sites . " (Current: {$record->sites_count})"),
|
||||
->formatStateUsing(fn(Server $record) => $record->maximum_sites . " (Current: {$record->sites_count})"),
|
||||
Tables\Columns\TextColumn::make('ip')
|
||||
->label(__('IP')),
|
||||
Tables\Columns\TextColumn::make('created_at')
|
||||
@@ -101,9 +109,10 @@ class ServerResource extends Resource
|
||||
Tables\Actions\Action::make('synchronize_server')
|
||||
->label(__('Synchronize'))
|
||||
->tooltip(__('This will synchronize the latest data from this provider to your Ploi Core installation'))
|
||||
->icon('heroicon-o-refresh')
|
||||
->action(fn (Server $record) => app(SynchronizeServerAction::class)->execute($record->ploi_id))
|
||||
->visible(fn (Server $record) => $record->status === Server::STATUS_ACTIVE),
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->action(fn(Server $record) => app(SynchronizeServerAction::class)->execute($record->ploi_id))
|
||||
->visible(fn(Server $record) => $record->status === Server::STATUS_ACTIVE),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\ServerResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use App\Filament\Resources\ServerResource;
|
||||
|
||||
@@ -10,7 +10,7 @@ class EditServer extends EditRecord
|
||||
{
|
||||
protected static string $resource = ServerResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\DeleteAction::make(),
|
||||
|
||||
@@ -2,36 +2,23 @@
|
||||
|
||||
namespace App\Filament\Resources\ServerResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions\Action;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use App\Filament\Resources\ServerResource;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListServers extends ListRecords
|
||||
{
|
||||
protected static string $resource = ServerResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('synchronize_servers')
|
||||
Actions\Action::make('synchronize_servers')
|
||||
->label(__('Synchronize servers'))
|
||||
->icon('heroicon-o-refresh')
|
||||
->color('secondary')
|
||||
->url(route('filament.resources.servers.synchronize')),
|
||||
...parent::getActions(),
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->color('gray')
|
||||
->url(ServerResource::getUrl('synchronize')),
|
||||
...parent::getHeaderActions(),
|
||||
];
|
||||
}
|
||||
|
||||
protected function applySearchToTableQuery(Builder $query): Builder
|
||||
{
|
||||
if (filled($searchTerm = $this->getTableSearchQuery())) {
|
||||
$query
|
||||
->where('domain', 'LIKE', "%{$searchTerm}%")
|
||||
->orWhereHas('users', fn (Builder $query) => $query->where('name', 'LIKE', "%{$searchTerm}%"))
|
||||
->orWhereHas('users', fn (Builder $query) => $query->where('email', 'LIKE', "%{$searchTerm}%"));
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
namespace App\Filament\Resources\ServerResource\Pages;
|
||||
|
||||
use App\Filament\Resources\ServerResource;
|
||||
use App\Models\Server;
|
||||
use App\Services\Ploi\Ploi;
|
||||
use Filament\Pages\Actions\Action;
|
||||
use Filament\Resources\Pages\Page;
|
||||
use Filament\Notifications\Notification;
|
||||
use App\Filament\Resources\ServerResource;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\Page;
|
||||
|
||||
class SynchronizeServers extends Page
|
||||
{
|
||||
@@ -24,15 +24,15 @@ class SynchronizeServers extends Page
|
||||
];
|
||||
}
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('synchronize_servers')
|
||||
Actions\Action::make('synchronize_servers')
|
||||
->label(__('Synchronize all servers'))
|
||||
->icon('heroicon-o-refresh')
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->requiresConfirmation()
|
||||
->modalHeading('Synchronize servers')
|
||||
->modalSubheading('This will synchronize all the servers that are listed in the table, to your Ploi Core installation.')
|
||||
->modalDescription('This will synchronize all the servers that are listed in the table, to your Ploi Core installation.')
|
||||
->action(function () {
|
||||
$availableServers = Ploi::make()->synchronize()->servers()->getData();
|
||||
|
||||
@@ -51,7 +51,7 @@ class SynchronizeServers extends Page
|
||||
}
|
||||
|
||||
Notification::make()
|
||||
->body(__('Servers synchronized successfully.'))
|
||||
->title(__('Servers synchronized successfully.'))
|
||||
->success()
|
||||
->send();
|
||||
}),
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\ServerResource\RelationManagers;
|
||||
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Tables\Table;
|
||||
use App\Filament\Resources\SiteResource;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
|
||||
@@ -23,12 +23,12 @@ class SitesRelationManager extends RelationManager
|
||||
return __('Sites');
|
||||
}
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return SiteResource::form($form);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return SiteResource::table($table);
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
namespace App\Filament\Resources\ServerResource\RelationManagers;
|
||||
|
||||
use Filament\Tables;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use App\Filament\Resources\UserResource;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class UsersRelationManager extends RelationManager
|
||||
{
|
||||
@@ -24,18 +24,21 @@ class UsersRelationManager extends RelationManager
|
||||
return __('Users');
|
||||
}
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return UserResource::form($form);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return UserResource::table($table)
|
||||
->appendHeaderActions([
|
||||
Tables\Actions\AttachAction::make()->preloadRecordSelect(),
|
||||
->headerActions([
|
||||
...$table->getHeaderActions(),
|
||||
Tables\Actions\AttachAction::make()
|
||||
->preloadRecordSelect(),
|
||||
])
|
||||
->appendActions([
|
||||
->actions([
|
||||
...$table->getActions(),
|
||||
Tables\Actions\DetachAction::make(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class AvailableServersOverview extends TableWidget
|
||||
return [
|
||||
Action::make('synchronize_server')
|
||||
->label(__('Synchronize'))
|
||||
->icon('heroicon-o-refresh')
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->action(function (AvailableServer $record) {
|
||||
app(SynchronizeServerAction::class)->execute($record->id);
|
||||
}),
|
||||
|
||||
@@ -2,23 +2,24 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Forms;
|
||||
use App\Models\Site;
|
||||
use App\Models\User;
|
||||
use Filament\Tables;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use App\Actions\Site\SynchronizeSiteAction;
|
||||
use App\Filament\Resources\SiteResource\Pages;
|
||||
use App\Filament\Resources\SiteResource\RelationManagers;
|
||||
use App\Models\Site;
|
||||
use App\Models\User;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
class SiteResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Site::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-code';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-code-bracket';
|
||||
|
||||
protected static ?string $navigationGroup = 'Site management';
|
||||
|
||||
@@ -26,9 +27,6 @@ class SiteResource extends Resource
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'domain';
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public static function getLabel(): ?string
|
||||
{
|
||||
return __('Site');
|
||||
@@ -67,11 +65,12 @@ class SiteResource extends Resource
|
||||
->label(__('Server'))
|
||||
->sortable()
|
||||
->searchable(),
|
||||
Tables\Columns\BadgeColumn::make('status')
|
||||
->enum([
|
||||
Tables\Columns\TextColumn::make('status')
|
||||
->badge()
|
||||
->formatStateUsing(fn(string $state) => match ($state) {
|
||||
Site::STATUS_BUSY => __('Busy'),
|
||||
Site::STATUS_ACTIVE => __('Active'),
|
||||
])
|
||||
})
|
||||
->colors([
|
||||
'warning' => Site::STATUS_BUSY,
|
||||
'success' => Site::STATUS_ACTIVE,
|
||||
@@ -79,15 +78,23 @@ class SiteResource extends Resource
|
||||
->label(__('Status')),
|
||||
Tables\Columns\TextColumn::make('users')
|
||||
->label(__('Users'))
|
||||
->getStateUsing(function (Site $record) {
|
||||
->wrap()
|
||||
->formatStateUsing(function (Site $record) {
|
||||
$state = $record
|
||||
->users
|
||||
->map(function (User $user) {
|
||||
return '<a href="' . route('filament.resources.users.edit', ['record' => $user]) . '" class="text-primary-600">' . $user->name . '</a>';
|
||||
return '<a href="' . UserResource::getUrl('edit', ['record' => $user]) . '" class="text-primary-600" style="white-space: nowrap">' . $user->name . '</a>';
|
||||
})
|
||||
->implode(', ') ?: '-';
|
||||
|
||||
return new HtmlString($state);
|
||||
})
|
||||
->searchable(query: function (Builder $query, string $search) {
|
||||
return $query->whereHas('users', function (Builder $query) use ($search) {
|
||||
return $query
|
||||
->where('name', 'LIKE', "%{$search}%")
|
||||
->orWhere('email', 'LIKE', "%{$search}%");
|
||||
});
|
||||
}),
|
||||
Tables\Columns\TextColumn::make('created_at')
|
||||
->label(__('Date'))
|
||||
@@ -102,11 +109,12 @@ class SiteResource extends Resource
|
||||
Tables\Actions\Action::make('synchronize_site')
|
||||
->label(__('Synchronize'))
|
||||
->tooltip(__('This will synchronize the latest data from this provider to your Ploi Core installation'))
|
||||
->icon('heroicon-o-refresh')
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->action(function (Site $record) {
|
||||
app(SynchronizeSiteAction::class)->execute($record->server->ploi_id, $record->ploi_id);
|
||||
})
|
||||
->visible(fn (Site $record) => $record->status === Site::STATUS_ACTIVE),
|
||||
->visible(fn(Site $record) => $record->status === Site::STATUS_ACTIVE),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
@@ -114,7 +122,7 @@ class SiteResource extends Resource
|
||||
->defaultSort('sites.created_at', 'desc');
|
||||
}
|
||||
|
||||
public static function getEloquentQuery(): \Illuminate\Database\Eloquent\Builder
|
||||
public static function getEloquentQuery(): Builder
|
||||
{
|
||||
return parent::getEloquentQuery()
|
||||
->with(['users', 'server']);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\SiteResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use App\Filament\Resources\SiteResource;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
@@ -10,7 +10,7 @@ class EditSite extends EditRecord
|
||||
{
|
||||
protected static string $resource = SiteResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\DeleteAction::make(),
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
|
||||
namespace App\Filament\Resources\SiteResource\Pages;
|
||||
|
||||
use App\Traits\HasPloi;
|
||||
use Filament\Pages\Actions\Action;
|
||||
use App\Filament\Resources\SiteResource;
|
||||
use App\Traits\HasPloi;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class ListSites extends ListRecords
|
||||
{
|
||||
@@ -14,28 +13,15 @@ class ListSites extends ListRecords
|
||||
|
||||
protected static string $resource = SiteResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('synchronize_sites')
|
||||
Actions\Action::make('synchronize_sites')
|
||||
->label(__('Synchronize sites'))
|
||||
->icon('heroicon-o-refresh')
|
||||
->color('secondary')
|
||||
->url(route('filament.resources.sites.synchronize')),
|
||||
|
||||
...parent::getActions()
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->color('gray')
|
||||
->url(SiteResource::getUrl('synchronize')),
|
||||
...parent::getHeaderActions()
|
||||
];
|
||||
}
|
||||
|
||||
protected function applySearchToTableQuery(Builder $query): Builder
|
||||
{
|
||||
if (filled($searchTerm = $this->getTableSearchQuery())) {
|
||||
$query
|
||||
->where('domain', 'LIKE', "%{$searchTerm}%")
|
||||
->orWhereHas('users', fn (Builder $query) => $query->where('name', 'LIKE', "%{$searchTerm}%"))
|
||||
->orWhereHas('users', fn (Builder $query) => $query->where('email', 'LIKE', "%{$searchTerm}%"));
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
namespace App\Filament\Resources\SiteResource\Pages;
|
||||
|
||||
use App\Models\Site;
|
||||
use App\Models\Server;
|
||||
use App\Services\Ploi\Ploi;
|
||||
use Filament\Pages\Actions\Action;
|
||||
use Filament\Resources\Pages\Page;
|
||||
use App\Filament\Resources\SiteResource;
|
||||
use App\Models\Server;
|
||||
use App\Models\Site;
|
||||
use App\Services\Ploi\Ploi;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\Page;
|
||||
|
||||
class SynchronizeSites extends Page
|
||||
{
|
||||
@@ -23,15 +23,15 @@ class SynchronizeSites extends Page
|
||||
];
|
||||
}
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('synchronize_sites')
|
||||
Actions\Action::make('synchronize_sites')
|
||||
->label(__('Synchronize all sites'))
|
||||
->icon('heroicon-o-refresh')
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->requiresConfirmation()
|
||||
->modalHeading('Synchronize sites')
|
||||
->modalSubheading('This will synchronize all the sites that are listed in the table, to your Ploi Core installation.')
|
||||
->modalDescription('This will synchronize all the sites that are listed in the table, to your Ploi Core installation.')
|
||||
->action(function () {
|
||||
$availableSites = Ploi::make()->synchronize()->sites()->getData();
|
||||
|
||||
@@ -52,7 +52,7 @@ class SynchronizeSites extends Page
|
||||
}
|
||||
|
||||
Notification::make()
|
||||
->body(__('Sites synchronized successfully.'))
|
||||
->title(__('Sites synchronized successfully.'))
|
||||
->success()
|
||||
->send();
|
||||
}),
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\SiteResource\RelationManagers;
|
||||
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Tables\Table;
|
||||
use App\Filament\Resources\CertificateResource;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
|
||||
@@ -13,12 +13,12 @@ class CertificatesRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'domain';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return CertificateResource::form($form);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return CertificateResource::table($table);
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\SiteResource\RelationManagers;
|
||||
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Tables\Table;
|
||||
use App\Filament\Resources\CronjobResource;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
|
||||
@@ -13,12 +13,12 @@ class CronjobsRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'command';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return CronjobResource::form($form);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return CronjobResource::table($table);
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\SiteResource\RelationManagers;
|
||||
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Tables\Table;
|
||||
use App\Filament\Resources\DatabaseResource;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
|
||||
@@ -13,12 +13,12 @@ class DatabasesRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return DatabaseResource::form($form);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return DatabaseResource::table($table);
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\SiteResource\RelationManagers;
|
||||
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Tables\Table;
|
||||
use App\Filament\Resources\RedirectResource;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
|
||||
@@ -13,12 +13,12 @@ class RedirectsRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'from';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return RedirectResource::form($form);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return RedirectResource::table($table);
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\SiteResource\RelationManagers;
|
||||
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Tables\Table;
|
||||
use App\Filament\Resources\SiteSystemUserResource;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
|
||||
@@ -13,12 +13,12 @@ class SystemUsersRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'user_name';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return SiteSystemUserResource::form($form);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return SiteSystemUserResource::table($table);
|
||||
}
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
|
||||
namespace App\Filament\Resources\SiteResource\RelationManagers;
|
||||
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use App\Filament\Resources\UserResource;
|
||||
use Filament\Tables\Actions\AttachAction;
|
||||
use Filament\Tables\Actions\DetachAction;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class UsersRelationManager extends RelationManager
|
||||
{
|
||||
@@ -25,20 +24,22 @@ class UsersRelationManager extends RelationManager
|
||||
return __('Users');
|
||||
}
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return UserResource::form($form);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return UserResource::table($table)
|
||||
->headerActions([
|
||||
AttachAction::make()
|
||||
...$table->getHeaderActions(),
|
||||
Tables\Actions\AttachAction::make()
|
||||
->preloadRecordSelect(),
|
||||
])
|
||||
->appendActions([
|
||||
DetachAction::make(),
|
||||
->actions([
|
||||
...$table->getActions(),
|
||||
Tables\Actions\DetachAction::make(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class AvailableSitesOverview extends TableWidget
|
||||
return [
|
||||
Action::make('synchronize_site')
|
||||
->label(__('Synchronize'))
|
||||
->icon('heroicon-o-refresh')
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->action(function (AvailableSite $record) {
|
||||
app(SynchronizeSiteAction::class)->execute(ploiServerId: $record->server_id, ploiSiteId: $record->id);
|
||||
}),
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Tables;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Tables\Table;
|
||||
use App\Models\SiteSystemUser;
|
||||
use Filament\Resources\Resource;
|
||||
use App\Filament\Resources\SiteSystemUserResource\Pages;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\SiteSystemUserResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use App\Filament\Resources\SiteSystemUserResource;
|
||||
|
||||
@@ -10,7 +10,7 @@ class ListSiteSystemUsers extends ListRecords
|
||||
{
|
||||
protected static string $resource = SiteSystemUserResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Tables;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use Laravel\Cashier\Subscription;
|
||||
use App\Filament\Resources\SubscriptionResource\Pages;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Laravel\Cashier\Subscription;
|
||||
|
||||
class SubscriptionResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Subscription::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-cash';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-banknotes';
|
||||
|
||||
protected static ?int $navigationSort = 4;
|
||||
|
||||
@@ -36,11 +36,12 @@ class SubscriptionResource extends Resource
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('user.name')
|
||||
->searchable()
|
||||
->url(fn ($record) => UserResource::getUrl('edit', ['record' => $record])),
|
||||
->url(fn($record) => UserResource::getUrl('edit', ['record' => $record])),
|
||||
Tables\Columns\TextColumn::make('stripe_id')->searchable(),
|
||||
Tables\Columns\TextColumn::make('stripe_plan')->searchable(),
|
||||
Tables\Columns\BadgeColumn::make('stripe_status')
|
||||
Tables\Columns\TextColumn::make('stripe_status')
|
||||
->label('Status')
|
||||
->badge()
|
||||
->colors([
|
||||
'success' => \Stripe\Subscription::STATUS_ACTIVE,
|
||||
'warning' => \Stripe\Subscription::STATUS_PAST_DUE,
|
||||
@@ -55,6 +56,7 @@ class SubscriptionResource extends Resource
|
||||
])
|
||||
->actions([
|
||||
// Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\SubscriptionResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use App\Filament\Resources\SubscriptionResource;
|
||||
|
||||
@@ -10,7 +10,7 @@ class EditSubscription extends EditRecord
|
||||
{
|
||||
protected static string $resource = SubscriptionResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\DeleteAction::make(),
|
||||
|
||||
@@ -2,15 +2,13 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Resources\Form;
|
||||
use App\Models\SupportTicket;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Columns\BadgeColumn;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Filament\Tables\Filters\MultiSelectFilter;
|
||||
use App\Filament\Resources\SupportTicketResource\Pages;
|
||||
use App\Models\SupportTicket;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class SupportTicketResource extends Resource
|
||||
{
|
||||
@@ -18,18 +16,18 @@ class SupportTicketResource extends Resource
|
||||
|
||||
protected static ?string $navigationGroup = 'Support';
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-support';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-lifebuoy';
|
||||
|
||||
protected static ?string $label = 'Ticket';
|
||||
|
||||
protected static ?string $pluralLabel = 'Tickets';
|
||||
|
||||
protected static function shouldRegisterNavigation(): bool
|
||||
public static function shouldRegisterNavigation(): bool
|
||||
{
|
||||
return (bool) setting('support');
|
||||
return (bool)setting('support');
|
||||
}
|
||||
|
||||
protected static function getNavigationBadge(): ?string
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return static::getEloquentQuery()->count();
|
||||
}
|
||||
@@ -46,32 +44,34 @@ class SupportTicketResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
BadgeColumn::make('status')
|
||||
Tables\Columns\TextColumn::make('status')
|
||||
->label(__('Status'))
|
||||
->enum([
|
||||
->badge()
|
||||
->formatStateUsing(fn(string $state) => match ($state) {
|
||||
SupportTicket::STATUS_OPEN => __('Open'),
|
||||
SupportTicket::STATUS_CLOSED => __('Closed'),
|
||||
SupportTicket::STATUS_CUSTOMER_REPLY => __('Customer Reply'),
|
||||
SupportTicket::STATUS_SUPPORT_REPLY => __('Support Reply'),
|
||||
])
|
||||
})
|
||||
->colors([
|
||||
'primary' => [SupportTicket::STATUS_OPEN, SupportTicket::STATUS_SUPPORT_REPLY, SupportTicket::STATUS_CUSTOMER_REPLY],
|
||||
'danger' => SupportTicket::STATUS_CLOSED,
|
||||
])
|
||||
->wrap(false),
|
||||
TextColumn::make('title')
|
||||
Tables\Columns\TextColumn::make('title')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('replies_count')
|
||||
Tables\Columns\TextColumn::make('replies_count')
|
||||
->label(__('Replies'))
|
||||
->getStateUsing(fn (SupportTicket $record) => $record->replies->count()),
|
||||
TextColumn::make('user.name')
|
||||
->getStateUsing(fn(SupportTicket $record) => $record->replies->count()),
|
||||
Tables\Columns\TextColumn::make('user.name')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
])
|
||||
->filters([
|
||||
MultiSelectFilter::make('status')
|
||||
Tables\Filters\SelectFilter::make('status')
|
||||
->label(__('Status'))
|
||||
->multiple()
|
||||
->options([
|
||||
SupportTicket::STATUS_OPEN => __('Open'),
|
||||
SupportTicket::STATUS_CLOSED => __('Closed'),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\SupportTicketResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions\CreateAction;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use App\Filament\Resources\SupportTicketResource;
|
||||
|
||||
@@ -10,10 +10,10 @@ class ListSupportTickets extends ListRecords
|
||||
{
|
||||
protected static string $resource = SupportTicketResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
Actions\CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
namespace App\Filament\Resources\SupportTicketResource\Pages;
|
||||
|
||||
use App\Filament\Resources\SupportTicketResource;
|
||||
use App\Mail\Support\TicketRepliedToEmail;
|
||||
use App\Models\SupportTicket;
|
||||
use Filament\Pages\Actions\Action;
|
||||
use Filament\Forms\Components\MarkdownEditor;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\Page;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Filament\Notifications\Notification;
|
||||
use App\Mail\Support\TicketRepliedToEmail;
|
||||
use Filament\Forms\Components\MarkdownEditor;
|
||||
use App\Filament\Resources\SupportTicketResource;
|
||||
|
||||
class ViewSupportTicket extends Page
|
||||
{
|
||||
@@ -31,38 +31,38 @@ class ViewSupportTicket extends Page
|
||||
return __('View ticket') . ': ' . $this->record->title;
|
||||
}
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('close')
|
||||
Actions\Action::make('close')
|
||||
->label(__('Close'))
|
||||
->action(function (self $livewire) {
|
||||
$livewire->record->status = SupportTicket::STATUS_CLOSED;
|
||||
$livewire->record->save();
|
||||
|
||||
Notification::make()
|
||||
->body(__('Ticket closed'))
|
||||
->title(__('Ticket closed'))
|
||||
->success()
|
||||
->send();
|
||||
|
||||
$livewire->redirectRoute('filament.resources.support-tickets.view', $livewire->record);
|
||||
$livewire->redirect(SupportTicketResource::getUrl('view', ['record' => $livewire->getRecord()]));
|
||||
})
|
||||
->visible(fn (self $livewire) => $livewire->record->status !== SupportTicket::STATUS_CLOSED)
|
||||
->visible(fn(self $livewire) => $livewire->record->status !== SupportTicket::STATUS_CLOSED)
|
||||
->color('danger'),
|
||||
Action::make('reopen')
|
||||
Actions\Action::make('reopen')
|
||||
->label(__('Reopen'))
|
||||
->action(function (self $livewire) {
|
||||
$livewire->record->status = SupportTicket::STATUS_OPEN;
|
||||
$livewire->record->save();
|
||||
|
||||
Notification::make()
|
||||
->body(__('Ticket reopened'))
|
||||
->title(__('Ticket reopened'))
|
||||
->success()
|
||||
->send();
|
||||
|
||||
$livewire->redirectRoute('filament.resources.support-tickets.view', $livewire->record);
|
||||
$livewire->redirect(SupportTicketResource::getUrl('view', ['record' => $livewire->getRecord()]));
|
||||
})
|
||||
->visible(fn (self $livewire) => $livewire->record->status === SupportTicket::STATUS_CLOSED)
|
||||
->visible(fn(self $livewire) => $livewire->record->status === SupportTicket::STATUS_CLOSED)
|
||||
->color('primary'),
|
||||
];
|
||||
}
|
||||
@@ -100,10 +100,10 @@ class ViewSupportTicket extends Page
|
||||
Mail::to($this->record->user)->send(new TicketRepliedToEmail($this->record));
|
||||
|
||||
$this->form->fill();
|
||||
$this->emit('$refresh');
|
||||
$this->dispatch('$refresh');
|
||||
|
||||
Notification::make()
|
||||
->body(__('Reply sent'))
|
||||
->title(__('Reply sent'))
|
||||
->success()
|
||||
->send();
|
||||
}
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use Filament\Forms;
|
||||
use App\Models\User;
|
||||
use Filament\Tables;
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Resources\Resource;
|
||||
use STS\FilamentImpersonate\Impersonate;
|
||||
use App\Filament\Resources\UserResource\Pages;
|
||||
use App\Filament\Resources\UserResource\RelationManagers;
|
||||
use App\Models\User;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use STS\FilamentImpersonate\Impersonate;
|
||||
|
||||
class UserResource extends Resource
|
||||
{
|
||||
@@ -63,7 +63,7 @@ class UserResource extends Resource
|
||||
Forms\Components\Select::make('language')
|
||||
->label(__('Language'))
|
||||
->default('en')
|
||||
->options(collect(languages())->mapWithKeys(fn (string $language) => [$language => $language])),
|
||||
->options(collect(languages())->mapWithKeys(fn(string $language) => [$language => $language])),
|
||||
Forms\Components\Textarea::make('notes')
|
||||
->label(__('Notes'))
|
||||
->maxLength(65535),
|
||||
@@ -79,14 +79,6 @@ class UserResource extends Resource
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
$actions = [];
|
||||
|
||||
if (config('core.impersonation')) {
|
||||
$actions[] = Impersonate::make('impersonate')->tooltip('Login as this user (impersonate)');
|
||||
}
|
||||
|
||||
$actions[] = Tables\Actions\EditAction::make();
|
||||
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('name')
|
||||
@@ -114,7 +106,13 @@ class UserResource extends Resource
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions($actions)
|
||||
->actions([
|
||||
Impersonate::make('impersonate')
|
||||
->tooltip('Login as this user (impersonate)')
|
||||
->visible(fn() => config('core.impersonation')),
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
])
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
namespace App\Filament\Resources\UserResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use App\Actions\User\DeleteUserAction;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Filament\Resources\UserResource;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class EditUser extends EditRecord
|
||||
{
|
||||
@@ -22,21 +22,21 @@ class EditUser extends EditRecord
|
||||
return $record;
|
||||
}
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\Action::make('two_factor_authentication')
|
||||
->label(__('Disable two-factor authentication'))
|
||||
->color('secondary')
|
||||
->color('gray')
|
||||
->action(function () {
|
||||
$this->record->disableTwoFactorAuth();
|
||||
|
||||
Notification::make()
|
||||
->body(__('Two-factor authentication disabled'))
|
||||
->title(__('Two-factor authentication disabled'))
|
||||
->success()
|
||||
->send();
|
||||
})
|
||||
->visible(fn () => $this->record->hasTwoFactorEnabled())
|
||||
->visible(fn() => $this->record->hasTwoFactorEnabled())
|
||||
->requiresConfirmation(),
|
||||
Actions\Action::make('delete')
|
||||
->form([
|
||||
@@ -50,11 +50,11 @@ class EditUser extends EditRecord
|
||||
app(DeleteUserAction::class)->execute($this->getRecord(), $data['remove_all_data']);
|
||||
|
||||
Notification::make()
|
||||
->body(__('User deleted'))
|
||||
->title(__('User deleted'))
|
||||
->success()
|
||||
->send();
|
||||
|
||||
$this->redirectRoute('filament.resources.users.index');
|
||||
$this->redirect(UserResource::getUrl());
|
||||
})
|
||||
->color('danger'),
|
||||
];
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\UserResource\Pages;
|
||||
|
||||
use Filament\Pages\Actions;
|
||||
use Filament\Actions;
|
||||
use App\Filament\Resources\UserResource;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
@@ -10,7 +10,7 @@ class ListUsers extends ListRecords
|
||||
{
|
||||
protected static string $resource = UserResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\UserResource\RelationManagers;
|
||||
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use App\Filament\Resources\ServerResource;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
@@ -15,12 +15,12 @@ class ServersRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return ServerResource::form($form);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return ServerResource::table($table);
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\UserResource\RelationManagers;
|
||||
|
||||
use Filament\Resources\Form;
|
||||
use Filament\Resources\Table;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Tables\Table;
|
||||
use App\Filament\Resources\SiteResource;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
|
||||
@@ -13,12 +13,12 @@ class SitesRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'domain';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return SiteResource::form($form);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return SiteResource::table($table);
|
||||
}
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
namespace App\Filament\Widgets;
|
||||
|
||||
use App\Filament\Resources\ServerResource;
|
||||
use App\Filament\Resources\SiteResource;
|
||||
use App\Filament\Resources\UserResource;
|
||||
use App\Models\Server;
|
||||
use App\Models\Site;
|
||||
use App\Models\User;
|
||||
use App\Models\Server;
|
||||
use Filament\Widgets\StatsOverviewWidget\Card;
|
||||
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
|
||||
|
||||
class StatsOverview extends BaseWidget
|
||||
@@ -13,14 +15,14 @@ class StatsOverview extends BaseWidget
|
||||
protected function getCards(): array
|
||||
{
|
||||
return [
|
||||
Card::make(__('Servers'), Server::count())
|
||||
->url(route('filament.resources.servers.index'))
|
||||
BaseWidget\Stat::make(__('Servers'), Server::count())
|
||||
->url(ServerResource::getUrl())
|
||||
->icon('heroicon-o-server'),
|
||||
Card::make(__('Sites'), Site::count())
|
||||
->url(route('filament.resources.sites.index'))
|
||||
BaseWidget\Stat::make(__('Sites'), Site::count())
|
||||
->url(SiteResource::getUrl())
|
||||
->icon('heroicon-o-globe-alt'),
|
||||
Card::make(__('Users'), User::count())
|
||||
->url(route('filament.resources.users.index'))
|
||||
BaseWidget\Stat::make(__('Users'), User::count())
|
||||
->url(UserResource::getUrl())
|
||||
->icon('heroicon-o-user'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3,35 +3,37 @@
|
||||
namespace App\Filament\Widgets;
|
||||
|
||||
use App\Models\SystemLog;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Widgets\TableWidget as BaseWidget;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class SystemLogs extends BaseWidget
|
||||
{
|
||||
protected int|string|array $columnSpan = 'full';
|
||||
|
||||
protected int $defaultTableRecordsPerPageSelectOption = 10;
|
||||
|
||||
protected function getTableQuery(): Builder
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return SystemLog::query()
|
||||
->latest()
|
||||
->with('model');
|
||||
}
|
||||
|
||||
protected function getTableColumns(): array
|
||||
{
|
||||
return [
|
||||
TextColumn::make(__('Title'))
|
||||
->formatStateUsing(fn (SystemLog $record) => __($record->title, [
|
||||
'site' => $record->model->domain ?? '-Unknown-',
|
||||
'database' => $record->model->name ?? '-Unknown-',
|
||||
]))
|
||||
->description(fn (SystemLog $record) => __($record->description, [
|
||||
'site' => $record->model->domain ?? '-Unknown-',
|
||||
'database' => $record->model->name ?? '-Unknown-',
|
||||
])),
|
||||
];
|
||||
return $table
|
||||
->query(fn(): Builder => SystemLog::query()->with('model'))
|
||||
->defaultSort(fn(Builder $query) => $query->latest())
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('title')
|
||||
->label(__('Title'))
|
||||
->formatStateUsing(fn(SystemLog $record) => __($record->title, [
|
||||
'site' => $record->model->domain ?? '-Unknown-',
|
||||
'database' => $record->model->name ?? '-Unknown-',
|
||||
]))
|
||||
->description(fn(SystemLog $record) => __($record->description, [
|
||||
'site' => $record->model->domain ?? '-Unknown-',
|
||||
'database' => $record->model->name ?? '-Unknown-',
|
||||
]))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('created_at')
|
||||
->label(__('Date'))
|
||||
->dateTime()
|
||||
->sortable()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class SystemLog extends Model
|
||||
{
|
||||
@@ -11,7 +12,7 @@ class SystemLog extends Model
|
||||
'description'
|
||||
];
|
||||
|
||||
public function user()
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Casts\Encrypted;
|
||||
use Filament\Panel;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
use Laravel\Cashier\Billable;
|
||||
@@ -69,7 +70,7 @@ class User extends Authenticatable implements HasLocalePreference, TwoFactorAuth
|
||||
}
|
||||
}
|
||||
|
||||
public function canAccessFilament(): bool
|
||||
public function canAccessPanel(Panel $panel): bool
|
||||
{
|
||||
return $this->role === self::ADMIN;
|
||||
}
|
||||
|
||||
@@ -40,13 +40,13 @@ class AppServiceProvider extends ServiceProvider
|
||||
UserMenuItem::make()
|
||||
->label('Back to panel')
|
||||
->url(route('dashboard'))
|
||||
->icon('heroicon-s-rewind'),
|
||||
->icon('heroicon-m-backward'),
|
||||
]);
|
||||
|
||||
Filament::registerNavigationItems([
|
||||
NavigationItem::make('Panel')
|
||||
->url(route('dashboard'))
|
||||
->icon('heroicon-o-rewind')
|
||||
->icon('heroicon-o-backward')
|
||||
->group('External')
|
||||
->sort(3),
|
||||
]);
|
||||
|
||||
94
app/Providers/Filament/AdminPanelProvider.php
Normal file
94
app/Providers/Filament/AdminPanelProvider.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers\Filament;
|
||||
|
||||
use App\Rules\Hostname;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
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 Filament\Support\Colors\Color;
|
||||
use Filament\Widgets;
|
||||
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies;
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
||||
use Illuminate\Routing\Middleware\SubstituteBindings;
|
||||
use Illuminate\Session\Middleware\AuthenticateSession;
|
||||
use Illuminate\Session\Middleware\StartSession;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||
use Saade\FilamentLaravelLog\FilamentLaravelLogPlugin;
|
||||
|
||||
class AdminPanelProvider extends PanelProvider
|
||||
{
|
||||
public function panel(Panel $panel): Panel
|
||||
{
|
||||
return $panel
|
||||
->default()
|
||||
->id('admin')
|
||||
->path('admin')
|
||||
->login()
|
||||
->colors([
|
||||
'primary' => Color::Sky,
|
||||
])
|
||||
->brandName(fn() => setting('name'))
|
||||
->brandLogo(fn() => ($logoPath = setting('logo')) ? Storage::disk('logos')->url($logoPath) : null)
|
||||
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
|
||||
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
|
||||
->pages([
|
||||
Pages\Dashboard::class,
|
||||
])
|
||||
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
|
||||
->widgets([
|
||||
Widgets\AccountWidget::class,
|
||||
Widgets\FilamentInfoWidget::class,
|
||||
])
|
||||
->middleware([
|
||||
EncryptCookies::class,
|
||||
AddQueuedCookiesToResponse::class,
|
||||
StartSession::class,
|
||||
AuthenticateSession::class,
|
||||
ShareErrorsFromSession::class,
|
||||
VerifyCsrfToken::class,
|
||||
SubstituteBindings::class,
|
||||
DisableBladeIconComponents::class,
|
||||
DispatchServingFilamentEvent::class,
|
||||
])
|
||||
->authMiddleware([
|
||||
Authenticate::class,
|
||||
])
|
||||
->viteTheme('resources/css/filament/admin/theme.css')
|
||||
->plugins([
|
||||
FilamentLaravelLogPlugin::make()
|
||||
->navigationGroup('Settings')
|
||||
->navigationSort(5)
|
||||
])
|
||||
->bootUsing(function (): void {
|
||||
Filament::registerNavigationGroups([
|
||||
'Server management',
|
||||
'Site management',
|
||||
'Providers',
|
||||
'Documentation',
|
||||
'Support',
|
||||
'Settings',
|
||||
]);
|
||||
|
||||
TextInput::macro('hostname', function () {
|
||||
return $this->rule(new Hostname());
|
||||
});
|
||||
|
||||
TextInput::configureUsing(function (TextInput $textInput) {
|
||||
return $textInput->maxLength(255);
|
||||
});
|
||||
|
||||
Textarea::configureUsing(function (Textarea $textarea) {
|
||||
return $textarea->maxLength(65535);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Rules\Hostname;
|
||||
use Filament\Facades\Filament;
|
||||
use Illuminate\Foundation\Vite;
|
||||
use Filament\PluginServiceProvider;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
|
||||
class FilamentServiceProvider extends PluginServiceProvider
|
||||
{
|
||||
public static string $name = 'ploi-core::admin';
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
Filament::serving(function () {
|
||||
Filament::registerTheme(
|
||||
app(Vite::class)('resources/css/filament.css', 'build/filament'),
|
||||
);
|
||||
|
||||
Filament::registerNavigationGroups([
|
||||
'Server management',
|
||||
'Site management',
|
||||
'Providers',
|
||||
'Documentation',
|
||||
'Support',
|
||||
'Settings',
|
||||
]);
|
||||
|
||||
TextInput::macro('hostname', function () {
|
||||
return $this->rule(new Hostname());
|
||||
});
|
||||
|
||||
TextInput::configureUsing(function (TextInput $textInput) {
|
||||
return $textInput->maxLength(255);
|
||||
});
|
||||
|
||||
Textarea::configureUsing(function (Textarea $textarea) {
|
||||
return $textarea->maxLength(65535);
|
||||
});
|
||||
});
|
||||
|
||||
parent::boot();
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ use App\Services\Ploi\Ploi;
|
||||
|
||||
trait HasPloi
|
||||
{
|
||||
protected function getPloi()
|
||||
protected function getPloi(): Ploi
|
||||
{
|
||||
return new Ploi(config('services.ploi.token'));
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"calebporzio/sushi": "^2.4",
|
||||
"cloudflare/sdk": "^1.3",
|
||||
"doctrine/dbal": "^3.3",
|
||||
"filament/filament": "^2.17.21",
|
||||
"filament/filament": "^3.0.62",
|
||||
"guzzlehttp/guzzle": "^7.4.1",
|
||||
"inertiajs/inertia-laravel": "^0.6.3",
|
||||
"laragear/two-factor": "^1.1",
|
||||
@@ -26,10 +26,10 @@
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^4.2",
|
||||
"predis/predis": "^1.1",
|
||||
"saade/filament-laravel-log": "^1.1",
|
||||
"saade/filament-laravel-log": "^3.0",
|
||||
"spatie/laravel-data": "^3.9",
|
||||
"spiral/roadrunner": "^2.8.2",
|
||||
"stechstudio/filament-impersonate": "^2.10",
|
||||
"stechstudio/filament-impersonate": "3.0",
|
||||
"symfony/http-client": "^6.0",
|
||||
"symfony/mailgun-mailer": "^6.0",
|
||||
"symfony/postmark-mailer": "^6.0",
|
||||
@@ -78,7 +78,8 @@
|
||||
"scripts": {
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover --ansi"
|
||||
"@php artisan package:discover --ansi",
|
||||
"@php artisan filament:upgrade"
|
||||
],
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
|
||||
926
composer.lock
generated
926
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -186,8 +186,8 @@ return [
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\FilamentServiceProvider::class,
|
||||
App\Providers\HorizonServiceProvider::class,
|
||||
App\Providers\Filament\AdminPanelProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
|
||||
],
|
||||
|
||||
@@ -1,243 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Filament\Pages;
|
||||
use App\Http\Middleware\SetLocale;
|
||||
use Filament\Http\Livewire\Auth\Login;
|
||||
use Filament\Http\Middleware\Authenticate;
|
||||
use Filament\AvatarProviders\UiAvatarsProvider;
|
||||
use Illuminate\Session\Middleware\StartSession;
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies;
|
||||
use Illuminate\Routing\Middleware\SubstituteBindings;
|
||||
use Illuminate\Session\Middleware\AuthenticateSession;
|
||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||
use Filament\Http\Middleware\MirrorConfigToSubpackages;
|
||||
use Filament\Http\Middleware\DispatchServingFilamentEvent;
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
||||
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filament Path
|
||||
| Broadcasting
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default is `admin` but you can change it to whatever works best and
|
||||
| doesn't conflict with the routing in your application.
|
||||
| By uncommenting the Laravel Echo configuration, you may connect Filament
|
||||
| to any Pusher-compatible websockets server.
|
||||
|
|
||||
| This will allow your users to receive real-time notifications.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => env('FILAMENT_PATH', 'admin'),
|
||||
'broadcasting' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filament Core Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the path which Filament will use to load its core routes and assets.
|
||||
| You may change it if it conflicts with your other routes.
|
||||
|
|
||||
*/
|
||||
// 'echo' => [
|
||||
// 'broadcaster' => 'pusher',
|
||||
// 'key' => env('VITE_PUSHER_APP_KEY'),
|
||||
// 'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
|
||||
// 'forceTLS' => true,
|
||||
// ],
|
||||
|
||||
'core_path' => env('FILAMENT_CORE_PATH', 'filament'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filament Domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may change the domain where Filament should be active. If the domain
|
||||
| is empty, all domains will be valid.
|
||||
|
|
||||
*/
|
||||
|
||||
'domain' => env('FILAMENT_DOMAIN'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Homepage URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the URL that Filament will redirect the user to when they click
|
||||
| on the sidebar's header.
|
||||
|
|
||||
*/
|
||||
|
||||
'home_url' => '/',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Brand Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This will be displayed on the login page and in the sidebar's header.
|
||||
|
|
||||
*/
|
||||
|
||||
'brand' => env('APP_NAME'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Auth
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the configuration that Filament will use to handle authentication
|
||||
| into the admin panel.
|
||||
|
|
||||
*/
|
||||
|
||||
'auth' => [
|
||||
'guard' => env('FILAMENT_AUTH_GUARD', 'web'),
|
||||
'pages' => [
|
||||
'login' => Login::class,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pages
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the namespace and directory that Filament will automatically
|
||||
| register pages from. You may also register pages here.
|
||||
|
|
||||
*/
|
||||
|
||||
'pages' => [
|
||||
'namespace' => 'App\\Filament\\Pages',
|
||||
'path' => app_path('Filament/Pages'),
|
||||
'register' => [
|
||||
Pages\Dashboard::class,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Resources
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the namespace and directory that Filament will automatically
|
||||
| register resources from. You may also register resources here.
|
||||
|
|
||||
*/
|
||||
|
||||
'resources' => [
|
||||
'namespace' => 'App\\Filament\\Resources',
|
||||
'path' => app_path('Filament/Resources'),
|
||||
'register' => [],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Widgets
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the namespace and directory that Filament will automatically
|
||||
| register dashboard widgets from. You may also register widgets here.
|
||||
|
|
||||
*/
|
||||
|
||||
'widgets' => [
|
||||
'namespace' => 'App\\Filament\\Widgets',
|
||||
'path' => app_path('Filament/Widgets'),
|
||||
'register' => [
|
||||
// Widgets\AccountWidget::class,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Livewire
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the namespace and directory that Filament will automatically
|
||||
| register Livewire components inside.
|
||||
|
|
||||
*/
|
||||
|
||||
'livewire' => [
|
||||
'namespace' => 'App\\Filament',
|
||||
'path' => app_path('Filament'),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Dark mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By enabling this feature, your users are able to select between a light
|
||||
| and dark appearance for the admin panel, or let their system decide.
|
||||
|
|
||||
*/
|
||||
|
||||
'dark_mode' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Layout
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the configuration for the general layout of the admin panel.
|
||||
|
|
||||
| You may configure the max content width from `xl` to `7xl`, or `full`
|
||||
| for no max width.
|
||||
|
|
||||
*/
|
||||
|
||||
'layout' => [
|
||||
'actions' => [
|
||||
'modal' => [
|
||||
'actions' => [
|
||||
'alignment' => 'left',
|
||||
],
|
||||
],
|
||||
],
|
||||
'forms' => [
|
||||
'actions' => [
|
||||
'alignment' => 'left',
|
||||
],
|
||||
'have_inline_labels' => false,
|
||||
],
|
||||
'footer' => [
|
||||
'should_show_logo' => false,
|
||||
],
|
||||
'max_content_width' => 'full',
|
||||
'notifications' => [
|
||||
'vertical_alignment' => 'top',
|
||||
'alignment' => 'right',
|
||||
],
|
||||
'sidebar' => [
|
||||
'is_collapsible_on_desktop' => true,
|
||||
'groups' => [
|
||||
'are_collapsible' => true,
|
||||
],
|
||||
'width' => null,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Favicon
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the path to the favicon used for pages in the admin panel.
|
||||
|
|
||||
*/
|
||||
|
||||
'favicon' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Avatar Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the service that will be used to retrieve default avatars if one
|
||||
| has not been uploaded.
|
||||
|
|
||||
*/
|
||||
|
||||
'default_avatar_provider' => UiAvatarsProvider::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Filesystem Disk
|
||||
@@ -248,49 +35,6 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DRIVER', 'public'),
|
||||
'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DISK', 'public'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Google Fonts
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the URL for Google Fonts that should be loaded. You may use any
|
||||
| font, or set to `null` to prevent any Google Fonts from loading.
|
||||
|
|
||||
| When using a custom font, you should also set the font family in your
|
||||
| custom theme's `tailwind.config.js` file.
|
||||
|
|
||||
*/
|
||||
|
||||
'google_fonts' => 'https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may customise the middleware stack that Filament uses to handle
|
||||
| requests.
|
||||
|
|
||||
*/
|
||||
|
||||
'middleware' => [
|
||||
'auth' => [
|
||||
Authenticate::class,
|
||||
],
|
||||
'base' => [
|
||||
EncryptCookies::class,
|
||||
AddQueuedCookiesToResponse::class,
|
||||
StartSession::class,
|
||||
AuthenticateSession::class,
|
||||
ShareErrorsFromSession::class,
|
||||
SetLocale::class,
|
||||
VerifyCsrfToken::class,
|
||||
SubstituteBindings::class,
|
||||
DispatchServingFilamentEvent::class,
|
||||
MirrorConfigToSubpackages::class,
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
];
|
||||
@@ -1,80 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Date / Time Formatting
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These are the formats that Filament will use to display dates and times
|
||||
| by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'date_format' => 'M j, Y',
|
||||
'date_time_format' => env('APP_DATE_TIME_FORMAT', 'Y-m-d H:i:s'),
|
||||
'time_format' => 'H:i:s',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the storage disk Filament will use to find media. You may use any
|
||||
| of the disks defined in the `config/filesystems.php`.
|
||||
|
|
||||
*/
|
||||
|
||||
'default_filesystem_disk' => env('TABLES_FILESYSTEM_DRIVER', 'public'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Dark mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By enabling this setting, your tables will be ready for Tailwind's Dark
|
||||
| Mode feature.
|
||||
|
|
||||
| https://tailwindcss.com/docs/dark-mode
|
||||
|
|
||||
*/
|
||||
|
||||
'dark_mode' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the configuration for the pagination of tables.
|
||||
|
|
||||
*/
|
||||
|
||||
'pagination' => [
|
||||
'default_records_per_page' => 25,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Layout
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the configuration for the general layout of tables.
|
||||
|
|
||||
*/
|
||||
|
||||
'layout' => [
|
||||
'actions' => [
|
||||
'cell' => [
|
||||
'alignment' => 'right',
|
||||
],
|
||||
'modal' => [
|
||||
'actions' => [
|
||||
'alignment' => 'left',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
884
package-lock.json
generated
884
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@@ -3,16 +3,11 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"watch": "npm run development",
|
||||
"watch:filament": "npm run dev:filament",
|
||||
"dev": "npm run development",
|
||||
"development": "vite",
|
||||
"dev:filament": "TAILWIND_CONFIG=filament vite",
|
||||
"prod": "npm run production",
|
||||
"production": "vite build",
|
||||
"prod:filament": "TAILWIND_CONFIG=filament vite build",
|
||||
"production:filament": "TAILWIND_CONFIG=filament vite build",
|
||||
"production:all" : "vite build && TAILWIND_CONFIG=filament vite build",
|
||||
"build" : "vite build && TAILWIND_CONFIG=filament vite build"
|
||||
"prod": "npm run build",
|
||||
"production": "npm run build",
|
||||
"build": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
@@ -21,12 +16,12 @@
|
||||
"@inertiajs/progress": "^0.2.6",
|
||||
"@rollup/plugin-commonjs": "^21.0",
|
||||
"@tailwindcss/forms": "^0.4.1",
|
||||
"@tailwindcss/typography": "^0.5.4",
|
||||
"@tailwindcss/typography": "^0.5.10",
|
||||
"@types/node": "^18.0.6",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vue/compat": "^3.1.0",
|
||||
"@vue/compiler-sfc": "^3.1.0",
|
||||
"autoprefixer": "^10.4.8",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"axios": "^0.21.1",
|
||||
"balloon-css": "^1.2.0",
|
||||
"click-outside-vue3": "^4.0.1",
|
||||
@@ -35,11 +30,11 @@
|
||||
"lodash": "^4.17.15",
|
||||
"mitt": "^3.0.0",
|
||||
"portal-vue": "^3.0.0-beta.0",
|
||||
"postcss": "^8.4.5",
|
||||
"postcss": "^8.4.30",
|
||||
"resolve-url-loader": "^3.1.0",
|
||||
"sass": "^1.53.0",
|
||||
"sass-loader": "^8.0.0",
|
||||
"tailwindcss": "^3.1.8",
|
||||
"tailwindcss": "^3.3.3",
|
||||
"tippy.js": "^6.3.7",
|
||||
"v-click-outside": "^3.2.0",
|
||||
"vite": "^4.0.2",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import TopBar from "./TopBar-adf8ab24.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, b as createBaseVNode, t as toDisplayString, f as createTextVNode } from "./app-422355c4.js";
|
||||
import TopBar from "./TopBar-323ec957.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, b as createBaseVNode, t as toDisplayString, f as createTextVNode } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./TabBar-2ce33888.js";
|
||||
import "./notification-75074ba2.js";
|
||||
import "./TabBar-62d8875b.js";
|
||||
import "./notification-1116eb57.js";
|
||||
const _sfc_main = {
|
||||
layout: MainLayout,
|
||||
components: {
|
||||
@@ -1,9 +1,9 @@
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, b as createBaseVNode, t as toDisplayString, f as createTextVNode } from "./app-422355c4.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, b as createBaseVNode, t as toDisplayString, f as createTextVNode } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./notification-75074ba2.js";
|
||||
import "./notification-1116eb57.js";
|
||||
const _sfc_main = {
|
||||
layout: MainLayout,
|
||||
components: {
|
||||
@@ -1,22 +1,22 @@
|
||||
import TopBar from "./TopBar-01c4e381.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-a9569fd6.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-c7f76843.js";
|
||||
import { F as FormInput } from "./FormInput-a6615f6c.js";
|
||||
import { F as FormSelect } from "./FormSelect-f70c10fe.js";
|
||||
import { F as FormTextarea } from "./FormTextarea-a2b4edec.js";
|
||||
import { a as Form, F as FormActions } from "./Form-7199af23.js";
|
||||
import { P as Pagination } from "./Pagination-a732efc9.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-41804171.js";
|
||||
import { u as useConfirm } from "./confirm-fdd0e805.js";
|
||||
import Tabs from "./Tabs-c53794d8.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-8b83e0f1.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, b as createBaseVNode, j as withDirectives, v as vModelCheckbox, d as withModifiers, e as createCommentVNode, c as createElementBlock, k as renderList, F as Fragment } from "./app-422355c4.js";
|
||||
import TopBar from "./TopBar-61c6cbff.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-f371b623.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-3286f0c4.js";
|
||||
import { F as FormInput } from "./FormInput-4ba1a7d4.js";
|
||||
import { F as FormSelect } from "./FormSelect-c42537b8.js";
|
||||
import { F as FormTextarea } from "./FormTextarea-262a1b86.js";
|
||||
import { a as Form, F as FormActions } from "./Form-3ac4ed0d.js";
|
||||
import { P as Pagination } from "./Pagination-377a0d12.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-ed34c6a6.js";
|
||||
import { u as useConfirm } from "./confirm-9576f8a6.js";
|
||||
import Tabs from "./Tabs-ad0e9178.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-a45eb8a2.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, b as createBaseVNode, j as withDirectives, v as vModelCheckbox, d as withModifiers, e as createCommentVNode, c as createElementBlock, k as renderList, F as Fragment } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./TabBar-2ce33888.js";
|
||||
import "./notification-75074ba2.js";
|
||||
import "./TabBar-62d8875b.js";
|
||||
import "./notification-1116eb57.js";
|
||||
const _sfc_main = {
|
||||
layout: MainLayout,
|
||||
components: {
|
||||
@@ -1,17 +1,17 @@
|
||||
import TopBar from "./TopBar-01c4e381.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-a9569fd6.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-c7f76843.js";
|
||||
import { F as FormInput } from "./FormInput-a6615f6c.js";
|
||||
import { a as Form, F as FormActions } from "./Form-7199af23.js";
|
||||
import Tabs from "./Tabs-c53794d8.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-8b83e0f1.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, e as createCommentVNode, b as createBaseVNode, j as withDirectives, v as vModelCheckbox } from "./app-422355c4.js";
|
||||
import TopBar from "./TopBar-61c6cbff.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-f371b623.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-3286f0c4.js";
|
||||
import { F as FormInput } from "./FormInput-4ba1a7d4.js";
|
||||
import { a as Form, F as FormActions } from "./Form-3ac4ed0d.js";
|
||||
import Tabs from "./Tabs-ad0e9178.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-a45eb8a2.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, e as createCommentVNode, b as createBaseVNode, j as withDirectives, v as vModelCheckbox } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./TabBar-2ce33888.js";
|
||||
import "./notification-75074ba2.js";
|
||||
import "./TabBar-62d8875b.js";
|
||||
import "./notification-1116eb57.js";
|
||||
const _sfc_main = {
|
||||
layout: MainLayout,
|
||||
components: {
|
||||
@@ -1,20 +1,20 @@
|
||||
import TopBar from "./TopBar-ae144e61.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-41804171.js";
|
||||
import { I as IconBox, a as IconGlobe, b as IconStorage } from "./IconStorage-9d535a5e.js";
|
||||
import { M as Modal, a as ModalContainer } from "./ModalContainer-2d5aacc4.js";
|
||||
import { F as FormInput } from "./FormInput-a6615f6c.js";
|
||||
import { F as FormTextarea } from "./FormTextarea-a2b4edec.js";
|
||||
import { F as FormActions } from "./Form-7199af23.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-c7f76843.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-a9569fd6.js";
|
||||
import Tabs from "./Tabs-c8ddcfc1.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, b as createBaseVNode } from "./app-422355c4.js";
|
||||
import TopBar from "./TopBar-9d824ab4.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-ed34c6a6.js";
|
||||
import { I as IconBox, a as IconGlobe, b as IconStorage } from "./IconStorage-23b21645.js";
|
||||
import { M as Modal, a as ModalContainer } from "./ModalContainer-72517758.js";
|
||||
import { F as FormInput } from "./FormInput-4ba1a7d4.js";
|
||||
import { F as FormTextarea } from "./FormTextarea-262a1b86.js";
|
||||
import { F as FormActions } from "./Form-3ac4ed0d.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-3286f0c4.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-f371b623.js";
|
||||
import Tabs from "./Tabs-cbf2169a.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, b as createBaseVNode } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./TabBar-2ce33888.js";
|
||||
import "./notification-75074ba2.js";
|
||||
import "./TabBar-62d8875b.js";
|
||||
import "./notification-1116eb57.js";
|
||||
const _sfc_main = {
|
||||
layout: MainLayout,
|
||||
components: {
|
||||
@@ -1,20 +1,20 @@
|
||||
import TopBar from "./TopBar-4a5407c7.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { I as IconBox, a as IconGlobe, b as IconStorage } from "./IconStorage-9d535a5e.js";
|
||||
import { I as IconArrowDown, a as IconArrowUp } from "./IconArrowDown-b95111b0.js";
|
||||
import { I as IconClose, M as Modal, a as ModalContainer } from "./ModalContainer-2d5aacc4.js";
|
||||
import { F as FormInput } from "./FormInput-a6615f6c.js";
|
||||
import { F as FormSelect } from "./FormSelect-f70c10fe.js";
|
||||
import { F as FormTextarea } from "./FormTextarea-a2b4edec.js";
|
||||
import { F as FormActions } from "./Form-7199af23.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-8b83e0f1.js";
|
||||
import { u as useNotification } from "./notification-75074ba2.js";
|
||||
import { u as useConfirm } from "./confirm-fdd0e805.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, b as createBaseVNode, t as toDisplayString, c as createElementBlock, e as createCommentVNode, d as withModifiers, f as createTextVNode, k as renderList, F as Fragment } from "./app-422355c4.js";
|
||||
import TopBar from "./TopBar-d27c2df5.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { I as IconBox, a as IconGlobe, b as IconStorage } from "./IconStorage-23b21645.js";
|
||||
import { I as IconArrowDown, a as IconArrowUp } from "./IconArrowDown-ca752aed.js";
|
||||
import { I as IconClose, M as Modal, a as ModalContainer } from "./ModalContainer-72517758.js";
|
||||
import { F as FormInput } from "./FormInput-4ba1a7d4.js";
|
||||
import { F as FormSelect } from "./FormSelect-c42537b8.js";
|
||||
import { F as FormTextarea } from "./FormTextarea-262a1b86.js";
|
||||
import { F as FormActions } from "./Form-3ac4ed0d.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-a45eb8a2.js";
|
||||
import { u as useNotification } from "./notification-1116eb57.js";
|
||||
import { u as useConfirm } from "./confirm-9576f8a6.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, b as createBaseVNode, t as toDisplayString, c as createElementBlock, e as createCommentVNode, d as withModifiers, f as createTextVNode, k as renderList, F as Fragment } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./TabBar-2ce33888.js";
|
||||
import "./TabBar-62d8875b.js";
|
||||
const _sfc_main = {
|
||||
layout: MainLayout,
|
||||
components: {
|
||||
@@ -1,15 +1,15 @@
|
||||
import TopBar from "./TopBar-4a5407c7.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { I as IconBox, a as IconGlobe, b as IconStorage } from "./IconStorage-9d535a5e.js";
|
||||
import { I as IconArrowDown, a as IconArrowUp } from "./IconArrowDown-b95111b0.js";
|
||||
import { I as IconClose, M as Modal, a as ModalContainer } from "./ModalContainer-2d5aacc4.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, b as createBaseVNode, t as toDisplayString } from "./app-422355c4.js";
|
||||
import TopBar from "./TopBar-d27c2df5.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { I as IconBox, a as IconGlobe, b as IconStorage } from "./IconStorage-23b21645.js";
|
||||
import { I as IconArrowDown, a as IconArrowUp } from "./IconArrowDown-ca752aed.js";
|
||||
import { I as IconClose, M as Modal, a as ModalContainer } from "./ModalContainer-72517758.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, b as createBaseVNode, t as toDisplayString } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./TabBar-2ce33888.js";
|
||||
import "./notification-75074ba2.js";
|
||||
import "./Form-7199af23.js";
|
||||
import "./TabBar-62d8875b.js";
|
||||
import "./notification-1116eb57.js";
|
||||
import "./Form-3ac4ed0d.js";
|
||||
const _sfc_main = {
|
||||
layout: MainLayout,
|
||||
components: {
|
||||
@@ -58,7 +58,7 @@ const _hoisted_1 = /* @__PURE__ */ createBaseVNode("div", {
|
||||
/* @__PURE__ */ createBaseVNode("p", { class: "block" }, " There's an issue getting in touch with the payment service provider. Please check your settings and the error log or get in touch with the administrator of this software. "),
|
||||
/* @__PURE__ */ createBaseVNode("a", {
|
||||
class: "block font-bold underline",
|
||||
href: "https://docs.ploi-core.io/digging-deeper/using-stripe",
|
||||
href: "https://docs.ploi-core.io/263-digging-deeper/743-using-stripe",
|
||||
target: "_blank"
|
||||
}, "How to setup Stripe for billing")
|
||||
], -1);
|
||||
@@ -1,4 +1,4 @@
|
||||
import { o as openBlock, g as createBlock, w as withCtx, h as renderSlot, n as normalizeClass, i as resolveDynamicComponent } from "./app-422355c4.js";
|
||||
import { o as openBlock, g as createBlock, w as withCtx, h as renderSlot, n as normalizeClass, i as resolveDynamicComponent } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
const baseClasses = "items-center justify-center font-medium capitalize rounded select-none focus:outline-none";
|
||||
const flexClasses = "flex w-full text-body";
|
||||
@@ -1,22 +1,22 @@
|
||||
import TopBar from "./TopBar-01c4e381.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-a9569fd6.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-c7f76843.js";
|
||||
import { F as FormInput } from "./FormInput-a6615f6c.js";
|
||||
import { F as FormSelect } from "./FormSelect-f70c10fe.js";
|
||||
import { F as FormTextarea } from "./FormTextarea-a2b4edec.js";
|
||||
import { a as Form, F as FormActions } from "./Form-7199af23.js";
|
||||
import { P as Pagination } from "./Pagination-a732efc9.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-41804171.js";
|
||||
import { u as useConfirm } from "./confirm-fdd0e805.js";
|
||||
import Tabs from "./Tabs-c53794d8.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-8b83e0f1.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, c as createElementBlock, e as createCommentVNode, b as createBaseVNode, d as withModifiers, k as renderList, F as Fragment } from "./app-422355c4.js";
|
||||
import TopBar from "./TopBar-61c6cbff.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-f371b623.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-3286f0c4.js";
|
||||
import { F as FormInput } from "./FormInput-4ba1a7d4.js";
|
||||
import { F as FormSelect } from "./FormSelect-c42537b8.js";
|
||||
import { F as FormTextarea } from "./FormTextarea-262a1b86.js";
|
||||
import { a as Form, F as FormActions } from "./Form-3ac4ed0d.js";
|
||||
import { P as Pagination } from "./Pagination-377a0d12.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-ed34c6a6.js";
|
||||
import { u as useConfirm } from "./confirm-9576f8a6.js";
|
||||
import Tabs from "./Tabs-ad0e9178.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-a45eb8a2.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, c as createElementBlock, e as createCommentVNode, b as createBaseVNode, d as withModifiers, k as renderList, F as Fragment } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./TabBar-2ce33888.js";
|
||||
import "./notification-75074ba2.js";
|
||||
import "./TabBar-62d8875b.js";
|
||||
import "./notification-1116eb57.js";
|
||||
const _sfc_main = {
|
||||
layout: MainLayout,
|
||||
components: {
|
||||
@@ -1,15 +1,15 @@
|
||||
import TopBar from "./TopBar-5a41186c.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { I as IconBox, a as IconGlobe, b as IconStorage } from "./IconStorage-9d535a5e.js";
|
||||
import { M as Modal, a as ModalContainer } from "./ModalContainer-2d5aacc4.js";
|
||||
import { F as FormInput } from "./FormInput-a6615f6c.js";
|
||||
import { F as FormActions } from "./Form-7199af23.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, b as createBaseVNode, t as toDisplayString, f as createTextVNode, c as createElementBlock, k as renderList, F as Fragment } from "./app-422355c4.js";
|
||||
import TopBar from "./TopBar-f2530bab.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { I as IconBox, a as IconGlobe, b as IconStorage } from "./IconStorage-23b21645.js";
|
||||
import { M as Modal, a as ModalContainer } from "./ModalContainer-72517758.js";
|
||||
import { F as FormInput } from "./FormInput-4ba1a7d4.js";
|
||||
import { F as FormActions } from "./Form-3ac4ed0d.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, b as createBaseVNode, t as toDisplayString, f as createTextVNode, c as createElementBlock, k as renderList, F as Fragment } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./TabBar-2ce33888.js";
|
||||
import "./notification-75074ba2.js";
|
||||
import "./TabBar-62d8875b.js";
|
||||
import "./notification-1116eb57.js";
|
||||
const _sfc_main = {
|
||||
layout: MainLayout,
|
||||
components: {
|
||||
@@ -1,8 +1,8 @@
|
||||
import { T as TextDivider } from "./TextDivider-47b152ef.js";
|
||||
import { F as FormInput } from "./FormInput-a6615f6c.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { c as createElementBlock, a as createVNode, w as withCtx, b as createBaseVNode, F as Fragment, r as resolveComponent, o as openBlock, t as toDisplayString, d as withModifiers, e as createCommentVNode, f as createTextVNode, g as createBlock } from "./app-422355c4.js";
|
||||
import { T as TextDivider } from "./TextDivider-54c486fb.js";
|
||||
import { F as FormInput } from "./FormInput-4ba1a7d4.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { c as createElementBlock, a as createVNode, w as withCtx, b as createBaseVNode, F as Fragment, r as resolveComponent, o as openBlock, t as toDisplayString, d as withModifiers, e as createCommentVNode, f as createTextVNode, g as createBlock } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
const _sfc_main = {
|
||||
components: {
|
||||
@@ -1,4 +1,4 @@
|
||||
import { o as openBlock, c as createElementBlock, h as renderSlot, n as normalizeClass } from "./app-422355c4.js";
|
||||
import { o as openBlock, c as createElementBlock, h as renderSlot, n as normalizeClass } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
const baseClasses = "w-full px-4 sm:px-8 mx-auto";
|
||||
const sizeClasses = {
|
||||
@@ -1,20 +1,20 @@
|
||||
import TopBar from "./TopBar-01c4e381.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-a9569fd6.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-c7f76843.js";
|
||||
import { F as FormInput } from "./FormInput-a6615f6c.js";
|
||||
import { a as Form, F as FormActions } from "./Form-7199af23.js";
|
||||
import { P as Pagination } from "./Pagination-a732efc9.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-41804171.js";
|
||||
import { u as useNotification } from "./notification-75074ba2.js";
|
||||
import { u as useConfirm } from "./confirm-fdd0e805.js";
|
||||
import Tabs from "./Tabs-c53794d8.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-8b83e0f1.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, b as createBaseVNode, j as withDirectives, A as vModelRadio, B as vShow, d as withModifiers, e as createCommentVNode, c as createElementBlock, k as renderList, F as Fragment } from "./app-422355c4.js";
|
||||
import TopBar from "./TopBar-61c6cbff.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-f371b623.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-3286f0c4.js";
|
||||
import { F as FormInput } from "./FormInput-4ba1a7d4.js";
|
||||
import { a as Form, F as FormActions } from "./Form-3ac4ed0d.js";
|
||||
import { P as Pagination } from "./Pagination-377a0d12.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-ed34c6a6.js";
|
||||
import { u as useNotification } from "./notification-1116eb57.js";
|
||||
import { u as useConfirm } from "./confirm-9576f8a6.js";
|
||||
import Tabs from "./Tabs-ad0e9178.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-a45eb8a2.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, b as createBaseVNode, j as withDirectives, A as vModelRadio, B as vShow, d as withModifiers, e as createCommentVNode, c as createElementBlock, k as renderList, F as Fragment } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./TabBar-2ce33888.js";
|
||||
import "./TabBar-62d8875b.js";
|
||||
const _sfc_main = {
|
||||
layout: MainLayout,
|
||||
components: {
|
||||
@@ -1,20 +1,20 @@
|
||||
import TopBar from "./TopBar-01c4e381.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-a9569fd6.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-c7f76843.js";
|
||||
import { F as FormInput } from "./FormInput-a6615f6c.js";
|
||||
import { a as Form, F as FormActions } from "./Form-7199af23.js";
|
||||
import { P as Pagination } from "./Pagination-a732efc9.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-41804171.js";
|
||||
import { u as useConfirm } from "./confirm-fdd0e805.js";
|
||||
import Tabs from "./Tabs-c53794d8.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-8b83e0f1.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, b as createBaseVNode, d as withModifiers, e as createCommentVNode, c as createElementBlock, k as renderList, F as Fragment } from "./app-422355c4.js";
|
||||
import TopBar from "./TopBar-61c6cbff.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-f371b623.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-3286f0c4.js";
|
||||
import { F as FormInput } from "./FormInput-4ba1a7d4.js";
|
||||
import { a as Form, F as FormActions } from "./Form-3ac4ed0d.js";
|
||||
import { P as Pagination } from "./Pagination-377a0d12.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-ed34c6a6.js";
|
||||
import { u as useConfirm } from "./confirm-9576f8a6.js";
|
||||
import Tabs from "./Tabs-ad0e9178.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-a45eb8a2.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, b as createBaseVNode, d as withModifiers, e as createCommentVNode, c as createElementBlock, k as renderList, F as Fragment } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./TabBar-2ce33888.js";
|
||||
import "./notification-75074ba2.js";
|
||||
import "./TabBar-62d8875b.js";
|
||||
import "./notification-1116eb57.js";
|
||||
const _sfc_main = {
|
||||
metaInfo() {
|
||||
return {
|
||||
@@ -1,20 +1,20 @@
|
||||
import TopBar from "./TopBar-01c4e381.js";
|
||||
import { C as Container } from "./Container-589427ca.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-deaff4ac.js";
|
||||
import { B as Button } from "./Button-c0cf0b15.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-a9569fd6.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-c7f76843.js";
|
||||
import { F as FormInput } from "./FormInput-a6615f6c.js";
|
||||
import { a as Form, F as FormActions } from "./Form-7199af23.js";
|
||||
import { P as Pagination } from "./Pagination-a732efc9.js";
|
||||
import { u as useConfirm } from "./confirm-fdd0e805.js";
|
||||
import { u as useNotification } from "./notification-75074ba2.js";
|
||||
import Tabs from "./Tabs-c53794d8.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-8b83e0f1.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-41804171.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, b as createBaseVNode, d as withModifiers, e as createCommentVNode, c as createElementBlock, k as renderList, F as Fragment } from "./app-422355c4.js";
|
||||
import TopBar from "./TopBar-61c6cbff.js";
|
||||
import { C as Container } from "./Container-0fec1f44.js";
|
||||
import { M as MainLayout, C as Content, P as Page, a as PageHeader, b as PageHeaderTitle, c as PageBody, L as List, d as ListItem, S as StatusBubble, N as NotificationBadge } from "./MainLayout-0bcdf66a.js";
|
||||
import { B as Button } from "./Button-eaed3445.js";
|
||||
import { S as SettingsLayout } from "./SettingsLayout-f371b623.js";
|
||||
import { S as SettingsSegment } from "./SettingsSegment-3286f0c4.js";
|
||||
import { F as FormInput } from "./FormInput-4ba1a7d4.js";
|
||||
import { a as Form, F as FormActions } from "./Form-3ac4ed0d.js";
|
||||
import { P as Pagination } from "./Pagination-377a0d12.js";
|
||||
import { u as useConfirm } from "./confirm-9576f8a6.js";
|
||||
import { u as useNotification } from "./notification-1116eb57.js";
|
||||
import Tabs from "./Tabs-ad0e9178.js";
|
||||
import { T as Table, a as TableHead, b as TableHeader, c as TableRow, d as TableBody, e as TableData } from "./TableData-a45eb8a2.js";
|
||||
import { E as EmptyImage } from "./EmptyImage-ed34c6a6.js";
|
||||
import { g as createBlock, w as withCtx, r as resolveComponent, o as openBlock, a as createVNode, f as createTextVNode, t as toDisplayString, b as createBaseVNode, d as withModifiers, e as createCommentVNode, c as createElementBlock, k as renderList, F as Fragment } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
import "./TabBar-2ce33888.js";
|
||||
import "./TabBar-62d8875b.js";
|
||||
const _sfc_main = {
|
||||
layout: MainLayout,
|
||||
components: {
|
||||
@@ -1,4 +1,4 @@
|
||||
import { o as openBlock, c as createElementBlock, b as createBaseVNode, h as renderSlot } from "./app-422355c4.js";
|
||||
import { o as openBlock, c as createElementBlock, b as createBaseVNode, h as renderSlot } from "./app-ebc4651b.js";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
||||
const _sfc_main$1 = {};
|
||||
const _hoisted_1 = {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user