Minimal8@'))
+ Section::make(SystemNotification::getMessage('Kredensial Akun 🔑✨', 'Akun'))
+ ->description(new HtmlString(SystemNotification::getMessage(
+ 'Pake email dan username ini buat login ya. Oh iya, password awalnya Minimal8@ 🥳',
+ 'Alamat Surel dan Nama Pengguna akan digunakan untuk masuk ke dalam sistem. Kata sandi bawaan adalah Minimal8@'
+ )))
+ ->icon(SystemNotification::getNotifStyle() === NotifStyle::Cheerful ? 'heroicon-o-key' : 'heroicon-o-user')
->schema([
TextInput::make('email')
->label('Alamat Surel')
@@ -44,7 +50,9 @@ public static function configure(Schema $schema): Schema
->columns(2)
->hiddenOn('edit'),
- Section::make('Informasi Mahasiswa')
+ Section::make(SystemNotification::getMessage('Data Mahasiswa 🎓📚', 'Informasi Mahasiswa'))
+ ->description(SystemNotification::getMessage('Lengkapi data mahasiswa di bawah ini dengan benar ya! 🤓📝', 'Masukkan seluruh informasi akademik dan personal mahasiswa dengan benar.'))
+ ->icon(SystemNotification::getNotifStyle() === NotifStyle::Cheerful ? 'heroicon-o-academic-cap' : 'heroicon-o-identification')
->schema([
TextInput::make('full_name')
->label('Nama Lengkap')
diff --git a/app/Filament/Resources/Master/Students/Tables/StudentsTable.php b/app/Filament/Resources/Master/Students/Tables/StudentsTable.php
index a39b107..2ac50d7 100644
--- a/app/Filament/Resources/Master/Students/Tables/StudentsTable.php
+++ b/app/Filament/Resources/Master/Students/Tables/StudentsTable.php
@@ -105,8 +105,10 @@ public static function configure(Table $table): Table
}
SystemNotification::success(
- $state ? 'Pengguna Diaktifkan! ✅' : 'Pengguna Dinonaktifkan ⛔',
- $state ? 'Status akun pengguna berhasil diaktifkan kembali. Siap beraksi! 🚀' : 'Status akun pengguna telah berhasil dinonaktifkan. Istirahat dulu ya... 😴'
+ $state ? 'Pengguna Diaktifkan! ✅✨' : 'Pengguna Dinonaktifkan ⛔👋',
+ $state ? 'Status akun pengguna berhasil diaktifkan kembali. Siap beraksi! 🚀' : 'Status akun pengguna telah berhasil dinonaktifkan. Istirahat dulu ya... 😴',
+ $state ? 'Aktivasi Akun Berhasil' : 'Penonaktifan Akun Berhasil',
+ $state ? 'Status akun pengguna terpilih telah diubah menjadi aktif.' : 'Status akun pengguna terpilih telah diubah menjadi tidak aktif.'
)->send();
})
->visible(fn () => auth()->user()->hasRole([RoleEnum::Kosma, RoleEnum::Developer])),
diff --git a/app/Filament/Support/SystemNotification.php b/app/Filament/Support/SystemNotification.php
index a90d49f..4fe309d 100644
--- a/app/Filament/Support/SystemNotification.php
+++ b/app/Filament/Support/SystemNotification.php
@@ -127,7 +127,8 @@ public static function success(string $title, string $body, ?string $formalTitle
self::make()
->title(self::clean($finalTitle))
->body(self::clean($finalBody))
- ->success()
+ ->success(),
+ 'success'
);
}
@@ -143,7 +144,8 @@ public static function info(string $title, string $body, ?string $formalTitle =
self::make()
->title(self::clean($finalTitle))
->body(self::clean($finalBody))
- ->info()
+ ->info(),
+ 'info'
);
}
@@ -159,7 +161,8 @@ public static function warning(string $title, string $body, ?string $formalTitle
self::make()
->title(self::clean($finalTitle))
->body(self::clean($finalBody))
- ->warning()
+ ->warning(),
+ 'warning'
);
}
@@ -175,17 +178,32 @@ public static function danger(string $title, string $body, ?string $formalTitle
self::make()
->title(self::clean($finalTitle))
->body(self::clean($finalBody))
- ->danger()
+ ->danger(),
+ 'danger'
);
}
/**
* Apply the user's selected style to the notification.
*/
- protected static function applyStyle(Notification $notification): Notification
+ protected static function applyStyle(Notification $notification, string $status): Notification
{
- if (self::getNotifStyle() === NotifStyle::Formal) {
- $notification->icon(null);
+ $isCheerful = self::getNotifStyle() === NotifStyle::Cheerful;
+
+ if ($isCheerful) {
+ $notification
+ ->duration(6000)
+ ->icon(match ($status) {
+ 'success' => 'heroicon-o-sparkles',
+ 'danger' => 'heroicon-o-fire',
+ 'warning' => 'heroicon-o-bolt',
+ 'info' => 'heroicon-o-megaphone',
+ default => null,
+ });
+ } else {
+ $notification
+ ->icon(null)
+ ->duration(4000);
}
return $notification;
@@ -197,7 +215,7 @@ protected static function applyStyle(Notification $notification): Notification
public static function getNotifStyle(): NotifStyle
{
try {
- /** @var \App\Models\User $user */
+ /** @var \App\Models\User|null $user */
$user = Auth::user();
return $user?->settings?->notif_style ?? NotifStyle::Cheerful;
diff --git a/resources/views/filament/resources/learning/assignments/index.blade.php b/resources/views/filament/resources/learning/assignments/index.blade.php
index b45b1b8..ca22774 100644
--- a/resources/views/filament/resources/learning/assignments/index.blade.php
+++ b/resources/views/filament/resources/learning/assignments/index.blade.php
@@ -1,7 +1,10 @@