Skip to content

Commit

Permalink
bugfix assignedTo sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjaytkbabu committed Aug 23, 2024
1 parent a85c284 commit d4f44d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,11 @@ function isFinanciallySupported(data: Submission) {
style="min-width: 125px"
/>
<Column
field="assignedTo"
field="user.fullName"
header="Assigned to"
:sortable="true"
style="min-width: 200px"
>
<template #body="{ data }">
{{ data.user?.lastName }}{{ data.user?.lastName && data.user?.firstName ? ', ' : '' }}
{{ data.user?.firstName }}
</template>
</Column>
/>
<Column
field="hasRelatedEnquiry"
header="Related enquiry"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ onMounted(async () => {
])
).map((r) => r.data);
assignEnquiries();
assignEnquiriesAndFullName();
const profile = getProfile.value;
Expand Down Expand Up @@ -147,7 +147,7 @@ function refreshStatistics() {
});
}
function assignEnquiries() {
function assignEnquiriesAndFullName() {
const relatedActivityIds = new Set();
enquiries.value.forEach((enquiry) => relatedActivityIds.add(enquiry.relatedActivityId));
Expand All @@ -159,6 +159,15 @@ function assignEnquiries() {
sub.hasRelatedEnquiry = false;
}
});
submissions.value.forEach((sub) => {
if (sub.user) {
sub.user.fullName =
sub.user.firstName && sub.user.lastName
? `${sub.user.lastName}, ${sub.user.firstName}`
: sub.user.firstName || sub.user.lastName || '';
}
});
}
watch(accordionIndex, () => {
Expand Down

0 comments on commit d4f44d1

Please sign in to comment.