Introductions:
For objects, there is a Properties page, which contains cards of real estate objects. If you click on a card, you will be taken to the Object page, where all object data is displayed.
For agents there is Agents page, which contains agent cards. If you click on a card, you will be passed to the Agent page. This page displays information about the agent and properties assigned to him.
Supabase has tables Properties and Agents. They are linked by the column agents in Properties and id in Agents.
Task:
Displaying data on Agent page of agent data and cards of real estate objects assigned to the selected agent.
Two object variables currentObject and currentAgent were created.
The transition from card to page is similar, so I will describe currentAgent as an example.
On the Agent_page transition page I added the id parameter.
I created a workflow for the agent card.
On the Agent page I take data for the agent from the variable currentAgent. The data of the objects assigned to the agent want to take from the Properties collection and filter by agent.
But it doesn’t work. Why?
Additionally, screenshots of Properties and Agents tables in Supabase.
Is there any other way to do it? I’m not very familiar with the code.