diff --git a/Trenser.Zenvy/Trenser.Zenvy/Trenser.Zenvy.cpp b/Trenser.Zenvy/Trenser.Zenvy/Trenser.Zenvy.cpp index 4413069..64b1e4b 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/Trenser.Zenvy.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/Trenser.Zenvy.cpp @@ -1,4 +1,12 @@ +/* + * File: Trenser.Zenvy.cpp + * Description: Zenvy Main + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include "UserInterface.h" + int main() { UserInterface userInterFace; diff --git a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp index 3d97204..162bdd2 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp @@ -1,16 +1,53 @@ +/* + * File: ZenvyController.cpp + * Description : Controls data flow between UI and Service Layers. + * Author: Trenser + * Created : 01-04-2026 + */ + #include "ZenvyController.h" -//Authentication +/* + * Function: login + * Description: authenticates the employee based on email and password + * Parameters: + * email - email of the employee + * password - password of the employee + * Returns: + * Tuple - login status, employee type, employee designation + * login status - success or failed + * employee type - type of the employee logged in + * employee designation - designation if employee type is GENERAL. + */ + AuthenticationDTO ZenvyController::login(const std::string& email, const std::string& password) { return m_authenticationManagementService->login(email, password); } +/* + * Function: changePassword + * Description: updates the password of the currently authenticated employee. + * Parameters: + * password - the new password to be set for the employee + * Returns: + * void - no return value + */ + void ZenvyController::logout() { m_authenticationManagementService->logout(); } +/* + * Function: changePassword + * Description: updates the password of the currently authenticated employee. + * Parameters: + * password - the new password to be set for the employee + * Returns: + * void - no return value + */ + void ZenvyController::changePassword(const std::string& password) { m_authenticationManagementService->changePassword(password); diff --git a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h index 1a5c77b..364ec49 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h +++ b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h @@ -1,3 +1,10 @@ +/* + * File: ZenvyController.h + * Description : Controls data flow between UI and Service Layers. + * Author: Trenser + * Created : 01-04-2026 + */ + #pragma once #include #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp index 16ddca1..64694df 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp @@ -1,31 +1,92 @@ +/* + * File: DataStore.cpp + * Description: Central Storage for all the System Data. + * Author: Trenser + * Created: 01-04-2026 + */ + #include "DataStore.h" +/* + * Function: getInstance + * Description: provides a singleton instance of the DataStore. + * Parameters: + * None + * Returns: + * DataStore& - reference to the single DataStore object. + */ + DataStore& DataStore::getInstance() { static DataStore dataStore; return dataStore; } +/* + * Function: getLogs + * Description: retrieves the log map containing system logs. + * Parameters: + * None + * Returns: + * logMap& - reference to the log map. + */ + logMap& DataStore::getLogs() { return m_logs; } +/* + * Function: getAuthenticatedEmployee + * Description: returns the currently authenticated employee. + * Parameters: + * None + * Returns: + * std::shared_ptr& - reference to the authenticated employee object. + */ + std::shared_ptr& DataStore::getAuthenticatedEmployee() { return m_authenticatedEmployee; } +/* + * Function: setAuthenticatedEmployee + * Description: sets the currently authenticated employee. + * Parameters: + * authenticatedEmployee - shared pointer to the employee object to be set as authenticated. + * Returns: + * void - no return value. + */ + void DataStore::setAuthenticatedEmployee(std::shared_ptr authenticatedEmployee) { m_authenticatedEmployee = authenticatedEmployee; } +/* + * Function: getEmployees + * Description: retrieves the employee map containing all employees. + * Parameters: + * None + * Returns: + * employeeMap& - reference to the employee map. + */ + employeeMap& DataStore::getEmployees() { return m_employees; } +/* + * Function: getAuthenticatedUser + * Description: alias for getAuthenticatedEmployee, returns the currently authenticated employee. + * Parameters: + * None + * Returns: + * std::shared_ptr& - reference to the authenticated employee object. + */ + std::shared_ptr& DataStore::getAuthenticatedUser() { return m_authenticatedEmployee; diff --git a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h index 5ecfb70..603d49c 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h +++ b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h @@ -1,3 +1,10 @@ +/* + * File: DataStore.h + * Description: Central Storage for all the System Data. + * Author: Trenser + * Created: 01-04-2026 + */ + #pragma once #include #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/factories/Factory.h b/Trenser.Zenvy/Trenser.Zenvy/factories/Factory.h index 0c54b81..f65c267 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/factories/Factory.h +++ b/Trenser.Zenvy/Trenser.Zenvy/factories/Factory.h @@ -1,3 +1,10 @@ +/* + * File: Factory.h + * Description: Provides a generic factory utility to create shared_ptr instances of objects. + * Author: Ajmal J S + * Created: 01-04-2026 + */ + #pragma once #include #include @@ -5,6 +12,17 @@ class Factory { public: + + /* + * Function: getObject + * Description: Creates and returns a shared_ptr to an object of type T. + * Parameters: + * T - the type of object to be created + * Args - constructor arguments forwarded to T's constructor + * Returns: + * std::shared_ptr - a shared pointer managing the newly created object + */ + template static std::shared_ptr getObject(Args&&... args) { diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Admin.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Admin.cpp index 0cc2b4c..f63c352 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Admin.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Admin.cpp @@ -1 +1,7 @@ +/* + * File: Admin.cpp + * Description: Admin model class + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "Admin.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Admin.h b/Trenser.Zenvy/Trenser.Zenvy/models/Admin.h index 97f4f4e..f507ccc 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Admin.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Admin.h @@ -1,3 +1,10 @@ +/* + * File: Admin.h + * Description: Admin model class + * Author: Trenser + * Created: 31-Mar-2026 + */ + #pragma once #include "Employee.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Announcement.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Announcement.cpp index 01cec1a..67e0c4e 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Announcement.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Announcement.cpp @@ -1,3 +1,9 @@ +/* + * File: Announcement.cpp + * Description: The Announcement class that stores an announcement’s ID, timestamp, and message with getter and setter functions for controlled access. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "Announcement.h" const std::string& Announcement::getAnnouncementId() const diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.cpp index 7565537..bcbf622 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.cpp @@ -1,3 +1,9 @@ +/* + * File: Attendance.cpp + * Description: The Attendance class manages attendance records by storing login and logout times. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "Attendance.h" const std::string& Attendance::getAttendanceId() const diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.h b/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.h index 3b10f5c..89f4ed3 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.h @@ -1,3 +1,9 @@ +/* + * File: Attendance.h + * Description: The Attendance class represents an attendance record by storing an ID, login and logout timestamps. + * Author: Trenser + * Created: 31-Mar-2026 + */ #pragma once #include #include "Timestamp.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Booking.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Booking.cpp index a40ed2b..6689689 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Booking.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Booking.cpp @@ -1,3 +1,9 @@ +/* + * File: Booking.cpp + * Description: The Booking class stores booking details and calculates the duration between start and end times. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "Booking.h" const std::string& Booking::getBookingId() const diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Booking.h b/Trenser.Zenvy/Trenser.Zenvy/models/Booking.h index 7e99b4a..f88c084 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Booking.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Booking.h @@ -1,3 +1,9 @@ +/* + * File: Booking.h + * Description: The Booking class represents a time?based booking with employee and team details and supports duration calculation. + * Author: Trenser + * Created: 31-Mar-2026 + */ #pragma once #include #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.cpp index e4831a4..8394260 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.cpp @@ -1,3 +1,9 @@ +/* + * File: Candidate.cpp + * Description: The Candidate class manages candidate details and status using getter and setter methods. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "Candidate.h" const std::string& Candidate::getCandidateId() const diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.h b/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.h index 257c54d..aefb893 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.h @@ -1,3 +1,9 @@ +/* + * File: Candidate.h + * Description: The Candidate class stores and manages a candidate’s information. + * Author: Trenser + * Created: 31-Mar-2026 + */ #pragma once #include #include "Enums.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Employee.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Employee.cpp index 4bd8c3b..68c1963 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Employee.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Employee.cpp @@ -1,3 +1,9 @@ +/* + * File: Employee.cpp + * Description: The Employee class stores and manages employee details along with related work records. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "Employee.h" const std::string& Employee::getEmployeeId() const diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Employee.h b/Trenser.Zenvy/Trenser.Zenvy/models/Employee.h index 3509db1..400eebd 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Employee.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Employee.h @@ -1,3 +1,9 @@ +/* + * File: Employee.h + * Description: The Employee class manages employee information and associated work records such as payroll, attendance, leaves, and payslips. + * Author: Trenser + * Created: 31-Mar-2026 + */ #pragma once #include #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/FAQ.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/FAQ.cpp index 63a403f..a5e7b41 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/FAQ.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/FAQ.cpp @@ -1 +1,7 @@ +/* + * File: Faq.h + * Description: Faq model class. + * Author: Trenser + * Created: 02-Apr-2026 + */ #include "Faq.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/FAQ.h b/Trenser.Zenvy/Trenser.Zenvy/models/FAQ.h index b90edff..3788612 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/FAQ.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/FAQ.h @@ -1,3 +1,9 @@ +/* + * File: Faq.h + * Description: Faq model class. + * Author: Trenser + * Created: 02-Apr-2026 + */ #pragma once class Faq diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/FinanceExecutive.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/FinanceExecutive.cpp index ec96663..93d3b6c 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/FinanceExecutive.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/FinanceExecutive.cpp @@ -1 +1,7 @@ +/* + * File: FinanceExecutive.h + * Description: FinanceExecutive model class. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "FinanceExecutive.h" \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/FinanceExecutive.h b/Trenser.Zenvy/Trenser.Zenvy/models/FinanceExecutive.h index 8aafc69..2f529bb 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/FinanceExecutive.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/FinanceExecutive.h @@ -1,3 +1,9 @@ +/* + * File: FinanceExecutive.h + * Description: FinanceExecutive model class. + * Author: Trenser + * Created: 31-Mar-2026 + */ #pragma once #include "Employee.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/GeneralEmployee.h b/Trenser.Zenvy/Trenser.Zenvy/models/GeneralEmployee.h index 6307e28..2c40288 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/GeneralEmployee.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/GeneralEmployee.h @@ -1,3 +1,9 @@ +/* + * File: GeneralEmployee.h + * Description: The GeneralEmployee class represents a general employee with a specific designation. + * Author: Trenser + * Created: 31-Mar-2026 + */ #pragma once #include "Employee.h" #include "Enums.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/HRManager.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/HRManager.cpp index 4b7ee33..8f9615f 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/HRManager.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/HRManager.cpp @@ -1 +1,7 @@ +/* + * File: HRManager.cpp + * Description: HRManager model class. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "HRManager.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/HRManager.h b/Trenser.Zenvy/Trenser.Zenvy/models/HRManager.h index 5e50a74..fda356c 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/HRManager.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/HRManager.h @@ -1,3 +1,9 @@ +/* + * File: HRManager.h + * Description: HRManager model class. + * Author: Trenser + * Created: 31-Mar-2026 + */ #pragma once #include "Employee.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/ITExecutive.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/ITExecutive.cpp index 700fcd9..7beaf7d 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/ITExecutive.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/ITExecutive.cpp @@ -1 +1,7 @@ +/* + * File: ITExecutive.cpp + * Description: ITExecutive model class. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "ITExecutive.h" \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/ITExecutive.h b/Trenser.Zenvy/Trenser.Zenvy/models/ITExecutive.h index 2a61ef8..b839ae4 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/ITExecutive.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/ITExecutive.h @@ -1,3 +1,9 @@ +/* + * File: ITExecutive.h + * Description: ITExecutive model class. + * Author: Trenser + * Created: 31-Mar-2026 + */ #pragma once #include "Employee.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.cpp index ba1267c..0d4b30e 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.cpp @@ -1,5 +1,13 @@ +/* +File: JobListing.cpp +* Description : Represents a job opening along with its details and applied candidates. +* Author : Trenser +* Created : 01 - Apr - 2026 +*/ + #include "JobListing.h" +//Getters and setters const std::string& JobListing::getJobId() const { return m_id; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.h b/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.h index 3622743..10b6c57 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.h @@ -1,3 +1,10 @@ +/* +File: JobListing.h +* Description : Represents a job opening along with its details and applied candidates. +* Author : Trenser +* Created : 01 - Apr - 2026 +*/ + #pragma once #include #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Leave.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Leave.cpp index 1755bc7..4ac215b 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Leave.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Leave.cpp @@ -1,5 +1,13 @@ +/* +File: Leave.cpp +* Description : Stores information related to an employee’s leave application. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #include "Leave.h" +//Getters and setters const std::string& Leave::getLeaveId() const { return m_id; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Leave.h b/Trenser.Zenvy/Trenser.Zenvy/models/Leave.h index 0133f4a..a7588e2 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Leave.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Leave.h @@ -1,3 +1,10 @@ +/* +File: Leave.h +* Description : Stores information related to an employee’s leave application. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #pragma once #include #include "Enums.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Log.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Log.cpp index 890cfc5..a022679 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Log.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Log.cpp @@ -1,5 +1,13 @@ +/* +File: Log.cpp +* Description : Represents a log entry containing a timestamp and an associated message. +* Author : Trenser +* Created : 01 - Apr - 2026 +*/ + #include "Log.h" +//Getters and setters const util::Timestamp& Log::getTimestamp() const { return m_timestamp; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Log.h b/Trenser.Zenvy/Trenser.Zenvy/models/Log.h index f2350b2..416d7fb 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Log.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Log.h @@ -1,3 +1,10 @@ +/* +File: Log.h +* Description : Represents a log entry containing a timestamp and an associated message. +* Author : Trenser +* Created : 01 - Apr - 2026 +*/ + #pragma once #include #include "Timestamp.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Notification.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Notification.cpp index f91530a..2bc0c0d 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Notification.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Notification.cpp @@ -1,5 +1,13 @@ +/* +File: Notification.cpp +* Description : Represents an employee notification with message and status details. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #include "Notification.h" +//Getters and setters const std::string& Notification::getNotificationId() const { return m_id; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Notification.h b/Trenser.Zenvy/Trenser.Zenvy/models/Notification.h index 0cd723c..cf76caf 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Notification.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Notification.h @@ -1,3 +1,10 @@ +/* +File: Notification.h +* Description : Represents an employee notification with message and status details. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #pragma once #include #include "Enums.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.cpp index eae13a1..b76ab8d 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.cpp @@ -1,5 +1,13 @@ +/* +File: Payroll.cpp +* Description : Stores payroll and salary breakdown details for an employee. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #include "Payroll.h" +//Getters and setters const std::string& Payroll::getPayrollId() const { return m_id; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.h b/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.h index 498eaf8..3ebe780 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.h @@ -1,3 +1,10 @@ +/* +File: Payroll.h +* Description : Stores payroll and salary breakdown details for an employee. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #pragma once #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.cpp index 3daf4b9..70e42e7 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.cpp @@ -1,5 +1,13 @@ +/* +File: Payslip.cpp +* Description : Models a payslip entity that stores salary information. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #include "Payslip.h" +//Getters and setters const std::string& Payslip::getPayslipId() const { return m_id; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.h b/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.h index 3f48dd2..06d0023 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.h @@ -1,3 +1,10 @@ +/* +File: Payslip.h +* Description : Models a payslip entity that stores salary information. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #pragma once #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Room.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Room.cpp index 9fcd521..cb5abbb 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Room.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Room.cpp @@ -1,5 +1,13 @@ +/* +File: Room.cpp +* Description : Models a room entity that maintains room details and manages its bookings. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #include "Room.h" +//Getters and setters const std::string& Room::getRoomId() const { return m_id; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Room.h b/Trenser.Zenvy/Trenser.Zenvy/models/Room.h index 48a4ba1..595ffaa 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Room.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Room.h @@ -1,3 +1,10 @@ +/* +File: Room.h +* Description : Models a room entity that maintains room details and manages its bookings. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #pragma once #include #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/TalentExecutive.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/TalentExecutive.cpp index de7213f..112c3d0 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/TalentExecutive.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/TalentExecutive.cpp @@ -1 +1,8 @@ +/* +File: TalentExecutive.cpp +* Description : Represents information related to a talent executive in the system. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #include "TalentExecutive.h" \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/TalentExecutive.h b/Trenser.Zenvy/Trenser.Zenvy/models/TalentExecutive.h index fcbfbcd..a5bfa6e 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/TalentExecutive.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/TalentExecutive.h @@ -1,3 +1,10 @@ +/* +File: TalentExecutive.h +* Description : Represents information related to a talent executive in the system. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #pragma once #include "Employee.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Team.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Team.cpp index a6848b3..4a26647 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Team.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Team.cpp @@ -1,5 +1,13 @@ +/* +File: Team.cpp +* Description : Models a team entity that maintains team identity, leadership, employee list, and size limitations. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #include "Team.h" +//Getters and setters const std::string& Team::getTeamId() const { return m_id; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Team.h b/Trenser.Zenvy/Trenser.Zenvy/models/Team.h index edb8f44..e353aa3 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Team.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Team.h @@ -1,3 +1,10 @@ +/* +File: Team.h +* Description : Models a team entity that maintains team identity, leadership, employee list, and size limitations. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #pragma once #include #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/TeamExecutive.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/TeamExecutive.cpp index df14a3f..aac8db4 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/TeamExecutive.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/TeamExecutive.cpp @@ -1 +1,8 @@ +/* +File: TeamExecutive.cpp +* Description : Represents information related to a team executive within the system. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #include "TeamExecutive.h" \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/TeamExecutive.h b/Trenser.Zenvy/Trenser.Zenvy/models/TeamExecutive.h index d7db4e9..1bd7def 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/TeamExecutive.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/TeamExecutive.h @@ -1,3 +1,10 @@ +/* +File: TeamExecutive.h +* Description : Represents information related to a team executive within the system. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #pragma once #include "Employee.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.cpp index 328421c..af67e08 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.cpp @@ -1,5 +1,13 @@ +/* +File: Ticket.cpp +* Description : Represents a support ticket with its associated details and status. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #include "Ticket.h" +//Getters and setters const std::string& Ticket::getTicketId() const { return m_id; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.h b/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.h index 7d54a6f..88f8ed8 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.h @@ -1,3 +1,10 @@ +/* +File: Ticket.h +* Description : Represents a support ticket with its associated details and status. +* Author : Trenser +* Created : 31 - Mar - 2026 +*/ + #pragma once #include #include "Enums.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.cpp index cb68b98..e5a0d0e 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.cpp @@ -1 +1,8 @@ +/* + * File: ApplicationConfig.cpp + * Description: Global Application Config + * Author: Trenser + * Created: 06-Apr-2026 + */ + #include "ApplicationConfig.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.h b/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.h index 8e4705e..bbeadd1 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.h @@ -1,3 +1,10 @@ +/* + * File: ApplicationConfig.h + * Description: Global Application Config + * Author: Trenser + * Created: 06-Apr-2026 + */ + #pragma once namespace Config diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.cpp index fb3ab62..2ab575a 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.cpp @@ -1 +1,8 @@ +/* + * File: AttendanceManagementService.cpp + * Description: Handles Attendance related operations + * Author: Trenser + * Created: 30-Apr-2026 + */ + #include "AttendanceManagementService.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.h index 64374bf..5f12270 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.h @@ -1,3 +1,10 @@ +/* + * File: AttendanceManagementService.h + * Description: Handles Attendance related operations + * Author: Trenser + * Created: 30-Apr-2026 + */ + #pragma once class AttendanceManagementService { diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.cpp index 9d7fc4f..642c868 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.cpp @@ -1,65 +1,103 @@ +/* + * File: AuthenticationManagementService.cpp + * Description: Handles authentication related operations + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include #include "AuthenticationManagementService.h" #include "ApplicationConfig.h" +/* + * Function: login + * Description: Authenticates a user using email and password, determines login status, + * employee type, and designation, and sets the authenticated employee + * in the data store. + * Parameters: + * email - employee email address + * password - employee password + * Returns: + * AuthenticationDTO containing login status, employee type, and employee designation + */ AuthenticationDTO AuthenticationManagementService::login(const std::string& email, const std::string& password) { - employeeMap& employees = m_dataStore.getEmployees(); - Enums::LoginStatus loginStatus = Enums::LoginStatus::USER_NOT_FOUND; - Enums::EmployeeType employeeType = Enums::EmployeeType::INVALID; - Enums::EmployeeDesignation employeeDesignation = Enums::EmployeeDesignation::INVALID; - for (const auto& employee : employees) - { - if (employee.second->getEmployeeEmail() == email) - { - if (employee.second->getEmployeePassword() == password) - { - if (password == Config::Authentication::DEFAULT_PASSWORD) - { - loginStatus = Enums::LoginStatus::FIRST_LOGIN; - } - else - { - loginStatus = Enums::LoginStatus::SUCCESS; - } - employeeType = employee.second->getEmployeeType(); - if (employeeType == Enums::EmployeeType::GENERAL) - { - std::shared_ptr generalEmployee = std::dynamic_pointer_cast(employee.second); - if (generalEmployee) - { - employeeDesignation = generalEmployee->getDesignation(); - } - else - { - throw std::runtime_error("Invalid Employee Type"); - } - } - m_dataStore.setAuthenticatedEmployee(employee.second); - } - else - { - loginStatus = Enums::LoginStatus::INVALID_PASSWORD; - } - break; - } - } - return std::make_tuple(loginStatus, employeeType, employeeDesignation); + employeeMap& employees = m_dataStore.getEmployees(); + Enums::LoginStatus loginStatus = Enums::LoginStatus::USER_NOT_FOUND; + Enums::EmployeeType employeeType = Enums::EmployeeType::INVALID; + Enums::EmployeeDesignation employeeDesignation = Enums::EmployeeDesignation::INVALID; + for (const auto& employee : employees) + { + if (employee.second->getEmployeeEmail() == email) + { + if (employee.second->getEmployeePassword() == password) + { + if (password == Config::Authentication::DEFAULT_PASSWORD) + { + loginStatus = Enums::LoginStatus::FIRST_LOGIN; + } + else + { + loginStatus = Enums::LoginStatus::SUCCESS; + } + employeeType = employee.second->getEmployeeType(); + if (employeeType == Enums::EmployeeType::GENERAL) + { + std::shared_ptr generalEmployee = std::dynamic_pointer_cast(employee.second); + if (generalEmployee) + { + employeeDesignation = generalEmployee->getDesignation(); + } + else + { + throw std::runtime_error("Invalid Employee Type"); + } + } + m_dataStore.setAuthenticatedEmployee(employee.second); + } + else + { + loginStatus = Enums::LoginStatus::INVALID_PASSWORD; + } + break; + } + } + return std::make_tuple(loginStatus, employeeType, employeeDesignation); } +/* + * Function: changePassword + * Description: Updates the password of the currently authenticated user. + * Parameters: + * password - new password to be set + * Returns: + * None + * Throws: + * runtime_error if no authenticated user is found + */ void AuthenticationManagementService::changePassword(const std::string& password) { - std::shared_ptr authenticatedUser = m_dataStore.getAuthenticatedUser(); - if (authenticatedUser) - { - authenticatedUser->setEmployeePassword(password); - } - else - { - throw std::runtime_error("User not found"); - } + std::shared_ptr authenticatedUser = m_dataStore.getAuthenticatedUser(); + if (authenticatedUser) + { + authenticatedUser->setEmployeePassword(password); + } + else + { + throw std::runtime_error("User not found"); + } } +/* + * Function: logout + * Description: Logs out the currently authenticated user by clearing authentication data. + * Parameters: + * None + * Returns: + * None + * Throws: + * runtime_error if no user is currently logged in + */ void AuthenticationManagementService::logout() { if (m_dataStore.getAuthenticatedUser()) { m_dataStore.getAuthenticatedUser() = nullptr; diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.h index f838311..392065b 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.h @@ -1,3 +1,10 @@ +/* + * File: AuthenticationManagementService.h + * Description: Handles authentication related operations + * Author: Trenser + * Created: 30-Mar-2026 + */ + #pragma once #include #include @@ -19,4 +26,3 @@ public: void logout(); void changePassword(const std::string&); }; - diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.cpp index db5a4c9..cb032c3 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.cpp @@ -1 +1,8 @@ +/* + * File: BookingManagementService.cpp + * Description: Handle operations related to booking meetings + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include "BookingManagementService.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.h index 75d7d57..7f343a4 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.h @@ -1,3 +1,10 @@ +/* + * File: BookingManagementService.h + * Description: Handle operations related to booking meetings + * Author: Trenser + * Created: 30-Mar-2026 + */ + #pragma once class BookingManagementService { diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagememtService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagememtService.cpp index bf8ad9d..5fdebfe 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagememtService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagememtService.cpp @@ -1 +1,8 @@ +/* + * File: EmployeeManagementService.cpp + * Description: Handle operations related to employees + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include "EmployeeManagememtService.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagememtService.h b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagememtService.h index 05e6ca7..3bb2294 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagememtService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagememtService.h @@ -1,3 +1,10 @@ +/* + * File: EmployeeManagementService.h + * Description: Handle operations related to employees + * Author: Trenser + * Created: 30-Mar-2026 + */ + #pragma once class EmployeeManagememtService { diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.cpp index a40f268..733f9eb 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.cpp @@ -1 +1,8 @@ +/* + * File: LeaveManagementService.cpp + * Description: Handle operations related to leaves + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include "LeaveManagementService.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.h index 6447f13..1010ec4 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.h @@ -1,3 +1,10 @@ +/* + * File: LeaveManagementService.h + * Description: Handle operations related to leaves + * Author: Trenser + * Created: 30-Mar-2026 + */ + #pragma once class LeaveManagementService { diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/LogService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/LogService.cpp index 1742a3d..3e77020 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/LogService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/LogService.cpp @@ -1,3 +1,10 @@ +/* + * File: Log.cpp + * Description: Handle operations related to logging + * Author: Trenser + * Created: 01-Apr-2026 + */ + #include "LogService.h" #include "Log.h" #include "Factory.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/LogService.h b/Trenser.Zenvy/Trenser.Zenvy/services/LogService.h index 6918b25..c1cf644 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/LogService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/LogService.h @@ -1,3 +1,10 @@ +/* + * File: Log.h + * Description: Handle operations related to logging + * Author: Trenser + * Created: 01-Apr-2026 + */ + #pragma once #include "Log.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.cpp index cc23059..7eaa377 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.cpp @@ -1 +1,8 @@ +/* + * File: NotificationManagementService.cpp + * Description: Handle operations related to notifications + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include "NotificationManagementService.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.h index f976574..6b4aba1 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.h @@ -1,5 +1,11 @@ +/* + * File: NotificationManagementService.h + * Description: Handle operations related to notifications + * Author: Trenser + * Created: 30-Mar-2026 + */ + #pragma once class NotificationManagementService { }; - diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.cpp index 154cf1f..57ca929 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.cpp @@ -1 +1,8 @@ +/* + * File: PayslipManagementService.cpp + * Description: Handle operations related to employee payslips + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include "PayslipManagementService.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.h index 04c9805..7f43806 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.h @@ -1,3 +1,10 @@ +/* + * File: PayslipManagementService.h + * Description: Handle operations related to employee payslips + * Author: Trenser + * Created: 30-Mar-2026 + */ + #pragma once class PayslipManagementService { diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.cpp index 5fd0d2d..9e0ef96 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.cpp @@ -1 +1,8 @@ +/* + * File: TalentAcquisitionManagementService.cpp + * Description: Handle operations related to Talent Acquisition + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include "TalentAcquisitionManagementService.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.h index 855dda7..ed0dd32 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.h @@ -1,5 +1,11 @@ +/* + * File: TalentAcquisitionManagementService.h + * Description: Handle operations related to Talent Acquisition + * Author: Trenser + * Created: 30-Mar-2026 + */ + #pragma once class TalentAcquisitionManagementService { }; - diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.cpp index f78fe48..8b13b81 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.cpp @@ -1 +1,8 @@ +/* + * File: TeamManagementService.cpp + * Description: Handle operations related to Team Management + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include "TeamManagementService.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.h index 918229d..21275da 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.h @@ -1,3 +1,10 @@ +/* + * File: TeamManagementService.h + * Description: Handle operations related to Team Management + * Author: Trenser + * Created: 30-Mar-2026 + */ + #pragma once class TeamManagementService { diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.cpp index 4649010..bc995f9 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.cpp @@ -1 +1,8 @@ +/* + * File: TicketManagementService.h + * Description: Handle operations related to Ticket Management + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include "TicketManagementService.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.h index 1db345b..8a38d98 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.h @@ -1,3 +1,10 @@ +/* + * File: TicketManagementService.h + * Description: Handle operations related to Ticket Management + * Author: Trenser + * Created: 30-Mar-2026 + */ + #pragma once class TicketManagementService { diff --git a/Trenser.Zenvy/Trenser.Zenvy/utilities/Enums.h b/Trenser.Zenvy/Trenser.Zenvy/utilities/Enums.h index ace8792..0d5111b 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/utilities/Enums.h +++ b/Trenser.Zenvy/Trenser.Zenvy/utilities/Enums.h @@ -1,3 +1,10 @@ +/* + * File: Enums.h + * Description: Defines strongly typed enumerations for statuses, types, and designations used across the HRMS system. + * Author: Smitha + * Created: 01-04-2026 + */ + #pragma once namespace Enums { diff --git a/Trenser.Zenvy/Trenser.Zenvy/utilities/InputHelper.h b/Trenser.Zenvy/Trenser.Zenvy/utilities/InputHelper.h index 559acda..5de0e35 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/utilities/InputHelper.h +++ b/Trenser.Zenvy/Trenser.Zenvy/utilities/InputHelper.h @@ -1,5 +1,11 @@ -#pragma once +/* + * File: InputHelper.h + * Description: Handles input validation and error handling + * Author: Smitha + * Created: 08-Apr-2026 + */ +#pragma once #include #include #include @@ -7,6 +13,15 @@ namespace util { + /* + * Function: read + * Description: Reads input from console into a variable of type T. + * Parameters: + * value - reference to a variable of type T where the input will be stored + * Returns: + * void - throws runtime_error if input is invalid + */ + template inline void read(T& value) { @@ -18,11 +33,27 @@ namespace util } } + /* + * Function: read + * Description: Reads a line of text input from console into a string. + * Parameters: + * value - reference to a string where the input will be stored + * Returns: + * void - no return value + */ + inline void read(std::string& value) { std::getline(std::cin >> std::ws, value); } + /* + * Function: pressEnter + * Description: Pauses execution until the user presses Enter. + * Parameters: None + * Returns: void - no return value + */ + inline void pressEnter() { system("pause"); diff --git a/Trenser.Zenvy/Trenser.Zenvy/utilities/OutputHelper.cpp b/Trenser.Zenvy/Trenser.Zenvy/utilities/OutputHelper.cpp index a8e0f7c..ce37ac4 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/utilities/OutputHelper.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/utilities/OutputHelper.cpp @@ -1,5 +1,20 @@ +/* + * File: OutputHelper.cpp + * Description: Provides functions to help with console output. + * Author: Trenser + * Created: 01-04-2026 +*/ + #include "outputHelper.h" +/* +* Function: clear +* Description: Clears the console screen output. +* Parameters: None +* Returns: +* void - no return value +*/ + void util::clear() { std::cout << "\x1B[2J\x1B[H" << std::flush; diff --git a/Trenser.Zenvy/Trenser.Zenvy/utilities/OutputHelper.h b/Trenser.Zenvy/Trenser.Zenvy/utilities/OutputHelper.h index a40dbaf..08a5b5f 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/utilities/OutputHelper.h +++ b/Trenser.Zenvy/Trenser.Zenvy/utilities/OutputHelper.h @@ -1,3 +1,10 @@ +/* + * File: OutputHelper.h + * Description: Provides functions to help with console output. + * Author: Trenser + * Created: 01-04-2026 +*/ + #pragma once #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/utilities/Timestamp.cpp b/Trenser.Zenvy/Trenser.Zenvy/utilities/Timestamp.cpp index 42d4758..3a51132 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/utilities/Timestamp.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/utilities/Timestamp.cpp @@ -1,18 +1,56 @@ +/* + * File: Timestamp.cpp + * Description: Provides a utility class for representing and manipulating time values. + * Supports conversion between string and time formats, duration calculations + * (hours, minutes, seconds), date extraction, and comparison operators. + * Author: Trenser + * Created: 01-Apr-2026 + */ + #include #include #include #include "Timestamp.h" +/* +* Function: Timestamp +* Description: Default constructor that initializes the timestamp to the current system time. +* Parameters: +* None +* Returns: +* Timestamp object +*/ + util::Timestamp::Timestamp() { m_time = std::time(nullptr); } +/* +* Function: Timestamp (overloaded) +* Description: Constructor that initializes the timestamp with a given time value. +* Parameters: +* timeValue - time_t value representing a specific time +* Returns: +* Timestamp object +*/ + util::Timestamp::Timestamp(std::time_t timeValue) { m_time = timeValue; } +/* +* Function: fromString +* Description: Creates a Timestamp object from a formatted string. +* Parameters: +* timeString - string in the format "YYYY-MM-DD HH:MM:SS" +* Returns: +* Timestamp object representing the parsed time +* Throws: +* runtime_error if the string format is invalid +*/ + util::Timestamp util::Timestamp::fromString(const std::string& timeString) { std::tm timeStruct = {}; @@ -26,6 +64,15 @@ util::Timestamp util::Timestamp::fromString(const std::string& timeString) return Timestamp(parsedTimestamp); } +/* +* Function: toString +* Description: Converts the Timestamp object into a formatted string. +* Parameters: +* None +* Returns: +* string - formatted as "YYYY-MM-DD HH:MM:SS" +*/ + std::string util::Timestamp::toString() const { std::tm timeStruct = {}; @@ -35,11 +82,30 @@ std::string util::Timestamp::toString() const return outputStream.str(); } +/* +* Function: getDurationInSeconds +* Description: Calculates the duration between two timestamps in seconds. +* Parameters: +* startTimestamp - starting time +* endTimestamp - ending time +* Returns: +* double - duration in seconds +*/ + double util::Timestamp::getDurationInSeconds(const Timestamp& startTimestamp, const Timestamp& endTimestamp) { return std::difftime(endTimestamp.m_time, startTimestamp.m_time); } +/* +* Function: getDateAsInt +* Description: Returns the date portion of the timestamp as an integer in YYYYMMDD format. +* Parameters: +* None +* Returns: +* int - date as YYYYMMDD +*/ + int util::Timestamp::getDateAsInt() const { std::tm timeStruct{}; @@ -50,36 +116,101 @@ int util::Timestamp::getDateAsInt() const return year * 10000 + month * 100 + day; } +/* +* Function: getDurationInMinutes +* Description: Calculates the duration between two timestamps in minutes. +* Parameters: +* startTimestamp - starting time +* endTimestamp - ending time +* Returns: +* double - duration in minutes +*/ + double util::Timestamp::getDurationInMinutes(const Timestamp& startTimestamp, const Timestamp& endTimestamp) { return getDurationInSeconds(startTimestamp, endTimestamp) / 60.0; } +/* +* Function: getDurationInHours +* Description: Calculates the duration between two timestamps in hours. +* Parameters: +* startTimestamp - starting time +* endTimestamp - ending time +* Returns: +* double - duration in hours +*/ + double util::Timestamp::getDurationInHours(const Timestamp& startTimestamp, const Timestamp& endTimestamp) { return getDurationInSeconds(startTimestamp, endTimestamp) / 3600.0; } +/* +* Function: operator< +* Description: Compares two timestamps to check if one is earlier than the other. +* Parameters: +* other - Timestamp to compare against +* Returns: +* bool - true if current timestamp is earlier +*/ + bool util::Timestamp::operator<(const Timestamp& other) const { return m_time < other.m_time; } +/* +* Function: operator> +* Description: Compares two timestamps to check if one is later than the other. +* Parameters: +* other - Timestamp to compare against +* Returns: +* bool - true if current timestamp is later +*/ + bool util::Timestamp::operator>(const Timestamp& other) const { return m_time > other.m_time; } +/* +* Function: operator<= +* Description: Compares two timestamps to check if one is earlier or equal. +* Parameters: +* other - Timestamp to compare against +* Returns: +* bool - true if current timestamp is earlier or equal +*/ + bool util::Timestamp::operator<=(const Timestamp& other) const { return m_time <= other.m_time; } +/* +* Function: operator>= +* Description: Compares two timestamps to check if one is later or equal. +* Parameters: +* other - Timestamp to compare against +* Returns: +* bool - true if current timestamp is later or equal +*/ + bool util::Timestamp::operator>=(const Timestamp& other) const { return m_time >= other.m_time; } +/* +* Function: operator== +* Description: Compares two timestamps for equality. +* Parameters: +* other - Timestamp to compare against +* Returns: +* bool - true if both timestamps are equal +*/ + bool util::Timestamp::operator==(const Timestamp& other) const { return m_time == other.m_time; diff --git a/Trenser.Zenvy/Trenser.Zenvy/utilities/Timestamp.h b/Trenser.Zenvy/Trenser.Zenvy/utilities/Timestamp.h index abbc58f..ace001a 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/utilities/Timestamp.h +++ b/Trenser.Zenvy/Trenser.Zenvy/utilities/Timestamp.h @@ -1,3 +1,12 @@ +/* + * File: Timestamp.h + * Description: Provides a utility class for representing and manipulating time values. + * Supports conversion between string and time formats, duration calculations + * (hours, minutes, seconds), date extraction, and comparison operators. + * Author: Trenser + * Created: 01-Apr-2026 + */ + #pragma once #include #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/utilities/Validator.cpp b/Trenser.Zenvy/Trenser.Zenvy/utilities/Validator.cpp index 9d14b40..8510bdf 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/utilities/Validator.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/utilities/Validator.cpp @@ -1,8 +1,24 @@ +/* + * File: Validator.cpp + * Description: Validates inputs like phone number, email, password + * Author: Trenser + * Created: 01-Apr-2026 + */ + #include #include #include "Validator.h" #include "ApplicationConfig.h" + /* + * Function: isPhoneNumberValid + * Description: Validates whether the given string is a valid phone number. + * Parameters: + * phoneNumber - string containing the phone number to validate + * Returns: + * bool - true if the phone number is valid (10 digits, all numeric), false otherwise + */ + bool util::isPhoneNumberValid(const std::string& phoneNumber) { if (phoneNumber.size() != 10) { @@ -16,6 +32,15 @@ bool util::isPhoneNumberValid(const std::string& phoneNumber) { ); } +/* + * Function: isEmailValid + * Description: Validates whether the given string is a properly formatted email address. + * Parameters: + * email - string containing the email address to validate + * Returns: + * bool - true if the email contains exactly one '@' character and is not at the start or end, false otherwise + */ + bool util::isEmailValid(const std::string& email) { size_t index = email.find('@'); if (index == std::string::npos) return false; @@ -30,6 +55,19 @@ bool util::isEmailValid(const std::string& email) { return true; } +/* + * Function: isPasswordValid + * Description: Validates whether the given string meets password requirements. + * Parameters: + * password - string containing the password to validate + * Returns: + * bool - true if the password is valid, false otherwise + * Notes: + * - Must not equal the default password + * - Must be at least 8 characters long + * - Must contain at least one uppercase letter, one lowercase letter, one digit, and one special character + * - Must not contain whitespace + */ bool util::isPasswordValid(const std::string& password) { diff --git a/Trenser.Zenvy/Trenser.Zenvy/utilities/Validator.h b/Trenser.Zenvy/Trenser.Zenvy/utilities/Validator.h index fbdf962..3710604 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/utilities/Validator.h +++ b/Trenser.Zenvy/Trenser.Zenvy/utilities/Validator.h @@ -1,3 +1,10 @@ +/* + * File: Validator.h + * Description: Validates inputs like phone number, email, password + * Author: Trenser + * Created: 01-Apr-2026 + */ + #pragma once #include #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.cpp index ecad349..91a2445 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.cpp @@ -1,8 +1,24 @@ +/* + * File: AdminMenu.cpp + * Description: Handles user-related operations such as creation, authentication, and validation. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #include #include "AdminMenu.h" #include"InputHelper.h" #include"OutputHelper.h" + /* + * Function: AdminMenu::run + * Description: Starts and manages the administrator menu loop. Continuously displays + * options to the administrator until logout is selected or an exception occurs. + * Parameters: + * None + * Returns: + * None + */ void AdminMenu::run() { bool isMenuActive = true; @@ -27,6 +43,15 @@ void AdminMenu::run() } } +/* + * Function: AdminMenu::handleOperation + * Description: Processes the administrator’s menu choice and executes the corresponding action. + * Parameters: + * choice - integer representing the selected menu option + * Returns: + * true - if the menu should remain active + * false - if the administrator chooses to logout + */ bool AdminMenu::handleOperation(int choice) { switch (choice) diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.h b/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.h index dab23c5..ed6a48b 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.h @@ -1,3 +1,10 @@ +/* + * File: AdminMenu.h + * Description: Declaration of the AdminMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once #include #include"ZenvyController.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.cpp index 99e3bc0..4a0dd07 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.cpp @@ -1,8 +1,23 @@ +/* + * File: EmployeeMenu.cpp + * Description: Implements the EmployeeMenu class functions including menu loop and operation handling. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #include #include "EmployeeMenu.h" #include"InputHelper.h" #include"OutputHelper.h" + /* + * Function: EmployeeMenu::run + * Description: Starts the employee menu loop and displays available options until logout is selected + * Parameters: + * None + * Returns: + * None + */ void EmployeeMenu::run() { bool isMenuActive = true; @@ -27,6 +42,15 @@ void EmployeeMenu::run() } } +/* + * Function: EmployeeMenu::handleOperation + * Description: Handles the employee’s menu choice and executes the corresponding action + * Parameters: + * choice - integer representing the selected menu option + * Returns: + * true - if the menu should remain active + * false - if the employee chooses to logout + */ bool EmployeeMenu::handleOperation(int choice) { switch (choice) diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.h b/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.h index f082b66..8611935 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.h @@ -1,3 +1,10 @@ +/* + * File: EmployeeMenu.h + * Description: Declaration of the EmployeeMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once #include #include"ZenvyController.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.cpp index 081d281..4503969 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.cpp @@ -1,8 +1,23 @@ +/* + * File: FinanceExecutiveMenu.cpp + * Description: Implements the FinanceExecutiveMenu class functions including menu loop and operation handling. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #include #include "FinanceExecutiveMenu.h" #include"InputHelper.h" #include"OutputHelper.h" +/* + * Function: FinanceExecutiveMenu::run + * Description: Starts the finance executive menu loop and displays available options until logout is selected + * Parameters: + * None + * Returns: + * None + */ void FinanceExecutiveMenu::run() { bool isMenuActive = true; @@ -27,6 +42,15 @@ void FinanceExecutiveMenu::run() } } +/* + * Function: FinanceExecutiveMenu::handleOperation + * Description: Handles the finance executive’s menu choice and executes the corresponding action + * Parameters: + * choice - integer representing the selected menu option + * Returns: + * true - if the menu should remain active + * false - if the finance executive chooses to logout + */ bool FinanceExecutiveMenu::handleOperation(int choice) { switch (choice) diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.h b/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.h index 825322f..d1c4d77 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.h @@ -1,3 +1,10 @@ +/* + * File: FinanceExecutiveMenu.h + * Description: Declaration of the FinanceExecutiveMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once #include #include"ZenvyController.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp index 7bf812c..dff562a 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp @@ -1,8 +1,23 @@ +/* + * File: HRManagerMenu.cpp + * Description: Implements the HRManagerMenu class functions including menu loop and operation handling. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #include #include "HRManagerMenu.h" #include"InputHelper.h" #include"OutputHelper.h" +/* + * Function: HRManagerMenu::run + * Description: Starts the HR manager menu loop and displays available options until logout is selected + * Parameters: + * None + * Returns: + * None + */ void HRManagerMenu::run() { bool isMenuActive = true; @@ -27,6 +42,15 @@ void HRManagerMenu::run() } } +/* + * Function: HRManagerMenu::handleOperation + * Description: Handles the HR manager’s menu choice and executes the corresponding action + * Parameters: + * choice - integer representing the selected menu option + * Returns: + * true - if the menu should remain active + * false - if the HR manager chooses to logout + */ bool HRManagerMenu::handleOperation(int choice) { switch (choice) diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.h b/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.h index 05e1f41..a3c1ff1 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.h @@ -1,3 +1,10 @@ +/* + * File: HRManagerMenu.h + * Description: Declaration of the EmployeeMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once #include #include"ZenvyController.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.cpp index 836ca39..b415d57 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.cpp @@ -1,8 +1,23 @@ +/* + * File: ITExecutiveMenu.cpp + * Description: Implements the ITExecutiveMenu class functions including menu loop and operation handling. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #include #include "ITExecutiveMenu.h" #include"InputHelper.h" #include"OutputHelper.h" +/* + * Function: ITExecutiveMenu::run + * Description: Starts the IT executive menu loop and displays available options until logout is selected + * Parameters: + * None + * Returns: + * None + */ void ITExecutiveMenu::run() { bool isMenuActive = true; @@ -27,6 +42,15 @@ void ITExecutiveMenu::run() } } +/* + * Function: ITExecutiveMenu::handleOperation + * Description: Handles the IT executive’s menu choice and executes the corresponding action + * Parameters: + * choice - integer representing the selected menu option + * Returns: + * true - if the menu should remain active + * false - if the IT executive chooses to logout + */ bool ITExecutiveMenu::handleOperation(int choice) { switch (choice) diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.h b/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.h index 1c5f060..7447643 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.h @@ -1,3 +1,10 @@ +/* + * File: ITExecutiveMenu.h + * Description: Declaration of the ITExecutiveMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once #include #include"ZenvyController.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.cpp index 45fbfba..250da5a 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.cpp @@ -1,8 +1,23 @@ +/* + * File: TalentExecutiveMenu.cpp + * Description: Implements the TalentExecutiveMenu class functions including menu loop and operation handling. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #include #include "TalentExecutiveMenu.h" #include"InputHelper.h" #include"OutputHelper.h" +/* + * Function: TalentExecutiveMenu::run + * Description: Starts the talent executive menu loop and displays available options until logout is selected + * Parameters: + * None + * Returns: + * None + */ void TalentExecutiveMenu::run() { bool isMenuActive = true; @@ -27,6 +42,15 @@ void TalentExecutiveMenu::run() } } +/* + * Function: TalentExecutiveMenu::handleOperation + * Description: Handles the talent executive’s menu choice and executes the corresponding action + * Parameters: + * choice - integer representing the selected menu option + * Returns: + * true - if the menu should remain active + * false - if the talent executive chooses to logout + */ bool TalentExecutiveMenu::handleOperation(int choice) { switch (choice) diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.h b/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.h index a258eaf..7cbee73 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.h @@ -1,3 +1,10 @@ +/* + * File: TalentExecutiveMenu.h + * Description: Declaration of the TalentExecutiveMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once #include #include"ZenvyController.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.cpp index 12c300b..97401b2 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.cpp @@ -1,8 +1,23 @@ +/* + * File: TeamExecutiveMenu.cpp + * Description: Implements the TeamExecutiveMenu class functions including menu loop and operation handling. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #include #include "TeamExecutiveMenu.h" #include"InputHelper.h" #include"OutputHelper.h" +/* + * Function: TeamExecutiveMenu::run + * Description: Starts the team executive menu loop and displays available options until logout is selected + * Parameters: + * None + * Returns: + * None + */ void TeamExecutiveMenu::run() { bool isMenuActive = true; @@ -27,6 +42,15 @@ void TeamExecutiveMenu::run() } } +/* + * Function: TeamExecutiveMenu::handleOperation + * Description: Handles the team executive’s menu choice and executes the corresponding action + * Parameters: + * choice - integer representing the selected menu option + * Returns: + * true - if the menu should remain active + * false - if the team executive chooses to logout + */ bool TeamExecutiveMenu::handleOperation(int choice) { switch (choice) diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.h b/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.h index 4b5181d..3f6d5f3 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.h @@ -1,3 +1,10 @@ +/* + * File: TeamExecutiveMenu.h + * Description: Declaration of the TeamExecutiveMenu and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once #include #include"ZenvyController.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.cpp index 4204fb7..31143d1 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.cpp @@ -1,8 +1,23 @@ +/* + * File: TeamLeadMenu.cpp + * Description: Implements the TeamLeadMenu class functions including menu loop and operation handling. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #include #include "TeamLeadMenu.h" #include"InputHelper.h" #include"OutputHelper.h" +/* + * Function: TeamLeadMenu::run + * Description: Starts the team lead menu loop and displays available options until logout is selected + * Parameters: + * None + * Returns: + * None + */ void TeamLeadMenu::run() { bool isMenuActive = true; @@ -27,6 +42,15 @@ void TeamLeadMenu::run() } } +/* + * Function: TeamLeadMenu::handleOperation + * Description: Handles the team lead’s menu choice and executes the corresponding action + * Parameters: + * choice - integer representing the selected menu option + * Returns: + * true - if the menu should remain active + * false - if the team lead chooses to logout + */ bool TeamLeadMenu::handleOperation(int choice) { switch (choice) diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.h b/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.h index e1bd45b..d2057aa 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.h @@ -1,3 +1,10 @@ +/* + * File: TeamLeadMenu.h + * Description: Declaration of the TeamLeadMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once #include #include"ZenvyController.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.cpp index adea852..1f08092 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.cpp @@ -1,3 +1,10 @@ +/* + * File: UserInterface.cpp + * Description: Implements the UserInterface class functions including menu loop, login handling, and routing to appropriate role-based menus. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #include #include #include @@ -16,6 +23,14 @@ #include "OutputHelper.h" #include "Validator.h" +/* + * Function: UserInterface::run + * Description: Starts the user interface loop and displays login/exit options until exit is selected + * Parameters: + * None + * Returns: + * None + */ void UserInterface::run() { bool isMenuActive = true; @@ -40,6 +55,15 @@ void UserInterface::run() } } +/* + * Function: UserInterface::handleOperation + * Description: Handles the user’s menu choice and executes the corresponding action + * Parameters: + * choice - integer representing the selected menu option + * Returns: + * true - if the interface should remain active + * false - if the user chooses to exit + */ bool UserInterface::handleOperation(int choice) { switch (choice) @@ -57,6 +81,14 @@ bool UserInterface::handleOperation(int choice) return true; } +/* + * Function: UserInterface::login + * Description: Authenticates the user by email and password, validates login status, and routes to the appropriate menu + * Parameters: + * None + * Returns: + * None + */ void UserInterface::login() { std::string email, password; diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.h b/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.h index c346301..cf9c924 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.h @@ -1,3 +1,10 @@ +/* + * File: UserInterface.h + * Description: Declaration of the UserInterface class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once #include #include