From 0cd6612d950ce08c3ab578ce6d6f2315c028fd8d Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Tue, 14 Jul 2026 13:31:37 +0700 Subject: [PATCH] fix: update notification messages to use user's full name instead of username for better clarity --- app/Services/Master/RawMaterialService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Services/Master/RawMaterialService.php b/app/Services/Master/RawMaterialService.php index eaffb51..22651eb 100644 --- a/app/Services/Master/RawMaterialService.php +++ b/app/Services/Master/RawMaterialService.php @@ -124,7 +124,7 @@ function () use ($validated): RawMaterial { $this->notifyOwner( 'Tambah Bahan Baku', - "Bahan baku '{$validated['name']}' telah ditambahkan oleh {$user->name}.", + "Bahan baku '{$validated['name']}' telah ditambahkan oleh {$user->profile?->full_name}.", route('admin.master.raw_materials.index', ['search_id' => $rawMaterial->id]), ); } @@ -154,7 +154,7 @@ function () use ($validated, $rawMaterial): void { $this->notifyOwner( 'Ubah Bahan Baku', - "Bahan baku '{$rawMaterial->name}' telah diperbarui oleh {$user->name}.", + "Bahan baku '{$rawMaterial->name}' telah diperbarui oleh {$user->profile?->full_name}.", route('admin.master.raw_materials.index', ['search_id' => $rawMaterial->id]), ); } @@ -168,7 +168,7 @@ public function delete(RawMaterial $rawMaterial, User $user): void $this->notifyOwner( 'Hapus Bahan Baku', - "Bahan baku '{$name}' telah dihapus oleh {$user->name}.", + "Bahan baku '{$name}' telah dihapus oleh {$user->profile?->full_name}.", route('admin.master.raw_materials.index'), ); } @@ -185,7 +185,7 @@ public function toggleStatus(RawMaterial $rawMaterial, array $validated, User $u $this->notifyOwner( 'Ubah Status Bahan Baku', - "Status bahan baku '{$rawMaterial->name}' telah diubah menjadi {$statusLabel} oleh {$user->name}.", + "Status bahan baku '{$rawMaterial->name}' telah diubah menjadi {$statusLabel} oleh {$user->profile?->full_name}.", route('admin.master.raw_materials.index', ['search_id' => $rawMaterial->id]), ); }