fix: use loose equality for company ID comparison in mapping dropdowns

The dropdown wasn't showing mapped company names due to type mismatch
between string and number IDs. Changed === to == for comparison.
This commit is contained in:
root 2026-02-02 22:52:59 -05:00
parent ca61b7785d
commit f1985e2ea5
2 changed files with 3 additions and 3 deletions

View file

@ -416,7 +416,7 @@ function TenantMappingRow({
<SelectValue placeholder="Select a company...">
{selectedCompanyId === 0
? "No mapping"
: companies.find(c => c.id === selectedCompanyId)?.companyName || "Select a company..."}
: companies.find(c => c.id == selectedCompanyId)?.companyName || "Select a company..."}
</SelectValue>
</SelectTrigger>
<SelectContent>

View file

@ -459,9 +459,9 @@ function SiteMappingRow({
>
<SelectTrigger className="w-full">
<SelectValue placeholder="Select a company...">
{selectedCompanyId === 0
{selectedCompanyId == 0
? "No mapping"
: companies.find(c => c.id === selectedCompanyId)?.companyName || "Select a company..."}
: companies.find(c => c.id == selectedCompanyId)?.companyName || "Select a company..."}
</SelectValue>
</SelectTrigger>
<SelectContent>