mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 14:50:57 +00:00
Staff search with whatever is in front of them. Company name, TIN, email and profile reference already matched; a TIN's licence number and the trade name of the business a role operates as did not, which is most of what appears on a customer's own paperwork. Adds a Role filter alongside it. Distinct from the existing Type pill: that is the company's own kind, this asks "who does X?" — one `customer` company routinely holds importer and exporter at once. Both are EXISTS subqueries rather than constraints on the joined `companyProfiles` alias. Filtering the join would drop the company's other profiles from the loaded entity, so an importer-and-exporter would render as importer-only.