The code changes include adding a new function called markVisited to the AdventureCard.svelte and +page.svelte files. This function is responsible for marking an adventure as visited and dispatching an event to update the adventure's status. This enhancement allows users to mark adventures as visited in the planner page and triggers the corresponding API request to update the adventure's status in the database.
The code changes include implementing lazy loading for images to improve page load performance. Additionally, the npm dependency has been updated to the latest stable version. These enhancements enhance the user experience by reducing the initial load time and ensuring compatibility with the latest dependencies.
The code changes include adding validation for the adventure name in the CreateNewAdventure component. If the name is empty, an alert is displayed and the adventure creation is prevented. This enhancement ensures that users provide a name for the adventure before creating it.
The code changes include adding the addAdventure, removeAdventure, and saveAdventure functions to the +page.svelte file and adventureService.js module. These functions handle the API requests for adding, removing, and saving adventures respectively. They update the local plans array based on the API response and display appropriate toast messages. These changes enhance the functionality of the planner page by allowing users to add, remove, and save adventures.
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.
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.
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.
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.
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.
The code changes include adding activity types functionality to the CreateNewAdventure and AdventureCard components. This allows users to specify different types of activities for each adventure. The changes also include updates to the server files to handle the new activity types.
Recent user commits:
- Refactor adventure page layout to display activity types and update server files
- Add activity types to EditModal component and update server files
- Add activity types to AdventureCard component and update server files
- Refactor adventure page layout to display activity types in +page.svelte and update server files
- Refactor adventure page layout to display activity types in +page.svelte and update server files
- Refactor CreateNewAdventure component to add activity types and update server files
- Refactor adventure page layout to use a responsive image size in +page.svelte
- Merge pull request #52 from seanmorley15/development
- Refactor error handling and add validation for adventure name in server and page files
- Update config.ts