Implement real-time contact collaboration and notification #143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request was created by Sweep to resolve the following request by @curtisdelicata:
Continue chatting at https://sweep-chat-demo.vercel.app/c/fceb8097-57d6-4f01-8968-d2dfad09c787.
Purpose
This pull request aims to implement real-time contact collaboration and notification functionality in the CRM application.
Description
The changes in this pull request include:
ContactUpdated
event that is dispatched whenever a contact is updated.ContactCollaboration
Livewire component that allows users to update contact information in real-time.NotifyTeamMembers
listener that sends a notification to all team members when a contact is updated.ContactResource
to trigger theContactUpdated
event whenever a contact is updated.team
relationship to theContact
model and updated theContactPolicy
to handle authorization based on the team.ContactCollaboration
component.Summary
The key changes in this pull request include:
app/Events/ContactUpdated.php
: New event class for contact updatesapp/Http/Livewire/ContactCollaboration.php
: Livewire component for real-time contact collaborationapp/Listeners/NotifyTeamMembers.php
: Listener for theContactUpdated
eventapp/Models/Contact.php
: Addedteam
relationship andtouches
propertyapp/Policies/ContactPolicy.php
: Updated authorization policies for contactsapp/Providers/EventServiceProvider.php
: Registered theContactUpdated
event listenerconfig/broadcasting.php
: Updated Pusher configuration with client optionsresources/views/livewire/contact-collaboration.blade.php
: View for theContactCollaboration
componenttests/Feature/ContactCollaborationTest.php
: Feature tests for the contact collaboration functionality