Skip to content

Commit

Permalink
add some features to SaaS panel
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io committed Sep 2, 2024
1 parent 5aea91e commit 2977381
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 38 deletions.
2 changes: 2 additions & 0 deletions resources/lang/ar/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@
],

"contact-us" => [
"status" => "تعديل حالات اتصل بنا",
"status-button" => "إدارة الحالات",
"footer" => "هل لديك اي مشكلة؟ او تحتاج الى مساعدة؟",
"modal" => 'برجاء مليء هذا النموذج للتواصل معانا',
"label" => "تواصل معنا",
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/en/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@
],

"contact-us" => [
"status" => "Edit Contact Us Status",
"status-button" => "Manage Status",
"footer" => "Do you have any problems or questions? Please",
"modal" => 'Please Fill This Form To Contact Us',
"label" => "Contact Us",
Expand Down
61 changes: 23 additions & 38 deletions src/Filament/Resources/ContactResource/Pages/ContactStatusTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
namespace TomatoPHP\FilamentAccounts\Filament\Resources\ContactResource\Pages;

use TomatoPHP\FilamentTypes\Pages\BaseTypePage;
use TomatoPHP\FilamentTypes\Services\Contracts\Type;

class ContactStatusTypes extends BaseTypePage
{
public function getTitle(): string
{
return trans('filament-accounts::messages.contact-us.status');
}


public function getType(): string
{
return "status";
Expand All @@ -19,50 +26,28 @@ public function getFor(): string
public function getTypes(): array
{
return [
[
"name" => [
Type::make("pending")
->name([
"ar" => "تحت المراجعة",
"en" => "Pending"
],
"key" => "pending",
"for" => "contacts",
"type" => "status",
"icon" => "heroicon-c-pause-circle",
"color" => "#ffcf00"
],
[
"name" => [
])
->icon("heroicon-c-pause-circle")
->color("#ffcf00"),
Type::make("active")
->name([
"ar" => "جاري المتابعة",
"en" => "Active"
],
"key" => "active",
"for" => "contacts",
"type" => "status",
"icon" => "heroicon-c-play-circle",
"color" => "#1897ff"
],
[
"name" => [
])
->icon("heroicon-c-play-circle")
->color("#1897ff"),
Type::make("closed")
->name([
"ar" => "تم اغلاقها",
"en" => "Closed"
],
"key" => "closed",
"for" => "contacts",
"type" => "status",
"icon" => "heroicon-c-check-circle",
"color" => "#38fc34"
],
[
"name" => [
"ar" => "الموافقة علي الحساب",
"en" => "Account Approve"
],
"key" => "account_approve",
"for" => "contacts",
"type" => "type",
"icon" => "heroicon-c-check-circle",
"color" => "#38fc34"
]
])
->icon("heroicon-c-check-circle")
->color("#38fc34")

];
}
}
4 changes: 4 additions & 0 deletions src/Filament/Resources/ContactResource/Pages/ListContacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class ListContacts extends ManageRecords
protected function getHeaderActions(): array
{
return [
Actions\Action::make('status')
->label('Manage Status')
->icon('heroicon-s-tag')
->url(ContactStatusTypes::getUrl()),
];
}
}

0 comments on commit 2977381

Please sign in to comment.