refactor: simplify PartnerInfolist sections by removing dynamic notification labels and icons

This commit is contained in:
Yoga Pangestu 2026-04-09 13:06:08 +07:00
parent 2bd0b200e3
commit 24d87cbbae

View File

@ -3,7 +3,6 @@
namespace App\Filament\Resources\Manage\Partners\Infolists; namespace App\Filament\Resources\Manage\Partners\Infolists;
use App\Enums\DecisionAdmin; use App\Enums\DecisionAdmin;
use App\Enums\NotifStyle;
use App\Filament\Support\CheerfulNotification; use App\Filament\Support\CheerfulNotification;
use App\Models\User; use App\Models\User;
use Filament\Infolists\Components\RepeatableEntry; use Filament\Infolists\Components\RepeatableEntry;
@ -88,8 +87,7 @@ public static function configure(Schema $schema): Schema
Grid::make(3) Grid::make(3)
->schema([ ->schema([
Section::make(fn () => CheerfulNotification::getByKey('company.director_nik')) Section::make('NIK Direktur')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-user' : null)
->schema([ ->schema([
TextEntry::make('company.director_nik') TextEntry::make('company.director_nik')
->hiddenLabel(), ->hiddenLabel(),
@ -136,8 +134,7 @@ public static function configure(Schema $schema): Schema
}), }),
]), ]),
Section::make(fn () => CheerfulNotification::getByKey('company.establishment_deed')) Section::make('Akta Pendirian')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.deed_incorporation') TextEntry::make('company.deed_incorporation')
->hiddenLabel(), ->hiddenLabel(),
@ -145,8 +142,7 @@ public static function configure(Schema $schema): Schema
self::fileEntry('company.deed_incorporation'), self::fileEntry('company.deed_incorporation'),
]), ]),
Section::make(fn () => CheerfulNotification::getByKey('company.siup_nib')) Section::make('SIUP / NIB')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.trade_license') TextEntry::make('company.trade_license')
->hiddenLabel(), ->hiddenLabel(),
@ -154,8 +150,7 @@ public static function configure(Schema $schema): Schema
self::fileEntry('company.trade_license'), self::fileEntry('company.trade_license'),
]), ]),
Section::make(fn () => CheerfulNotification::getByKey('company.npwp')) Section::make('NPWP')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.tax_id_number') TextEntry::make('company.tax_id_number')
->hiddenLabel(), ->hiddenLabel(),
@ -163,8 +158,7 @@ public static function configure(Schema $schema): Schema
self::fileEntry('company.tax_id_number'), self::fileEntry('company.tax_id_number'),
]), ]),
Section::make(fn () => CheerfulNotification::getByKey('company.pkp')) Section::make('PKP')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.taxable_enterprise') TextEntry::make('company.taxable_enterprise')
->hiddenLabel(), ->hiddenLabel(),
@ -172,8 +166,7 @@ public static function configure(Schema $schema): Schema
self::fileEntry('company.taxable_enterprise'), self::fileEntry('company.taxable_enterprise'),
]), ]),
Section::make(fn () => CheerfulNotification::getByKey('company.annual_tax')) Section::make('SPT Tahunan')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.annual_tax_return') TextEntry::make('company.annual_tax_return')
->hiddenLabel(), ->hiddenLabel(),
@ -181,8 +174,7 @@ public static function configure(Schema $schema): Schema
self::fileEntry('company.annual_tax_return'), self::fileEntry('company.annual_tax_return'),
]), ]),
Section::make(fn () => CheerfulNotification::getByKey('company.domicile')) Section::make('Suket Domisili')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.domicile_certificate') TextEntry::make('company.domicile_certificate')
->hiddenLabel(), ->hiddenLabel(),
@ -190,8 +182,7 @@ public static function configure(Schema $schema): Schema
self::fileEntry('company.domicile_certificate'), self::fileEntry('company.domicile_certificate'),
]), ]),
Section::make(fn () => CheerfulNotification::getByKey('company.company_profile')) Section::make('Profil Perusahaan')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.profile') TextEntry::make('company.profile')
->hiddenLabel(), ->hiddenLabel(),
@ -228,8 +219,7 @@ public static function configure(Schema $schema): Schema
Grid::make(2) Grid::make(2)
->schema([ ->schema([
Section::make(fn () => CheerfulNotification::getByKey('company.journalism_org_cert')) Section::make('Organisasi Kewartawanan')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.partnerMedia.journalism_organization') TextEntry::make('company.partnerMedia.journalism_organization')
->hiddenLabel(), ->hiddenLabel(),
@ -237,8 +227,7 @@ public static function configure(Schema $schema): Schema
self::fileEntry('company.partnerMedia.journalism_organization', 'company.partnerMedia', 'partnerMedia'), self::fileEntry('company.partnerMedia.journalism_organization', 'company.partnerMedia', 'partnerMedia'),
]), ]),
Section::make(fn () => CheerfulNotification::getByKey('company.press_council_cert')) Section::make('Sertifikat Dewan Pers')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.partnerMedia.press_council_certificate') TextEntry::make('company.partnerMedia.press_council_certificate')
->hiddenLabel(), ->hiddenLabel(),
@ -257,18 +246,17 @@ public static function configure(Schema $schema): Schema
Grid::make(3) Grid::make(3)
->schema([ ->schema([
TextEntry::make('name') TextEntry::make('name')
->label('Nama'), ->label('Nama Lengkap'),
TextEntry::make('email') TextEntry::make('email')
->label('Email'), ->label('Alamat Surel'),
TextEntry::make('phone_number') TextEntry::make('phone_number')
->label('No. Telepon'), ->label('Nomor Telepon'),
]), ]),
Grid::make(2) Grid::make(2)
->schema([ ->schema([
Section::make(fn () => CheerfulNotification::getByKey('company.press_card')) Section::make('Dokumen Pers')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-identification' : null)
->schema([ ->schema([
TextEntry::make('press_card') TextEntry::make('press_card')
->hiddenLabel(), ->hiddenLabel(),
@ -276,8 +264,7 @@ public static function configure(Schema $schema): Schema
self::fileEntry('press_card', null, 'journalists'), self::fileEntry('press_card', null, 'journalists'),
]), ]),
Section::make(fn () => CheerfulNotification::getByKey('company.ukw_cert')) Section::make('Sertifikat UKW')
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('ukw_certificate') TextEntry::make('ukw_certificate')
->hiddenLabel(), ->hiddenLabel(),