@@ -57,15 +57,15 @@ export default defineComponent({
5757 multiple: " secondary" ,
5858 frequency: " warning" ,
5959 [suggestedSpeciesKey ]: " success" ,
60- noid : " " ,
60+ Other : " " ,
6161 };
6262
6363 const categoryPriority: Record <string , number > = {
6464 [suggestedSpeciesKey ]: 0 ,
6565 single: 1 ,
6666 multiple: 2 ,
6767 frequency: 3 ,
68- noid : 4 ,
68+ Other : 4 ,
6969 };
7070
7171 const inRangeTooltip =
@@ -102,7 +102,7 @@ export default defineComponent({
102102 " Single" ,
103103 " Multiple" ,
104104 " Frequency" ,
105- " Noid " ,
105+ " Other " ,
106106 ];
107107 groupsOrder .forEach ((key ) => {
108108 result .push ({ type: " subheader" , title: key });
@@ -129,6 +129,10 @@ export default defineComponent({
129129 }
130130 };
131131
132+ const commonNameInfoThreshold = 36 ;
133+ const showCommonNameInfo = (commonName : string ) =>
134+ commonName .length > commonNameInfoThreshold ;
135+
132136 return {
133137 search ,
134138 selectedCode ,
@@ -138,6 +142,7 @@ export default defineComponent({
138142 speciesAutocomplete ,
139143 onClearOrDeleteClick ,
140144 inRangeTooltip ,
145+ showCommonNameInfo ,
141146 };
142147 },
143148});
@@ -163,7 +168,10 @@ export default defineComponent({
163168 :custom-filter =" customFilter"
164169 clear-on-select
165170 label =" Select species"
166- :menu-props =" { maxHeight: '300px', maxWidth: '400px' }"
171+ :menu-props =" {
172+ maxHeight: '300px',
173+ maxWidth: '400px',
174+ }"
167175 :disabled =" disabled"
168176 class =" species-autocomplete-fill"
169177 density =" compact"
@@ -192,10 +200,23 @@ export default defineComponent({
192200 </v-list-subheader >
193201 </template >
194202 <template #item =" { props: itemProps , item } " >
195- <v-list-item
196- v-bind =" itemProps"
197- :title =" (item.raw as Species).common_name"
198- >
203+ <v-list-item v-bind =" itemProps" class =" species-option-item" >
204+ <template #title >
205+ <div class =" species-option-title-row" >
206+ <span class =" species-option-title" >
207+ {{ (item.raw as Species).common_name }}
208+ </span >
209+ <v-icon
210+ v-if =" showCommonNameInfo((item.raw as Species).common_name)"
211+ v-tooltip =" (item.raw as Species).common_name"
212+ size =" x-small"
213+ color =" info"
214+ class =" species-option-info-icon"
215+ >
216+ mdi-information-outline
217+ </v-icon >
218+ </div >
219+ </template >
199220 <template #subtitle =" {} " >
200221 <span >{{ (item.raw as Species).species_code }}</span >
201222 <v-chip
@@ -240,4 +261,23 @@ export default defineComponent({
240261 flex : 1 1 0 ;
241262 min-width : 0 ;
242263}
264+
265+ .species-option-title-row {
266+ display : flex ;
267+ align-items : center ;
268+ gap : 6px ;
269+ min-width : 0 ;
270+ }
271+
272+ .species-option-title {
273+ flex : 1 1 auto ;
274+ min-width : 0 ;
275+ overflow : hidden ;
276+ text-overflow : ellipsis ;
277+ white-space : nowrap ;
278+ }
279+
280+ .species-option-info-icon {
281+ flex : 0 0 auto ;
282+ }
243283 </style >
0 commit comments