refactor: replace direct message retrieval with key-based retrieval in CheerfulNotification across various enums and Filament pages for improved localization and maintainability

This commit is contained in:
Yoga Pangestu 2026-04-06 09:22:07 +07:00
parent f485b2cef3
commit 3a5ef20334
87 changed files with 1900 additions and 400 deletions

View File

@ -19,9 +19,9 @@ enum ApprovalStatus: int implements HasColor, HasLabel
public function getLabel(): ?string public function getLabel(): ?string
{ {
return match ($this) { return match ($this) {
self::PENDING => CheerfulNotification::getMessage('Menunggu Persetujuan ⏳✨', 'Menunggu'), self::PENDING => CheerfulNotification::getByKey('enum.approval_status.pending'),
self::ACCEPTED => CheerfulNotification::getMessage('Diterima! ✅🚀', 'Menerima'), self::ACCEPTED => CheerfulNotification::getByKey('enum.approval_status.accepted'),
self::REJECTED => CheerfulNotification::getMessage('Ditolak, Tetap Semangat! 🛑😔', 'Menolak'), self::REJECTED => CheerfulNotification::getByKey('enum.approval_status.rejected'),
}; };
} }

View File

@ -21,11 +21,11 @@ enum CooperationStatus: int implements HasColor, HasLabel
public function getLabel(): ?string public function getLabel(): ?string
{ {
return match ($this) { return match ($this) {
self::PENDING => CheerfulNotification::getMessage('Menunggu... Tetap Sabar Ya! ⏳✨', 'Menunggu'), self::PENDING => CheerfulNotification::getByKey('enum.cooperation_status.pending'),
self::ASSIGNMENT => CheerfulNotification::getMessage('Sedang Ditugaskan nih! 📋🛠️', 'Penugasan'), self::ASSIGNMENT => CheerfulNotification::getByKey('enum.cooperation_status.assignment'),
self::VERIFICATION => CheerfulNotification::getMessage('Lagi Diverifikasi, Tunggu Sebentar! 🔍✅', 'Verifikasi'), self::VERIFICATION => CheerfulNotification::getByKey('enum.cooperation_status.verification'),
self::PAYMENT => CheerfulNotification::getMessage('Waktunya Pembayaran! 💵🚀', 'Pembayaran'), self::PAYMENT => CheerfulNotification::getByKey('enum.cooperation_status.payment'),
self::COMPLETED => CheerfulNotification::getMessage('Selesai! Mantap Jiwa! 🎉🔥', 'Selesai'), self::COMPLETED => CheerfulNotification::getByKey('enum.cooperation_status.completed'),
}; };
} }

View File

@ -18,8 +18,8 @@ enum DataChangeDecision: int implements HasColor, HasLabel
public function getLabel(): ?string public function getLabel(): ?string
{ {
return match ($this) { return match ($this) {
self::APPROVED => CheerfulNotification::getMessage('Perubahan Disetujui! ✅🚀', 'Disetujui'), self::APPROVED => CheerfulNotification::getByKey('enum.data_change_decision.approved'),
self::REJECTED => CheerfulNotification::getMessage('Perubahan Ditolak 🛑😔', 'Ditolak'), self::REJECTED => CheerfulNotification::getByKey('enum.data_change_decision.rejected'),
}; };
} }

View File

@ -19,9 +19,9 @@ enum DataChangeStatus: int implements HasColor, HasLabel
public function getLabel(): ?string public function getLabel(): ?string
{ {
return match ($this) { return match ($this) {
self::PENDING => CheerfulNotification::getMessage('Menunggu Verifikasi ⏳✨', 'Menunggu Verifikasi'), self::PENDING => CheerfulNotification::getByKey('enum.data_change_status.pending'),
self::APPROVED => CheerfulNotification::getMessage('Perubahan Disetujui! ✅🚀', 'Disetujui'), self::APPROVED => CheerfulNotification::getByKey('enum.data_change_status.approved'),
self::REJECTED => CheerfulNotification::getMessage('Perubahan Ditolak 🛑😔', 'Ditolak'), self::REJECTED => CheerfulNotification::getByKey('enum.data_change_status.rejected'),
}; };
} }

View File

@ -19,9 +19,9 @@ enum DecisionAdmin: int implements HasColor, HasLabel
public function getLabel(): ?string public function getLabel(): ?string
{ {
return match ($this) { return match ($this) {
self::APPROVED => CheerfulNotification::getMessage('Sudah Disetujui! ✅🚀', 'Disetujui'), self::APPROVED => CheerfulNotification::getByKey('enum.decision_admin.approved'),
self::NEED_REVISION => CheerfulNotification::getMessage('Perlu Revisi nih! ✍️🛠️', 'Perlu Revisi'), self::NEED_REVISION => CheerfulNotification::getByKey('enum.decision_admin.need_revision'),
self::REJECTED => CheerfulNotification::getMessage('Ditolak, Tetap Semangat! 🛑😔', 'Ditolak'), self::REJECTED => CheerfulNotification::getByKey('enum.decision_admin.rejected'),
}; };
} }

View File

@ -18,9 +18,9 @@ enum NewsStatus: int implements HasLabel
public function getLabel(): ?string public function getLabel(): ?string
{ {
return match ($this) { return match ($this) {
self::DRAFT => CheerfulNotification::getMessage('Draft - Sempurnakan Lagi! ✍️🛠️', 'Draft'), self::DRAFT => CheerfulNotification::getByKey('enum.news_status.draft'),
self::PUBLISHED => CheerfulNotification::getMessage('Telah Tayang! 🚀✨', 'Publish'), self::PUBLISHED => CheerfulNotification::getByKey('enum.news_status.published'),
self::ARCHIVED => CheerfulNotification::getMessage('Arsip - Disimpan Dulu Ya! 📦🔒', 'Arsip'), self::ARCHIVED => CheerfulNotification::getByKey('enum.news_status.archived'),
}; };
} }

View File

@ -20,10 +20,10 @@ enum VerificationStatus: int implements HasColor, HasLabel
public function getLabel(): ?string public function getLabel(): ?string
{ {
return match ($this) { return match ($this) {
self::PENDING => CheerfulNotification::getMessage('Menunggu Verifikasi ⏳✨', 'Menunggu Verifikasi'), self::PENDING => CheerfulNotification::getByKey('enum.verification_status.pending'),
self::APPROVED => CheerfulNotification::getMessage('Sudah Disetujui! ✅🚀', 'Disetujui'), self::APPROVED => CheerfulNotification::getByKey('enum.verification_status.approved'),
self::NEED_REVISION => CheerfulNotification::getMessage('Perlu Revisi nih! ✍️🛠️', 'Perlu Revisi'), self::NEED_REVISION => CheerfulNotification::getByKey('enum.verification_status.need_revision'),
self::REJECTED => CheerfulNotification::getMessage('Ditolak, Tetap Semangat! 🛑😔', 'Ditolak'), self::REJECTED => CheerfulNotification::getByKey('enum.verification_status.rejected'),
}; };
} }

View File

@ -11,9 +11,9 @@ protected function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->modalHeading(fn () => CheerfulNotification::getMessage('Tambah Data Seru! 🚀✨', 'Tambah Data Baru')); $this->modalHeading(fn () => CheerfulNotification::getByKey('actions.create.title'));
$this->modalDescription(fn () => CheerfulNotification::getMessage('Isi form di bawah ini dengan semangat ya, biar datanya tersimpan dengan aman! 💪😊', 'Silakan isi formulir di bawah ini dengan lengkap untuk menambahkan data baru.')); $this->modalDescription(fn () => CheerfulNotification::getByKey('actions.create.description'));
$this->successNotification(fn () => CheerfulNotification::create() $this->successNotification(fn () => CheerfulNotification::create()
); );

View File

@ -11,9 +11,9 @@ protected function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->modalHeading(fn () => CheerfulNotification::getMessage('Sempurnakan Datanya 📝✨', 'Ubah Data')); $this->modalHeading(fn () => CheerfulNotification::getByKey('actions.edit.title'));
$this->modalDescription(fn () => CheerfulNotification::getMessage('Ayo kita perbarui supaya datanya makin akurat dan segar lagi! 🛠️👌', 'Silakan perbarui informasi pada formulir di bawah ini.')); $this->modalDescription(fn () => CheerfulNotification::getByKey('actions.edit.description'));
$this->successNotification(fn () => CheerfulNotification::update() $this->successNotification(fn () => CheerfulNotification::update()
); );

View File

@ -11,9 +11,9 @@ protected function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->modalHeading(fn () => CheerfulNotification::getMessage('Panggil Balik Datanya? ♻️✨', 'Pulihkan Data')); $this->modalHeading(fn () => CheerfulNotification::getByKey('actions.restore.title'));
$this->modalDescription(fn () => CheerfulNotification::getMessage('Siap buat mengaktifkan kembali data yang sempat hilang? Yuk, kita pulihkan bareng-bareng! 😉🙌', 'Apakah Anda yakin ingin memulihkan data yang telah dihapus ini?')); $this->modalDescription(fn () => CheerfulNotification::getByKey('actions.restore.description'));
$this->successNotification(fn () => CheerfulNotification::restore() $this->successNotification(fn () => CheerfulNotification::restore()
); );

View File

@ -13,19 +13,19 @@ public static function make(string $entity): array
{ {
return [ return [
DeleteBulkAction::make() DeleteBulkAction::make()
->modalHeading(fn () => CheerfulNotification::getMessage("Mau Hapus Banyak {$entity}? 🗑️🤔", "Hapus Data {$entity} Terpilih")) ->modalHeading(fn () => CheerfulNotification::getByKey('actions.bulk.delete', ['entity' => $entity]))
->successNotification( ->successNotification(
CheerfulNotification::bulkDelete() CheerfulNotification::bulkDelete()
), ),
ForceDeleteBulkAction::make() ForceDeleteBulkAction::make()
->modalHeading(fn () => CheerfulNotification::getMessage("Hapus Permanen {$entity} Terpilih? 🗑️🔥", "Hapus Permanen Data {$entity} Terpilih")) ->modalHeading(fn () => CheerfulNotification::getByKey('actions.bulk.force_delete', ['entity' => $entity]))
->successNotification( ->successNotification(
CheerfulNotification::bulkForceDelete() CheerfulNotification::bulkForceDelete()
), ),
RestoreBulkAction::make() RestoreBulkAction::make()
->modalHeading(fn () => CheerfulNotification::getMessage("Pulihkan {$entity} yang Dipilih? ♻️✨", "Pulihkan Data {$entity} Terpilih")) ->modalHeading(fn () => CheerfulNotification::getByKey('actions.bulk.restore', ['entity' => $entity]))
->successNotification( ->successNotification(
CheerfulNotification::bulkRestore() CheerfulNotification::bulkRestore()
), ),

View File

@ -25,8 +25,8 @@ protected function setUp(): void
->icon('heroicon-o-check') ->icon('heroicon-o-check')
->size('sm') ->size('sm')
->requiresConfirmation() ->requiresConfirmation()
->modalHeading(fn () => CheerfulNotification::getMessage('Setujui Verifikasi? ✅✨', 'Setujui Verifikasi')) ->modalHeading(fn () => CheerfulNotification::getByKey('actions.approve.title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Yakin datanya sudah oke semua? Yuk, kita resmikan verifikasinya sekarang! 🚀😊', 'Apakah Anda yakin ingin menyetujui verifikasi ini? Seluruh data yang diajukan akan dianggap valid.')) ->modalDescription(fn () => CheerfulNotification::getByKey('actions.approve.description'))
->modalSubmitActionLabel('Ya, Setujui') ->modalSubmitActionLabel('Ya, Setujui')
->action(function (array $arguments): void { ->action(function (array $arguments): void {
$this->processReview($arguments['id'], DecisionAdmin::APPROVED, null); $this->processReview($arguments['id'], DecisionAdmin::APPROVED, null);

View File

@ -21,8 +21,8 @@ protected function processReview(int $requestId, DecisionAdmin $decision, ?strin
if (! $verificationRequest) { if (! $verificationRequest) {
CheerfulNotification::danger( CheerfulNotification::danger(
CheerfulNotification::getMessage('Belum ketemu nih 🙌', 'Data Tidak Ditemukan'), CheerfulNotification::getByKey('verification.admin.process.not_found.title'),
CheerfulNotification::getMessage('Data verifikasi belum kami temukan. Coba sebentar lagi, ya.', 'Permintaan verifikasi tidak ditemukan dalam sistem kami.') CheerfulNotification::getByKey('verification.admin.process.not_found.body')
) )
->send(); ->send();
@ -60,8 +60,8 @@ protected function processReview(int $requestId, DecisionAdmin $decision, ?strin
}; };
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Berhasil Diproses! ✨', 'Berhasil Diproses'), CheerfulNotification::getByKey('verification.admin.process.success.title'),
CheerfulNotification::getMessage("Mantap! Verifikasi telah {$actionLabel} dan notifikasi sudah dikirim ke pengguna. Kerja bagus, Admin! 💪", "Proses verifikasi telah {$actionLabel} dan notifikasi telah dikirimkan ke pihak pengguna.") CheerfulNotification::getByKey('verification.admin.process.success.body', ['action' => $actionLabel])
) )
->send(); ->send();
@ -69,19 +69,19 @@ protected function processReview(int $requestId, DecisionAdmin $decision, ?strin
$partnerUser = $verificationRequest->company?->user; $partnerUser = $verificationRequest->company?->user;
if ($partnerUser) { if ($partnerUser) {
$statusTitle = match ($decision) { $statusTitle = match ($decision) {
DecisionAdmin::APPROVED => CheerfulNotification::getMessage('Horee! Verifikasi Disetujui 🎉', 'Verifikasi Disetujui'), DecisionAdmin::APPROVED => CheerfulNotification::getByKey('verification.admin.notif_user.approved.title'),
DecisionAdmin::NEED_REVISION => CheerfulNotification::getMessage('Yah, Ada Yang Perlu Direvisi nih 📝', 'Perlu Revisi Verifikasi'), DecisionAdmin::NEED_REVISION => CheerfulNotification::getByKey('verification.admin.notif_user.revision.title'),
DecisionAdmin::REJECTED => CheerfulNotification::getMessage('Maaf, Verifikasi Ditolak 😔', 'Verifikasi Ditolak'), DecisionAdmin::REJECTED => CheerfulNotification::getByKey('verification.admin.notif_user.rejected.title'),
}; };
$body = match ($decision) { $body = match ($decision) {
DecisionAdmin::APPROVED => CheerfulNotification::getMessage('Yeay! Pengajuan verifikasi perusahaan Anda telah disetujui. Sekarang Anda sudah resmi terverifikasi dan bekerja sama dengan kami! 🎊', 'Pengajuan verifikasi perusahaan Anda telah disetujui.'), DecisionAdmin::APPROVED => CheerfulNotification::getByKey('verification.admin.notif_user.approved.body'),
DecisionAdmin::NEED_REVISION => CheerfulNotification::getMessage('Ayo sedikit lagi! Admin meminta beberapa perbaikan pada pengajuan Anda agar bisa segera disetujui. 💪', 'Admin meminta beberapa perbaikan pada pengajuan verifikasi Anda.'), DecisionAdmin::NEED_REVISION => CheerfulNotification::getByKey('verification.admin.notif_user.revision.body'),
DecisionAdmin::REJECTED => CheerfulNotification::getMessage('Yah, maaf banget... pengajuan verifikasi perusahaan Anda belum bisa kami terima saat ini. 💔', 'Pengajuan verifikasi perusahaan Anda tidak dapat kami setujui saat ini.'), DecisionAdmin::REJECTED => CheerfulNotification::getByKey('verification.admin.notif_user.rejected.body'),
}; };
if ($note) { if ($note) {
$body .= "\n\n".CheerfulNotification::getMessage("Catatan Admin: {$note} 😊", "Catatan Admin: {$note}"); $body .= "\n\n".CheerfulNotification::getByKey('verification.admin.notif_user.note', ['note' => $note]);
} }
$partnerUser->notify(new BroadcastNotification([ $partnerUser->notify(new BroadcastNotification([
@ -104,8 +104,8 @@ protected function processReview(int $requestId, DecisionAdmin $decision, ?strin
]); ]);
CheerfulNotification::danger( CheerfulNotification::danger(
CheerfulNotification::getMessage('Terjadi Kesalahan ⚠️', 'Terjadi Kesalahan Sistem'), CheerfulNotification::getByKey('verification.admin.process.error.title'),
CheerfulNotification::getMessage('Proses verifikasi gagal karena kesalahan sistem. Tim kami sudah mencatat masalah ini. Silakan coba lagi nanti.', 'Proses verifikasi gagal dilakukan karena kendala teknis. Silakan laporkan jika masalah berlanjut.') CheerfulNotification::getByKey('verification.admin.process.error.body')
) )
->send(); ->send();
} }

View File

@ -26,8 +26,8 @@ protected function setUp(): void
->icon('heroicon-o-x-mark') ->icon('heroicon-o-x-mark')
->size('sm') ->size('sm')
->requiresConfirmation() ->requiresConfirmation()
->modalHeading(fn () => CheerfulNotification::getMessage('Tolak Verifikasi? 🛑🤔', 'Tolak Verifikasi')) ->modalHeading(fn () => CheerfulNotification::getByKey('actions.reject.title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Yakin mau ditolak secara permanen? Pastikan alasannya sudah sreg di hati ya! 😔📝', 'Apakah Anda yakin ingin menolak verifikasi ini secara permanen?')) ->modalDescription(fn () => CheerfulNotification::getByKey('actions.reject.description'))
->modalSubmitActionLabel('Ya, Tolak') ->modalSubmitActionLabel('Ya, Tolak')
->schema([ ->schema([
Textarea::make('note') Textarea::make('note')

View File

@ -26,8 +26,8 @@ protected function setUp(): void
->color('warning') ->color('warning')
->icon('heroicon-o-pencil-square') ->icon('heroicon-o-pencil-square')
->size('sm') ->size('sm')
->modalHeading(fn () => CheerfulNotification::getMessage('Minta Revisi Data 📝⚠️', 'Minta Revisi Data')) ->modalHeading(fn () => CheerfulNotification::getByKey('actions.revision.title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Siap kirim instruksi perbaikan? Kasih catatan yang jelas ya biar pengguna nggak bingung! 😊', 'Silakan masukkan instruksi perbaikan yang diperlukan untuk pengguna.')) ->modalDescription(fn () => CheerfulNotification::getByKey('actions.revision.description'))
->schema([ ->schema([
Textarea::make('note') Textarea::make('note')
->label('Catatan Revisi') ->label('Catatan Revisi')

View File

@ -158,10 +158,10 @@ public function verifications(): LengthAwarePaginator
]), ]),
], ],
'messages' => [ 'messages' => [
'detail' => CheerfulNotification::getMessage('Detail Data 🔍✨', 'Detail'), 'detail' => CheerfulNotification::getByKey('verification.admin.messages.detail'),
'revision' => CheerfulNotification::getMessage('Sabar ya, pengguna lagi sibuk revisi data nih! ⏳✍️', 'Menunggu revisi dari pengguna...'), 'revision' => CheerfulNotification::getByKey('verification.admin.messages.revision'),
'approved' => CheerfulNotification::getMessage('Yeay! Verifikasi sudah beres dan disetujui! ✅🚀', 'Verifikasi selesai'), 'approved' => CheerfulNotification::getByKey('verification.admin.messages.approved'),
'rejected' => CheerfulNotification::getMessage('Yah, pengajuannya terpaksa belum bisa diterima. 🛑😔', 'Pengajuan ditolak'), 'rejected' => CheerfulNotification::getByKey('verification.admin.messages.rejected'),
], ],
]; ];
}); });
@ -246,11 +246,11 @@ public function rejectAction(): Action
public function getEmptyStateHeading(): string public function getEmptyStateHeading(): string
{ {
return CheerfulNotification::getMessage('Belum ada pengajuan verifikasi nih! 📭✨', 'Tidak ada pengajuan verifikasi'); return CheerfulNotification::getByKey('verification.admin.empty_state.heading');
} }
public function getEmptyStateDescription(): string public function getEmptyStateDescription(): string
{ {
return CheerfulNotification::getMessage('Tenang saja, mungkin sebentar lagi bakal ada yang kirim pengajuan verifikasi. Ditunggu saja ya! 😊⏳', 'Belum ada pengajuan verifikasi dari user.'); return CheerfulNotification::getByKey('verification.admin.empty_state.description');
} }
} }

View File

@ -34,8 +34,8 @@ public function resendNotificationAction(): Action
$this->sendEmailVerificationNotification($this->getVerifiable()); $this->sendEmailVerificationNotification($this->getVerifiable());
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Mail Meluncur! 📧🚀', 'Email Terkirim'), CheerfulNotification::getByKey('auth.email_verification.resend_success.title'),
CheerfulNotification::getMessage('Tautan verifikasi baru sudah dikirim ke alamat surelmu. Cek inbox (atau spam) ya! 😉✨', 'Tautan verifikasi baru telah dikirimkan ke alamat email Anda. Silakan periksa kotak masuk atau spam.') CheerfulNotification::getByKey('auth.email_verification.resend_success.body')
)->send(); )->send();
}); });
} }
@ -43,8 +43,8 @@ public function resendNotificationAction(): Action
protected function getRateLimitedNotification(TooManyRequestsException $exception): ?Notification protected function getRateLimitedNotification(TooManyRequestsException $exception): ?Notification
{ {
return CheerfulNotification::danger( return CheerfulNotification::danger(
CheerfulNotification::getMessage('Pelan-pelan ya ⏳', 'Terlalu Banyak Permintaan'), CheerfulNotification::getByKey('auth.email_verification.rate_limited.title'),
CheerfulNotification::getMessage('Permintaan terlalu sering. Tunggu sebentar lalu coba lagi dalam '.$exception->secondsUntilAvailable.' detik.', 'Anda telah melakukan terlalu banyak permintaan. Silakan coba kembali dalam '.$exception->secondsUntilAvailable.' detik.') CheerfulNotification::getByKey('auth.email_verification.rate_limited.body', ['seconds' => $exception->secondsUntilAvailable])
)->send(); )->send();
} }
} }

