fix: update notification messages to use user's full name instead of username for better clarity
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (8.3) (push) Waiting to run
tests / ci (8.4) (push) Waiting to run
tests / ci (8.5) (push) Waiting to run

This commit is contained in:
Yoga Pangestu 2026-07-14 13:31:37 +07:00
parent 9b20d26a4e
commit 0cd6612d95

View File

@ -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]),
);
}