From ad651c44ce2515d497c8e5214147c69126e25903 Mon Sep 17 00:00:00 2001 From: sowgro Date: Thu, 3 Apr 2025 19:48:54 -0400 Subject: abstraction working with search and sort --- ufund-ui/src/app/components/cupboard/sorting.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ufund-ui/src/app/components/cupboard/sorting.ts') diff --git a/ufund-ui/src/app/components/cupboard/sorting.ts b/ufund-ui/src/app/components/cupboard/sorting.ts index a512f22..7cb3f39 100644 --- a/ufund-ui/src/app/components/cupboard/sorting.ts +++ b/ufund-ui/src/app/components/cupboard/sorting.ts @@ -49,10 +49,10 @@ const sortByLocation: sortAlgo = (a: Need, b: Need): number => { return 1; } -export const SortingAlgoArrays = { - sortByPriority: { func: sortByPriority, display: ["Highest Priority", "Lowest Priority" ] }, - sortByName: { func: sortByName, display: ["Name (A to Z)", "Name (Z to A)" ] }, - sortByLocation: { func: sortByLocation, display: ["Location (A to Z)", "Location (Z to A)" ] }, - sortByCompletion: { func: sortByCompletion, display: ["Most Completed", "Least Completed" ] }, - sortByGoal: { func: sortByGoal, display: ["Largest Maximum Goal", "Smallest Maximum Goal" ] }, +export const SortingAlgoArrays: {[key: string]: { func: sortAlgo, display: [string, string]}} = { + "sortByPriority": { func: sortByPriority, display: ["Highest Priority", "Lowest Priority" ] }, + "sortByName": { func: sortByName, display: ["Name (A to Z)", "Name (Z to A)" ] }, + "sortByLocation": { func: sortByLocation, display: ["Location (A to Z)", "Location (Z to A)" ] }, + "sortByCompletion": { func: sortByCompletion, display: ["Most Completed", "Least Completed" ] }, + "sortByGoal": { func: sortByGoal, display: ["Largest Maximum Goal", "Smallest Maximum Goal" ] }, }; -- cgit v1.2.3