notification implementation into the toaster

This commit is contained in:
Čarodej
2022-03-12 08:40:35 +01:00
parent 0e45092795
commit 9e973b89ce
16 changed files with 294 additions and 209 deletions
@@ -18,7 +18,7 @@ class NotificationResource extends JsonResource
'id' => $this->id,
'type' => $this->type,
'attributes' => [
'type' => $this->data['type'],
'category' => $this->data['category'],
'title' => $this->data['title'],
'description' => $this->data['description'],
'action' => $this->data['action'] ?? null,
@@ -59,7 +59,7 @@ class InvitationIntoTeamFolder extends Notification implements ShouldQueue
public function toArray(mixed $notifiable): array
{
return [
'type' => 'team-invitation',
'category' => 'team-invitation',
'title' => 'New Team Invitation',
'description' => "{$this->invitation->inviter->settings->name} invite you to join into Team Folder.",
'action' => [
@@ -49,7 +49,7 @@ class UploadRequestFulfilledNotification extends Notification implements ShouldQ
public function toArray(mixed $notifiable): array
{
return [
'type' => 'file-request',
'category' => 'file-request',
'title' => 'File Request Filled',
'description' => "Your file request for '{$this->uploadRequest->parent->name}' folder was filled successfully.",
'action' => [