So you need to call the server action that retrieves the officeId and with that output, you assign the value to the client variable.
What I did here was put everything in a server action and retrieve all the data I want.


Now you need to figure it out by doing step by step.
1- get the office id
2- call the action that retrieves the office id upon login
3-assign the officeid to the client variable