fix(push notification): pemanggilannya seharusnya after create

This commit is contained in:
Yoga Pangestu 2025-11-17 15:21:50 +07:00
parent 614a4597a0
commit 236242bde7
2 changed files with 8 additions and 8 deletions

View File

@ -40,6 +40,10 @@ public function mount()
public function save()
{
$this->canOrAbort('create perfume');
$this->form->store();
StorePushNotification::dispatch(
PushNotification::all(),
[
@ -48,10 +52,6 @@ public function save()
],
);
$this->canOrAbort('create perfume');
$this->form->store();
$this->dispatch('refreshDatatable');
$this->toast('Parfum berhasil ditambahkan.');

View File

@ -29,6 +29,10 @@ public function mount()
public function save()
{
$this->canOrAbort('create voucher');
$this->form->store();
StorePushNotification::dispatch(
PushNotification::all(),
[
@ -37,10 +41,6 @@ public function save()
],
);
$this->canOrAbort('create voucher');
$this->form->store();
$this->toast('Voucher berhasil ditambahkan.');
$this->redirectRoute('studio.loyalty.voucher.index', navigate: true);