Closed drewpayment closed 5 years ago
client_id
to Agent Laravel entityAgentController->getAgents($activeOnly)
to use ->byClient()
query filterAgents now have direct relationships to clients. Cleaned up some of the authorization logic that uses the logged in user's role.
There is a residual bug where if the user tries to save an existing form without changed data, the agent card UI breaks after it tries sending the API call. Need to disallow user from saving the dialog form if they haven't changed any fields on it.
Agents currently are assigned only to a User, which has a relationship to a Client. However, this doesn't work because users can have relationships to multiple Clients while we want agents to only be related to one Client at a time.
We need to add a Client relationship to the Agent entity, so that a user could have multiple agent records that were agnostic of each particular Client.
Clients are the highest level of separation in the web app and should be treated as such.
client_id
column to Agent entityAuth::user()
to automatically scope by client when the dev calls->byClient()
client_id
clientId