Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete #2332 #2370

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

JWJUN233233
Copy link

@JWJUN233233 JWJUN233233 commented Jan 10, 2025

Description

Complete #2332

Related Issue

close #2332

Checklist

  • The target PR branch is develop branch

@dgp-bot
Copy link

dgp-bot bot commented Jan 10, 2025

PR Summary: Complete #2332

This pull request introduces a feature to clear all inventory items and enhances the Cultivation page with a corresponding command.

Changes by feature

Inventory Management
  • IInventoryRepository.cs: Added a RemoveAllInventoryItem method to the repository interface, allowing for deletion of all inventory items.
  • IInventoryService.cs: Added a RemoveAllInventoryItem method to the service interface, providing a way to trigger deletion of all inventory items.
  • InventoryRepository.cs: Implemented the RemoveAllInventoryItem method, which performs a delete operation on all InventoryItem entities in database.
  • InventoryService.cs: Implemented the RemoveAllInventoryItem method, which calls the corresponding method in InventoryRepository.
Cultivation Page Enhancement
  • CultivationPage.xaml: Added a new AppBarButton to trigger ClearInventoryCommand, with the label "Clear Inventory."
  • CultivationViewModel.cs:
    • Introduced a new ClearInventoryCommand that:
      • Opens a progress dialog.
      • Calls the RemoveAllInventoryItem method from InventoryService.
      • Updates inventory and statistics data after clearing.

Key Change Highlights

  • New RemoveAllInventoryItem methods: The addition of these methods in the repository and service layers provides the core functionality to remove all inventory items, enabling users to reset their tracked resources.
  • ClearInventoryCommand: The introduction of this command, along with its corresponding button in the UI, exposes the ability for the user to clear all inventory data. This change allows users to reset their inventory.
  • UI enhancement: The addition of AppBarButton in CultivationPage.xaml enhance user experience.

@JWJUN233233 JWJUN233233 force-pushed the feature/clear-inventory branch from d907627 to eae584f Compare January 11, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants