Skip to content

Commit

Permalink
resolve linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmontville committed Oct 16, 2024
1 parent e7a9a77 commit d4aebda
Showing 1 changed file with 33 additions and 34 deletions.
67 changes: 33 additions & 34 deletions src/pages/HomeAdministrator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -340,42 +340,41 @@ const onSearch = () => {
item.name.toLowerCase().includes(search.value.toLowerCase()),
);
}
};
/**
* Perform an autocomplete search based on the search input value.
* @returns {void}
*/
const autocomplete = () => {
searchSuggestions.value = searchTokens.value.filter((item) => {
return item.toLowerCase().includes(searchInput.value.toLowerCase());
});
};
/**
* Perform an autocomplete search based on the search input value.
* @returns {void}
*/
const autocomplete = () => {
searchSuggestions.value = searchTokens.value.filter((item) => {
return item.toLowerCase().includes(searchInput.value.toLowerCase());
});
};
/**
* Sort change event handler
* @param {*} event – The sort event object emitted by PrimeVue
* @returns {void}
*/
const onSortChange = (event) => {
dataViewKey.value += 1;
page.value = 0;
const value = event.value.value;
const sortValue = event.value;
if (!isSuperAdmin.value && sortValue[0].field.fieldPath === 'name') {
// catches edge case where a partner admin should sort by the public name attribute
sortField.value = 'publicName';
} else {
sortField.value = value[0].field?.fieldPath;
}
if (value[0].direction === 'DESCENDING') {
sortOrder.value = -1;
} else {
sortOrder.value = 1;
}
/**
* Sort change event handler
* @param {*} event – The sort event object emitted by PrimeVue
* @returns {void}
*/
const onSortChange = (event) => {
dataViewKey.value += 1;
page.value = 0;
const value = event.value.value;
const sortValue = event.value;
if (!isSuperAdmin.value && sortValue[0].field.fieldPath === 'name') {
// catches edge case where a partner admin should sort by the public name attribute
sortField.value = 'publicName';
} else {
sortField.value = value[0].field?.fieldPath;
}
if (value[0].direction === 'DESCENDING') {
sortOrder.value = -1;
} else {
sortOrder.value = 1;
}
sortKey.value = sortValue;
};
sortKey.value = sortValue;
};
</script>
Expand Down

0 comments on commit d4aebda

Please sign in to comment.