-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: dashboard feed (monicahq/chandler#195)
- Loading branch information
Showing
24 changed files
with
452 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...Contact/ManageContactFeed/Web/ViewHelpers/Actions/ActionFeedGenericContactInformation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace App\Contact\ManageContactFeed\Web\ViewHelpers\Actions; | ||
|
||
use App\Models\ContactFeedItem; | ||
|
||
class ActionFeedGenericContactInformation | ||
{ | ||
public static function data(ContactFeedItem $item): array | ||
{ | ||
$contact = $item->contact; | ||
|
||
return [ | ||
'id' => $contact->id, | ||
'name' => $contact->name, | ||
'age' => $contact->age, | ||
'avatar' => $contact->avatar, | ||
'url' => route('contact.show', [ | ||
'vault' => $contact->vault_id, | ||
'contact' => $contact->id, | ||
]), | ||
]; | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
domains/Contact/ManageContactFeed/Web/ViewHelpers/Actions/ActionFeedLabelAssigned.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace App\Contact\ManageContactFeed\Web\ViewHelpers\Actions; | ||
|
||
use App\Models\ContactFeedItem; | ||
|
||
class ActionFeedLabelAssigned | ||
{ | ||
public static function data(ContactFeedItem $item): array | ||
{ | ||
$contact = $item->contact; | ||
$label = $item->feedable; | ||
|
||
return [ | ||
'label' => [ | ||
'object' => $label ? [ | ||
'id' => $label->id, | ||
'name' => $label->name, | ||
'bg_color' => $label->bg_color, | ||
'text_color' => $label->text_color, | ||
'url' => route('contact.label.index', [ | ||
'vault' => $contact->vault_id, | ||
'label' => $label->id, | ||
]), | ||
] : null, | ||
'description' => $item->description, | ||
], | ||
'contact' => [ | ||
'id' => $contact->id, | ||
'name' => $contact->name, | ||
'age' => $contact->age, | ||
'avatar' => $contact->avatar, | ||
'url' => route('contact.show', [ | ||
'vault' => $contact->vault_id, | ||
'contact' => $contact->id, | ||
]), | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.