Commit Graph

18 Commits

Author SHA1 Message Date
Jissin Mathew 500eb95f12 Add documentation headers across system modules 2026-05-22 12:49:14 +05:30
Jissin Mathew 340f00deef Merge branch 'feature-notification-management-not006' into feature-notification-management 2026-05-21 21:07:17 +05:30
Jissin Mathew 0933db41a5 Merge branch 'feature-notification-management-not005' into feature-notification-management 2026-05-21 21:00:20 +05:30
Jissin Mathew 8a595a5893 Merge branch 'feature-notification-management-not004' into feature-notification-management 2026-05-21 20:54:20 +05:30
Jissin Mathew a8f934c7c5 Merge branch 'feature-notification-management-not003' into feature-notification-management 2026-05-21 20:48:41 +05:30
Jissin Mathew 166cc02aaa Merge branch 'feature-notification-management-not002' into feature-notification-management 2026-05-21 20:46:02 +05:30
joelthomastrenser b8e87ade0f Implement View Customer Notifications
<UserStory> NOT001: View Customer Notifications </UserStory>

<Changes>
1. Added shared notification helper functions to display notifications in tabular format, support notification selection, and show full notification details.
2. Implemented notification deletion logic in Controller and UserManagementService to remove notifications for the authenticated user after viewing.
3. Updated CustomerMenu::viewNotifications() to use the shared notification viewing and deletion flow.
</Changes>

<Test>

Precondition:
1. Customer is registered in the system.
2. Customer is logged into the system.
3. Customer has one or more notifications available.

Steps:
1. Navigate to “View Notifications” from the customer menu.
- Verify that the system displays the list of notifications with title and timestamp.

2. Select a notification from the displayed list.
   - Verify that the system displays the full notification details including message.

3. View the selected notification and continue.
   - Verify that the viewed notification is deleted from the system.

4. Navigate to “View Notifications” again.
   - Verify that the previously viewed notification no longer appears in the notification list.

</Test>

<Review>
Sreeja Reghukumar, please review
</Review>
2026-05-21 20:39:13 +05:30
joelthomastrenser b9be43acca Implement Payment Reminder functionality
<UserStory>
NOT005: Payment Reminder
</UserStory>

<Changes>
    1. Added payment reminder check in Controller::runSystemChecks() to trigger reminder processing during system startup.
    2. Implemented PaymentManagementService::sendPaymentReminders() to identify unpaid invoices that exceed the pending payment threshold and send reminder notifications to customers.
    3. Added reminder notification logic to include invoice details and stop reminders once invoice payment status changes from Pending to Paid.
</Changes>

<Test>
    Precondition:
    1. Customer has an invoice with PaymentStatus::PENDING.
    2. Invoice age exceeds the configured payment reminder threshold.
    3. Application is started and system checks execute.

    Steps:
    1. Start the application.
    2. Allow system checks to run during startup.
    3. Navigate to View Notifications.
       - Verify that a payment reminder notification is displayed.
    4. Open the generated notification.
       - Verify that the notification includes the invoice ID and due date.
    5. Complete payment for the invoice and restart the application.
       - Verify that no further reminder notifications are generated for the paid invoice.
</Test>

<Review>
    Sreeja Reghukumar, please review
</Review>
2026-05-21 12:25:45 +05:30
joelthomastrenser aef0f4146e Implement Low Stock Alert functionality
<UserStory> NOT004: Low Stock Alert </UserStory>

<Changes>
    1. Added low stock alert check in Controller::runSystemChecks() to trigger inventory notification processing during system startup.
    2. Implemented InventoryManagementService::sendLowStockAlerts() to detect inventory items below threshold, identify admin users, and send low stock alert notifications with item details.
    3. Added helper logic to notify all admins when low stock inventory is detected.

</Changes>

<Test>

    Precondition:
    1. System has at least one admin user.
    2. Inventory item exists with quantity below the configured low stock threshold.
    3. Application is started and system checks execute.

    Steps:
    1. Start the application.
    2. Allow system checks to run during startup.
    3. Navigate to Inventory Menu / View Notifications.
       - Verify that a low stock alert notification is displayed.
    4. Open the generated notification.
       - Verify that the notification includes the part name and remaining quantity.
    5. Confirm notification content.
       - Verify that the alert was triggered only for inventory items with stock below the threshold.

</Test>

<Review>
    Sreeja Reghukumar, please review
</Review>
2026-05-21 12:20:39 +05:30
joelthomastrenser c92ad773c7 Implement Configure Notifications functionality
<UserStory> NOT006: Configure Notifications </UserStory>

<Changes>
    1. Added notification subscription configuration in CustomerMenu to allow customers to enable or disable notifications for Payment Management Service and Service Management Service.
    2. Updated Controller::configureNotifications() to attach or detach the authenticated user from service observers based on selected notification preferences.
    3. Refactored Observer interface and User notification handling to support notification delivery through observer subscriptions.
    4. Implemented observer attach, detach, and sendNotification logic in InventoryManagementService, PaymentManagementService, and ServiceManagementService to ensure notifications are sent only to subscribed users.

