LEO Territory

Dealer & Wholesaler Zone Builder
LOADING TERRITORY DATA…
// Build popup: dealer contact + wholesaler contact const dManagerLine = od.managerName ? '
👤 '+esc(od.managerName)+'
' : ''; const dPhoneLine = od.phone ? '
📞 '+esc(od.phone)+'
' : ''; const dEmailLine = od.email ? '
✉ '+esc(od.email)+'
' : ''; const hasDealerContact = dManagerLine || dPhoneLine || dEmailLine; const wsManagerLine = (ow && ow.managerName) ? '
👤 '+esc(ow.managerName)+'
' : ''; const wsPhoneLine = (ow && ow.phone) ? '
📞 '+esc(ow.phone)+'
' : ''; const wsEmailLine = (ow && ow.email) ? '
✉ '+esc(ow.email)+'
' : ''; const hasWsContact = wsManagerLine || wsPhoneLine || wsEmailLine; const popup = '
' + '
Dealer
' + ''+esc(od.name)+'' + (hasDealerContact ? '
'+dManagerLine+dPhoneLine+dEmailLine+'
' : '
No dealer contact set
') + '
' + '
Wholesaler
' + '
' + '
' + ''+(ow?esc(ow.name):'Unknown')+'' + '
' + (hasWsContact ? '
'+wsManagerLine+wsPhoneLine+wsEmailLine+'
' : '
No wholesaler contact set
') + '
' + '
' + miToDisplay(od.value||31)+' territory'+(ow?' · '+wholesalerCountries(ow).map(function(c){return countryLabel(c);}).join(', '):'') + '
';