The project is used to manage small to large computer shops. It manages the Inventory while leveraging on the benefits of blockchain.
Retrieves all computers in the inventory.
Retrieves a computer by its ID.
Adds a new computer to the inventory.
Updates the details of an existing computer.
Deletes a computer from the inventory.
Updates the quantity of a computer after a sale.
Searches for computers based on a query string
Checks for low-stock computers (quantity less than 5).
resupplyComputer(id: string, quantityToAdd: number): Result<Computer, string> Description: This function allows you to restock the inventory of a specific computer by adding a certain quantity of computers to it. It's useful for replenishing stock. Get Total Inventory Value:
Description: This function calculates and returns the total value of the entire computer inventory. It's helpful for assessing the overall worth of the inventory. Get Computers by Price Range:
Description: This function allows you to retrieve a list of computers within a specified price range. It's useful for customers looking for computers within a certain budget. Clear Low Stock Notifications:
Description: This function can be used to clear the low stock notifications, effectively resetting them. It's helpful for periodic maintenance. Get Computer Description:
Description: This function retrieves the description of a computer based on its ID. It's helpful for providing detailed information about a specific computer.
setComputerPrice(id: string, newPrice: float64): Result<Computer, string> Description: This function allows you to change the price of a specific computer by providing its ID and the new price. Get Computer Quantity:
Description: This function allows you to retrieve the quantity of a specific computer based on its ID. List Computer Brands:
Description: This function returns a list of unique computer brands available in the inventory.