Commit Graph

9 Commits

Author SHA1 Message Date
Sean Morley
609d3743ed feat: Add addAdventure function to adventureService
The code changes include adding a new function called addAdventure to the adventureService module. This function is responsible for sending a POST request to the corresponding API endpoint to add a new adventure. If the request is successful, the adventure is added to the local plans array and a success toast is displayed. If the request fails, an error toast is displayed. This functionality allows users to add adventures to the planner page.
2024-05-04 17:14:20 +00:00
Sean Morley
79cf19ccb2 ```text
feat: Add type prop to CreateNewAdventure component

The code changes include adding a new prop called "type" to the CreateNewAdventure component in order to specify the type of adventure being created. This prop is passed from the parent component and used to set the "type" property of the newAdventure object. This allows for more flexibility in creating adventures with different types.
2024-05-04 15:55:58 +00:00
Sean Morley
2b7c6b0f18 feat: Add removeAdventure function to +page.svelte and adventureService.ts
The code changes include adding a new function called removeAdventure to the +page.svelte file and adventureService.ts module. This function is responsible for sending a DELETE request to the corresponding API endpoint to remove an adventure. If the request is successful, the adventure is removed from the local plans array. If the request fails, an error toast is displayed. This functionality allows users to remove adventures from the planner page.
2024-05-04 15:38:55 +00:00
Sean Morley
798ce1e3e5 feat: Add saveAdventure function to adventureService
The code changes include adding a new function called saveAdventure to the adventureService module. This function is responsible for sending a PUT request to the corresponding API endpoint to save an adventure. If the request is successful, the local adventure array is updated with the new data. If the request fails, an empty array is returned to allow for handling errors.
2024-05-04 15:18:20 +00:00
Sean Morley
716323657b feat: Add "Planner" button to Navbar component
The code changes include adding a "Planner" button to the Navbar component. This button allows users to navigate to the Planner page. The changes involve modifying the Navbar component in the src/lib/components/Navbar.svelte file.
2024-05-04 15:00:02 +00:00
Sean Morley
7327fefe15 Refactor EditModal component to use adventureToEdit prop instead of individual props 2024-04-27 16:54:20 +00:00
Sean Morley
9837cc4e64 Refactor database schema, remove unused SQL files, and update components 2024-04-26 23:09:39 +00:00
Sean Morley
a3d4d757a9 Add new columns to userPlannedAdventures table and update Adventure interface 2024-04-21 22:56:27 +00:00
Sean Morley
b2184bdee3 Refactor database schema and add planner functionality 2024-04-21 22:42:49 +00:00