refactor: Reorder static properties and adjust function syntax in Filament resources and pages for consistency.
This commit is contained in:
parent
337238b518
commit
3f0529a53e
@ -27,18 +27,18 @@ class AdminVerification extends Page implements HasActions, HasForms
|
|||||||
{
|
{
|
||||||
use HasPageShield, InteractsWithActions, InteractsWithForms;
|
use HasPageShield, InteractsWithActions, InteractsWithForms;
|
||||||
|
|
||||||
protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-user-group';
|
|
||||||
|
|
||||||
protected static ?string $title = 'Verifikasi Rekanan';
|
|
||||||
|
|
||||||
protected static string|UnitEnum|null $navigationGroup = 'Kelola';
|
protected static string|UnitEnum|null $navigationGroup = 'Kelola';
|
||||||
|
|
||||||
|
protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-user-group';
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'Verifikasi Rekanan';
|
protected static ?string $navigationLabel = 'Verifikasi Rekanan';
|
||||||
|
|
||||||
protected static ?int $navigationSort = 2;
|
protected static ?int $navigationSort = 2;
|
||||||
|
|
||||||
protected static ?string $slug = 'manage/admin-verification';
|
protected static ?string $slug = 'manage/admin-verification';
|
||||||
|
|
||||||
|
protected static ?string $title = 'Verifikasi Rekanan';
|
||||||
|
|
||||||
protected string $view = 'filament.pages.admin-verification';
|
protected string $view = 'filament.pages.admin-verification';
|
||||||
|
|
||||||
public string $filterStatus = 'all';
|
public string $filterStatus = 'all';
|
||||||
|
|||||||
@ -19,16 +19,16 @@ class ManageGeneralSettings extends SettingsPage
|
|||||||
{
|
{
|
||||||
use HasPageShield;
|
use HasPageShield;
|
||||||
|
|
||||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::Cog6Tooth;
|
|
||||||
|
|
||||||
protected static string $settings = GeneralSettings::class;
|
|
||||||
|
|
||||||
protected static string|UnitEnum|null $navigationGroup = 'Pengaturan';
|
protected static string|UnitEnum|null $navigationGroup = 'Pengaturan';
|
||||||
|
|
||||||
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::Cog6Tooth;
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'Umum';
|
protected static ?string $navigationLabel = 'Umum';
|
||||||
|
|
||||||
protected static ?int $navigationSort = 1;
|
protected static ?int $navigationSort = 1;
|
||||||
|
|
||||||
|
protected static string $settings = GeneralSettings::class;
|
||||||
|
|
||||||
protected static ?string $title = 'Pengaturan Umum';
|
protected static ?string $title = 'Pengaturan Umum';
|
||||||
|
|
||||||
public function form(Schema $schema): Schema
|
public function form(Schema $schema): Schema
|
||||||
|
|||||||
@ -17,16 +17,16 @@ class ManageSeoSettings extends SettingsPage
|
|||||||
{
|
{
|
||||||
use HasPageShield;
|
use HasPageShield;
|
||||||
|
|
||||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::MagnifyingGlass;
|
|
||||||
|
|
||||||
protected static string $settings = SeoSettings::class;
|
|
||||||
|
|
||||||
protected static string|UnitEnum|null $navigationGroup = 'Pengaturan';
|
protected static string|UnitEnum|null $navigationGroup = 'Pengaturan';
|
||||||
|
|
||||||
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::MagnifyingGlass;
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'SEO';
|
protected static ?string $navigationLabel = 'SEO';
|
||||||
|
|
||||||
protected static ?int $navigationSort = 3;
|
protected static ?int $navigationSort = 3;
|
||||||
|
|
||||||
|
protected static string $settings = SeoSettings::class;
|
||||||
|
|
||||||
protected static ?string $title = 'Pengaturan SEO';
|
protected static ?string $title = 'Pengaturan SEO';
|
||||||
|
|
||||||
public function form(Schema $schema): Schema
|
public function form(Schema $schema): Schema
|
||||||
|
|||||||
@ -17,16 +17,16 @@ class ManageSocialMediaSettings extends SettingsPage
|
|||||||
{
|
{
|
||||||
use HasPageShield;
|
use HasPageShield;
|
||||||
|
|
||||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::Share;
|
|
||||||
|
|
||||||
protected static string $settings = SocialMediaSettings::class;
|
|
||||||
|
|
||||||
protected static string|UnitEnum|null $navigationGroup = 'Pengaturan';
|
protected static string|UnitEnum|null $navigationGroup = 'Pengaturan';
|
||||||
|
|
||||||
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::Share;
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'Media Sosial';
|
protected static ?string $navigationLabel = 'Media Sosial';
|
||||||
|
|
||||||
protected static ?int $navigationSort = 2;
|
protected static ?int $navigationSort = 2;
|
||||||
|
|
||||||
|
protected static string $settings = SocialMediaSettings::class;
|
||||||
|
|
||||||
protected static ?string $title = 'Pengaturan Media Sosial';
|
protected static ?string $title = 'Pengaturan Media Sosial';
|
||||||
|
|
||||||
public function form(Schema $schema): Schema
|
public function form(Schema $schema): Schema
|
||||||
|
|||||||
@ -29,18 +29,18 @@ class ContactResource extends Resource
|
|||||||
{
|
{
|
||||||
protected static ?string $model = Contact::class;
|
protected static ?string $model = Contact::class;
|
||||||
|
|
||||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::Envelope;
|
protected static ?string $modelLabel = 'Kontak';
|
||||||
|
|
||||||
protected static string|UnitEnum|null $navigationGroup = 'Kelola';
|
protected static string|UnitEnum|null $navigationGroup = 'Kelola';
|
||||||
|
|
||||||
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::Envelope;
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'Kontak';
|
protected static ?string $navigationLabel = 'Kontak';
|
||||||
|
|
||||||
protected static ?int $navigationSort = 8;
|
protected static ?int $navigationSort = 8;
|
||||||
|
|
||||||
protected static ?string $recordTitleAttribute = 'subject';
|
protected static ?string $recordTitleAttribute = 'subject';
|
||||||
|
|
||||||
protected static ?string $modelLabel = 'Kontak';
|
|
||||||
|
|
||||||
protected static ?string $slug = 'manage/contacts';
|
protected static ?string $slug = 'manage/contacts';
|
||||||
|
|
||||||
public static function getNavigationBadge(): ?string
|
public static function getNavigationBadge(): ?string
|
||||||
|
|||||||
@ -13,10 +13,10 @@
|
|||||||
|
|
||||||
class ManageJournalists extends ManageRecords
|
class ManageJournalists extends ManageRecords
|
||||||
{
|
{
|
||||||
protected static ?string $title = 'Jurnalis';
|
|
||||||
|
|
||||||
protected static string $resource = JournalistResource::class;
|
protected static string $resource = JournalistResource::class;
|
||||||
|
|
||||||
|
protected static ?string $title = 'Jurnalis';
|
||||||
|
|
||||||
protected function getHeaderActions(): array
|
protected function getHeaderActions(): array
|
||||||
{
|
{
|
||||||
if (auth()->user()->hasRole(RoleEnum::PERUSAHAAN->value) && ! auth()->user()->company?->partnerMedia) {
|
if (auth()->user()->hasRole(RoleEnum::PERUSAHAAN->value) && ! auth()->user()->company?->partnerMedia) {
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
class ManagePartners extends ManageRecords
|
class ManagePartners extends ManageRecords
|
||||||
{
|
{
|
||||||
protected static ?string $title = 'Rekanan';
|
|
||||||
|
|
||||||
protected static string $resource = PartnerResource::class;
|
protected static string $resource = PartnerResource::class;
|
||||||
|
|
||||||
|
protected static ?string $title = 'Rekanan';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,10 +9,10 @@
|
|||||||
|
|
||||||
class ManageClassifications extends ManageRecords
|
class ManageClassifications extends ManageRecords
|
||||||
{
|
{
|
||||||
protected static ?string $title = 'Klasifikasi';
|
|
||||||
|
|
||||||
protected static string $resource = ClassificationResource::class;
|
protected static string $resource = ClassificationResource::class;
|
||||||
|
|
||||||
|
protected static ?string $title = 'Klasifikasi';
|
||||||
|
|
||||||
protected function getHeaderActions(): array
|
protected function getHeaderActions(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
|||||||
@ -9,10 +9,10 @@
|
|||||||
|
|
||||||
class ManageDepartments extends ManageRecords
|
class ManageDepartments extends ManageRecords
|
||||||
{
|
{
|
||||||
protected static ?string $title = 'OPD';
|
|
||||||
|
|
||||||
protected static string $resource = DepartmentResource::class;
|
protected static string $resource = DepartmentResource::class;
|
||||||
|
|
||||||
|
protected static ?string $title = 'OPD';
|
||||||
|
|
||||||
protected function getHeaderActions(): array
|
protected function getHeaderActions(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
|||||||
@ -9,10 +9,10 @@
|
|||||||
|
|
||||||
class ManageLocations extends ManageRecords
|
class ManageLocations extends ManageRecords
|
||||||
{
|
{
|
||||||
protected static ?string $title = 'Lokasi';
|
|
||||||
|
|
||||||
protected static string $resource = LocationResource::class;
|
protected static string $resource = LocationResource::class;
|
||||||
|
|
||||||
|
protected static ?string $title = 'Lokasi';
|
||||||
|
|
||||||
protected function getHeaderActions(): array
|
protected function getHeaderActions(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
|||||||
@ -9,10 +9,10 @@
|
|||||||
|
|
||||||
class ManageThemes extends ManageRecords
|
class ManageThemes extends ManageRecords
|
||||||
{
|
{
|
||||||
protected static ?string $title = 'Tema';
|
|
||||||
|
|
||||||
protected static string $resource = ThemeResource::class;
|
protected static string $resource = ThemeResource::class;
|
||||||
|
|
||||||
|
protected static ?string $title = 'Tema';
|
||||||
|
|
||||||
protected function getHeaderActions(): array
|
protected function getHeaderActions(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
|||||||
@ -46,8 +46,6 @@ class UserResource extends Resource
|
|||||||
|
|
||||||
protected static ?int $navigationSort = 8;
|
protected static ?int $navigationSort = 8;
|
||||||
|
|
||||||
// protected static ?string $recordTitleAttribute = 'name';
|
|
||||||
|
|
||||||
protected static ?string $slug = 'master/users';
|
protected static ?string $slug = 'master/users';
|
||||||
|
|
||||||
public static function form(Schema $schema): Schema
|
public static function form(Schema $schema): Schema
|
||||||
|
|||||||
@ -34,18 +34,18 @@ class AnnouncementResource extends Resource
|
|||||||
{
|
{
|
||||||
protected static ?string $model = Announcement::class;
|
protected static ?string $model = Announcement::class;
|
||||||
|
|
||||||
|
protected static string|UnitEnum|null $navigationGroup = 'Publikasi';
|
||||||
|
|
||||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::Megaphone;
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::Megaphone;
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'Pengumuman';
|
protected static ?string $navigationLabel = 'Pengumuman';
|
||||||
|
|
||||||
protected static string|UnitEnum|null $navigationGroup = 'Publikasi';
|
|
||||||
|
|
||||||
protected static ?int $navigationSort = 2;
|
protected static ?int $navigationSort = 2;
|
||||||
|
|
||||||
protected static ?string $slug = 'publication/announcements';
|
|
||||||
|
|
||||||
protected static ?string $recordTitleAttribute = 'title';
|
protected static ?string $recordTitleAttribute = 'title';
|
||||||
|
|
||||||
|
protected static ?string $slug = 'publication/announcements';
|
||||||
|
|
||||||
public static function form(Schema $schema): Schema
|
public static function form(Schema $schema): Schema
|
||||||
{
|
{
|
||||||
return $schema
|
return $schema
|
||||||
|
|||||||
@ -14,10 +14,10 @@
|
|||||||
|
|
||||||
class ManageAnnouncements extends ManageRecords
|
class ManageAnnouncements extends ManageRecords
|
||||||
{
|
{
|
||||||
protected static ?string $title = 'Pengumuman';
|
|
||||||
|
|
||||||
protected static string $resource = AnnouncementResource::class;
|
protected static string $resource = AnnouncementResource::class;
|
||||||
|
|
||||||
|
protected static ?string $title = 'Pengumuman';
|
||||||
|
|
||||||
protected function getHeaderActions(): array
|
protected function getHeaderActions(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
|||||||
@ -21,18 +21,18 @@ class NewsResource extends Resource
|
|||||||
{
|
{
|
||||||
protected static ?string $model = News::class;
|
protected static ?string $model = News::class;
|
||||||
|
|
||||||
|
protected static string|UnitEnum|null $navigationGroup = 'Publikasi';
|
||||||
|
|
||||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::Newspaper;
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::Newspaper;
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'Berita';
|
protected static ?string $navigationLabel = 'Berita';
|
||||||
|
|
||||||
protected static string|UnitEnum|null $navigationGroup = 'Publikasi';
|
|
||||||
|
|
||||||
protected static ?int $navigationSort = 1;
|
protected static ?int $navigationSort = 1;
|
||||||
|
|
||||||
protected static ?string $slug = 'publication/news';
|
|
||||||
|
|
||||||
protected static ?string $recordTitleAttribute = 'title';
|
protected static ?string $recordTitleAttribute = 'title';
|
||||||
|
|
||||||
|
protected static ?string $slug = 'publication/news';
|
||||||
|
|
||||||
public static function form(Schema $schema): Schema
|
public static function form(Schema $schema): Schema
|
||||||
{
|
{
|
||||||
return NewsForm::configure($schema);
|
return NewsForm::configure($schema);
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
class ManageVisitors extends ManageRecords
|
class ManageVisitors extends ManageRecords
|
||||||
{
|
{
|
||||||
protected static ?string $title = 'Pengunjung';
|
|
||||||
|
|
||||||
protected static string $resource = VisitorResource::class;
|
protected static string $resource = VisitorResource::class;
|
||||||
|
|
||||||
|
protected static ?string $title = 'Pengunjung';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user