From 1732776d13c2bfdaff33eb4a70572a506cf1221f Mon Sep 17 00:00:00 2001 From: Joel Thomas Date: Wed, 20 May 2026 16:10:04 +0530 Subject: [PATCH] Implement View Admin Notifications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NOT002: View Admin Notifications 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. 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. Sreeja Reghukumar, please review --- .../Trenser.VehicleServiceSystem/views/AdminMenu.cpp | 2 ++ .../Trenser.VehicleServiceSystem/views/MenuHelper.h | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h diff --git a/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/AdminMenu.cpp b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/AdminMenu.cpp index 0432f3c..589df33 100644 --- a/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/AdminMenu.cpp +++ b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/AdminMenu.cpp @@ -1,6 +1,7 @@ #include "AdminMenu.h" #include "InputHelper.h" #include "OutputHelper.h" +#include "MenuHelper.h" void AdminMenu::showMenu() { @@ -86,4 +87,5 @@ void AdminMenu::removeComboPackage() void AdminMenu::viewNotifications() { + viewAndDeleteNotification(m_controller); } diff --git a/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h new file mode 100644 index 0000000..74025b7 --- /dev/null +++ b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h @@ -0,0 +1,6 @@ +#pragma once +#include "Controller.h" + +inline void viewAndDeleteNotification(Controller& controller) +{ +}