File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { TitaniumSingleSelectBase } from '../../titanium/single-select-base/sing
1414
1515import { Debouncer } from '../../titanium/helpers/debouncer' ;
1616import { ShowSnackbarEvent } from '../../titanium/snackbar/show-snackbar-event' ;
17+ import { getCompanyMark } from '@leavittsoftware/web/titanium/helpers/get-company-mark' ;
1718
1819/**
1920 * Single select input that searches Leavitt Group companies
@@ -62,14 +63,7 @@ export class LeavittCompanySelect extends TitaniumSingleSelectBase<Partial<Compa
6263 < slot name ="trailing-icon " slot ="trailing-icon "> </ slot >
6364 < span slot ="headline "> ${ company . Name } </ span >
6465 < span slot ="supporting-text "> ${ company . ShortName || '-' } </ span >
65- < img
66- loading ="lazy "
67- company-mark
68- slot ="start "
69- src =${ this . themePreference == 'dark'
70- ? company ?. DarkMarkUrl || company ?. MarkUrl || 'https://cdn.leavitt.com/lg-mark-dark.svg'
71- : company ?. MarkUrl || 'https://cdn.leavitt.com/lg-mark.svg' }
72- / >
66+ < img loading ="lazy " company-mark slot ="start " src =${ getCompanyMark ( company , this . themePreference ) } / >
7367 </ md-menu-item > ` ;
7468
7569 async firstUpdated ( ) {
Original file line number Diff line number Diff line change 1+ import { Company } from '@leavittsoftware/lg-core-typescript' ;
2+
3+ export function getCompanyLogo ( company : Partial < Company > | null , themePreference : 'light' | 'dark' ) {
4+ return themePreference == 'dark'
5+ ? company ?. DarkLogoUrl || company ?. LogoUrl || 'https://cdn.leavitt.com/lg-logo-dark.svg'
6+ : company ?. LogoUrl || 'https://cdn.leavitt.com/lg-logo.svg' ;
7+ }
Original file line number Diff line number Diff line change 1+ import { Company } from '@leavittsoftware/lg-core-typescript' ;
2+
3+ export function getCompanyMark ( company : Partial < Company > | null , themePreference : 'light' | 'dark' ) {
4+ return themePreference == 'dark'
5+ ? company ?. DarkMarkUrl || company ?. MarkUrl || 'https://cdn.leavitt.com/lg-mark-dark.svg'
6+ : company ?. MarkUrl || 'https://cdn.leavitt.com/lg-mark.svg' ;
7+ }
You can’t perform that action at this time.
0 commit comments