View File

@ -103,8 +103,8 @@ public function authenticate(): ?LoginResponse
if ($user instanceof FilamentUser && (! $user->canAccessPanel(Filament::getCurrentOrDefaultPanel()))) { if ($user instanceof FilamentUser && (! $user->canAccessPanel(Filament::getCurrentOrDefaultPanel()))) {
CheerfulNotification::danger( CheerfulNotification::danger(
CheerfulNotification::getMessage('Akun Tidak Aktif 🚫', 'Akses Ditolak'), CheerfulNotification::getByKey('auth.login.inactive.title'),
CheerfulNotification::getMessage('Maaf, akun Anda saat ini tidak aktif. Silakan hubungi Administrator. 📞', 'Akun Anda saat ini tidak memiliki izin untuk mengakses sistem. Silakan hubungi administrator.') CheerfulNotification::getByKey('auth.login.inactive.body')
)->send(); )->send();
throw ValidationException::withMessages([]); throw ValidationException::withMessages([]);
@ -151,8 +151,8 @@ public function authenticate(): ?LoginResponse
session()->regenerate(); session()->regenerate();
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Hore! Berhasil Masuk 🎉', 'Login Berhasil'), CheerfulNotification::getByKey('auth.login.success.title'),
CheerfulNotification::getMessage('Selamat datang kembali, '.$user->name.'! Siap untuk beraksi hari ini? 🚀✨', 'Selamat datang kembali, '.$user->name.'. Anda telah berhasil masuk ke dalam sistem.') CheerfulNotification::getByKey('auth.login.success.body', ['name' => $user->name])
)->send(); )->send();
return app(LoginResponse::class); return app(LoginResponse::class);
@ -161,8 +161,8 @@ public function authenticate(): ?LoginResponse
protected function throwFailureValidationException(): never protected function throwFailureValidationException(): never
{ {
CheerfulNotification::danger( CheerfulNotification::danger(
CheerfulNotification::getMessage('Ups! Gagal Masuk 😅', 'Login Gagal'), CheerfulNotification::getByKey('auth.login.failed.title'),
CheerfulNotification::getMessage('Sepertinya ada yang salah nih. Coba cek email atau kata sandi mu lagi ya! 🤔🔐', 'Kredensial yang Anda masukkan salah. Silakan periksa kembali email dan kata sandi Anda.') CheerfulNotification::getByKey('auth.login.failed.body')
)->send(); )->send();
throw ValidationException::withMessages([]); throw ValidationException::withMessages([]);

View File

@ -90,8 +90,8 @@ public function form(Schema $schema): Schema
{ {
return $schema return $schema
->components([ ->components([
Section::make(CheerfulNotification::getMessage('Detail Profil 👤✨', 'Profil Pengguna')) Section::make(CheerfulNotification::getByKey('profile.detail.title'))
->description(CheerfulNotification::getMessage('Yuk, kelola informasi detail profil Anda agar selalu terkini! 👤🚀', 'Kelola informasi profil dasar Anda di bawah ini.')) ->description(CheerfulNotification::getByKey('profile.detail.description'))
->icon(CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-user' : null) ->icon(CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-user' : null)
->schema([ ->schema([
Grid::make(2) Grid::make(2)
@ -127,8 +127,8 @@ public function form(Schema $schema): Schema
]), ]),
]), ]),
Section::make(CheerfulNotification::getMessage('Pengaturan Tampilan & UX 🎨✨', 'Preferensi Tampilan')) Section::make(CheerfulNotification::getByKey('profile.ux.title'))
->description(CheerfulNotification::getMessage('Personalisasi pengalaman aplikasi Anda agar lebih nyaman dan sesuai selera! 🌈🚀', 'Sesuaikan gaya bahasa, warna tema, dan jenis huruf aplikasi Anda.')) ->description(CheerfulNotification::getByKey('profile.ux.description'))
->icon(CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-swatch' : null) ->icon(CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-swatch' : null)
->schema([ ->schema([
Grid::make(2) Grid::make(2)
@ -197,8 +197,8 @@ public function form(Schema $schema): Schema
]), ]),
]), ]),
Section::make(CheerfulNotification::getMessage('Keamanan Akun 🔐✨', 'Ubah Kata Sandi')) Section::make(CheerfulNotification::getByKey('profile.security.title'))
->description(CheerfulNotification::getMessage('Ingin ganti kata sandi? Pastikan pilih yang kuat ya biar makin aman! 🔐💪', 'Silakan masukkan kata sandi baru untuk memperbarui keamanan akun Anda.')) ->description(CheerfulNotification::getByKey('profile.security.description'))
->icon(CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-lock-closed' : null) ->icon(CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-lock-closed' : null)
->schema([ ->schema([
Grid::make(2) Grid::make(2)
@ -247,8 +247,8 @@ protected function handleRecordUpdate(Model $record, array $data): Model
protected function afterSave(): void protected function afterSave(): void
{ {
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Profil Diperbarui! ✨', 'Profil Diperbarui'), CheerfulNotification::getByKey('profile.saved.title'),
CheerfulNotification::getMessage('Sip! Detail profil baru Anda sudah tersimpan dengan aman. Terus semangat ya! 💪😊', 'Perubahan pada profil Anda telah berhasil disimpan ke dalam sistem.') CheerfulNotification::getByKey('profile.saved.body')
)->send(); )->send();
if (! filled($this->form->getState()['password'] ?? null)) { if (! filled($this->form->getState()['password'] ?? null)) {
@ -263,8 +263,8 @@ protected function afterSave(): void
session()->regenerateToken(); session()->regenerateToken();
CheerfulNotification::info( CheerfulNotification::info(
CheerfulNotification::getMessage('Sesi Berakhir 🔐', 'Keamanan Diperbarui'), CheerfulNotification::getByKey('profile.password_changed.title'),
CheerfulNotification::getMessage('Anda telah mengubah kata sandi. Silakan masuk kembali dengan kata sandi baru Anda ya. 😉👋', 'Kata sandi Anda telah berhasil diubah. Harap lakukan login kembali menggunakan kata sandi yang baru untuk alasan keamanan.') CheerfulNotification::getByKey('profile.password_changed.body')
)->send(); )->send();
$this->redirect(filament()->getLoginUrl()); $this->redirect(filament()->getLoginUrl());

View File

@ -81,8 +81,8 @@ protected function handleRegistration(array $data): Model
$user->assignRole('Perusahaan'); $user->assignRole('Perusahaan');
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Selamat Datang! 👋🎉', 'Pendaftaran Berhasil'), CheerfulNotification::getByKey('auth.registration.success.title'),
CheerfulNotification::getMessage("Halooo, {$user->name}!, terima kasih sudah bergabung! Akunmu berhasil dibuat. Silakan verifikasi alamat surelmu! 🚀✨", "Selamat datang, {$user->name}. Akun Anda telah berhasil dibuat. Silakan periksa email Anda untuk melakukan verifikasi.") CheerfulNotification::getByKey('auth.registration.success.body', ['name' => $user->name])
) )
->send(); ->send();
@ -90,8 +90,8 @@ protected function handleRegistration(array $data): Model
->get() ->get()
->each(function ($admin) use ($user): void { ->each(function ($admin) use ($user): void {
$admin->notify(new BroadcastNotification([ $admin->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Warga Baru Nih! 👋🎉', 'Pendaftaran Pengguna Baru'), 'title' => CheerfulNotification::getByKey('auth.registration.admin_notify.title'),
'body' => CheerfulNotification::getMessage("Halo Admin! {$user->name} baru saja mendaftar. Yuk cek kelengkapannya! 🚀", "Pengguna baru {$user->name} telah mendaftar ke dalam sistem."), 'body' => CheerfulNotification::getByKey('auth.registration.admin_notify.body', ['name' => $user->name]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -184,8 +184,8 @@ public static function form(Schema $schema): Schema
return $schema return $schema
->components([ ->components([
Section::make(fn () => CheerfulNotification::getMessage('Informasi Perusahaan 🏗️✨', 'Profil Perusahaan')) Section::make(fn () => CheerfulNotification::getByKey('company.section.title'))
->description(fn () => CheerfulNotification::getMessage('Kelola informasi perusahaan Anda biar tetap resmi dan kredibel! 🚀✨', 'Kelola informasi detail perusahaan Anda di sini.')) ->description(fn () => CheerfulNotification::getByKey('company.section.description'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-building-office-2' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-building-office-2' : null)
->schema([ ->schema([
TextInput::make('name') TextInput::make('name')
@ -231,7 +231,7 @@ public static function form(Schema $schema): Schema
->schema( ->schema(
array_merge( array_merge(
[ [
Section::make(fn () => CheerfulNotification::getMessage('NIK Direktur 👤✨', 'NIK Direktur')) Section::make(fn () => CheerfulNotification::getByKey('company.nik_section.title'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-user' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-user' : null)
->schema([ ->schema([
TextInput::make('director_nik') TextInput::make('director_nik')
@ -256,7 +256,7 @@ public static function form(Schema $schema): Schema
collect($documents) collect($documents)
->map(function (array $doc): Section { ->map(function (array $doc): Section {
return Section::make(fn () => CheerfulNotification::getMessage($doc['title'].' 📄✨', $doc['title'])) return Section::make(fn () => CheerfulNotification::getByKey('general.empty_msg', ['doc__title' => $doc['title']]))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextInput::make($doc['text_name']) TextInput::make($doc['text_name'])
@ -293,8 +293,8 @@ public function saveAction(): Action
return Action::make('save') return Action::make('save')
->label('Simpan') ->label('Simpan')
->modalHeading(fn () => CheerfulNotification::getMessage('Ajukan Perubahan Profil 📝✨', 'Ubah Profil Perusahaan')) ->modalHeading(fn () => CheerfulNotification::getByKey('company.save.title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Yakin ingin mengubah data perusahaan? Jelaskan alasannya supaya proses verifikasi makin lancar! 😊', 'Silakan masukkan alasan Anda melakukan perubahan profil perusahaan.')) ->modalDescription(fn () => CheerfulNotification::getByKey('company.save.description'))
->modal($needsReview) ->modal($needsReview)
->schema( ->schema(
$needsReview $needsReview
@ -330,8 +330,8 @@ public function performSave(array $data, bool $needsReview = false): void
if ($existingRequest) { if ($existingRequest) {
CheerfulNotification::warning( CheerfulNotification::warning(
CheerfulNotification::getMessage('Pengajuan Sudah Ada ⏳', 'Pengajuan Sedang Diproses'), CheerfulNotification::getByKey('data_change.existing.title'),
CheerfulNotification::getMessage('Masih ada pengajuan perubahan data yang sedang menunggu verifikasi. Silakan tunggu hingga selesai diproses.', 'Pengajuan perubahan data perusahaan Anda masih dalam proses verifikasi oleh admin.') CheerfulNotification::getByKey('data_change.existing.body')
) )
->send(); ->send();
@ -396,8 +396,8 @@ public function performSave(array $data, bool $needsReview = false): void
if (empty($changedFields)) { if (empty($changedFields)) {
CheerfulNotification::info( CheerfulNotification::info(
CheerfulNotification::getMessage('Belum ada yang berubah ✨', 'Tidak Ada Perubahan'), CheerfulNotification::getByKey('data_change.no_change.title'),
CheerfulNotification::getMessage('Ubah data terlebih dulu lalu simpan kembali 💪', 'Silakan ubah data terlebih dahulu sebelum melakukan penyimpanan.') CheerfulNotification::getByKey('data_change.no_change.body')
) )
->send(); ->send();
@ -414,8 +414,8 @@ public function performSave(array $data, bool $needsReview = false): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Permohonan Berhasil 🎉', 'Permohonan Berhasil'), CheerfulNotification::getByKey('data_change.success.title'),
CheerfulNotification::getMessage('Data sudah dikirim dan sedang menunggu verifikasi admin ⏳', 'Permohonan perubahan data perusahaan telah berhasil dikirimkan.') CheerfulNotification::getByKey('data_change.success.body')
) )
->send(); ->send();
@ -423,8 +423,8 @@ public function performSave(array $data, bool $needsReview = false): void
->get() ->get()
->each(function ($admin) use ($dataChangeRequest): void { ->each(function ($admin) use ($dataChangeRequest): void {
$admin->notify(new BroadcastNotification([ $admin->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Ada Pengajuan Perubahan Data ✨', 'Pengajuan Perubahan Perusahaan'), 'title' => CheerfulNotification::getByKey('data_change.admin_notify.title'),
'body' => CheerfulNotification::getMessage('Halooo Admin! 👋 '.auth()->user()->name.' baru saja mengajukan perubahan data. Yuk, cek detailnya dan lakukan verifikasi ya! 🚀', 'Pengguna '.auth()->user()->name.' telah mengajukan perubahan data perusahaan.'), 'body' => CheerfulNotification::getByKey('data_change.admin_notify.body', ['name' => auth()->user()->name]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -157,8 +157,8 @@ public static function form(Schema $schema): Schema
return $schema return $schema
->components([ ->components([
Section::make(fn () => CheerfulNotification::getMessage('Detail Informasi 📰✨', 'Informasi Media')) Section::make(fn () => CheerfulNotification::getByKey('media.section.title'))
->description(fn () => CheerfulNotification::getMessage('Kelola informasi media Anda biar tetap eksis dan terpercaya! 🚀✨', 'Kelola informasi detail media Anda di sini.')) ->description(fn () => CheerfulNotification::getByKey('media.section.description'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-newspaper' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-newspaper' : null)
->schema([ ->schema([
TextInput::make('name') TextInput::make('name')
@ -205,7 +205,7 @@ public static function form(Schema $schema): Schema
->schema( ->schema(
collect($documents) collect($documents)
->map(function (array $doc): Section { ->map(function (array $doc): Section {
return Section::make(fn () => CheerfulNotification::getMessage($doc['title'].' 📄✨', $doc['title'])) return Section::make(fn () => CheerfulNotification::getByKey('general.empty_msg', ['doc__title' => $doc['title']]))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextInput::make($doc['text_name']) TextInput::make($doc['text_name'])
@ -240,8 +240,8 @@ public function saveAction(): Action
return Action::make('save') return Action::make('save')
->label('Simpan') ->label('Simpan')
->modalHeading(fn () => CheerfulNotification::getMessage('Ajukan Perubahan Media 📝✨', 'Ubah Data Media')) ->modalHeading(fn () => CheerfulNotification::getByKey('media.save.title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Mau mengubah data media? Sertakan alasan yang jelas ya biar admin makin yakin! 😊', 'Silakan masukkan alasan Anda melakukan perubahan data media.')) ->modalDescription(fn () => CheerfulNotification::getByKey('media.save.description'))
->modal($needsReview) ->modal($needsReview)
->schema( ->schema(
$needsReview $needsReview
@ -271,8 +271,8 @@ public function performSave(array $data = [], bool $needsReview = false): void
if ($existingRequest) { if ($existingRequest) {
CheerfulNotification::warning( CheerfulNotification::warning(
CheerfulNotification::getMessage('Pengajuan Sudah Ada ⏳', 'Pengajuan Sedang Diproses'), CheerfulNotification::getByKey('data_change.existing.title'),
CheerfulNotification::getMessage('Masih ada pengajuan perubahan data yang sedang menunggu verifikasi. Silakan tunggu hingga selesai diproses.', 'Pengajuan perubahan data media Anda masih dalam proses verifikasi oleh admin.') CheerfulNotification::getByKey('data_change.existing.body')
) )
->send(); ->send();
@ -337,8 +337,8 @@ public function performSave(array $data = [], bool $needsReview = false): void
if (empty($changedFields)) { if (empty($changedFields)) {
CheerfulNotification::info( CheerfulNotification::info(
CheerfulNotification::getMessage('Belum ada yang berubah ✨', 'Tidak Ada Perubahan'), CheerfulNotification::getByKey('data_change.no_change.title'),
CheerfulNotification::getMessage('Ubah data terlebih dulu lalu simpan kembali 💪', 'Silakan ubah data terlebih dahulu sebelum melakukan penyimpanan.') CheerfulNotification::getByKey('data_change.no_change.body')
) )
->send(); ->send();
@ -355,8 +355,8 @@ public function performSave(array $data = [], bool $needsReview = false): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Permohonan Berhasil 🎉', 'Permohonan Berhasil'), CheerfulNotification::getByKey('data_change.success.title'),
CheerfulNotification::getMessage('Data sudah dikirim dan sedang menunggu verifikasi admin ⏳', 'Permohonan perubahan data media telah berhasil dikirimkan.') CheerfulNotification::getByKey('data_change.success.body')
) )
->send(); ->send();
@ -364,8 +364,8 @@ public function performSave(array $data = [], bool $needsReview = false): void
->get() ->get()
->each(function ($admin) use ($dataChangeRequest): void { ->each(function ($admin) use ($dataChangeRequest): void {
$admin->notify(new BroadcastNotification([ $admin->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Ada Pengajuan Perubahan Data Media ✨', 'Pengajuan Perubahan Media'), 'title' => CheerfulNotification::getByKey('data_change.admin_notify.title'),
'body' => CheerfulNotification::getMessage('Halooo Admin! 👋 '.auth()->user()->name.' baru saja mengajukan perubahan data media. Yuk, cek detailnya! 🚀', 'Pengguna '.auth()->user()->name.' telah mengajukan perubahan data media.'), 'body' => CheerfulNotification::getByKey('data_change.admin_notify.body', ['name' => auth()->user()->name]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -37,8 +37,8 @@ public function form(Schema $schema): Schema
{ {
return $schema return $schema
->components([ ->components([
Section::make(fn () => CheerfulNotification::getMessage('Informasi Dasar 📋✨', 'Informasi Dasar')) Section::make(fn () => CheerfulNotification::getByKey('settings.general.basic_info.title'))
->description(fn () => CheerfulNotification::getMessage('Atur info penting website kita di sini biar makin lengkap! 🚀😊', 'Silakan atur informasi dasar situs web pada bagian ini.')) ->description(fn () => CheerfulNotification::getByKey('settings.general.basic_info.description'))
->schema([ ->schema([
TextInput::make('site_name') TextInput::make('site_name')
->label('Nama') ->label('Nama')
@ -84,8 +84,8 @@ public function form(Schema $schema): Schema
->columnSpanFull(), ->columnSpanFull(),
])->columnSpan(2), ])->columnSpan(2),
Section::make(fn () => CheerfulNotification::getMessage('Logo & Ikon 🖼️✨', 'Logo & Ikon')) Section::make(fn () => CheerfulNotification::getByKey('settings.general.logo_icon.title'))
->description(fn () => CheerfulNotification::getMessage('Unggah logo dan ikon biar branding kita makin cakep! 🎨👌', 'Silakan unggah logo dan ikon untuk keperluan branding situs web.')) ->description(fn () => CheerfulNotification::getByKey('settings.general.logo_icon.description'))
->schema([ ->schema([
FileUpload::make('site_logo') FileUpload::make('site_logo')
->label('Logo') ->label('Logo')

View File

@ -35,8 +35,8 @@ public function form(Schema $schema): Schema
{ {
return $schema return $schema
->components([ ->components([
Section::make(fn () => CheerfulNotification::getMessage('Search Engine Optimization 🔍✨', 'Optimasi Mesin Pencari (SEO)')) Section::make(fn () => CheerfulNotification::getByKey('settings.seo.section.title'))
->description(fn () => CheerfulNotification::getMessage('Atur kata kunci dan deskripsi biar website kita gampang dicari orang ya! 🚀📈', 'Atur kata kunci dan deskripsi untuk meningkatkan visibilitas situs web pada mesin pencari.')) ->description(fn () => CheerfulNotification::getByKey('settings.seo.section.description'))
->schema([ ->schema([
TextInput::make('title') TextInput::make('title')
->label('SEO Title') ->label('SEO Title')

View File

@ -35,8 +35,8 @@ public function form(Schema $schema): Schema
{ {
return $schema return $schema
->components([ ->components([
Section::make(fn () => CheerfulNotification::getMessage('Link Media Sosial 🔗✨', 'Tautan Media Sosial')) Section::make(fn () => CheerfulNotification::getByKey('settings.social_media.section.title'))
->description(fn () => CheerfulNotification::getMessage('Hubungkan semua media sosial resmi kita di sini untuk menjangkau lebih banyak orang! 🌐🤩', 'Silakan masukkan tautan media sosial resmi perusahaan pada bagian ini.')) ->description(fn () => CheerfulNotification::getByKey('settings.social_media.section.description'))
->schema([ ->schema([
Grid::make(2) Grid::make(2)
->schema([ ->schema([

View File

@ -112,17 +112,17 @@ public function submitVerificationAction(): Action
->icon('heroicon-o-paper-airplane') ->icon('heroicon-o-paper-airplane')
->color('primary') ->color('primary')
->requiresConfirmation() ->requiresConfirmation()
->modalHeading(fn () => CheerfulNotification::getMessage('Ajukan Verifikasi Sekarang? 🚀✨', 'Ajukan Verifikasi')) ->modalHeading(fn () => CheerfulNotification::getByKey('verification.submit.title'))
->modalDescription(function () use ($progress): string { ->modalDescription(function () use ($progress): string {
if (! $progress['isDataComplete']) { if (! $progress['isDataComplete']) {
return CheerfulNotification::getMessage('Aduh, data belum lengkap nih! 😅 Silakan lengkapi dulu bagian: '.implode(', ', $progress['missingData']).' ya!', 'Data belum lengkap. Silakan lengkapi bagian: '.implode(', ', $progress['missingData']).'.'); return CheerfulNotification::getByKey('verification.submit.description.incomplete', ['missing' => implode(', ', $progress['missingData'])]);
} }
if ($this->verificationRequest && $this->verificationRequest->status === VerificationStatus::NEED_REVISION) { if ($this->verificationRequest && $this->verificationRequest->status === VerificationStatus::NEED_REVISION) {
return CheerfulNotification::getMessage('Ayo kirim ulang perbaikannya! Pastikan semuanya sudah sesuai catatan admin biar langsung gaspol! 💪✨', 'Silakan kirimkan kembali perbaikan data Anda sesuai dengan catatan Admin.'); return CheerfulNotification::getByKey('verification.submit.description.revision');
} }
return CheerfulNotification::getMessage('Apakah Anda yakin ingin mengajukan verifikasi? Pastikan semua data sudah benar and lengkap ya! Pasti bisa! 😊👍', 'Apakah Anda yakin ingin mengajukan verifikasi? Pastikan seluruh data yang diinput telah sesuai.'); return CheerfulNotification::getByKey('verification.submit.description.default');
}) })
->modalSubmitActionLabel('Ya, Ajukan') ->modalSubmitActionLabel('Ya, Ajukan')
->visible(fn (): bool => $progress['canSubmit']) ->visible(fn (): bool => $progress['canSubmit'])
@ -130,8 +130,8 @@ public function submitVerificationAction(): Action
->action(function () use ($progress): void { ->action(function () use ($progress): void {
if (! $progress['isDataComplete']) { if (! $progress['isDataComplete']) {
CheerfulNotification::danger( CheerfulNotification::danger(
CheerfulNotification::getMessage('Data Belum Lengkap! 😅', 'Data Tidak Lengkap'), CheerfulNotification::getByKey('verification.incomplete.title'),
CheerfulNotification::getMessage('Silakan lengkapi data terlebih dahulu sebelum mengajukan verifikasi ya: '.implode(', ', $progress['missingData']), 'Silakan lengkapi seluruh data wajib sebelum mengajukan verifikasi: '.implode(', ', $progress['missingData'])) CheerfulNotification::getByKey('verification.incomplete.body', ['missing' => implode(', ', $progress['missingData'])])
)->send(); )->send();
return; return;
@ -142,8 +142,8 @@ public function submitVerificationAction(): Action
$this->verificationRequest = $this->submitVerification(); $this->verificationRequest = $this->submitVerification();
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Berhasil Diajukan! 🚀', 'Berhasil Diajukan'), CheerfulNotification::getByKey('verification.success.title'),
CheerfulNotification::getMessage('Yeay! Pengajuan verifikasi Anda sudah terkirim ke Admin. Mohon ditunggu ya, semoga hasilnya memuaskan! ✨', 'Pengajuan verifikasi Anda telah berhasil dikirimkan ke pihak Admin untuk diproses.') CheerfulNotification::getByKey('verification.success.body')
)->send(); )->send();
User::superAdmin() User::superAdmin()
@ -153,11 +153,11 @@ public function submitVerificationAction(): Action
$admin->notify(new BroadcastNotification([ $admin->notify(new BroadcastNotification([
'title' => $isRevision 'title' => $isRevision
? CheerfulNotification::getMessage('Pembaruan Data Verifikasi ✨', 'Pembaruan Data Verifikasi') ? CheerfulNotification::getByKey('verification.admin_notify.title.revision')
: CheerfulNotification::getMessage('Ada Pengajuan Verifikasi Baru! 🚀', 'Pengajuan Verifikasi Baru'), : CheerfulNotification::getByKey('verification.admin_notify.title.new'),
'body' => $isRevision 'body' => $isRevision
? CheerfulNotification::getMessage("Cihuy! {$user->name} baru saja memperbarui data verifikasi untuk perusahaan {$user->company->name}. Yuk, cek perubahannya!", "Pengguna {$user->name} telah memperbarui data verifikasi untuk perusahaan {$user->company->name}.") ? CheerfulNotification::getByKey('verification.admin_notify.body.revision', ['name' => $user->name, 'company' => $user->company->name])
: CheerfulNotification::getMessage("Halo Admin! {$user->name} baru saja mengajukan verifikasi data untuk perusahaan {$user->company->name}. Segera diproses ya! 😊", "Pengguna {$user->name} telah mengajukan verifikasi data untuk perusahaan {$user->company->name}."), : CheerfulNotification::getByKey('verification.admin_notify.body.new', ['name' => $user->name, 'company' => $user->company->name]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')
@ -334,7 +334,7 @@ protected function getAlertData(): ?array
'type' => 'approved', 'type' => 'approved',
'icon' => 'check-circle', 'icon' => 'check-circle',
'title' => 'Verifikasi Diterima', 'title' => 'Verifikasi Diterima',
'message' => 'Verifikasi Anda telah diterima dan disetujui oleh admin. Sekarang Anda sudah resmi terverifikasi dan bekerja sama dengan kami!', 'message' => CheerfulNotification::getByKey('verification.alert.approved.body'),
'color' => 'success', 'color' => 'success',
]; ];
} }
@ -343,8 +343,8 @@ protected function getAlertData(): ?array
return [ return [
'type' => 'pending', 'type' => 'pending',
'icon' => 'clock', 'icon' => 'clock',
'title' => 'Menunggu Verifikasi', 'title' => CheerfulNotification::getByKey('verification.alert.pending.title'),
'message' => 'Data Anda sedang dalam proses verifikasi oleh admin. Mohon tunggu.', 'message' => CheerfulNotification::getByKey('verification.alert.pending.body'),
'color' => 'info', 'color' => 'info',
'animate' => true, 'animate' => true,
]; ];

View File

@ -19,8 +19,8 @@ protected function setUp(): void
$this->label('Balas') $this->label('Balas')
->icon(Heroicon::OutlinedChatBubbleLeftRight) ->icon(Heroicon::OutlinedChatBubbleLeftRight)
->color('success') ->color('success')
->modalHeading(fn () => CheerfulNotification::getMessage('Balas Pesan Kontak ✨✉️', 'Balas Pesan Kontak')) ->modalHeading(fn () => CheerfulNotification::getByKey('contact.reply_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Tuliskan jawaban terbaik Anda di sini ya! Hati-hati, setelah dikirim tidak bisa ditarik kembali. 👋😊', 'Silakan masukkan balasan Anda untuk pesan kontak ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('contact.reply_desc'))
->schema([ ->schema([
Textarea::make('reply_message') Textarea::make('reply_message')
->label('Pesan Balasan') ->label('Pesan Balasan')
@ -40,8 +40,8 @@ protected function setUp(): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Balasan Terkirim! 🚀✉️', 'Balasan Berhasil Dikirim'), CheerfulNotification::getByKey('contact.reply_success'),
CheerfulNotification::getMessage('Pesan balasan Anda sudah meluncur ke email pengirim. Semoga membantu mereka ya! 😊', 'Pesan balasan telah berhasil dikirim ke alamat email pengirim.') CheerfulNotification::getByKey('contact.reply_success_desc')
)->send(); )->send();
}) })
->visible(fn (Contact $record): bool => $record->replied_at === null); ->visible(fn (Contact $record): bool => $record->replied_at === null);

View File

@ -52,8 +52,8 @@ public static function infolist(Schema $schema): Schema
{ {
return $schema return $schema
->schema([ ->schema([
Section::make(fn () => CheerfulNotification::getMessage('Informasi Pengirim 📧', 'Informasi Pengirim')) Section::make(fn () => CheerfulNotification::getByKey('contact.sender_info_title'))
->description(fn () => CheerfulNotification::getMessage('Cek detail identitas pengirim pesan biar makin kenal! 📧✨', 'Detail mengenai identitas pengirim pesan.')) ->description(fn () => CheerfulNotification::getByKey('contact.sender_info_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-user' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-user' : null)
->schema([ ->schema([
Grid::make(4) Grid::make(4)
@ -78,8 +78,8 @@ public static function infolist(Schema $schema): Schema
]) ])
->columnSpanFull(), ->columnSpanFull(),
Section::make(fn () => CheerfulNotification::getMessage('Isi Pesan 💬', 'Isi Pesan')) Section::make(fn () => CheerfulNotification::getByKey('contact.message_content_title'))
->description(fn () => CheerfulNotification::getMessage('Yuk, baca pesan lengkap yang dikirimkan oleh pengguna! 💬✨', 'Pesan lengkap yang dikirimkan oleh pengguna.')) ->description(fn () => CheerfulNotification::getByKey('contact.message_content_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-chat-bubble-left-right' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-chat-bubble-left-right' : null)
->schema([ ->schema([
TextEntry::make('message') TextEntry::make('message')
@ -88,8 +88,8 @@ public static function infolist(Schema $schema): Schema
]) ])
->columnSpanFull(), ->columnSpanFull(),
Section::make(fn () => CheerfulNotification::getMessage('Riwayat Balasan 📤', 'Riwayat Balasan')) Section::make(fn () => CheerfulNotification::getByKey('contact.reply_history_title'))
->description(fn () => CheerfulNotification::getMessage('Lihat detail tanggapan yang sudah Admin berikan sebelumnya! 📤✨', 'Detail mengenai tanggapan yang telah diberikan.')) ->description(fn () => CheerfulNotification::getByKey('contact.reply_history_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-paper-airplane' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-paper-airplane' : null)
->schema([ ->schema([
TextEntry::make('repliedBy.name') TextEntry::make('repliedBy.name')
@ -175,7 +175,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedEnvelope) ->emptyStateIcon(Heroicon::OutlinedEnvelope)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada kontak atau pesan masuk nih! Santai dulu yuk. ✨✅', 'Belum ada kontak atau pesan masuk yang tersedia.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('contact.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -35,8 +35,8 @@ protected function setUp(): void
$cooperationMedia->update(['status' => ApprovalStatus::ACCEPTED]); $cooperationMedia->update(['status' => ApprovalStatus::ACCEPTED]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Berhasil Diterima! ✅✨', 'Tawaran Diterima'), CheerfulNotification::getByKey('cooperation.offer_accepted'),
CheerfulNotification::getMessage('Mantap! Anda telah menerima penawaran kerja sama ini. Silakan lanjut ke tahap pengajuan proposal ya! 💪', 'Anda telah menyetujui penawaran kerja sama ini. Silakan lanjutkan ke tahap pengiriman proposal.') CheerfulNotification::getByKey('cooperation.offer_accepted_desc')
)->send(); )->send();
// Notify Admins // Notify Admins
@ -44,8 +44,8 @@ protected function setUp(): void
->get() ->get()
->each(function ($admin) use ($record, $cooperationMedia): void { ->each(function ($admin) use ($record, $cooperationMedia): void {
$admin->notify(new BroadcastNotification([ $admin->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Kabar Baik! Tawaran Diterima ✨🤝', 'Tawaran Kerja Sama Disetujui Media'), 'title' => CheerfulNotification::getByKey('cooperation.offer_accepted_by_media'),
'body' => CheerfulNotification::getMessage("Media {$cooperationMedia->partnerMedia->name} baru saja menerima penawaran kerja sama \"{$record->title}\". Siap-siap cek proposal mereka ya! 😊", "Pihak media {$cooperationMedia->partnerMedia->name} telah menyetujui penawaran kerja sama \"{$record->title}\"."), 'body' => CheerfulNotification::getByKey('notification.media_accepted_offer', ['cooperationMedia__partnerMedia__name' => $cooperationMedia->partnerMedia->name, 'record__title' => $record->title]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -19,16 +19,16 @@ protected function setUp(): void
->icon(Heroicon::OutlinedCheckBadge) ->icon(Heroicon::OutlinedCheckBadge)
->color('success') ->color('success')
->requiresConfirmation() ->requiresConfirmation()
->modalHeading(fn () => CheerfulNotification::getMessage('Selesaikan Kerja Sama? 🏁✨', 'Selesaikan Kerja Sama')) ->modalHeading(fn () => CheerfulNotification::getByKey('cooperation.complete_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Yakin mau menyelesaikan kerja sama ini? Pastikan semua pembayaran ke media sudah lunas dan aman ya! 🤝😊', 'Apakah Anda yakin ingin menyelesaikan kerja sama ini? Pastikan seluruh kewajiban pembayaran telah terpenuhi.')) ->modalDescription(fn () => CheerfulNotification::getByKey('cooperation.complete_desc'))
->action(function (Cooperation $record): void { ->action(function (Cooperation $record): void {
// Verify all accepted media are paid // Verify all accepted media are paid
$acceptedMedia = $record->cooperationMedia()->accepted()->get(); $acceptedMedia = $record->cooperationMedia()->accepted()->get();
if ($acceptedMedia->isEmpty()) { if ($acceptedMedia->isEmpty()) {
CheerfulNotification::danger( CheerfulNotification::danger(
CheerfulNotification::getMessage('Tidak Ada Media! ❌', 'Data Media Kosong'), CheerfulNotification::getByKey('cooperation.media_empty'),
CheerfulNotification::getMessage('Tidak ada media yang menerima kerja sama ini. Tidak dapat diselesaikan.', 'Proses tidak dapat dilanjutkan karena tidak ada media yang terlibat dalam kerja sama ini.') CheerfulNotification::getByKey('cooperation.media_empty_desc')
)->send(); )->send();
return; return;
@ -40,8 +40,8 @@ protected function setUp(): void
if ($unpaidMedia->isNotEmpty()) { if ($unpaidMedia->isNotEmpty()) {
CheerfulNotification::danger( CheerfulNotification::danger(
CheerfulNotification::getMessage('Pembayaran Belum Lunas! ⚠️', 'Pembayaran Belum Terpenuhi'), CheerfulNotification::getByKey('cooperation.payment_unfulfilled'),
CheerfulNotification::getMessage('Masih ada media yang belum dibayar. Harap selesaikan pembayaran untuk semua media yang menerima kerja sama.', 'Terdapat kewajiban pembayaran yang belum diselesaikan untuk media terkait.') CheerfulNotification::getByKey('cooperation.payment_unfulfilled_desc')
)->send(); )->send();
$this->halt(); $this->halt();
@ -59,8 +59,8 @@ protected function setUp(): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Kerja Sama Selesai! 🎉✨', 'Kerja Sama Berhasil Diselesaikan'), CheerfulNotification::getByKey('cooperation.completed_success'),
CheerfulNotification::getMessage('Alhamdulillah! Kerja sama ini telah resmi diselesaikan. Terima kasih atas kerja samanya! 🙌😊', 'Proses kerja sama ini telah resmi ditutup dan diselesaikan.') CheerfulNotification::getByKey('cooperation.completed_desc')
)->send(); )->send();
}) })
->visible(function (Cooperation $record): bool { ->visible(function (Cooperation $record): bool {

View File

@ -82,8 +82,8 @@ protected function setUp(): void
$partnerUser = $partnerMedia->company?->user; $partnerUser = $partnerMedia->company?->user;
if ($partnerUser) { if ($partnerUser) {
$partnerUser->notify(new BroadcastNotification([ $partnerUser->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Tugas Baru Telah Menanti! 📝✨', 'Penugasan Kerja Sama Baru'), 'title' => CheerfulNotification::getByKey('cooperation.new_assignment'),
'body' => CheerfulNotification::getMessage("Halo! Admin sudah menetapkan tugas untuk kerja sama \"{$record->title}\". Yuk, cek detail tugasnya dan mulai buat laporannya! Semangat! 💪😊", "Admin telah menetapkan penugasan baru untuk kerja sama \"{$record->title}\". Silakan tinjau detail tugas dan laporan yang diperlukan."), 'body' => CheerfulNotification::getByKey('notification.admin_assigned_task', ['record__title' => $record->title]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')
@ -94,12 +94,12 @@ protected function setUp(): void
} }
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Penugasan Berhasil Dibuat! 🚀✨', 'Penugasan Berhasil Dibuat'), CheerfulNotification::getByKey('cooperation.assignment_created_success'),
CheerfulNotification::getMessage('Mantap! Penugasan telah dibuat dan semua media terkait sudah diberi tahu. Mari kita pantau progresnya! 💪', 'Penugasan telah berhasil dibuat dan seluruh media terkait telah dinotifikasi.') CheerfulNotification::getByKey('cooperation.assignment_created_desc')
)->send(); )->send();
}) })
->modalHeading(fn () => CheerfulNotification::getMessage('Buat Penugasan Baru 📝✨', 'Buat Penugasan Baru')) ->modalHeading(fn () => CheerfulNotification::getByKey('cooperation.create_assignment_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Waktunya bagi-bagi tugas! Tentukan detail penugasan untuk para media biar mereka bisa langsung gaspol! 🚀💪', 'Silakan tentukan detail penugasan untuk pihak media eksternal.')) ->modalDescription(fn () => CheerfulNotification::getByKey('cooperation.create_assignment_desc'))
->modalSubmitActionLabel('Simpan') ->modalSubmitActionLabel('Simpan')
->visible(function (Cooperation $record): bool { ->visible(function (Cooperation $record): bool {
$user = auth()->user(); $user = auth()->user();

View File

@ -20,8 +20,8 @@ protected function setUp(): void
->icon(Heroicon::OutlinedBanknotes) ->icon(Heroicon::OutlinedBanknotes)
->color('success') ->color('success')
->requiresConfirmation() ->requiresConfirmation()
->modalHeading(fn () => CheerfulNotification::getMessage('Lanjut ke Pembayaran? 💸💳', 'Lanjutkan ke Pembayaran')) ->modalHeading(fn () => CheerfulNotification::getByKey('cooperation.proceed_to_payment_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Siap buat lanjut ke tahap pembayaran? Pastikan semua laporan sudah diverifikasi dulu ya! ✅😊', 'Apakah Anda yakin ingin melanjutkan ke tahap pembayaran? Pastikan seluruh laporan telah diverifikasi.')) ->modalDescription(fn () => CheerfulNotification::getByKey('cooperation.proceed_to_payment_desc'))
->action(function (Cooperation $record): void { ->action(function (Cooperation $record): void {
$record->update([ $record->update([
'status' => CooperationStatus::PAYMENT, 'status' => CooperationStatus::PAYMENT,
@ -29,8 +29,8 @@ protected function setUp(): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Tahap Pembayaran Dimulai! 💸✨', 'Tahap Pembayaran Aktif'), CheerfulNotification::getByKey('cooperation.payment_stage_active'),
CheerfulNotification::getMessage('Kerja sama telah dipindahkan ke tahap pembayaran. Silakan proses pembayarannya ya! 😊', 'Status kerja sama telah dialihkan ke tahap pembayaran.') CheerfulNotification::getByKey('cooperation.payment_stage_changed_desc')
)->send(); )->send();
}) })
->visible(function (Cooperation $record): bool { ->visible(function (Cooperation $record): bool {

View File

@ -33,8 +33,8 @@ protected function setUp(): void
$cooperationMedia->update(['status' => ApprovalStatus::REJECTED]); $cooperationMedia->update(['status' => ApprovalStatus::REJECTED]);
CheerfulNotification::info( CheerfulNotification::info(
CheerfulNotification::getMessage('Berhasil Ditolak 🙏', 'Tawaran Kerja Sama Ditolak'), CheerfulNotification::getByKey('cooperation.offer_rejected'),
CheerfulNotification::getMessage('Terima kasih atas konfirmasinya. Pesan penolakan telah diteruskan ke Admin. 😊', 'Penolakan penawaran kerja sama telah berhasil dikirimkan ke pihak Admin.') CheerfulNotification::getByKey('cooperation.offer_rejection_sent')
)->send(); )->send();
// Notify Admins // Notify Admins
@ -42,8 +42,8 @@ protected function setUp(): void
->get() ->get()
->each(function ($admin) use ($record, $cooperationMedia): void { ->each(function ($admin) use ($record, $cooperationMedia): void {
$admin->notify(new BroadcastNotification([ $admin->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Yah, Tawaran Ditolak 😔🤝', 'Tawaran Kerja Sama Ditolak Media'), 'title' => CheerfulNotification::getByKey('cooperation.offer_rejected_media'),
'body' => CheerfulNotification::getMessage("Media {$cooperationMedia->partnerMedia->name} baru saja menolak penawaran kerja sama \"{$record->title}\". Mungkin di lain waktu ya! 🙏", "Pihak media {$cooperationMedia->partnerMedia->name} telah menolak penawaran kerja sama \"{$record->title}\"."), 'body' => CheerfulNotification::getByKey('notification.media_rejected_offer', ['cooperationMedia__partnerMedia__name' => $cooperationMedia->partnerMedia->name, 'record__title' => $record->title]),
])); ]));
}); });
} }

View File

@ -93,8 +93,8 @@ protected function setUp(): void
} }
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Berhasil Diajukan! 🚀', 'Proposal Berhasil Dikirim'), CheerfulNotification::getByKey('cooperation.proposal_sent_success'),
CheerfulNotification::getMessage('Yeay! Proposal kerja sama Anda sudah terkirim ke Admin. Mohon ditunggu ya, semoga hasilnya memuaskan! ✨', 'Proposal kerja sama Anda telah berhasil dikirimkan ke pihak Admin.') CheerfulNotification::getByKey('cooperation.proposal_approved_desc')
)->send(); )->send();
// Notify Admin // Notify Admin
@ -105,11 +105,11 @@ protected function setUp(): void
$admin->notify(new BroadcastNotification([ $admin->notify(new BroadcastNotification([
'title' => $isRevision 'title' => $isRevision
? CheerfulNotification::getMessage('Pembaruan Proposal Kerja Sama ✨', 'Pembaruan Proposal Kerja Sama') ? CheerfulNotification::getByKey('cooperation.proposal_update')
: CheerfulNotification::getMessage('Ada Proposal Kerja Sama Baru! 🚀', 'Proposal Kerja Sama Baru'), : CheerfulNotification::getByKey('cooperation.new_proposal'),
'body' => $isRevision 'body' => $isRevision
? CheerfulNotification::getMessage("Cihuy! {$user->name} baru saja memperbarui proposal kerja sama untuk media {$cooperationMedia->partnerMedia->name} pada kampanye {$record->title}. Yuk, cek perubahannya!", "Pengguna {$user->name} telah memperbarui proposal kerja sama untuk media {$cooperationMedia->partnerMedia->name} pada kampanye {$record->title}.") ? CheerfulNotification::getByKey('notification.user_updated_proposal', ['user__name' => $user->name, 'cooperationMedia__partnerMedia__name' => $cooperationMedia->partnerMedia->name, 'record__title' => $record->title])
: CheerfulNotification::getMessage("Halo Admin! {$user->name} baru saja mengajukan proposal kerja sama baru untuk media {$cooperationMedia->partnerMedia->name} pada kampanye {$record->title}. Segera diproses ya! 😊", "Pengguna {$user->name} telah mengajukan proposal kerja sama baru untuk media {$cooperationMedia->partnerMedia->name} pada kampanye {$record->title}."), : CheerfulNotification::getByKey('notification.user_submitted_proposal', ['user__name' => $user->name, 'cooperationMedia__partnerMedia__name' => $cooperationMedia->partnerMedia->name, 'record__title' => $record->title]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')
@ -119,8 +119,8 @@ protected function setUp(): void
}); });
} }
}) })
->modalHeading(fn () => CheerfulNotification::getMessage('Ajukan Proposal Kerja Sama 🚀📝', 'Ajukan Proposal Kerja Sama')) ->modalHeading(fn () => CheerfulNotification::getByKey('cooperation.submit_proposal_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Ayo kirimkan proposal terbaikmu! Pastikan semua dokumen sudah lengkap ya biar admin makin sreg! ✨😊', 'Silakan ajukan proposal kerja sama Anda. Pastikan seluruh dokumen pendukung telah dilampirkan.')) ->modalDescription(fn () => CheerfulNotification::getByKey('cooperation.submit_proposal_desc'))
->modalSubmitActionLabel('Kirim Proposal') ->modalSubmitActionLabel('Kirim Proposal')
->visible(function (Cooperation $record): bool { ->visible(function (Cooperation $record): bool {
$user = auth()->user(); $user = auth()->user();

View File

@ -63,15 +63,15 @@ protected function setUp(): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Pembayaran Berhasil! 💸✨', 'Pembayaran Berhasil Dicatat'), CheerfulNotification::getByKey('cooperation.payment_recorded_success'),
CheerfulNotification::getMessage("Pembayaran untuk {$record->partnerMedia->name} telah berhasil dicatat.", "Proses pembayaran untuk {$record->partnerMedia->name} telah berhasil diselesaikan.") CheerfulNotification::getByKey('notification.payment_processed', ['record__partnerMedia__name' => $record->partnerMedia->name])
)->send(); )->send();
$partnerUser = $record->partnerMedia->company?->user; $partnerUser = $record->partnerMedia->company?->user;
if ($partnerUser) { if ($partnerUser) {
$partnerUser->notify(new BroadcastNotification([ $partnerUser->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Pembayaran Telah Dikirim! 💸✨', 'Pembayaran Kerja Sama Telah Dikirim'), 'title' => CheerfulNotification::getByKey('cooperation.payment_sent'),
'body' => CheerfulNotification::getMessage("Halo! Pembayaran untuk kerja sama \"{$record->cooperation->title}\" telah berhasil dikirim oleh Admin. Silakan cek detailnya ya! 😊", "Admin telah mengirimkan pembayaran untuk kerja sama \"{$record->cooperation->title}\". Silakan periksa detail transaksi Anda."), 'body' => CheerfulNotification::getByKey('notification.payment_sent_desc', ['record__cooperation__title' => $record->cooperation->title]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -22,8 +22,8 @@ protected function setUp(): void
->icon(Heroicon::OutlinedCheck) ->icon(Heroicon::OutlinedCheck)
->color('success') ->color('success')
->requiresConfirmation() ->requiresConfirmation()
->modalHeading(fn () => CheerfulNotification::getMessage('Terima Proposal Ini? ✅✨', 'Terima Proposal')) ->modalHeading(fn () => CheerfulNotification::getByKey('cooperation.accept_proposal_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Yakin ingin menerima proposal kerja sama ini? Pastikan profil medianya sudah oke semua ya! 😊', 'Apakah Anda yakin ingin menyetujui proposal kerja sama ini?')) ->modalDescription(fn () => CheerfulNotification::getByKey('cooperation.accept_proposal_desc'))
->action(function (CooperationProposal $record): void { ->action(function (CooperationProposal $record): void {
$record->update([ $record->update([
'status' => ApprovalStatus::ACCEPTED, 'status' => ApprovalStatus::ACCEPTED,
@ -31,16 +31,16 @@ protected function setUp(): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Proposal Diterima! ✅✨', 'Proposal Berhasil Disetujui'), CheerfulNotification::getByKey('cooperation.proposal_approved_success'),
CheerfulNotification::getMessage("Mantap! Proposal dari '{$record->partnerMedia->name}' telah berhasil diterima. Mari kita lanjut ke tahap berikutnya! 💪", "Proposal kerja sama dari '{$record->partnerMedia->name}' telah berhasil disetujui.") CheerfulNotification::getByKey('notification.proposal_from_rejected', ['record__partnerMedia__name' => $record->partnerMedia->name])
)->send(); )->send();
// Notify User (Partner) // Notify User (Partner)
$partnerUser = $record->partnerMedia?->company?->user; $partnerUser = $record->partnerMedia?->company?->user;
if ($partnerUser) { if ($partnerUser) {
$partnerUser->notify(new BroadcastNotification([ $partnerUser->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Horee! Proposal Disetujui 🎉', 'Proposal Kerja Sama Disetujui'), 'title' => CheerfulNotification::getByKey('cooperation.proposal_approved'),
'body' => CheerfulNotification::getMessage('Yeay! Proposal kerja sama Anda telah disetujui oleh Admin. Mari kita lanjut ke tahap berikutnya! 🎊', 'Proposal kerja sama Anda telah disetujui oleh pihak Admin.'), 'body' => CheerfulNotification::getByKey('cooperation.proposal_approved_desc'),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -23,8 +23,8 @@ protected function setUp(): void
$this->label('Tolak') $this->label('Tolak')
->icon(Heroicon::OutlinedXMark) ->icon(Heroicon::OutlinedXMark)
->color('danger') ->color('danger')
->modalHeading(fn () => CheerfulNotification::getMessage('Tolak Proposal Ini? 🛑🤔', 'Tolak Proposal')) ->modalHeading(fn () => CheerfulNotification::getByKey('cooperation.reject_proposal_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Yakin ingin menolak proposal ini? Berikan alasan biar media bisa melakukan perbaikan ke depannya! 📝😊', 'Apakah Anda yakin ingin menolak proposal kerja sama ini? Harap berikan alasan penolakan.')) ->modalDescription(fn () => CheerfulNotification::getByKey('cooperation.reject_proposal_desc'))
->schema([ ->schema([
Textarea::make('reason') Textarea::make('reason')
->label('Alasan Penolakan') ->label('Alasan Penolakan')
@ -40,16 +40,16 @@ protected function setUp(): void
$record->rejectionReasons()->create(['reason' => $data['reason']]); $record->rejectionReasons()->create(['reason' => $data['reason']]);
CheerfulNotification::warning( CheerfulNotification::warning(
CheerfulNotification::getMessage('Proposal Ditolak! 🛑', 'Proposal Ditolak'), CheerfulNotification::getByKey('cooperation.proposal_rejected'),
CheerfulNotification::getMessage("Proposal dari '{$record->partnerMedia->name}' telah ditolak. Media terkait akan segera mendapatkan notifikasi. 🙏", "Proposal kerja sama dari '{$record->partnerMedia->name}' telah ditolak.") CheerfulNotification::getByKey('notification.proposal_from_rejected', ['record__partnerMedia__name' => $record->partnerMedia->name])
)->send(); )->send();
// Notify User (Partner) // Notify User (Partner)
$partnerUser = $record->partnerMedia?->company?->user; $partnerUser = $record->partnerMedia?->company?->user;
if ($partnerUser) { if ($partnerUser) {
$partnerUser->notify(new BroadcastNotification([ $partnerUser->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Maaf, Proposal Belum Diterima 😔', 'Pemberitahuan Penolakan Proposal'), 'title' => CheerfulNotification::getByKey('cooperation.proposal_rejection_notice'),
'body' => CheerfulNotification::getMessage("Yah, maaf banget... proposal kerja sama Anda belum bisa kami terima saat ini. 💔\n\nAlasan: {$data['reason']}", "Proposal kerja sama Anda telah ditolak oleh pihak Admin.\n\nAlasan: {$data['reason']}"), 'body' => CheerfulNotification::getByKey('notification.proposal_rejected_reason', ['data__reason' => $data['reason']]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -27,15 +27,15 @@ protected function setUp(): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Laporan Diterima! ✅✨', 'Laporan Berhasil Disetujui'), CheerfulNotification::getByKey('cooperation.report_approved_success'),
CheerfulNotification::getMessage("Laporan '{$record->title}' telah berhasil diproses. Notifikasi sudah dikirim ke media terkait! 💪", "Laporan '{$record->title}' telah disetujui dan notifikasi telah dikirimkan ke pihak media.") CheerfulNotification::getByKey('notification.report_approved_notice', ['record__title' => $record->title])
)->send(); )->send();
$partnerUser = $record->mediaTaskAssignment?->partnerMedia?->company?->user; $partnerUser = $record->mediaTaskAssignment?->partnerMedia?->company?->user;
if ($partnerUser) { if ($partnerUser) {
$partnerUser->notify(new BroadcastNotification([ $partnerUser->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Mantap! Laporan Diterima 🎊✨', 'Laporan Kerja Sama Disetujui'), 'title' => CheerfulNotification::getByKey('cooperation.report_cooperation_approved'),
'body' => CheerfulNotification::getMessage("Hore! Laporan \"{$record->title}\" pada kerja sama \"{$record->mediaTaskAssignment->taskAssignment->cooperation->title}\" telah disetujui oleh Admin. Satu langkah lebih dekat! 🚀", "Laporan \"{$record->title}\" untuk kerja sama \"{$record->mediaTaskAssignment->taskAssignment->cooperation->title}\" telah disetujui oleh Admin."), 'body' => CheerfulNotification::getByKey('notification.report_cooperation_approved', ['record__title' => $record->title, 'record__mediaTaskAssignment__taskAssignment__cooperation__title' => $record->mediaTaskAssignment->taskAssignment->cooperation->title]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -29,8 +29,8 @@ protected function setUp(): void
->placeholder('Jelaskan alasan pengajuan ditolak...') ->placeholder('Jelaskan alasan pengajuan ditolak...')
->required(), ->required(),
]) ])
->modalHeading(fn () => CheerfulNotification::getMessage('Tolak Laporan? 🛑🤔', 'Tolak Laporan')) ->modalHeading(fn () => CheerfulNotification::getByKey('cooperation.reject_report_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Apakah Anda yakin ingin menolak laporan ini? Sertakan alasan biar media bisa segera memperbaikinya ya! 📝😊', 'Apakah Anda yakin ingin menolak laporan ini? Silakan berikan alasan penolakan untuk perbaikan oleh pihak media.')) ->modalDescription(fn () => CheerfulNotification::getByKey('cooperation.reject_proposal_desc'))
->action(function (Report $record, array $data): void { ->action(function (Report $record, array $data): void {
$record->update([ $record->update([
'status' => ApprovalStatus::REJECTED, 'status' => ApprovalStatus::REJECTED,
@ -39,15 +39,15 @@ protected function setUp(): void
$record->rejectionReasons()->create(['reason' => $data['reason']]); $record->rejectionReasons()->create(['reason' => $data['reason']]);
CheerfulNotification::warning( CheerfulNotification::warning(
CheerfulNotification::getMessage('Laporan Ditolak! 🛑', 'Laporan Ditolak'), CheerfulNotification::getByKey('cooperation.report_rejected'),
CheerfulNotification::getMessage("Laporan '{$record->title}' telah ditolak. Media terkait akan segera mendapatkan notifikasi untuk perbaikan. 🙏", "Laporan '{$record->title}' telah ditolak. Notifikasi perbaikan telah dikirimkan ke pihak media.") CheerfulNotification::getByKey('notification.report_rejected_notice', ['record__title' => $record->title])
)->send(); )->send();
$partnerUser = $record->mediaTaskAssignment?->partnerMedia?->company?->user; $partnerUser = $record->mediaTaskAssignment?->partnerMedia?->company?->user;
if ($partnerUser) { if ($partnerUser) {
$partnerUser->notify(new BroadcastNotification([ $partnerUser->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Yah, Laporan Ditolak 🙁', 'Laporan Kerja Sama Ditolak'), 'title' => CheerfulNotification::getByKey('cooperation.report_cooperation_rejected'),
'body' => CheerfulNotification::getMessage("Halo! Laporan \"{$record->title}\" pada kerja sama \"{$record->mediaTaskAssignment->taskAssignment->cooperation->title}\" ditolak oleh Admin. 💪\n\nCatatan Admin: {$data['reason']}", "Laporan \"{$record->title}\" untuk kerja sama \"{$record->mediaTaskAssignment->taskAssignment->cooperation->title}\" ditolak oleh Admin.\n\nAlasan: {$data['reason']}"), 'body' => CheerfulNotification::getByKey('notification.report_rejected_reason', ['record__title' => $record->title, 'record__mediaTaskAssignment__taskAssignment__cooperation__title' => $record->mediaTaskAssignment->taskAssignment->cooperation->title, 'data__reason' => $data['reason']]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -74,8 +74,8 @@ public static function infolist(Schema $schema): Schema
{ {
return $schema return $schema
->components([ ->components([
Section::make(fn () => CheerfulNotification::getMessage('Informasi Kerja Sama 🤝', 'Informasi Kerja Sama')) Section::make(fn () => CheerfulNotification::getByKey('cooperation.info_title'))
->description(fn () => CheerfulNotification::getMessage('Detail lengkap mengenai data kerja sama yang sedang berjalan. 🤝✨', 'Informasi detail mengenai pelaksanaan kerja sama.')) ->description(fn () => CheerfulNotification::getByKey('cooperation.info_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-hand-raised' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-hand-raised' : null)
->headerActions([ ->headerActions([
Action::make('status') Action::make('status')

View File

@ -68,8 +68,8 @@ protected function afterCreate(): void
$partnerUser = $media->company?->user; $partnerUser = $media->company?->user;
if ($partnerUser) { if ($partnerUser) {
$partnerUser->notify(new BroadcastNotification([ $partnerUser->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Ada Penawaran Kerja Sama Baru! 🤝✨', 'Penawaran Kerja Sama Baru'), 'title' => CheerfulNotification::getByKey('cooperation.new_offer'),
'body' => CheerfulNotification::getMessage("Halo! Admin baru saja menawarkan kerja sama \"{$record->title}\" untuk media {$media->name}. Yuk, cek detailnya dan berikan tanggapanmu! 😊", "Admin telah menawarkan kerja sama \"{$record->title}\" untuk media {$media->name}."), 'body' => CheerfulNotification::getByKey('notification.admin_offered_cooperation', ['record__title' => $record->title, 'media__name' => $media->name]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -65,7 +65,7 @@ public function table(Table $table): Table
->visible(fn (CooperationMedia $record): bool => $record->status === ApprovalStatus::ACCEPTED && $record->payment()->exists()), ->visible(fn (CooperationMedia $record): bool => $record->status === ApprovalStatus::ACCEPTED && $record->payment()->exists()),
]) ])
->emptyStateIcon(Heroicon::OutlinedNewspaper) ->emptyStateIcon(Heroicon::OutlinedNewspaper)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Daftar media pendukung masih kosong nih! Yuk, tambahkan media sekarang. 📰✨', 'Belum ada data media yang tersedia.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('cooperation.media_data_empty'))
->defaultSort('created_at', 'desc'); ->defaultSort('created_at', 'desc');
} }

View File

@ -66,7 +66,7 @@ public function table(Table $table): Table
->headerActions([]) ->headerActions([])
->recordActions([]) ->recordActions([])
->emptyStateIcon(Heroicon::OutlinedCreditCard) ->emptyStateIcon(Heroicon::OutlinedCreditCard)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Ups! Belum ada data pembayaran yang tercatat nih. Sabar ya! 💸✨', 'Belum ada data pembayaran yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('cooperation.payment_empty'))
->defaultSort('created_at', 'desc'); ->defaultSort('created_at', 'desc');
} }

View File

@ -108,14 +108,14 @@ public function table(Table $table): Table
DeleteBulkAction::make() DeleteBulkAction::make()
->successNotification( ->successNotification(
fn () => CheerfulNotification::success( fn () => CheerfulNotification::success(
CheerfulNotification::getMessage('Proposal Dihapus! 🗑️', 'Proposal Dihapus'), CheerfulNotification::getByKey('cooperation.proposal_deleted'),
CheerfulNotification::getMessage('Semua proposal yang dipilih telah berhasil dihapus dari sistem. 👋', 'Seluruh data proposal yang dipilih telah berhasil dihapus dari sistem.') CheerfulNotification::getByKey('cooperation.proposal_deleted_desc')
) )
), ),
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedDocumentText) ->emptyStateIcon(Heroicon::OutlinedDocumentText)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada proposal yang masuk nih! Tenang, nanti juga ada yang tertarik kok. ✨🚀', 'Belum ada data proposal yang diajukan saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('cooperation.proposal_empty'))
->defaultSort('created_at', 'desc'); ->defaultSort('created_at', 'desc');
} }

View File

@ -154,8 +154,8 @@ public function table(Table $table): Table
CreateAction::make() CreateAction::make()
->label('Buat Laporan') ->label('Buat Laporan')
->modalWidth(Width::Large) ->modalWidth(Width::Large)
->modalHeading(fn () => CheerfulNotification::getMessage('Sampaikan Laporan Baru 📝🚀', 'Buat Laporan Baru')) ->modalHeading(fn () => CheerfulNotification::getByKey('cooperation.create_report_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Ayo kirimkan hasil kerja kerasmu! Isi detail laporannya biar admin bisa langsung verifikasi ya! 💪✨', 'Silakan masukkan detail laporan pekerjaan Anda pada formulir di bawah ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('cooperation.create_report_desc'))
->mutateDataUsing(function (array $data): array { ->mutateDataUsing(function (array $data): array {
$taskAssignment = $this->getOwnerRecord()->taskAssignment; $taskAssignment = $this->getOwnerRecord()->taskAssignment;
@ -174,8 +174,8 @@ public function table(Table $table): Table
->successNotification(null) ->successNotification(null)
->after(function (Report $record): void { ->after(function (Report $record): void {
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Laporan Berhasil Terkirim! 🚀✨', 'Laporan Berhasil Terkirim'), CheerfulNotification::getByKey('cooperation.report_sent_success'),
CheerfulNotification::getMessage('Hore! Laporan Anda sudah masuk ke sistem. Admin akan segera memeriksanya. Terima kasih atas kerja kerasnya! 💪', 'Laporan Anda telah berhasil dikirimkan ke sistem dan sedang menunggu verifikasi admin.') CheerfulNotification::getByKey('cooperation.report_sent_desc')
)->send(); )->send();
// Notify Admins // Notify Admins
@ -185,8 +185,8 @@ public function table(Table $table): Table
$user = auth()->user(); $user = auth()->user();
$admin->notify(new BroadcastNotification([ $admin->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Ada Laporan Baru! 📝✨', 'Laporan Kerja Sama Baru'), 'title' => CheerfulNotification::getByKey('auto_generated.msg_laporan_kerja_sama_baru'),
'body' => CheerfulNotification::getMessage("Halo Admin! {$user->name} baru saja mengirimkan laporan \"{$record->title}\" untuk kerja sama \"{$this->getOwnerRecord()->title}\". Yuk, dicek! 😊", "Pengguna {$user->name} telah mengirimkan laporan baru \"{$record->title}\" untuk pengajuan kerja sama \"{$this->getOwnerRecord()->title}\"."), 'body' => CheerfulNotification::getByKey('notification.user_submitted_report', ['user__name' => $user->name, 'record__title' => $record->title, 'this__getOwnerRecord____title' => $this->getOwnerRecord()->title]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')
@ -219,7 +219,7 @@ public function table(Table $table): Table
]) ])
->toolbarActions([]) ->toolbarActions([])
->emptyStateIcon(Heroicon::OutlinedInboxArrowDown) ->emptyStateIcon(Heroicon::OutlinedInboxArrowDown)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada laporan yang dikirimkan nih! Yuk, kirimkan hasil kerjamu sekarang juga! 🚀✨', 'Belum ada data laporan yang diajukan saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('cooperation.report_empty'))
->defaultSort('created_at', 'desc'); ->defaultSort('created_at', 'desc');
} }

View File

@ -73,23 +73,23 @@ public function table(Table $table): Table
&& ! $cooperation->taskAssignment()->exists(); && ! $cooperation->taskAssignment()->exists();
}) })
->successNotification(fn () => CheerfulNotification::success( ->successNotification(fn () => CheerfulNotification::success(
CheerfulNotification::getMessage('Penugasan Dibuat! 🚀✨', 'Penugasan Berhasil'), CheerfulNotification::getByKey('cooperation.assignment_success'),
CheerfulNotification::getMessage('Tugas baru berhasil ditetapkan. Media terkait akan segera mengetahuinya! 💪', 'Tugas baru telah berhasil ditetapkan untuk pihak media.') CheerfulNotification::getByKey('cooperation.assignment_set_success')
) )
), ),
]) ])
->recordActions([ ->recordActions([
EditAction::make() EditAction::make()
->successNotification(fn () => CheerfulNotification::success( ->successNotification(fn () => CheerfulNotification::success(
CheerfulNotification::getMessage('Penugasan Diperbarui! ✅', 'Penugasan Diperbarui'), CheerfulNotification::getByKey('cooperation.assignment_updated'),
CheerfulNotification::getMessage('Perubahan pada penugasan berhasil disimpan dengan aman. 👍', 'Perubahan pada detail penugasan telah berhasil disimpan.') CheerfulNotification::getByKey('cooperation.assignment_updated_desc')
) )
), ),
DeleteAction::make() DeleteAction::make()
->successNotification(fn () => CheerfulNotification::success( ->successNotification(fn () => CheerfulNotification::success(
CheerfulNotification::getMessage('Penugasan Dihapus! 🗑️', 'Penugasan Dihapus'), CheerfulNotification::getByKey('cooperation.assignment_deleted'),
CheerfulNotification::getMessage('Penugasan telah berhasil dihapus dari sistem. 👋', 'Data penugasan telah berhasil dihapus dari sistem.') CheerfulNotification::getByKey('cooperation.assignment_deleted_desc')
) )
), ),
]) ])
@ -97,13 +97,13 @@ public function table(Table $table): Table
BulkActionGroup::make([ BulkActionGroup::make([
DeleteBulkAction::make() DeleteBulkAction::make()
->successNotification(fn () => CheerfulNotification::success( ->successNotification(fn () => CheerfulNotification::success(
CheerfulNotification::getMessage('Banyak Penugasan Dihapus! 🗑️👋', 'Penugasan Berhasil Dihapus'), CheerfulNotification::getByKey('cooperation.assignment_success_dihapus'),
CheerfulNotification::getMessage('Semua penugasan yang dipilih telah dihapus dari sistem. 🧹', 'Seluruh data penugasan yang dipilih telah berhasil dihapus.') CheerfulNotification::getByKey('cooperation.bulk_assignment_deleted')
) )
), ),
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedArchiveBoxXMark) ->emptyStateIcon(Heroicon::OutlinedArchiveBoxXMark)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada penugasan nih! Mari buat penugasan pertama untuk media. 🚀✨', 'Tidak ada data penugasan yang tersedia.')); ->emptyStateDescription(fn () => CheerfulNotification::getByKey('cooperation.assignment_empty'));
} }
} }

View File

@ -25,8 +25,8 @@ public static function configure(Schema $schema): Schema
{ {
return $schema return $schema
->components([ ->components([
Section::make(fn () => CheerfulNotification::getMessage('Detail Kerja Sama 🤝', 'Detail Kerja Sama')) Section::make(fn () => CheerfulNotification::getByKey('cooperation.detail_title'))
->description(fn () => CheerfulNotification::getMessage('Ayo lengkapi informasi mengenai judul, durasi, dan media yang diajak kerja sama! 🤝✨', 'Lengkapi informasi mengenai judul, durasi, dan media yang terlibat.')) ->description(fn () => CheerfulNotification::getByKey('cooperation.detail_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-hand-raised' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-hand-raised' : null)
->schema([ ->schema([
TextInput::make('title') TextInput::make('title')
@ -88,8 +88,8 @@ public static function configure(Schema $schema): Schema
]) ])
->columnSpan(2), ->columnSpan(2),
Section::make(fn () => CheerfulNotification::getMessage('Lampiran & Media 🖼️', 'Lampiran & Media')) Section::make(fn () => CheerfulNotification::getByKey('cooperation.attachment_title'))
->description(fn () => CheerfulNotification::getMessage('Jangan lupa unggah banner promosi dan template pengajuannya ya! 🖼️✨', 'Unggah banner promosi dan template untuk pengajuan.')) ->description(fn () => CheerfulNotification::getByKey('cooperation.attachment_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-paper-clip' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-paper-clip' : null)
->schema([ ->schema([
SpatieMediaLibraryFileUpload::make('banner') SpatieMediaLibraryFileUpload::make('banner')

View File

@ -287,7 +287,7 @@ public static function configure(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedHandRaised) ->emptyStateIcon(Heroicon::OutlinedHandRaised)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data kerja sama nih. Yuk, mulai buat data pertama Anda! 🤝✨', 'Belum ada data kerja sama yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('cooperation.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -24,8 +24,8 @@ protected function setUp(): void
->icon(Heroicon::OutlinedCheck) ->icon(Heroicon::OutlinedCheck)
->color('success') ->color('success')
->requiresConfirmation() ->requiresConfirmation()
->modalHeading(fn () => CheerfulNotification::getMessage('Setujui Perubahan Data? ✅✨', 'Setujui Perubahan Data')) ->modalHeading(fn () => CheerfulNotification::getByKey('data_change.approve_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Siap untuk menerapkan perubahan data ini secara otomatis ke sistem? Pastikan semuanya sudah sesuai ya! 🚀😊', 'Apakah Anda yakin ingin menerapkan perubahan data ini ke dalam sistem?')) ->modalDescription(fn () => CheerfulNotification::getByKey('data_change.approve_desc'))
->action(function (DataChangeRequest $record): void { ->action(function (DataChangeRequest $record): void {
$entity = $record->entity; $entity = $record->entity;
$newData = $record->new_data; $newData = $record->new_data;
@ -42,14 +42,14 @@ protected function setUp(): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Penghapusan Disetujui! ✅', 'Penghapusan Disetujui'), CheerfulNotification::getByKey('data_change.deletion_approved'),
CheerfulNotification::getMessage('Data telah berhasil dihapus sesuai dengan permohonan.', 'Data telah berhasil dihapus sesuai dengan permintaan permohonan.') CheerfulNotification::getByKey('data_change.deletion_success_desc')
)->send(); )->send();
// Notify User // Notify User
$record->user?->notify(new BroadcastNotification([ $record->user?->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Permohonan Penghapusan Disetujui ✨', 'Permohonan Penghapusan Disetujui'), 'title' => CheerfulNotification::getByKey('data_change.deletion_request_approved'),
'body' => CheerfulNotification::getMessage("Halo! Permohonan penghapusan data Anda untuk {$record->change_reason} telah disetujui oleh admin. 🚀", "Permohonan penghapusan data untuk {$record->change_reason} telah disetujui oleh Admin."), 'body' => CheerfulNotification::getByKey('data_change.deletion_request_title_untuk_telah', ['record__change_reason' => $record->change_reason]),
])); ]));
return; return;
@ -147,14 +147,14 @@ protected function setUp(): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Perubahan Disetujui! ✅', 'Perubahan Disetujui'), CheerfulNotification::getByKey('data_change.change_approved'),
CheerfulNotification::getMessage('Data telah berhasil diperbarui sesuai dengan permohonan.', 'Data telah berhasil diperbarui sesuai dengan permintaan permohonan.') CheerfulNotification::getByKey('data_change.change_success_desc')
)->send(); )->send();
// Notify User // Notify User
$record->user?->notify(new BroadcastNotification([ $record->user?->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Permohonan Perubahan Disetujui ✨', 'Permohonan Perubahan Disetujui'), 'title' => CheerfulNotification::getByKey('data_change.change_request_approved'),
'body' => CheerfulNotification::getMessage("Halo! Permohonan perubahan data Anda untuk {$record->change_reason} telah disetujui oleh admin. Cek sekarang ya! 🚀", "Permohonan perubahan data untuk {$record->change_reason} telah disetujui oleh Admin."), 'body' => CheerfulNotification::getByKey('notification.data_change_approved', ['record__change_reason' => $record->change_reason]),
])); ]));
}) })
->visible(fn (DataChangeRequest $record): bool => $record->status === DataChangeStatus::PENDING && ! auth()->user()->hasRole(RoleEnum::PERUSAHAAN->value)); ->visible(fn (DataChangeRequest $record): bool => $record->status === DataChangeStatus::PENDING && ! auth()->user()->hasRole(RoleEnum::PERUSAHAAN->value));

View File

@ -29,8 +29,8 @@ protected function setUp(): void
->placeholder('Berikan alasan mengapa permohonan ini ditolak...') ->placeholder('Berikan alasan mengapa permohonan ini ditolak...')
->required(), ->required(),
]) ])
->modalHeading(fn () => CheerfulNotification::getMessage('Tolak Perubahan Data? 🛑🤔', 'Tolak Perubahan Data')) ->modalHeading(fn () => CheerfulNotification::getByKey('data_change.reject_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Yakin ingin menolak permohonan ini? Pastikan alasannya jelas biar pemohon nggak bingung ya! 😔📝', 'Apakah Anda yakin ingin menolak permohonan perubahan data ini?')) ->modalDescription(fn () => CheerfulNotification::getByKey('cooperation.reject_proposal_desc'))
->action(function (DataChangeRequest $record, array $data): void { ->action(function (DataChangeRequest $record, array $data): void {
$record->update([ $record->update([
'status' => DataChangeStatus::REJECTED, 'status' => DataChangeStatus::REJECTED,
@ -50,14 +50,14 @@ protected function setUp(): void
} }
CheerfulNotification::info( CheerfulNotification::info(
CheerfulNotification::getMessage('Permohonan Ditolak 🛑', 'Permohonan Ditolak'), CheerfulNotification::getByKey('data_change.request_rejected'),
CheerfulNotification::getMessage('Permohonan perubahan data telah ditolak. 😔', 'Permohonan perubahan data telah ditolak oleh Admin.') CheerfulNotification::getByKey('data_change.request_rejected_desc')
)->send(); )->send();
// Notify User // Notify User
$record->user?->notify(new BroadcastNotification([ $record->user?->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Permohonan Perubahan Ditolak 🛑', 'Permohonan Perubahan Ditolak'), 'title' => CheerfulNotification::getByKey('data_change.change_request_rejected'),
'body' => CheerfulNotification::getMessage("Halo! Mohon maaf, permohonan perubahan data Anda untuk {$record->change_reason} ditolak oleh admin. Alasan: {$data['rejection_reason']} 😔", "Permohonan perubahan data Anda untuk {$record->change_reason} telah ditolak oleh Admin.\n\nAlasan: {$data['rejection_reason']}"), 'body' => CheerfulNotification::getByKey('notification.data_change_rejected', ['record__change_reason' => $record->change_reason, 'data__rejection_reason' => $data['rejection_reason']]),
])); ]));
}) })
->visible(fn (DataChangeRequest $record): bool => $record->status === DataChangeStatus::PENDING && ! auth()->user()->hasRole(RoleEnum::PERUSAHAAN->value)) ->visible(fn (DataChangeRequest $record): bool => $record->status === DataChangeStatus::PENDING && ! auth()->user()->hasRole(RoleEnum::PERUSAHAAN->value))

View File

@ -120,8 +120,8 @@ public static function infolist(Schema $schema): Schema
if (isset($new['__delete_request__']) && $new['__delete_request__'] === true) { if (isset($new['__delete_request__']) && $new['__delete_request__'] === true) {
return " return "
<div style='background-color:#fee2e2; border:1px solid #f87171; color:#991b1b; padding:16px; border-radius:8px; margin-bottom:16px;'> <div style='background-color:#fee2e2; border:1px solid #f87171; color:#991b1b; padding:16px; border-radius:8px; margin-bottom:16px;'>
<div style='font-weight:700; font-size:1.125rem; margin-bottom:4px;'>".CheerfulNotification::getMessage('🚮 Permohonan Penghapusan Data', 'Permohonan Penghapusan Data')."</div> <div style='font-weight:700; font-size:1.125rem; margin-bottom:4px;'>".CheerfulNotification::getByKey('data_change.deletion_request_title')."</div>
<p style='font-size:0.875rem;'>".CheerfulNotification::getMessage('User mengajukan penghapusan permanen untuk data ini. Semua informasi terkait akan dihapus setelah disetujui.', 'Pengguna mengajukan permohonan penghapusan permanen untuk data ini.').'</p> <p style='font-size:0.875rem;'>".CheerfulNotification::getByKey('data_change.deletion_request_desc').'</p>
</div> </div>
'; ';
} }
@ -144,8 +144,8 @@ public static function infolist(Schema $schema): Schema
return " return "
<div style='background-color:#f0fdf4; border:1px solid #bbf7d0; color:#166534; padding:16px; border-radius:8px; margin-bottom:16px;'> <div style='background-color:#f0fdf4; border:1px solid #bbf7d0; color:#166534; padding:16px; border-radius:8px; margin-bottom:16px;'>
<div style='font-weight:700; font-size:1.125rem; margin-bottom:4px;'>".CheerfulNotification::getMessage('✨ Permohonan Penambahan Data', 'Permohonan Penambahan Data')."</div> <div style='font-weight:700; font-size:1.125rem; margin-bottom:4px;'>".CheerfulNotification::getByKey('data_change.addition_request_title')."</div>
<p style='font-size:0.875rem;'>".CheerfulNotification::getMessage('Berikut adalah data baru yang akan dibuat.', 'Berikut adalah rincian data baru yang diajukan.')."</p> <p style='font-size:0.875rem;'>".CheerfulNotification::getByKey('data_change.addition_request_desc')."</p>
</div> </div>
{$rows} {$rows}
"; ";
@ -205,9 +205,9 @@ public static function table(Table $table): Table
->searchable() ->searchable()
->sortable() ->sortable()
->description(fn (DataChangeRequest $record): ?string => match (true) { ->description(fn (DataChangeRequest $record): ?string => match (true) {
isset($record->new_data['__delete_request__']) => CheerfulNotification::getMessage('🗑️ Penghapusan', 'Penghapusan'), isset($record->new_data['__delete_request__']) => CheerfulNotification::getByKey('data_change.deletion'),
empty($record->old_data) => CheerfulNotification::getMessage('✨ Penambahan', 'Penambahan'), empty($record->old_data) => CheerfulNotification::getByKey('data_change.addition'),
default => CheerfulNotification::getMessage('📝 Perubahan', 'Perubahan'), default => CheerfulNotification::getByKey('data_change.change'),
}) })
->formatStateUsing(fn (DataChangeRequest $record): ?string => match ($record->entity_type) { ->formatStateUsing(fn (DataChangeRequest $record): ?string => match ($record->entity_type) {
Company::class => 'Perusahaan', Company::class => 'Perusahaan',
@ -268,7 +268,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedDocumentText) ->emptyStateIcon(Heroicon::OutlinedDocumentText)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada permohonan baru nih! Semua aman dan terkendali. ✨✅', 'Belum ada permohonan perubahan data yang tersedia.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('data_change.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -21,8 +21,8 @@ protected function setUp(): void
parent::setUp(); parent::setUp();
$this->label('Tambah') $this->label('Tambah')
->modalHeading(fn () => CheerfulNotification::getMessage('Tambah Jurnalis Baru 🚀✨', 'Tambah Jurnalis')) ->modalHeading(fn () => CheerfulNotification::getByKey('journalist.create_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Yuk, masukkan data jurnalisnya dengan lengkap biar sistem makin mantap! 💪😊', 'Silakan masukkan detail data jurnalis baru di bawah ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('journalist.create_desc'))
->modalSubmitActionLabel('Simpan') ->modalSubmitActionLabel('Simpan')
->modalCancelActionLabel('Batal') ->modalCancelActionLabel('Batal')
->successNotification(null) ->successNotification(null)
@ -94,16 +94,16 @@ protected function setUp(): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Permohonan Berhasil 🎉', 'Permohonan Berhasil'), CheerfulNotification::getByKey('journalist.request_success'),
CheerfulNotification::getMessage('Data jurnalis baru telah dikirim dan sedang menunggu verifikasi admin ⏳', 'Permohonan penambahan jurnalis baru sedang menunggu verifikasi.') CheerfulNotification::getByKey('journalist.addition_request_processing')
)->send(); )->send();
User::superAdmin() User::superAdmin()
->get() ->get()
->each(function ($admin) use ($dataChangeRequest, $user): void { ->each(function ($admin) use ($dataChangeRequest, $user): void {
$admin->notify(new BroadcastNotification([ $admin->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Ada Penambahan Jurnalis Baru ✨', 'Penambahan Jurnalis Baru'), 'title' => CheerfulNotification::getByKey('data_change.addition_jurnalis_baru'),
'body' => CheerfulNotification::getMessage('Halooo Admin! 👋 '.$user->name.' baru saja menambahkan jurnalis baru. Yuk, cek detailnya! 🚀', 'Pengguna '.$user->name.' telah menambahkan jurnalis baru ke dalam sistem.'), 'body' => CheerfulNotification::getByKey('notification.user_added_journalist', ['user__name' => $user->name]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -24,8 +24,8 @@ protected function setUp(): void
$this->successNotification(null); $this->successNotification(null);
$this->modalHeading(fn () => auth()->user()->company?->verificationRequest?->status === VerificationStatus::APPROVED $this->modalHeading(fn () => auth()->user()->company?->verificationRequest?->status === VerificationStatus::APPROVED
? CheerfulNotification::getMessage('Mau Ajukan Penghapusan Jurnalis? 🗑️📬', 'Ajukan Penghapusan Jurnalis') ? CheerfulNotification::getByKey('journalist.request_deletion_title')
: CheerfulNotification::getMessage('Betulan Mau Hapus Jurnalis? 🗑️🤔', 'Hapus Jurnalis') : CheerfulNotification::getByKey('journalist.delete_title')
); );
$this->schema(fn () => auth()->user()->company?->verificationRequest?->status === VerificationStatus::APPROVED ? [ $this->schema(fn () => auth()->user()->company?->verificationRequest?->status === VerificationStatus::APPROVED ? [
@ -46,8 +46,8 @@ protected function setUp(): void
if ($existingRequest) { if ($existingRequest) {
CheerfulNotification::warning( CheerfulNotification::warning(
CheerfulNotification::getMessage('Pengajuan Sudah Ada ⏳', 'Pengajuan Sedang Diproses'), CheerfulNotification::getByKey('journalist.request_processing'),
CheerfulNotification::getMessage('Masih ada pengajuan penghapusan jurnalis yang sedang menunggu verifikasi.', 'Pengajuan penghapusan jurnalis ini masih dalam proses verifikasi admin.') CheerfulNotification::getByKey('journalist.deletion_request_processing')
)->send(); )->send();
return; return;
@ -63,16 +63,16 @@ protected function setUp(): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Permohonan Berhasil 🎉', 'Permohonan Berhasil'), CheerfulNotification::getByKey('journalist.request_success'),
CheerfulNotification::getMessage('Permohonan penghapusan jurnalis telah dikirim dan sedang menunggu verifikasi admin ⏳', 'Pengajuan penghapusan jurnalis telah berhasil dikirim.') CheerfulNotification::getByKey('journalist.deletion_request_success')
)->send(); )->send();
User::superAdmin() User::superAdmin()
->get() ->get()
->each(function ($admin) use ($user, $record, $dataChangeRequest): void { ->each(function ($admin) use ($user, $record, $dataChangeRequest): void {
$admin->notify(new BroadcastNotification([ $admin->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Ada Pengajuan Penghapusan Jurnalis ✨', 'Pengajuan Penghapusan Jurnalis'), 'title' => CheerfulNotification::getByKey('journalist.deletion_request_notif'),
'body' => CheerfulNotification::getMessage('Halooo Admin! 👋 '.$user->name.' baru saja mengajukan penghapusan jurnalis '.$record->name.'. Yuk, cek detailnya! 🚀', 'Pengguna '.$user->name.' telah mengajukan penghapusan jurnalis '.$record->name.'.'), 'body' => CheerfulNotification::getByKey('notification.user_submitted_journalist_change', ['user__name' => $user->name, 'record__name' => $record->name]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -22,8 +22,8 @@ protected function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->modalHeading(fn () => CheerfulNotification::getMessage('Sempurnakan Data Jurnalis 📝✨', 'Ubah Data Jurnalis')) $this->modalHeading(fn () => CheerfulNotification::getByKey('journalist.edit_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Ayo kita perbarui supaya data jurnalis makin akurat dan segar lagi! 🛠️👌', 'Silakan perbarui informasi jurnalis pada formulir di bawah ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('journalist.edit_desc'))
->modalWidth(Width::Large) ->modalWidth(Width::Large)
->successNotification(null) ->successNotification(null)
->fillForm(function (Journalist $journalist): array { ->fillForm(function (Journalist $journalist): array {
@ -61,8 +61,8 @@ protected function setUp(): void
if ($existingRequest) { if ($existingRequest) {
CheerfulNotification::warning( CheerfulNotification::warning(
CheerfulNotification::getMessage('Pengajuan Sudah Ada ⏳', 'Pengajuan Sedang Diproses'), CheerfulNotification::getByKey('journalist.request_processing'),
CheerfulNotification::getMessage('Masih ada pengajuan perubahan data yang sedang menunggu verifikasi.', 'Pengajuan perubahan data ini masih dalam proses verifikasi admin.') CheerfulNotification::getByKey('journalist.request_processing_desc')
)->send(); )->send();
return $record; return $record;
@ -121,8 +121,8 @@ protected function setUp(): void
if (empty($changedFields)) { if (empty($changedFields)) {
CheerfulNotification::info( CheerfulNotification::info(
CheerfulNotification::getMessage('Belum ada yang berubah ✨', 'Tidak Ada Perubahan'), CheerfulNotification::getByKey('journalist.no_change'),
CheerfulNotification::getMessage('Ubah data terlebih dulu lalu simpan kembali 💪', 'Silakan ubah data terlebih dahulu sebelum menyimpan.') CheerfulNotification::getByKey('journalist.no_change_desc')
)->send(); )->send();
return $record; return $record;
@ -138,16 +138,16 @@ protected function setUp(): void
]); ]);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Permohonan Berhasil 🎉', 'Permohonan Berhasil'), CheerfulNotification::getByKey('journalist.request_success'),
CheerfulNotification::getMessage('Data sudah dikirim dan sedang menunggu verifikasi admin ⏳', 'Pengajuan perubahan data telah berhasil dikirim.') CheerfulNotification::getByKey('journalist.request_success_desc')
)->send(); )->send();
User::superAdmin() User::superAdmin()
->get() ->get()
->each(function ($admin) use ($dataChangeRequest, $user): void { ->each(function ($admin) use ($dataChangeRequest, $user): void {
$admin->notify(new BroadcastNotification([ $admin->notify(new BroadcastNotification([
'title' => CheerfulNotification::getMessage('Ada Pengajuan Perubahan Jurnalis ✨', 'Pengajuan Perubahan Jurnalis'), 'title' => CheerfulNotification::getByKey('journalist.change_request_title'),
'body' => CheerfulNotification::getMessage('Halooo Admin! 👋 '.$user->name.' baru saja mengajukan perubahan data jurnalis. Yuk, cek detailnya! 🚀', 'Pengguna '.$user->name.' telah mengajukan perubahan data jurnalis.'), 'body' => CheerfulNotification::getByKey('notification.user_submitted_journalist_change', ['user__name' => $user->name]),
'action' => [ 'action' => [
Action::make('view') Action::make('view')
->label('Lihat') ->label('Lihat')

View File

@ -207,15 +207,15 @@ public static function table(Table $table): Table
])->visible(fn () => ! (in_array(auth()->user()->company?->verificationRequest?->status, [VerificationStatus::PENDING, VerificationStatus::REJECTED]) || auth()->user()->company?->verificationRequest()->pending()->exists())), ])->visible(fn () => ! (in_array(auth()->user()->company?->verificationRequest?->status, [VerificationStatus::PENDING, VerificationStatus::REJECTED]) || auth()->user()->company?->verificationRequest()->pending()->exists())),
]) ])
->emptyStateIcon(Heroicon::OutlinedIdentification) ->emptyStateIcon(Heroicon::OutlinedIdentification)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Jurnalis nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Jurnalis yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('journalist.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])
->deferLoading() ->deferLoading()
->when(fn () => auth()->user()->hasRole(RoleEnum::PERUSAHAAN->value) && ! auth()->user()->company?->partnerMedia, function (Table $table): Table { ->when(fn () => auth()->user()->hasRole(RoleEnum::PERUSAHAAN->value) && ! auth()->user()->company?->partnerMedia, function (Table $table): Table {
return $table return $table
->emptyStateHeading(fn () => CheerfulNotification::getMessage('Wah, Pintunya Dikunci Nih! 🔒✨', 'Akses Dibatasi')) ->emptyStateHeading(fn () => CheerfulNotification::getByKey('access.restricted'))
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Ups! Silakan lengkapi data media Anda dulu ya sebelum mengelola jurnalis. ✨📝', 'Silakan lengkapi data media Anda terlebih dahulu untuk dapat mengelola informasi jurnalis.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('access.complete_media_data'))
->emptyStateIcon(Heroicon::OutlinedLockClosed) ->emptyStateIcon(Heroicon::OutlinedLockClosed)
->emptyStateActions([ ->emptyStateActions([
Action::make('complete_media') Action::make('complete_media')

View File

@ -54,8 +54,8 @@ public static function infolist(Schema $schema): Schema
{ {
return $schema return $schema
->schema([ ->schema([
Section::make(fn () => CheerfulNotification::getMessage('Akun 👤', 'Akun')) Section::make(fn () => CheerfulNotification::getByKey('company.account_title'))
->description(fn () => CheerfulNotification::getMessage('Detail informasi akun pengguna yang terdaftar. ✨', 'Informasi detail mengenai akun pengguna.')) ->description(fn () => CheerfulNotification::getByKey('company.account_desc'))
->schema([ ->schema([
Grid::make(3) Grid::make(3)
->schema([ ->schema([
@ -79,8 +79,8 @@ public static function infolist(Schema $schema): Schema
]), ]),
]), ]),
Section::make(fn () => CheerfulNotification::getMessage('Perusahaan 🏢', 'Perusahaan')) Section::make(fn () => CheerfulNotification::getByKey('company.company_title'))
->description(fn () => CheerfulNotification::getMessage('Informasi lengkap mengenai profil dan legalitas perusahaan. 🏢✨', 'Informasi detail mengenai profil dan legalitas perusahaan.')) ->description(fn () => CheerfulNotification::getByKey('company.company_desc'))
->schema([ ->schema([
Grid::make(3) Grid::make(3)
->schema([ ->schema([
@ -122,7 +122,7 @@ public static function infolist(Schema $schema): Schema
Grid::make(3) Grid::make(3)
->schema([ ->schema([
Section::make(fn () => CheerfulNotification::getMessage('NIK Direktur 👤✨', 'NIK Direktur')) Section::make(fn () => CheerfulNotification::getByKey('company.director_nik'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-user' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-user' : null)
->schema([ ->schema([
TextEntry::make('company.director_nik') TextEntry::make('company.director_nik')
@ -157,7 +157,7 @@ public static function infolist(Schema $schema): Schema
}), }),
]), ]),
Section::make(fn () => CheerfulNotification::getMessage('Akta Pendirian 📄✨', 'Akta Pendirian')) Section::make(fn () => CheerfulNotification::getByKey('company.establishment_deed'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.deed_incorporation') TextEntry::make('company.deed_incorporation')
@ -166,7 +166,7 @@ public static function infolist(Schema $schema): Schema
self::fileEntry('company.deed_incorporation'), self::fileEntry('company.deed_incorporation'),
]), ]),
Section::make(fn () => CheerfulNotification::getMessage('SIUP / NIB 📄✨', 'SIUP / NIB')) Section::make(fn () => CheerfulNotification::getByKey('company.siup_nib'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.trade_license') TextEntry::make('company.trade_license')
@ -175,7 +175,7 @@ public static function infolist(Schema $schema): Schema
self::fileEntry('company.trade_license'), self::fileEntry('company.trade_license'),
]), ]),
Section::make(fn () => CheerfulNotification::getMessage('NPWP 📄✨', 'NPWP')) Section::make(fn () => CheerfulNotification::getByKey('company.npwp'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->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')
@ -184,7 +184,7 @@ public static function infolist(Schema $schema): Schema
self::fileEntry('company.tax_id_number'), self::fileEntry('company.tax_id_number'),
]), ]),
Section::make(fn () => CheerfulNotification::getMessage('PKP 📄✨', 'PKP')) Section::make(fn () => CheerfulNotification::getByKey('company.pkp'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.taxable_enterprise') TextEntry::make('company.taxable_enterprise')
@ -193,7 +193,7 @@ public static function infolist(Schema $schema): Schema
self::fileEntry('company.taxable_enterprise'), self::fileEntry('company.taxable_enterprise'),
]), ]),
Section::make(fn () => CheerfulNotification::getMessage('SPT Tahunan 📄✨', 'SPT Tahunan')) Section::make(fn () => CheerfulNotification::getByKey('company.annual_tax'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->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')
@ -202,7 +202,7 @@ public static function infolist(Schema $schema): Schema
self::fileEntry('company.annual_tax_return'), self::fileEntry('company.annual_tax_return'),
]), ]),
Section::make(fn () => CheerfulNotification::getMessage('SK Domisili 📄✨', 'SK Domisili')) Section::make(fn () => CheerfulNotification::getByKey('company.domicile'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.domicile_certificate') TextEntry::make('company.domicile_certificate')
@ -211,7 +211,7 @@ public static function infolist(Schema $schema): Schema
self::fileEntry('company.domicile_certificate'), self::fileEntry('company.domicile_certificate'),
]), ]),
Section::make(fn () => CheerfulNotification::getMessage('Profil Perusahaan 📄✨', 'Profil Perusahaan')) Section::make(fn () => CheerfulNotification::getByKey('company.company_profile'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('company.profile') TextEntry::make('company.profile')
@ -222,8 +222,8 @@ public static function infolist(Schema $schema): Schema
]), ]),
]), ]),
Section::make(fn () => CheerfulNotification::getMessage('Media 📺', 'Media')) Section::make(fn () => CheerfulNotification::getByKey('company.media_title'))
->description(fn () => CheerfulNotification::getMessage('Detail informasi media yang dikelola oleh perusahaan ini. 📺✨', 'Informasi detail mengenai media yang dikelola.')) ->description(fn () => CheerfulNotification::getByKey('company.media_desc'))
->schema([ ->schema([
Grid::make(4) Grid::make(4)
->schema([ ->schema([
@ -249,7 +249,7 @@ public static function infolist(Schema $schema): Schema
Grid::make(2) Grid::make(2)
->schema([ ->schema([
Section::make(fn () => CheerfulNotification::getMessage('Sertifikat Organisasi Kewartawanan 📄✨', 'Sertifikat Organisasi Kewartawanan')) Section::make(fn () => CheerfulNotification::getByKey('company.journalism_org_cert'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->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')
@ -258,7 +258,7 @@ public static function infolist(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::getMessage('Sertifikat Dewan Pers 📄✨', 'Sertifikat Dewan Pers')) Section::make(fn () => CheerfulNotification::getByKey('company.press_council_cert'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->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')
@ -269,8 +269,8 @@ public static function infolist(Schema $schema): Schema
]), ]),
]), ]),
Section::make(fn () => CheerfulNotification::getMessage('Jurnalis ✍️', 'Jurnalis')) Section::make(fn () => CheerfulNotification::getByKey('company.journalist_title'))
->description(fn () => CheerfulNotification::getMessage('Daftar jurnalis yang terdaftar di bawah bendera media ini. ✍️✨', 'Daftar jurnalis yang terdaftar pada media ini.')) ->description(fn () => CheerfulNotification::getByKey('company.journalist_desc'))
->schema([ ->schema([
RepeatableEntry::make('company.partnerMedia.journalists') RepeatableEntry::make('company.partnerMedia.journalists')
->hiddenLabel() ->hiddenLabel()
@ -288,7 +288,7 @@ public static function infolist(Schema $schema): Schema
]), ]),
Grid::make(2) Grid::make(2)
->schema([ ->schema([
Section::make(fn () => CheerfulNotification::getMessage('Kartu Pers 🆔✨', 'Kartu Pers')) Section::make(fn () => CheerfulNotification::getByKey('company.press_card'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-identification' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-identification' : null)
->schema([ ->schema([
TextEntry::make('press_card') TextEntry::make('press_card')
@ -297,7 +297,7 @@ public static function infolist(Schema $schema): Schema
self::fileEntry('press_card', null, 'journalists'), self::fileEntry('press_card', null, 'journalists'),
]), ]),
Section::make(fn () => CheerfulNotification::getMessage('Sertifikat UKW 📄✨', 'Sertifikat UKW')) Section::make(fn () => CheerfulNotification::getByKey('company.ukw_cert'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextEntry::make('ukw_certificate') TextEntry::make('ukw_certificate')
@ -415,7 +415,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedBuildingOffice2) ->emptyStateIcon(Heroicon::OutlinedBuildingOffice2)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada rekanan yang terdaftar nih. Yuk, ajak mereka bergabung dengan aplikasi kita! 🏢✨', 'Belum ada data rekanan yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('company.partner_empty'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -111,7 +111,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedListBullet) ->emptyStateIcon(Heroicon::OutlinedListBullet)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Kategori nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Kategori yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('category.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -19,8 +19,8 @@ protected function getHeaderActions(): array
return [ return [
CreateAction::make() CreateAction::make()
->label('Tambah') ->label('Tambah')
->modalHeading(fn () => CheerfulNotification::getMessage('Tambah Kategori Baru 🏷️✨', 'Tambah Kategori')) ->modalHeading(fn () => CheerfulNotification::getByKey('category.create_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Tambahkan kategori baru biar data makin teratur dan rapi! 📁😊', 'Silakan masukkan detail kategori data di bawah ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('category.create_desc'))
->modalSubmitActionLabel('Simpan') ->modalSubmitActionLabel('Simpan')
->modalCancelActionLabel('Batal') ->modalCancelActionLabel('Batal')
->extraModalFooterActions(fn (CreateAction $action): array => [ ->extraModalFooterActions(fn (CreateAction $action): array => [

View File

@ -111,7 +111,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedBookOpen) ->emptyStateIcon(Heroicon::OutlinedBookOpen)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Klasifikasi nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Klasifikasi yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('classification.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -19,8 +19,8 @@ protected function getHeaderActions(): array
return [ return [
CreateAction::make() CreateAction::make()
->label('Tambah') ->label('Tambah')
->modalHeading(fn () => CheerfulNotification::getMessage('Tambah Klasifikasi Baru 📂✨', 'Tambah Klasifikasi')) ->modalHeading(fn () => CheerfulNotification::getByKey('classification.create_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Bantu sistem mengelompokkan data dengan klasifikasi yang pas! 🧩😊', 'Silakan masukkan detail klasifikasi data di bawah ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('classification.create_desc'))
->modalSubmitActionLabel('Simpan') ->modalSubmitActionLabel('Simpan')
->modalCancelActionLabel('Batal') ->modalCancelActionLabel('Batal')
->extraModalFooterActions(fn (CreateAction $action): array => [ ->extraModalFooterActions(fn (CreateAction $action): array => [

View File

@ -122,7 +122,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedBuildingLibrary) ->emptyStateIcon(Heroicon::OutlinedBuildingLibrary)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data OPD nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data OPD yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('opd.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -19,8 +19,8 @@ protected function getHeaderActions(): array
return [ return [
CreateAction::make() CreateAction::make()
->label('Tambah') ->label('Tambah')
->modalHeading(fn () => CheerfulNotification::getMessage('Tambah OPD Baru 🏢✨', 'Tambah OPD')) ->modalHeading(fn () => CheerfulNotification::getByKey('opd.create_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Daftarkan instansi/OPD baru ke dalam sistem kita! 💪😊', 'Silakan masukkan detail instansi/OPD baru di bawah ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('opd.create_desc'))
->modalSubmitActionLabel('Simpan') ->modalSubmitActionLabel('Simpan')
->modalCancelActionLabel('Batal') ->modalCancelActionLabel('Batal')
->extraModalFooterActions(fn (CreateAction $action): array => [ ->extraModalFooterActions(fn (CreateAction $action): array => [

View File

@ -111,7 +111,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedMapPin) ->emptyStateIcon(Heroicon::OutlinedMapPin)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Lokus nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Lokus yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('locus.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -19,8 +19,8 @@ protected function getHeaderActions(): array
return [ return [
CreateAction::make() CreateAction::make()
->label('Tambah') ->label('Tambah')
->modalHeading(fn () => CheerfulNotification::getMessage('Tambah Lokus Baru 📍✨', 'Tambah Lokus')) ->modalHeading(fn () => CheerfulNotification::getByKey('locus.create_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Tentukan titik lokasi baru biar datanya makin presisi! 🗺️😊', 'Silakan masukkan detail lokasi/lokus data di bawah ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('locus.create_desc'))
->modalSubmitActionLabel('Simpan') ->modalSubmitActionLabel('Simpan')
->modalCancelActionLabel('Batal') ->modalCancelActionLabel('Batal')
->extraModalFooterActions(fn (CreateAction $action): array => [ ->extraModalFooterActions(fn (CreateAction $action): array => [

View File

@ -19,8 +19,8 @@ protected function getHeaderActions(): array
return [ return [
CreateAction::make() CreateAction::make()
->label('Tambah') ->label('Tambah')
->modalHeading(fn () => CheerfulNotification::getMessage('Tambah Subklasifikasi Baru 📑✨', 'Tambah Subklasifikasi')) ->modalHeading(fn () => CheerfulNotification::getByKey('classification.sub.create_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Perdalam klasifikasi data biar makin detail dan tertata! 🗂️😊', 'Silakan masukkan detail subklasifikasi data di bawah ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('classification.sub.create_desc'))
->modalSubmitActionLabel('Simpan') ->modalSubmitActionLabel('Simpan')
->modalCancelActionLabel('Batal') ->modalCancelActionLabel('Batal')
->extraModalFooterActions(fn (CreateAction $action): array => [ ->extraModalFooterActions(fn (CreateAction $action): array => [

View File

@ -92,8 +92,8 @@ public static function table(Table $table): Table
$record->save(); $record->save();
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Status Berubah! 🔄✨', 'Status Diperbarui'), CheerfulNotification::getByKey('status.updated'),
CheerfulNotification::getMessage('Status data berhasil diperbarui. Perubahan langsung aktif ya! 👍', 'Perubahan status data telah berhasil disimpan dan diterapkan.') CheerfulNotification::getByKey('status.update_success')
)->send(); )->send();
}), }),
@ -132,7 +132,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedQueueList) ->emptyStateIcon(Heroicon::OutlinedQueueList)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Subklasifikasi nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('user.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -19,8 +19,8 @@ protected function getHeaderActions(): array
return [ return [
CreateAction::make() CreateAction::make()
->label('Tambah') ->label('Tambah')
->modalHeading(fn () => CheerfulNotification::getMessage('Tambah Sublokus Baru 📌✨', 'Tambah Sublokus')) ->modalHeading(fn () => CheerfulNotification::getByKey('locus.sub.create_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Detailkan lebih dalam lagi titik lokasinya, ya! 📍😊', 'Silakan masukkan detail sublokus data di bawah ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('locus.sub.create_desc'))
->modalSubmitActionLabel('Simpan') ->modalSubmitActionLabel('Simpan')
->modalCancelActionLabel('Batal') ->modalCancelActionLabel('Batal')
->extraModalFooterActions(fn (CreateAction $action): array => [ ->extraModalFooterActions(fn (CreateAction $action): array => [

View File

@ -129,7 +129,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedNumberedList) ->emptyStateIcon(Heroicon::OutlinedNumberedList)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Sublokus nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Sublokus yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('locus.sub.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -19,8 +19,8 @@ protected function getHeaderActions(): array
return [ return [
CreateAction::make() CreateAction::make()
->label('Tambah') ->label('Tambah')
->modalHeading(fn () => CheerfulNotification::getMessage('Tambah Tema Baru 📂✨', 'Tambah Tema')) ->modalHeading(fn () => CheerfulNotification::getByKey('theme.create_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Ayo tambahkan tema biar pengelompokan makin lengkap! 📚😊', 'Silakan masukkan detail tema data di bawah ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('theme.create_desc'))
->modalSubmitActionLabel('Simpan') ->modalSubmitActionLabel('Simpan')
->modalCancelActionLabel('Batal') ->modalCancelActionLabel('Batal')
->extraModalFooterActions(fn (CreateAction $action): array => [ ->extraModalFooterActions(fn (CreateAction $action): array => [

View File

@ -105,7 +105,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedPuzzlePiece) ->emptyStateIcon(Heroicon::OutlinedPuzzlePiece)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Tema nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Tema yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('theme.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -19,8 +19,8 @@ protected function getHeaderActions(): array
return [ return [
CreateAction::make() CreateAction::make()
->label('Tambah') ->label('Tambah')
->modalHeading(fn () => CheerfulNotification::getMessage('Tambah Pengguna Baru 🚀✨', 'Tambah Pengguna')) ->modalHeading(fn () => CheerfulNotification::getByKey('user.create_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Yuk, buat akun baru biar makin lengkap penggunanya! 💪😊', 'Silakan masukkan detail akun pengguna baru di bawah ini.')) ->modalDescription(fn () => CheerfulNotification::getByKey('user.create_desc'))
->modalSubmitActionLabel('Simpan') ->modalSubmitActionLabel('Simpan')
->modalCancelActionLabel('Batal') ->modalCancelActionLabel('Batal')
->extraModalFooterActions(fn (CreateAction $action): array => [ ->extraModalFooterActions(fn (CreateAction $action): array => [

View File

@ -140,8 +140,8 @@ public static function table(Table $table): Table
} }
CheerfulNotification::success( CheerfulNotification::success(
$state ? CheerfulNotification::getMessage('Pengguna Diaktifkan! ✅', 'Pengguna Diaktifkan') : CheerfulNotification::getMessage('Pengguna Dinonaktifkan ⛔', 'Pengguna Dinonaktifkan'), $state ? CheerfulNotification::getByKey('user.activated') : CheerfulNotification::getByKey('user.deactivated'),
$state ? CheerfulNotification::getMessage('Status akun pengguna berhasil diaktifkan kembali. Siap beraksi! 🚀', 'Status akun pengguna telah berhasil diaktifkan kembali.') : CheerfulNotification::getMessage('Status akun pengguna berhasil dinonaktifkan. Istirahat dulu ya... 😴', 'Status akun pengguna telah berhasil dinonaktifkan.') $state ? CheerfulNotification::getByKey('user.status_activated_success') : CheerfulNotification::getByKey('user.status_activated_success')
)->send(); )->send();
}) })
->disabled(fn (User $record): bool => $record->hasRole(RoleEnum::PERUSAHAAN->value)), ->disabled(fn (User $record): bool => $record->hasRole(RoleEnum::PERUSAHAAN->value)),
@ -192,7 +192,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedUserGroup) ->emptyStateIcon(Heroicon::OutlinedUserGroup)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data pengguna nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('user.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -22,8 +22,8 @@ public static function configure(Schema $schema): Schema
{ {
return $schema return $schema
->components([ ->components([
Section::make(fn () => CheerfulNotification::getMessage('Informasi Konten 📝', 'Informasi Konten')) Section::make(fn () => CheerfulNotification::getByKey('content.section_title'))
->description(fn () => CheerfulNotification::getMessage('Lengkapi detail judul, tautan, dan jenis konten Anda biar makin keren! 🚀😊', 'Lengkapi detail judul, tautan, dan jenis konten Anda.')) ->description(fn () => CheerfulNotification::getByKey('content.section_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-document-text' : null)
->schema([ ->schema([
TextInput::make('title') TextInput::make('title')
@ -74,8 +74,8 @@ public static function configure(Schema $schema): Schema
]), ]),
])->columnSpan(2), ])->columnSpan(2),
Section::make(fn () => CheerfulNotification::getMessage('Klasifikasi & Lampiran 📁', 'Klasifikasi & Lampiran')) Section::make(fn () => CheerfulNotification::getByKey('content.attachment_title'))
->description(fn () => CheerfulNotification::getMessage('Pilih klasifikasi yang pas dan unggah gambar pendukung ya! 📁✨', 'Pilih klasifikasi yang sesuai dan unggah gambar pendukung.')) ->description(fn () => CheerfulNotification::getByKey('content.attachment_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-folder-open' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-folder-open' : null)
->schema([ ->schema([
Select::make('classification_id') Select::make('classification_id')

View File

@ -201,7 +201,7 @@ public static function configure(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedClipboardDocumentList) ->emptyStateIcon(Heroicon::OutlinedClipboardDocumentList)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Rekap Konten nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Rekap Konten yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('content.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -20,8 +20,8 @@ public static function configure(Schema $schema): Schema
{ {
return $schema return $schema
->components([ ->components([
Section::make(fn () => CheerfulNotification::getMessage('Identifikasi Isu 🔍', 'Identifikasi Isu')) Section::make(fn () => CheerfulNotification::getByKey('issue.identification_title'))
->description(fn () => CheerfulNotification::getMessage('Yuk, hubungkan dengan berita monitoring dan tentukan lokasi isunya! 🔍✨', 'Hubungkan dengan berita monitoring dan tentukan lokasi isu.')) ->description(fn () => CheerfulNotification::getByKey('issue.identification_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-magnifying-glass' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-magnifying-glass' : null)
->schema([ ->schema([
Select::make('media_monitoring_id') Select::make('media_monitoring_id')
@ -73,8 +73,8 @@ public static function configure(Schema $schema): Schema
->columnSpanFull(), ->columnSpanFull(),
])->columnSpan(2), ])->columnSpan(2),
Section::make(fn () => CheerfulNotification::getMessage('Sentimen & Klasifikasi 📊', 'Sentimen & Klasifikasi')) Section::make(fn () => CheerfulNotification::getByKey('issue.sentiment_title'))
->description(fn () => CheerfulNotification::getMessage('Tentukan sentimen isu, respon, dan kategorinya biar makin jelas! 📊✨', 'Tentukan sentimen isu, respon, dan kategori klasifikasinya.')) ->description(fn () => CheerfulNotification::getByKey('issue.sentiment_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-chart-bar' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-chart-bar' : null)
->schema([ ->schema([
Select::make('issue') Select::make('issue')

View File

@ -229,7 +229,7 @@ public static function configure(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedExclamationCircle) ->emptyStateIcon(Heroicon::OutlinedExclamationCircle)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Manajemen Isu nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Manajemen Isu yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('issue.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -47,13 +47,13 @@ protected function setUp(): void
if ($count > 0) { if ($count > 0) {
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getMessage('Crawl Berhasil! 🕸️🚀', 'Crawl Selesai'), CheerfulNotification::getByKey('crawl.success'),
CheerfulNotification::getMessage("Mantap! Ada {$count} berita baru nih tentang '{$data['keyword']}' di Purwakarta. Databasenya makin kaya! 😎", "Berhasil mendapatkan {$count} berita baru terkait kata kunci '{$data['keyword']}'.") CheerfulNotification::getByKey('news.content.fetch_success', ['count' => $count, 'data__keyword' => $data['keyword']])
)->send(); )->send();
} else { } else {
CheerfulNotification::info( CheerfulNotification::info(
CheerfulNotification::getMessage('Belum Ada Berita Baru 🔍', 'Tidak Ada Berita Baru'), CheerfulNotification::getByKey('news.no_new_data'),
CheerfulNotification::getMessage("Hmm, sepertinya belum ada update berita baru untuk '{$data['keyword']}'. Coba lagi nanti ya! 😉", "Tidak ditemukan berita baru untuk kata kunci '{$data['keyword']}' saat ini.") CheerfulNotification::getByKey('news.content.fetch_empty', ['data__keyword' => $data['keyword']])
)->send(); )->send();
} }
}) })

View File

@ -21,8 +21,8 @@ public static function configure(Schema $schema): Schema
{ {
return $schema return $schema
->components([ ->components([
Section::make(fn () => CheerfulNotification::getMessage('Detail Berita 📰', 'Detail Berita')) Section::make(fn () => CheerfulNotification::getByKey('news.detail_title'))
->description(fn () => CheerfulNotification::getMessage('Masukkan informasi lengkap mengenai pemberitaan media biar makin lengkap! 📰✨', 'Masukkan informasi lengkap mengenai pemberitaan media.')) ->description(fn () => CheerfulNotification::getByKey('news.detail_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-newspaper' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-newspaper' : null)
->schema([ ->schema([
TextInput::make('media_name') TextInput::make('media_name')
@ -75,8 +75,8 @@ public static function configure(Schema $schema): Schema
->required(), ->required(),
])->columnSpan(2), ])->columnSpan(2),
Section::make(fn () => CheerfulNotification::getMessage('Kategori & Metadata 🏷️', 'Kategori & Metadata')) Section::make(fn () => CheerfulNotification::getByKey('news.category_title'))
->description(fn () => CheerfulNotification::getMessage('Tentukan kategori berita dan informasi tambahan lainnya biar makin rapi! 🏷️✨', 'Tentukan kategori berita dan informasi tambahan lainnya.')) ->description(fn () => CheerfulNotification::getByKey('news.category_desc'))
->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-tag' : null) ->icon(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-tag' : null)
->schema([ ->schema([
Select::make('channel') Select::make('channel')

View File

@ -214,7 +214,7 @@ public static function configure(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedClipboardDocumentCheck) ->emptyStateIcon(Heroicon::OutlinedClipboardDocumentCheck)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Monitoring Media nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Monitoring Media yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('news.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -162,7 +162,7 @@ public static function table(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedMegaphone) ->emptyStateIcon(Heroicon::OutlinedMegaphone)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Pengumuman nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Pengumuman yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('announcement.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -24,8 +24,8 @@ protected function getHeaderActions(): array
return [ return [
CreateAction::make() CreateAction::make()
->label('Tambah') ->label('Tambah')
->modalHeading(fn () => CheerfulNotification::getMessage('Buat Pengumuman Baru 📢✨', 'Tambah Pengumuman')) ->modalHeading(fn () => CheerfulNotification::getByKey('announcement.create_title'))
->modalDescription(fn () => CheerfulNotification::getMessage('Siarkan kabar terbaru ke seluruh sistem biar semua orang tetap update! 🚀😊', 'Silakan isi formulir di bawah ini untuk membuat pengumuman baru.')) ->modalDescription(fn () => CheerfulNotification::getByKey('announcement.create_desc'))
->modalSubmitActionLabel('Simpan') ->modalSubmitActionLabel('Simpan')
->modalCancelActionLabel('Batal') ->modalCancelActionLabel('Batal')
->extraModalFooterActions(fn (CreateAction $action): array => [ ->extraModalFooterActions(fn (CreateAction $action): array => [

View File

@ -27,8 +27,8 @@ public static function configure(Schema $schema): Schema
Hidden::make('author_id') Hidden::make('author_id')
->default(auth()->id()), ->default(auth()->id()),
Section::make(CheerfulNotification::getMessage('Konten Berita ✍️', 'Konten Berita')) Section::make(CheerfulNotification::getByKey('news.content.title'))
->description(CheerfulNotification::getMessage('Yuk, tuliskan judul, ringkasan, dan isi lengkap berita Anda biar makin menarik! 🚀😊', 'Silakan tuliskan judul, ringkasan, dan isi lengkap berita Anda.')) ->description(CheerfulNotification::getByKey('news.content.desc'))
->icon(CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-pencil-square' : null) ->icon(CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-pencil-square' : null)
->schema([ ->schema([
TextInput::make('title') TextInput::make('title')
@ -52,8 +52,8 @@ public static function configure(Schema $schema): Schema
->columnSpanFull(), ->columnSpanFull(),
])->columnSpan(2), ])->columnSpan(2),
Section::make(CheerfulNotification::getMessage('Kategori & Publikasi 🏷️', 'Kategori & Publikasi')) Section::make(CheerfulNotification::getByKey('news.content.category_title'))
->description(CheerfulNotification::getMessage('Tentukan kategori, tautan media, dan status publikasi biar berita kita gampang dicari! 🏷️✨', 'Tentukan kategori, tautan media, dan status publikasi.')) ->description(CheerfulNotification::getByKey('news.content.category_desc'))
->icon(CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-tag' : null) ->icon(CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL ? 'heroicon-o-tag' : null)
->schema([ ->schema([
TextInput::make('link') TextInput::make('link')

View File

@ -115,7 +115,7 @@ public static function configure(Table $table): Table
]), ]),
]) ])
->emptyStateIcon(Heroicon::OutlinedNewspaper) ->emptyStateIcon(Heroicon::OutlinedNewspaper)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Berita nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Berita yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('news.content.empty_state'))
->defaultSort('created_at', 'desc') ->defaultSort('created_at', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -168,7 +168,7 @@ public static function table(Table $table): Table
], FiltersLayout::AboveContentCollapsible) ], FiltersLayout::AboveContentCollapsible)
->filtersFormColumns(3) ->filtersFormColumns(3)
->emptyStateIcon(Heroicon::OutlinedChartBar) ->emptyStateIcon(Heroicon::OutlinedChartBar)
->emptyStateDescription(fn () => CheerfulNotification::getMessage('Belum ada data Pengunjung nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨', 'Belum ada data Pengunjung yang tersedia saat ini.')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('visitor.empty_state'))
->defaultSort('date', 'desc') ->defaultSort('date', 'desc')
->deferFilters(false) ->deferFilters(false)
->paginated([25, 50, 100, 'all']) ->paginated([25, 50, 100, 'all'])

View File

@ -29,91 +29,73 @@ public static function getNotifStyle(): NotifStyle
public static function create(): Notification public static function create(): Notification
{ {
$cheerful = self::getNotifStyle() === NotifStyle::CHEERFUL;
return self::make() return self::make()
->title($cheerful ? 'Hore! Data Tersimpan 🎉✨' : 'Data Berhasil Disimpan') ->title(self::getByKey('create.title'))
->body($cheerful ? 'Data baru berhasil ditambahkan! Sistem sudah menyimpannya dengan aman. 🚀💪' : 'Data baru telah berhasil ditambahkan ke dalam sistem.') ->body(self::getByKey('create.body'))
->success(); ->success();
} }
public static function update(): Notification public static function update(): Notification
{ {
$cheerful = self::getNotifStyle() === NotifStyle::CHEERFUL;
return self::make() return self::make()
->title($cheerful ? 'Mantap! Data Diperbarui ✅🔥' : 'Perubahan Tersimpan') ->title(self::getByKey('update.title'))
->body($cheerful ? 'Perubahan berhasil disimpan! Data sekarang sudah up-to-date dan segar lagi. ✨👌' : 'Perubahan pada data telah berhasil diperbarui dan disimpan.') ->body(self::getByKey('update.body'))
->success(); ->success();
} }
public static function delete(): Notification public static function delete(): Notification
{ {
$cheerful = self::getNotifStyle() === NotifStyle::CHEERFUL;
return self::make() return self::make()
->title($cheerful ? 'Oke, Data Dihapus 🗑️👋' : 'Data Dihapus') ->title(self::getByKey('delete.title'))
->body($cheerful ? 'Data tersebut sudah berhasil dihapus dari sistem. Semuanya bersih dan rapi sekarang! 😊🚮' : 'Data tersebut telah berhasil dihapus dari sistem aplikasi.') ->body(self::getByKey('delete.body'))
->success(); ->success();
} }
public static function forceDelete(): Notification public static function forceDelete(): Notification
{ {
$cheerful = self::getNotifStyle() === NotifStyle::CHEERFUL;
return self::make() return self::make()
->title($cheerful ? 'Selamat Tinggal Selamanya 👋😢' : 'Data Dihapus Permanen') ->title(self::getByKey('force_delete.title'))
->body($cheerful ? 'Data telah dihapus permanen dan tidak bisa kembali. Semoga ini keputusan yang tepat! 🚮💨' : 'Data tersebut telah dihapus secara permanen dari sistem.') ->body(self::getByKey('force_delete.body'))
->success(); ->success();
} }
public static function restore(): Notification public static function restore(): Notification
{ {
$cheerful = self::getNotifStyle() === NotifStyle::CHEERFUL;
return self::make() return self::make()
->title($cheerful ? 'Welcome Back! Data Pulih ♻️✨' : 'Data Berhasil Dipulihkan') ->title(self::getByKey('restore.title'))
->body($cheerful ? 'Data berhasil dikembalikan! Hati-hati ya, jangan sampai terhapus lagi. 😉👍' : 'Data yang dihapus sebelumnya telah berhasil dipulihkan ke dalam sistem.') ->body(self::getByKey('restore.body'))
->success(); ->success();
} }
public static function statusUpdated(?string $title = null, ?string $body = null): Notification public static function statusUpdated(?string $title = null, ?string $body = null): Notification
{ {
$cheerful = self::getNotifStyle() === NotifStyle::CHEERFUL;
return self::make() return self::make()
->title($title ?? ($cheerful ? 'Status Berubah! 🔄✨' : 'Status Diperbarui')) ->title($title ?? self::getByKey('status_updated.title'))
->body($body ?? ($cheerful ? 'Status data berhasil diperbarui. Perubahan langsung aktif ya! 👍' : 'Status data telah berhasil diperbarui dan telah diterapkan.')) ->body($body ?? self::getByKey('status_updated.body'))
->success(); ->success();
} }
public static function bulkDelete(): Notification public static function bulkDelete(): Notification
{ {
$cheerful = self::getNotifStyle() === NotifStyle::CHEERFUL;
return self::make() return self::make()
->title($cheerful ? 'Oke, Banyak Data Dihapus 🗑️👋' : 'Data Berhasil Dihapus') ->title(self::getByKey('bulk_delete.title'))
->body($cheerful ? 'Semua data yang dipilih berhasil dihapus. Sistem makin lega deh! 😊' : 'Seluruh data yang dipilih telah berhasil dihapus dari sistem.') ->body(self::getByKey('bulk_delete.body'))
->success(); ->success();
} }
public static function bulkForceDelete(): Notification public static function bulkForceDelete(): Notification
{ {
$cheerful = self::getNotifStyle() === NotifStyle::CHEERFUL;
return self::make() return self::make()
->title($cheerful ? 'Bye Bye Semua! 👋🔥' : 'Data Dihapus Permanen') ->title(self::getByKey('bulk_force_delete.title'))
->body($cheerful ? 'Data yang dipilih sudah dihapus permanen. Bersih total! 🧹💨' : 'Data yang dipilih telah berhasil dihapus secara permanen.') ->body(self::getByKey('bulk_force_delete.body'))
->success(); ->success();
} }
public static function bulkRestore(): Notification public static function bulkRestore(): Notification
{ {
$cheerful = self::getNotifStyle() === NotifStyle::CHEERFUL;
return self::make() return self::make()
->title($cheerful ? 'Hore! Banyak Data Pulih ♻️🎉' : 'Data Berhasil Dipulihkan') ->title(self::getByKey('bulk_restore.title'))
->body($cheerful ? 'Data-data tersebut sudah kembali aktif. Selamat bekerja kembali! 💪✨' : 'Seluruh data yang dipilih telah berhasil dikembalikan ke posisi semula.') ->body(self::getByKey('bulk_restore.body'))
->success(); ->success();
} }
@ -162,10 +144,16 @@ public static function danger(string $title, string $body): Notification
} }
/** /**
* Get dynamic message based on UX style. * Get dynamic message based on UX style from language file.
*/ */
public static function getMessage(string $cheerful, string $formal): string public static function getByKey(?string $key = null, array $replace = []): string
{ {
return self::getNotifStyle() === NotifStyle::CHEERFUL ? $cheerful : $formal; if (! $key) {
return '';
}
$style = self::getNotifStyle()->value;
return __("notif.{$key}.{$style}", $replace);
} }
} }

View File

@ -143,6 +143,7 @@ public function panel(Panel $panel): Panel
]) ])
->databaseNotifications() ->databaseNotifications()
->databaseNotificationsPolling('30s') ->databaseNotificationsPolling('30s')
->globalSearch(false); ->globalSearch(false)
->spa();
} }
} }

1511
lang/id/notif.php Normal file

File diff suppressed because it is too large Load Diff