refactor: update enum labels to use localized strings for improved clarity and user experience
This commit is contained in:
parent
2c90380d3b
commit
94ed87b3bd
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Enums;
|
namespace App\Enums;
|
||||||
|
|
||||||
use App\Filament\Support\CheerfulNotification;
|
|
||||||
use App\Traits\Enum\WithComment;
|
use App\Traits\Enum\WithComment;
|
||||||
use App\Traits\Enum\WithValue;
|
use App\Traits\Enum\WithValue;
|
||||||
use Filament\Support\Contracts\HasColor;
|
use Filament\Support\Contracts\HasColor;
|
||||||
@ -19,9 +18,9 @@ enum ApprovalStatus: int implements HasColor, HasLabel
|
|||||||
public function getLabel(): ?string
|
public function getLabel(): ?string
|
||||||
{
|
{
|
||||||
return match ($this) {
|
return match ($this) {
|
||||||
self::PENDING => CheerfulNotification::getByKey('enum.approval_status.pending'),
|
self::PENDING => 'Menunggu',
|
||||||
self::ACCEPTED => CheerfulNotification::getByKey('enum.approval_status.accepted'),
|
self::ACCEPTED => 'Menerima',
|
||||||
self::REJECTED => CheerfulNotification::getByKey('enum.approval_status.rejected'),
|
self::REJECTED => 'Menolak',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Enums;
|
namespace App\Enums;
|
||||||
|
|
||||||
use App\Filament\Support\CheerfulNotification;
|
|
||||||
use App\Traits\Enum\WithComment;
|
use App\Traits\Enum\WithComment;
|
||||||
use App\Traits\Enum\WithValue;
|
use App\Traits\Enum\WithValue;
|
||||||
use Filament\Support\Contracts\HasColor;
|
use Filament\Support\Contracts\HasColor;
|
||||||
@ -21,11 +20,11 @@ enum CooperationStatus: int implements HasColor, HasLabel
|
|||||||
public function getLabel(): ?string
|
public function getLabel(): ?string
|
||||||
{
|
{
|
||||||
return match ($this) {
|
return match ($this) {
|
||||||
self::PENDING => CheerfulNotification::getByKey('enum.cooperation_status.pending'),
|
self::PENDING => 'Menunggu',
|
||||||
self::ASSIGNMENT => CheerfulNotification::getByKey('enum.cooperation_status.assignment'),
|
self::ASSIGNMENT => 'Media Order',
|
||||||
self::VERIFICATION => CheerfulNotification::getByKey('enum.cooperation_status.verification'),
|
self::VERIFICATION => 'Verifikasi',
|
||||||
self::PAYMENT => CheerfulNotification::getByKey('enum.cooperation_status.payment'),
|
self::PAYMENT => 'Pembayaran',
|
||||||
self::COMPLETED => CheerfulNotification::getByKey('enum.cooperation_status.completed'),
|
self::COMPLETED => 'Selesai',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Enums;
|
namespace App\Enums;
|
||||||
|
|
||||||
use App\Filament\Support\CheerfulNotification;
|
|
||||||
use App\Traits\Enum\WithComment;
|
use App\Traits\Enum\WithComment;
|
||||||
use App\Traits\Enum\WithValue;
|
use App\Traits\Enum\WithValue;
|
||||||
use Filament\Support\Contracts\HasColor;
|
use Filament\Support\Contracts\HasColor;
|
||||||
@ -18,8 +17,8 @@ enum DataChangeDecision: int implements HasColor, HasLabel
|
|||||||
public function getLabel(): ?string
|
public function getLabel(): ?string
|
||||||
{
|
{
|
||||||
return match ($this) {
|
return match ($this) {
|
||||||
self::APPROVED => CheerfulNotification::getByKey('enum.data_change_decision.approved'),
|
self::APPROVED => 'Disetujui',
|
||||||
self::REJECTED => CheerfulNotification::getByKey('enum.data_change_decision.rejected'),
|
self::REJECTED => 'Ditolak',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Enums;
|
namespace App\Enums;
|
||||||
|
|
||||||
use App\Filament\Support\CheerfulNotification;
|
|
||||||
use App\Traits\Enum\WithComment;
|
use App\Traits\Enum\WithComment;
|
||||||
use App\Traits\Enum\WithValue;
|
use App\Traits\Enum\WithValue;
|
||||||
use Filament\Support\Contracts\HasColor;
|
use Filament\Support\Contracts\HasColor;
|
||||||
@ -19,9 +18,9 @@ enum DataChangeStatus: int implements HasColor, HasLabel
|
|||||||
public function getLabel(): ?string
|
public function getLabel(): ?string
|
||||||
{
|
{
|
||||||
return match ($this) {
|
return match ($this) {
|
||||||
self::PENDING => CheerfulNotification::getByKey('enum.data_change_status.pending'),
|
self::PENDING => 'Menunggu Verifikasi',
|
||||||
self::APPROVED => CheerfulNotification::getByKey('enum.data_change_status.approved'),
|
self::APPROVED => 'Disetujui',
|
||||||
self::REJECTED => CheerfulNotification::getByKey('enum.data_change_status.rejected'),
|
self::REJECTED => 'Ditolak',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Enums;
|
namespace App\Enums;
|
||||||
|
|
||||||
use App\Filament\Support\CheerfulNotification;
|
|
||||||
use App\Traits\Enum\WithComment;
|
use App\Traits\Enum\WithComment;
|
||||||
use App\Traits\Enum\WithValue;
|
use App\Traits\Enum\WithValue;
|
||||||
use Filament\Support\Contracts\HasColor;
|
use Filament\Support\Contracts\HasColor;
|
||||||
@ -19,9 +18,9 @@ enum DecisionAdmin: int implements HasColor, HasLabel
|
|||||||
public function getLabel(): ?string
|
public function getLabel(): ?string
|
||||||
{
|
{
|
||||||
return match ($this) {
|
return match ($this) {
|
||||||
self::APPROVED => CheerfulNotification::getByKey('enum.decision_admin.approved'),
|
self::APPROVED => 'Disetujui',
|
||||||
self::NEED_REVISION => CheerfulNotification::getByKey('enum.decision_admin.need_revision'),
|
self::NEED_REVISION => 'Perlu Revisi',
|
||||||
self::REJECTED => CheerfulNotification::getByKey('enum.decision_admin.rejected'),
|
self::REJECTED => 'Ditolak',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Enums;
|
namespace App\Enums;
|
||||||
|
|
||||||
use App\Filament\Support\CheerfulNotification;
|
|
||||||
use App\Traits\Enum\WithComment;
|
use App\Traits\Enum\WithComment;
|
||||||
use App\Traits\Enum\WithValue;
|
use App\Traits\Enum\WithValue;
|
||||||
use Filament\Support\Contracts\HasLabel;
|
use Filament\Support\Contracts\HasLabel;
|
||||||
@ -18,9 +17,9 @@ enum NewsStatus: int implements HasLabel
|
|||||||
public function getLabel(): ?string
|
public function getLabel(): ?string
|
||||||
{
|
{
|
||||||
return match ($this) {
|
return match ($this) {
|
||||||
self::DRAFT => CheerfulNotification::getByKey('enum.news_status.draft'),
|
self::DRAFT => 'Draft',
|
||||||
self::PUBLISHED => CheerfulNotification::getByKey('enum.news_status.published'),
|
self::PUBLISHED => 'Publish',
|
||||||
self::ARCHIVED => CheerfulNotification::getByKey('enum.news_status.archived'),
|
self::ARCHIVED => 'Arsip',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Enums;
|
namespace App\Enums;
|
||||||
|
|
||||||
use App\Filament\Support\CheerfulNotification;
|
|
||||||
use App\Traits\Enum\WithComment;
|
use App\Traits\Enum\WithComment;
|
||||||
use App\Traits\Enum\WithValue;
|
use App\Traits\Enum\WithValue;
|
||||||
use Filament\Support\Contracts\HasColor;
|
use Filament\Support\Contracts\HasColor;
|
||||||
@ -20,10 +19,10 @@ enum VerificationStatus: int implements HasColor, HasLabel
|
|||||||
public function getLabel(): ?string
|
public function getLabel(): ?string
|
||||||
{
|
{
|
||||||
return match ($this) {
|
return match ($this) {
|
||||||
self::PENDING => CheerfulNotification::getByKey('enum.verification_status.pending'),
|
self::PENDING => 'Menunggu Verifikasi',
|
||||||
self::APPROVED => CheerfulNotification::getByKey('enum.verification_status.approved'),
|
self::APPROVED => 'Disetujui',
|
||||||
self::NEED_REVISION => CheerfulNotification::getByKey('enum.verification_status.need_revision'),
|
self::NEED_REVISION => 'Perlu Revisi',
|
||||||
self::REJECTED => CheerfulNotification::getByKey('enum.verification_status.rejected'),
|
self::REJECTED => 'Ditolak',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -653,114 +653,6 @@
|
|||||||
'formal' => 'Tidak Ada Pengajuan Perubahan',
|
'formal' => 'Tidak Ada Pengajuan Perubahan',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'enum' => [
|
|
||||||
'news_status' => [
|
|
||||||
'draft' => [
|
|
||||||
'cheerful' => 'Draft - Sempurnakan Lagi! ✍️🛠️',
|
|
||||||
'formal' => 'Draft',
|
|
||||||
],
|
|
||||||
'published' => [
|
|
||||||
'cheerful' => 'Telah Tayang! 🚀✨',
|
|
||||||
'formal' => 'Publish',
|
|
||||||
],
|
|
||||||
'archived' => [
|
|
||||||
'cheerful' => 'Arsip - Disimpan Dulu Ya! 📦🔒',
|
|
||||||
'formal' => 'Arsip',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'data_change_decision' => [
|
|
||||||
'approved' => [
|
|
||||||
'cheerful' => 'Perubahan Disetujui! ✅🚀',
|
|
||||||
'formal' => 'Disetujui',
|
|
||||||
],
|
|
||||||
'rejected' => [
|
|
||||||
'cheerful' => 'Perubahan Ditolak 🛑😔',
|
|
||||||
'formal' => 'Ditolak',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'decision_admin' => [
|
|
||||||
'approved' => [
|
|
||||||
'cheerful' => 'Sudah Disetujui! ✅🚀',
|
|
||||||
'formal' => 'Disetujui',
|
|
||||||
],
|
|
||||||
'need_revision' => [
|
|
||||||
'cheerful' => 'Perlu Revisi nih! ✍️🛠️',
|
|
||||||
'formal' => 'Perlu Revisi',
|
|
||||||
],
|
|
||||||
'rejected' => [
|
|
||||||
'cheerful' => 'Ditolak, Tetap Semangat! 🛑😔',
|
|
||||||
'formal' => 'Ditolak',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'approval_status' => [
|
|
||||||
'pending' => [
|
|
||||||
'cheerful' => 'Menunggu Persetujuan ⏳✨',
|
|
||||||
'formal' => 'Menunggu',
|
|
||||||
],
|
|
||||||
'accepted' => [
|
|
||||||
'cheerful' => 'Diterima! ✅🚀',
|
|
||||||
'formal' => 'Menerima',
|
|
||||||
],
|
|
||||||
'rejected' => [
|
|
||||||
'cheerful' => 'Ditolak, Tetap Semangat! 🛑😔',
|
|
||||||
'formal' => 'Menolak',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'data_change_status' => [
|
|
||||||
'pending' => [
|
|
||||||
'cheerful' => 'Menunggu Verifikasi ⏳✨',
|
|
||||||
'formal' => 'Menunggu Verifikasi',
|
|
||||||
],
|
|
||||||
'approved' => [
|
|
||||||
'cheerful' => 'Perubahan Disetujui! ✅🚀',
|
|
||||||
'formal' => 'Disetujui',
|
|
||||||
],
|
|
||||||
'rejected' => [
|
|
||||||
'cheerful' => 'Perubahan Ditolak 🛑😔',
|
|
||||||
'formal' => 'Ditolak',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'verification_status' => [
|
|
||||||
'pending' => [
|
|
||||||
'cheerful' => 'Menunggu Verifikasi ⏳✨',
|
|
||||||
'formal' => 'Menunggu Verifikasi',
|
|
||||||
],
|
|
||||||
'approved' => [
|
|
||||||
'cheerful' => 'Sudah Disetujui! ✅🚀',
|
|
||||||
'formal' => 'Disetujui',
|
|
||||||
],
|
|
||||||
'need_revision' => [
|
|
||||||
'cheerful' => 'Perlu Revisi nih! ✍️🛠️',
|
|
||||||
'formal' => 'Perlu Revisi',
|
|
||||||
],
|
|
||||||
'rejected' => [
|
|
||||||
'cheerful' => 'Ditolak, Tetap Semangat! 🛑😔',
|
|
||||||
'formal' => 'Ditolak',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'cooperation_status' => [
|
|
||||||
'pending' => [
|
|
||||||
'cheerful' => 'Menunggu... Tetap Sabar Ya! ⏳✨',
|
|
||||||
'formal' => 'Menunggu',
|
|
||||||
],
|
|
||||||
'assignment' => [
|
|
||||||
'cheerful' => 'Sedang Ditugaskan nih! 📋🛠️',
|
|
||||||
'formal' => 'Media Order',
|
|
||||||
],
|
|
||||||
'verification' => [
|
|
||||||
'cheerful' => 'Lagi Diverifikasi, Tunggu Sebentar! 🔍✅',
|
|
||||||
'formal' => 'Verifikasi',
|
|
||||||
],
|
|
||||||
'payment' => [
|
|
||||||
'cheerful' => 'Waktunya Pembayaran! 💵🚀',
|
|
||||||
'formal' => 'Pembayaran',
|
|
||||||
],
|
|
||||||
'completed' => [
|
|
||||||
'cheerful' => 'Selesai! Mantap Jiwa! 🎉🔥',
|
|
||||||
'formal' => 'Selesai',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'visitor' => [
|
'visitor' => [
|
||||||
'empty_state' => [
|
'empty_state' => [
|
||||||
'cheerful' => 'Belum ada data Pengunjung nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨',
|
'cheerful' => 'Belum ada data Pengunjung nih! Mulai buat data pertama sekarang biar makin rame! 🚀✨',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user