#126 - fix
This commit is contained in:
@@ -11,6 +11,7 @@ use InvalidArgumentException;
|
||||
use Toby\Domain\States\VacationRequest\WaitingForTechnical;
|
||||
use Toby\Eloquent\Models\User;
|
||||
use Toby\Eloquent\Models\VacationRequest;
|
||||
use Toby\Infrastructure\Slack\Elements\SlackMessage;
|
||||
|
||||
class VacationRequestWaitsForApprovalNotification extends Notification
|
||||
{
|
||||
@@ -26,14 +27,12 @@ class VacationRequestWaitsForApprovalNotification extends Notification
|
||||
return [Channels::MAIL, Channels::SLACK];
|
||||
}
|
||||
|
||||
public function toSlack(): string
|
||||
public function toSlack(): SlackMessage
|
||||
{
|
||||
$url = route("vacation.requests.show", ["vacationRequest" => $this->vacationRequest->id]);
|
||||
|
||||
return implode("\n", [
|
||||
$this->buildDescription(),
|
||||
"<${url}|Zobacz szczegóły>",
|
||||
]);
|
||||
return (new SlackMessage())
|
||||
->text("{$this->buildDescription()}\n <${url}|Zobacz szczegóły>");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user