Skip to content

Commit

Permalink
Updated: handle the case to display groupName if available(#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Sourabh committed Apr 30, 2024
1 parent 0d8a0be commit 4432046
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/components/EditPickerModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default defineComponent({
groupName_value: this.queryString,
groupName_op: 'contains',
groupName_ic: 'Y',
groupName_grp: '3'
groupName_grp: '4'
}
}
Expand All @@ -143,14 +143,14 @@ export default defineComponent({
orderBy: "firstName ASC",
filterByDate: "Y",
distinct: "Y",
fieldList: ["firstName", "lastName", "partyId"]
fieldList: ["firstName", "lastName", "partyId", "groupName"]
}
try {
const resp = await PicklistService.getAvailablePickers(payload);
if (resp.status === 200 && !hasError(resp)) {
this.availablePickers = resp.data.docs.map((picker: any) => ({
name: picker.firstName + ' ' + picker.lastName,
name: picker.firstName || picker.lastName ? `${picker.firstName} ${picker.lastName}` : picker.groupName,
id: picker.partyId
}))
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/views/AssignPickerModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export default defineComponent({
groupName_value: this.queryString,
groupName_op: 'contains',
groupName_ic: 'Y',
groupName_grp: '3'
groupName_grp: '5'
}
}
Expand All @@ -196,7 +196,7 @@ export default defineComponent({
orderBy: "firstName ASC",
filterByDate: "Y",
distinct: "Y",
fieldList: ["firstName", "lastName", "partyId"]
fieldList: ["firstName", "lastName", "partyId", "groupName"]
}
let resp;
let total = 0;
Expand All @@ -205,7 +205,7 @@ export default defineComponent({
resp = await PicklistService.getAvailablePickers(payload);
if (resp.status === 200 && !hasError(resp) && resp.data.count > 0) {
const pickers = resp.data.docs.map((picker) => ({
name: picker.firstName+ ' ' +picker.lastName,
name: picker.firstName || picker.lastName ? `${picker.firstName} ${picker.lastName}` : picker.groupName,
id: picker.partyId
}))
this.availablePickers = this.availablePickers.concat(pickers);
Expand Down

0 comments on commit 4432046

Please sign in to comment.