feat: add push notification for new variant addition in PurchaseService to enhance user awareness
This commit is contained in:
parent
dc80ad3106
commit
e4318fd244
@ -228,6 +228,13 @@ public function createVariantAndDraft(array $validated, User $user): array
|
||||
|
||||
$price->setAttribute('images', MediaPresenter::collection($price, 'images'));
|
||||
|
||||
$this->pushNotificationService->sendToRoles(
|
||||
'🆕 Varian Baru Ditambahkan',
|
||||
"{$user->name} menambahkan varian \"{$price->variant}\" ke bahan baku \"{$rawMaterial->name}\".",
|
||||
['owner', 'developer', 'direktur'],
|
||||
route('admin.master.raw_materials.index', ['search' => $rawMaterial->name]),
|
||||
);
|
||||
|
||||
return [
|
||||
'id' => $price->id,
|
||||
'variant' => $price->variant,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user