45d4f693b6
Changes: - Added missing include for MenuHelper.h in project and AdminMenu - Fixed typo in variable name inventoryIems to inventoryItems in Controller.cpp - Removed stray semicolon from include in Controller.h - Cleaned up duplicate comments in Controller.cpp description header - Minor formatting adjustments with blank lines after headers in multiple files - Updated ServiceManagementService notification message to remove informal wording - Refactored AdminMenu::changePassword to use changePasswordHelper - Added util::clear() call at start of viewStockLevels - Removed redundant helper functions from AdminMenu.cpp and moved to shared helpers - Fixed bug in removeInventoryItem to use activeItems instead of inventoryItems - Enhanced createComboPackages to enforce selection of two distinct services - General comment cleanup and formatting consistency across headers and implementation files
35 lines
1.2 KiB
C++
35 lines
1.2 KiB
C++
/*
|
|
File: InventoryManagementService.h
|
|
Description: Header file declaring the InventoryManagementService class,
|
|
which manages inventory items, stock updates, and notifications
|
|
related to low stock alerts. Inherits from NotificationManagementService.
|
|
Author: Trenser
|
|
Date:19-May-2026
|
|
*/
|
|
|
|
#pragma once
|
|
#include <string>
|
|
#include "Map.h"
|
|
#include "NotificationManagementService.h"
|
|
#include "DataStore.h"
|
|
|
|
class InventoryItem;
|
|
|
|
class InventoryManagementService : public NotificationManagementService
|
|
{
|
|
private:
|
|
DataStore& m_dataStore;
|
|
static util::Map<std::string, User*> m_observers;
|
|
public:
|
|
InventoryManagementService() : m_dataStore(DataStore::getInstance()) {}
|
|
util::Map<std::string, InventoryItem*> getInventoryItems();
|
|
InventoryItem* getInventoryItem(const std::string& inventoryItemID);
|
|
void addInventoryItem(const std::string& partName, int quantity, double price);
|
|
void removeInventoryItem(const std::string& inventoryItemID);
|
|
void addInventoryItemStock(const std::string& selectedItemId, int quantity);
|
|
void sendLowStockAlerts();
|
|
void sendNotification(User* user, const std::string& title, const std::string& message) override;
|
|
void attach(User* user) override;
|
|
void detach(User* user) override;
|
|
};
|