This PR introduces two new features to the LogViewComponent:
LogAddItem: Enables users to add items from their wardrobe to the current day's outfit log.
LogDeleteItem: Allows users to remove outfits from the outfit log.
Key Changes:
New Components:
LogAddItem.js and LogDeleteItem.js:
Implemented modular components for adding and deleting items in the outfit log.
Integrated with WardrobeRepositoryService and OutfitRepositoryService for data handling.
Utilized event publishing (Events.OutfitUpdated, Events.OutfitDeleted) to communicate changes.
LogViewComponent Adjustments:
Subscribed to new events (Events.OutfitUpdated, Events.OutfitDeleted) to refresh the outfit list dynamically.
Ensured compatibility with the new components and maintained existing functionality.
Sequence Diagram Updates:
Documented the operational flow for LogAddItem and LogDeleteItem using sequence diagrams for better understanding.
How It Works:
LogAddItem: Opens a modal to select items from the wardrobe. On confirmation, the selected items are added to the current outfit and saved to IndexedDB.
LogDeleteItem: Deletes an outfit from IndexedDB and updates the UI dynamically.
Testing:
Added manual tests to verify:
Adding items to the outfit log.
Deleting outfits from the outfit log.
Event propagation and UI updates in LogViewComponent.
Notes for Reviewers:
Please test the following scenarios:
Adding multiple items to today's outfit log.
Deleting an outfit from the log page.
Verifying that changes persist in IndexedDB across sessions.
Look for any unintended side effects on the LogViewComponent or WardrobeRepositoryService.
Summary
This PR introduces two new features to the
LogViewComponent
:Key Changes:
New Components:
LogAddItem.js
andLogDeleteItem.js
:WardrobeRepositoryService
andOutfitRepositoryService
for data handling.Events.OutfitUpdated
,Events.OutfitDeleted
) to communicate changes.LogViewComponent Adjustments:
Events.OutfitUpdated
,Events.OutfitDeleted
) to refresh the outfit list dynamically.Sequence Diagram Updates:
LogAddItem
andLogDeleteItem
using sequence diagrams for better understanding.How It Works:
Testing:
LogViewComponent
.Notes for Reviewers:
LogViewComponent
orWardrobeRepositoryService
.