Skip to content

Commit

Permalink
SDCI-94 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltangbcgov committed Feb 14, 2024
1 parent dd2ccca commit 5aba82f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/views/ContactsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ const transformContactForDownload = (inputData: any) => {
email: item.email
}))
}
const filterOutYukon = (inputData: any) => {
return inputData.filter(
(contact) => contact.districtId !== '54396317-b444-063d-779e-e4d42ff7634f'
)
}
const searchContact = async () => {
// Filter contacts based on selected filters
let currentDate = new Date().toISOString().substring(0, 19)
Expand Down Expand Up @@ -123,7 +128,8 @@ const searchContact = async () => {
}
try {
const searchResults = await InstituteService.searchContactByType(req)
filteredContacts.value = transformContactForDownload(searchResults.data.content)
const yukonFilteredContacts = filterOutYukon(searchResults.data.content)
filteredContacts.value = transformContactForDownload(yukonFilteredContacts)
results.value = searchResults.data.totalElements
// Update current page and total pages
totalPages.value = searchResults.data.totalPages
Expand Down

0 comments on commit 5aba82f

Please sign in to comment.