From d4f44d1e13ec994680f1eeeb28fe5fa84699a349 Mon Sep 17 00:00:00 2001 From: Sanjay Babu Date: Fri, 23 Aug 2024 14:31:01 -0700 Subject: [PATCH] bugfix assignedTo sorting --- .../housing/submission/SubmissionListNavigator.vue | 9 ++------- .../housing/submission/SubmissionsNavigator.vue | 13 +++++++++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/housing/submission/SubmissionListNavigator.vue b/frontend/src/components/housing/submission/SubmissionListNavigator.vue index d0acd65a..d9010e59 100644 --- a/frontend/src/components/housing/submission/SubmissionListNavigator.vue +++ b/frontend/src/components/housing/submission/SubmissionListNavigator.vue @@ -237,16 +237,11 @@ function isFinanciallySupported(data: Submission) { style="min-width: 125px" /> - - + /> { ]) ).map((r) => r.data); - assignEnquiries(); + assignEnquiriesAndFullName(); const profile = getProfile.value; @@ -147,7 +147,7 @@ function refreshStatistics() { }); } -function assignEnquiries() { +function assignEnquiriesAndFullName() { const relatedActivityIds = new Set(); enquiries.value.forEach((enquiry) => relatedActivityIds.add(enquiry.relatedActivityId)); @@ -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, () => {