From 285adb3674933f42332da9470d5f9ceb3a2d13f4 Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Thu, 19 Sep 2024 12:10:03 +0300 Subject: [PATCH] update --- web/Modules/Email/App/Filament/Pages/EmailSettings.php | 2 ++ .../Email/App/Filament/Resources/EmailBoxResource.php | 4 +++- web/Modules/Email/App/Models/EmailBox.php | 9 +++++++++ web/composer.lock | 1 - 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/web/Modules/Email/App/Filament/Pages/EmailSettings.php b/web/Modules/Email/App/Filament/Pages/EmailSettings.php index 733f414..8d8398a 100644 --- a/web/Modules/Email/App/Filament/Pages/EmailSettings.php +++ b/web/Modules/Email/App/Filament/Pages/EmailSettings.php @@ -14,4 +14,6 @@ class EmailSettings extends Page protected static ?string $navigationLabel = 'Settings'; + protected static ?int $navigationSort = 4; + } diff --git a/web/Modules/Email/App/Filament/Resources/EmailBoxResource.php b/web/Modules/Email/App/Filament/Resources/EmailBoxResource.php index 1afe3b1..28c1f18 100644 --- a/web/Modules/Email/App/Filament/Resources/EmailBoxResource.php +++ b/web/Modules/Email/App/Filament/Resources/EmailBoxResource.php @@ -22,6 +22,8 @@ class EmailBoxResource extends Resource protected static ?string $navigationGroup = 'Email'; + protected static ?int $navigationSort = 0; + public static function form(Form $form): Form { return $form @@ -93,7 +95,7 @@ class EmailBoxResource extends Resource Tables\Columns\TextColumn::make('name') ->searchable() ->sortable(), - Tables\Columns\TextColumn::make('quota') + Tables\Columns\TextColumn::make('quotaFormated') ->searchable() ->sortable(), ]) diff --git a/web/Modules/Email/App/Models/EmailBox.php b/web/Modules/Email/App/Models/EmailBox.php index 5dd47d3..d277448 100644 --- a/web/Modules/Email/App/Models/EmailBox.php +++ b/web/Modules/Email/App/Models/EmailBox.php @@ -33,6 +33,15 @@ class EmailBox extends Model ]; + public function getQuotaFormatedAttribute() + { + if ($this->quota == 0) { + return 'Unlimited'; + } + + return $this->quota . ' MB'; + } + public function getEmailAttribute() { return $this->username . '@' . $this->domain; diff --git a/web/composer.lock b/web/composer.lock index b2d2051..ca0c2f1 100644 --- a/web/composer.lock +++ b/web/composer.lock @@ -4428,7 +4428,6 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/microweber-packages/shared-server-scripts/zipball/159879db147f4a69f8a5f6797b57312bee869df0", "reference": "159879db147f4a69f8a5f6797b57312bee869df0", "shasum": "" },