feat: Integrate cheerful notifications into various status enums, enhancing user feedback with engaging messages for approval, cooperation, data change, and news statuses.
This commit is contained in:
parent
c23e7517f0
commit
1c063c4c79
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Filament\Support\CheerfulNotification;
|
||||
use App\Traits\Enum\WithComment;
|
||||
use App\Traits\Enum\WithValue;
|
||||
use Filament\Support\Contracts\HasColor;
|
||||
@ -18,9 +19,9 @@ enum ApprovalStatus: int implements HasColor, HasLabel
|
||||
public function getLabel(): ?string
|
||||
{
|
||||
return match ($this) {
|
||||
self::PENDING => 'Menunggu',
|
||||
self::ACCEPTED => 'Menerima',
|
||||
self::REJECTED => 'Menolak',
|
||||
self::PENDING => CheerfulNotification::getMessage('Menunggu Persetujuan ⏳✨', 'Menunggu'),
|
||||
self::ACCEPTED => CheerfulNotification::getMessage('Diterima! ✅🚀', 'Menerima'),
|
||||
self::REJECTED => CheerfulNotification::getMessage('Ditolak, Tetap Semangat! 🛑😔', 'Menolak'),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Filament\Support\CheerfulNotification;
|
||||
use App\Traits\Enum\WithComment;
|
||||
use App\Traits\Enum\WithValue;
|
||||
use Filament\Support\Contracts\HasColor;
|
||||
@ -20,11 +21,11 @@ enum CooperationStatus: int implements HasColor, HasLabel
|
||||
public function getLabel(): ?string
|
||||
{
|
||||
return match ($this) {
|
||||
self::PENDING => 'Menunggu',
|
||||
self::ASSIGNMENT => 'Penugasan',
|
||||
self::VERIFICATION => 'Verifikasi',
|
||||
self::PAYMENT => 'Pembayaran',
|
||||
self::COMPLETED => 'Selesai',
|
||||
self::PENDING => CheerfulNotification::getMessage('Menunggu... Tetap Sabar Ya! ⏳✨', 'Menunggu'),
|
||||
self::ASSIGNMENT => CheerfulNotification::getMessage('Sedang Ditugaskan nih! 📋🛠️', 'Penugasan'),
|
||||
self::VERIFICATION => CheerfulNotification::getMessage('Lagi Diverifikasi, Tunggu Sebentar! 🔍✅', 'Verifikasi'),
|
||||
self::PAYMENT => CheerfulNotification::getMessage('Waktunya Pembayaran! 💵🚀', 'Pembayaran'),
|
||||
self::COMPLETED => CheerfulNotification::getMessage('Selesai! Mantap Jiwa! 🎉🔥', 'Selesai'),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Filament\Support\CheerfulNotification;
|
||||
use App\Traits\Enum\WithComment;
|
||||
use App\Traits\Enum\WithValue;
|
||||
use Filament\Support\Contracts\HasColor;
|
||||
@ -17,8 +18,8 @@ enum DataChangeDecision: int implements HasColor, HasLabel
|
||||
public function getLabel(): ?string
|
||||
{
|
||||
return match ($this) {
|
||||
self::APPROVED => 'Disetujui',
|
||||
self::REJECTED => 'Ditolak',
|
||||
self::APPROVED => CheerfulNotification::getMessage('Perubahan Disetujui! ✅🚀', 'Disetujui'),
|
||||
self::REJECTED => CheerfulNotification::getMessage('Perubahan Ditolak 🛑😔', 'Ditolak'),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Filament\Support\CheerfulNotification;
|
||||
use App\Traits\Enum\WithComment;
|
||||
use App\Traits\Enum\WithValue;
|
||||
use Filament\Support\Contracts\HasColor;
|
||||
@ -18,9 +19,9 @@ enum DataChangeStatus: int implements HasColor, HasLabel
|
||||
public function getLabel(): ?string
|
||||
{
|
||||
return match ($this) {
|
||||
self::PENDING => 'Menunggu Verifikasi',
|
||||
self::APPROVED => 'Disetujui',
|
||||
self::REJECTED => 'Ditolak',
|
||||
self::PENDING => CheerfulNotification::getMessage('Menunggu Verifikasi ⏳✨', 'Menunggu Verifikasi'),
|
||||
self::APPROVED => CheerfulNotification::getMessage('Perubahan Disetujui! ✅🚀', 'Disetujui'),
|
||||
self::REJECTED => CheerfulNotification::getMessage('Perubahan Ditolak 🛑😔', 'Ditolak'),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Filament\Support\CheerfulNotification;
|
||||
use App\Traits\Enum\WithComment;
|
||||
use App\Traits\Enum\WithValue;
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
@ -17,9 +18,9 @@ enum NewsStatus: int implements HasLabel
|
||||
public function getLabel(): ?string
|
||||
{
|
||||
return match ($this) {
|
||||
self::DRAFT => 'Draft',
|
||||
self::PUBLISHED => 'Publish',
|
||||
self::ARCHIVED => 'Arsip',
|
||||
self::DRAFT => CheerfulNotification::getMessage('Draft - Sempurnakan Lagi! ✍️🛠️', 'Draft'),
|
||||
self::PUBLISHED => CheerfulNotification::getMessage('Telah Tayang! 🚀✨', 'Publish'),
|
||||
self::ARCHIVED => CheerfulNotification::getMessage('Arsip - Disimpan Dulu Ya! 📦🔒', 'Arsip'),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user