fix: PostObserver trigger published, submit cek kreator, toAll filter aktif, dead code
This commit is contained in:
@@ -23,7 +23,7 @@ class CashRecordObserver
|
||||
|
||||
// Threshold: 500rb–2jt → buat approval ketua + notif
|
||||
if ($record->amount >= 500_000 && $record->amount <= 2_000_000) {
|
||||
$approval = Approval::create([
|
||||
Approval::create([
|
||||
'model_type' => CashRecord::class,
|
||||
'model_id' => $record->id,
|
||||
'required_approvals' => 1,
|
||||
|
||||
@@ -9,7 +9,7 @@ class PostObserver
|
||||
{
|
||||
public function updated(Post $post): void
|
||||
{
|
||||
if ($post->wasChanged('status') && $post->status === 'approved') {
|
||||
if ($post->wasChanged('status') && $post->status === 'published') {
|
||||
MemberPoint::firstOrCreate(
|
||||
[
|
||||
'user_id' => $post->author_id,
|
||||
|
||||
Reference in New Issue
Block a user