Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Byte me Byte me
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • JuvrajSingh.-
  • Byte meByte me
  • Wiki
  • Deliverable 3
  • Final document
  • Challenges and How We Solved Them

Challenges and How We Solved Them · Changes

Page history
Update Challenges and How We Solved Them authored Apr 11, 2025 by Sahil.Sahota's avatar Sahil.Sahota
Show whitespace changes
Inline Side-by-side
Deliverable-3/Final-Document/Challenges-and-How-We-Solved-Them.md
View page @ bc10741f
......@@ -24,5 +24,8 @@ Issue: Ensuring reliable creation, editing, and deletion of grocery items with c
Root Cause: The item model required handling various attributes like quantity, expiry date, and categories, which introduced complexity in validation and structure.
Solution: We used a MongoDB schema to define item attributes and created clean API endpoints for item management.
Outcome: The inventory system works reliably, supports all required fields, and is fully integrated with the group and reminder features.
**6. Inventory Navigation Issue**
Issue: When adding/editing/deleting an item to the inventory, the navigation would navigate to the inventory screen, however this was just adding more inventory screens onto the navigation stack. This meant that the when the user pressed the back button to try and go to the homepage, it instead just went back to the previous inventory screen. If a user had added multiple items, then they would have to press the back button multiple times before they could get out of the inventory screen. I tried using navigation.goBack() which did fix the navigation issue but the inventory screen did not update if any changes were made.
Solution: used navigation.goBack(), but also added useFocusEffect in Inventory screen which is a React Navigation Hook which runs the code within it, whenever the screen is focused (navigated to the screen). The code within is a function to fetch items from the database. When a navigation.goBack() is used the useFocusEffect will run as the screen is focused and so the fetchItems function will be called getting the items that are in the database.
Outcome: Inventory screen updates whenever an item is added/removed/modified.
……
Clone repository
  • Deliverable 2
    • Requirements Statement
    • UML Class Model
    • Use Case Descriptions and Scenarios
    • Use Case Model
  • Deliverable 3
    • Final Document
      • Challenges and How We Solved Them
      • Key summary of all participants
      • Video Link
    • System Architecture
    • Updated Class diagram
    • Updated Use case Diagram
  • Functional Properties
  • Participation Journal
View All Pages