refactor: update role notifications in CuttingService to streamline admin alerts for completed cuttings
This commit is contained in:
parent
6b3d94170b
commit
c815db0042
@ -767,7 +767,7 @@ function () use ($cutting, $status, $verificationNote, $results, $resultPrices,
|
|||||||
};
|
};
|
||||||
|
|
||||||
$roles = $status === CuttingStatus::COMPLETED
|
$roles = $status === CuttingStatus::COMPLETED
|
||||||
? ['owner', 'developer', 'direktur', 'admin-toko']
|
? ['owner', 'developer', 'direktur']
|
||||||
: ['owner', 'developer', 'direktur'];
|
: ['owner', 'developer', 'direktur'];
|
||||||
|
|
||||||
$this->pushNotificationService->sendToRoles(
|
$this->pushNotificationService->sendToRoles(
|
||||||
@ -776,6 +776,15 @@ function () use ($cutting, $status, $verificationNote, $results, $resultPrices,
|
|||||||
$roles,
|
$roles,
|
||||||
route('admin.manage.cuttings.index'),
|
route('admin.manage.cuttings.index'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($status === CuttingStatus::COMPLETED) {
|
||||||
|
$this->pushNotificationService->sendToRoles(
|
||||||
|
$title,
|
||||||
|
$message,
|
||||||
|
['admin-toko'],
|
||||||
|
route('admin.manage.stocks.index'),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildMaterials(array $materials): array
|
private function buildMaterials(array $materials): array
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user