Skip to content

Commit

Permalink
Fixed: Displaying Full Name for Single Assigned Picker in Picklist(ho…
Browse files Browse the repository at this point in the history
  • Loading branch information
shanmukhdutt committed Jan 31, 2024
1 parent 962ecfd commit c024be2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/views/InProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -913,12 +913,13 @@ export default defineComponent({
const pickerIds = [] as Array<string>
// if firstName is not found then adding default name `System Generated`
const pickersName = pickersInformation.pickerFacet.buckets.length ? pickersInformation.pickerFacet.buckets.reduce((pickers: Array<string>, picker: any) => {
const pickersName = pickersInformation.pickerFacet.buckets.length ? (pickersInformation.pickerFacet.buckets.length === 1 ? [pickersInformation.pickerFacet.buckets[0].val.split('/')[1]]:
pickersInformation.pickerFacet.buckets.reduce((pickers: Array<string>, picker: any) => {
const val = picker.val.split('/') // having picker val in format 10001/FirstName LastName, split will change it into [pickerId, FirstName LastName]
pickerIds.push(val[0]) // storing pickerIds for usage in edit pickers modal
pickers.push(val[1].split(' ')[0]) // having val[0] as 'firstname lastname', we only need to display firstName
return pickers
}, []) : ['System Generated']
}, [])) : ['System Generated']
picklists.push({
id: picklist.picklistId,
Expand Down

0 comments on commit c024be2

Please sign in to comment.