It would be much better if this logic was in the flow.

The flow can assign a state variable with the relevant offices, and then this partial simply deals with formatting that data, not selecting what data to show.