</Changes>

<Test>

    Precondition:
    1. Customer user is logged into the system.
    2. Notification configuration option is available in Customer Menu.
    3. Notification-triggering event exists for Payment Management Service or Service Management Service.

    Steps:
    1. Navigate to Configure Notification Preferences in Customer Menu.
    2. Enable notifications for one service and disable notifications for the other.
    3. Trigger a notification event for both services.
       - Verify that notification is received only from the subscribed service.
    4. Change preferences by disabling the subscribed service and enabling the other.
    5. Trigger notification events again.
       - Verify that notification is received only from the newly subscribed service.

</Test>

<Review>
    Sreeja Reghukumar, please review
</Review>
2026-05-20 19:55:54 +05:30
joelthomastrenser 713c3b6cf9 Implement View Technician Notifications
<UserStory> NOT003: View Technician Notifications </UserStory>

<Changes>
    1. Added MenuHelper.h to the project for shared notification viewing helper support.
    2. Updated TechnicianMenu.cpp to include MenuHelper.h and route viewNotifications() through the shared notification handler.
</Changes>

<Test>

    Precondition:
    1. Technician user exists and is logged into the system.
    2. Technician has one or more notifications available.
    3. “View Notifications” option is visible in the Technician menu.

    Steps:
    1. Navigate to Technician Menu.
    2. Select “View Notifications”.
    3. Verify that the system displays a list of notifications showing title, message, and timestamp.
    4. Select a notification to view full details.
       - Verify that the selected notification is displayed and deleted after viewing.
    5. Return to the notification list or reopen “View Notifications”.
       - Verify that the previously viewed notification is no longer present.

</Test>

<Review>
    Sreeja Reghukumar, please review
</Review>
2026-05-20 16:24:34 +05:30
joelthomastrenser 1732776d13 Implement View Admin Notifications
<UserStory> NOT002: View Admin Notifications </UserStory>

<Changes>
    1. Added shared notification view handler `viewAndDeleteNotification()` in MenuHelper.h for notification viewing and deletion logic reuse.
    2. Updated AdminMenu.cpp to include MenuHelper.h and connected AdminMenu::viewNotifications() to the shared notification handler.
</Changes>

<Test>

    Precondition:
    1. Admin user exists and is logged into the system.
    2. Admin has one or more notifications available.
    3. “View Notifications” option is visible in the Admin menu.

    Steps:
    1. Navigate to Admin Menu.
    2. Select “View Notifications”.
    3. Verify that the system displays a list of notifications showing title, message, and timestamp.
    4. Select a notification to view full details.
       - Verify that the selected notification is displayed and deleted after viewing.
    5. Return to the notification list or reopen “View Notifications”.
       - Verify that the previously viewed notification is no longer present.

</Test>

<Review>
    Sreeja Reghukumar, please review
</Review>
2026-05-20 16:10:04 +05:30
joelthomastrenser 56c5c2dc70 Refactor notification service abstraction
- Removed observer map from Subject base class
- Removed notify() from Subject interface
- Made NotificationManagementService abstract with pure virtual methods
- Added static observer maps to notification service implementations
- Added attach() and detach() overrides in inventory, payment, and service management services
- Added update() override in User model for observer pattern support
- Updated notification method declarations with override specifiers
2026-05-19 19:39:55 +05:30
joelthomastrenser 007927bf34 Implement NotificationManagementService methods
- Added concrete sendNotification() implementation declaration
- Added attach() and detach() overrides for observer management
- Added notify() override for notification dispatch
- Removed pure virtual declarations from NotificationManagementService
2026-05-19 16:52:45 +05:30
joelthomastrenser d10cc91c40 Add state tracking for models and menu loop setup
<Changes>
    1. Added State enum with ACTIVE and INACTIVE values in Enums.h.
    2. Added state member, getter, and setter in User, Service, InventoryItem, and ComboPackage models.
    3. Updated constructors to initialize model objects with ACTIVE state by default.
    4. Added state string conversion helper functions in Enums.h.
    5. Added default return values in Controller getter methods to complete stub implementations.
    6. Added basic menu loop implementation in CustomerMenu and TechnicianMenu for handling user input.
</Changes>
2026-05-19 16:21:56 +05:30
joelthomastrenser dd834ded44 Update controller methods and fix const issues
Changes:
- Added stub implementations for Controller.cpp methods
- Fixed const issue in UserInterface methods (run, login, registerCustomer, handleOperation)
- Changed return types to use const pointers for read-only objects
- Updated maps and vectors to return const object pointers
- Fixed some function parameter names and signatures for consistency
2026-05-19 11:10:32 +05:30
Joel Thomas a7ad188801 Setup codebase 2026-05-19 09:56:36 +05:30
Dinshith V N. f39f9d0e79 Added README.md 2026-05-15 12:19:21 +00:00