One-to-one resource relationships
Hi all,
I can't work out how to display some model relationships.
The structure I have is:
Client
Company
Employees
A client may have 1 associated company.
A company may have one ore more employees.
So I have a client resource displaying fine. I have a company resource displaying fine, with a RelationManager to list any employees.
However, on the client view page, I would like to display the company and employees. How could I go about this? I don't want to use a RelationManager on the client page for the company, as there is only ever one company, so no need for a table.
Ideally, I'd like to render the company with its RelationManager to employees etc in a seperate tab on the client page. Or, if not possible, have an action button on the client page which opens the company view in a modal.
Any thoughts?
I can't work out how to display some model relationships.
The structure I have is:
Client
Company
Employees
A client may have 1 associated company.
A company may have one ore more employees.
So I have a client resource displaying fine. I have a company resource displaying fine, with a RelationManager to list any employees.
However, on the client view page, I would like to display the company and employees. How could I go about this? I don't want to use a RelationManager on the client page for the company, as there is only ever one company, so no need for a table.
Ideally, I'd like to render the company with its RelationManager to employees etc in a seperate tab on the client page. Or, if not possible, have an action button on the client page which opens the company view in a modal.
Any thoughts?