Skip to content

Commit

Permalink
🔨 1.0.4 - Sort Items, Open New Tab
Browse files Browse the repository at this point in the history
- removed data science files as well
- sorted the items to be selected
- open directions in new tab
  • Loading branch information
neozhixuan committed Jan 3, 2024
1 parent 868b2ac commit c78a0a4
Show file tree
Hide file tree
Showing 93 changed files with 18 additions and 31,778 deletions.
15 changes: 14 additions & 1 deletion client/components/home/UserInput/Items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,20 @@ const emptyItem: TEmptyItem = {

export const Items = () => {
const { items, setUserSelection } = useUserInputs();
const { items: itemList, categories } = useSheetyData();
const { items: iList, categories } = useSheetyData();
const itemList = iList.sort((a, b) => {
// Convert to uppercase for case-insensitive comparison
const nameA = a.name.toUpperCase();
const nameB = b.name.toUpperCase();

if (nameA < nameB) {
return -1;
}
if (nameA > nameB) {
return 1;
}
return 0;
});

const getValidMethods = useCallback(
(itemName: string) => {
Expand Down
6 changes: 4 additions & 2 deletions client/components/map/FacilityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ export const FacilityCard = ({
{/* <span style={{ fontWeight: 800 }}>Address:</span>{" "} */}
{facCardDetails.address}
</Text>
<Link
<a
href={`https://www.google.com/maps/dir/${address.coordinates.lat},${address.coordinates.long}/${facCardDetails.latitude},${facCardDetails.longitude}`}
target="_blank"
rel="noopener noreferrer"
>
<Button
bg={COLORS.Button.primary}
Expand All @@ -119,7 +121,7 @@ export const FacilityCard = ({
<ExternalLinkIcon />
<Text>Get directions</Text>
</Button>
</Link>
</a>
</VStack>
</HStack>
<Flex p={2} gap={2} flexDir={"column"}>
Expand Down
3 changes: 0 additions & 3 deletions data_science/algo/README.txt

This file was deleted.

1,356 changes: 0 additions & 1,356 deletions data_science/algo/cleaning.ipynb

This file was deleted.

4,492 changes: 0 additions & 4,492 deletions data_science/algo/mapping.ipynb

This file was deleted.

7 changes: 0 additions & 7 deletions data_science/dashboard/README.md

This file was deleted.

Binary file not shown.
Binary file removed data_science/dashboard/bin_locations.xlsx
Binary file not shown.
Empty file.
3 changes: 0 additions & 3 deletions data_science/dashboard/data/collection_method_table.csv

This file was deleted.

155 changes: 0 additions & 155 deletions data_science/dashboard/data/item_table.csv

This file was deleted.

Loading

0 comments on commit c78a0a4

Please sign in to comment.