diff --git a/Trenser.Zenvy/Trenser.Zenvy/Trenser.Zenvy.cpp b/Trenser.Zenvy/Trenser.Zenvy/Trenser.Zenvy.cpp index 9c953a9..f21d31b 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/Trenser.Zenvy.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/Trenser.Zenvy.cpp @@ -1,3 +1,10 @@ +/* + * File: Trenser.Zenvy.cpp + * Description: Zenvy Main + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include "UserInterface.h" #include "FileManager.h" int main() diff --git a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp index 9207108..9584cce 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-Apr-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); @@ -80,4 +117,18 @@ void ZenvyController::persistStates() std::pair, std::shared_ptr> ZenvyController::getPayslipForMonth(const std::string& employeeId, int year, int month) { return m_payslipManagementService->getPayslipForMonth(employeeId, year, month); -} \ No newline at end of file +} + +ZenvyController::~ZenvyController() +{ + delete m_authenticationManagementService; + delete m_attendanceManagementService; + delete m_bookingManagementService; + delete m_employeeManagementService; + delete m_leaveManagementService; + delete m_notificationManagementService; + delete m_payslipManagementService; + delete m_talentAcquisitionManagementService; + delete m_teamManagementService; + delete m_ticketManagementService; +} diff --git a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h index 261cb67..c6151eb 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h +++ b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h @@ -1,5 +1,11 @@ +/* + * File: ZenvyController.h + * Description : Controls data flow between UI and Service Layers. + * Author: Trenser + * Created : 01-Apr-2026 + */ + #pragma once -#include #include #include "AuthenticationManagementService.h" #include "AttendanceManagementService.h" @@ -16,28 +22,28 @@ class ZenvyController { private: - std::shared_ptr m_authenticationManagementService; - std::shared_ptr m_attendanceManagementService; - std::shared_ptr m_bookingManagementService; - std::shared_ptr m_employeeManagementService; - std::shared_ptr m_leaveManagementService; - std::shared_ptr m_notificationManagementService; - std::shared_ptr m_payslipManagementService; - std::shared_ptr m_talentAcquisitionManagementService; - std::shared_ptr m_teamManagementService; - std::shared_ptr m_ticketManagementService; + AuthenticationManagementService* m_authenticationManagementService; + AttendanceManagementService* m_attendanceManagementService; + BookingManagementService* m_bookingManagementService; + EmployeeManagementService* m_employeeManagementService; + LeaveManagementService* m_leaveManagementService; + NotificationManagementService* m_notificationManagementService; + PayslipManagementService* m_payslipManagementService; + TalentAcquisitionManagementService* m_talentAcquisitionManagementService; + TeamManagementService* m_teamManagementService; + TicketManagementService* m_ticketManagementService; public: ZenvyController() : - m_authenticationManagementService(std::make_shared()), - m_attendanceManagementService(std::make_shared()), - m_bookingManagementService(std::make_shared()), - m_employeeManagementService(std::make_shared()), - m_leaveManagementService(std::make_shared()), - m_notificationManagementService(std::make_shared()), - m_payslipManagementService(std::make_shared()), - m_talentAcquisitionManagementService(std::make_shared()), - m_teamManagementService(std::make_shared()), - m_ticketManagementService(std::make_shared()) {}; + m_authenticationManagementService(new AuthenticationManagementService()), + m_attendanceManagementService(new AttendanceManagementService()), + m_bookingManagementService(new BookingManagementService()), + m_employeeManagementService(new EmployeeManagementService()), + m_leaveManagementService(new LeaveManagementService()), + m_notificationManagementService(new NotificationManagementService()), + m_payslipManagementService(new PayslipManagementService()), + m_talentAcquisitionManagementService(new TalentAcquisitionManagementService()), + m_teamManagementService(new TeamManagementService()), + m_ticketManagementService(new TicketManagementService()) {}; //Authentication AuthenticationDTO login(const std::string& email, const std::string& password); diff --git a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp index be0897e..a8a23a7 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp @@ -1,32 +1,79 @@ +/* + * File: DataStore.cpp + * Description: Central Storage for all the System Data. + * Author: Trenser + * Created: 01-Apr-2026 + */ + #include "DataStore.h" #include "EmployeeManagementService.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; } -candidateMap& DataStore::getCandidates() -{ - return m_candidates; -} +/* + * 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() +Employee*& DataStore::getAuthenticatedEmployee() { return m_authenticatedEmployee; } -void DataStore::setAuthenticatedEmployee(std::shared_ptr 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(Employee* 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; @@ -37,6 +84,25 @@ payrollMap& DataStore::getPayrolls() return m_payrolls; } +DataStore::~DataStore() +{ + for (auto& pair : m_employees) + { + delete pair.second; + } + m_employees.clear(); + for (auto& pair : m_logs) + { + delete pair.second; + } + m_logs.clear(); + if (m_authenticatedEmployee) + { + delete m_authenticatedEmployee; + m_authenticatedEmployee = nullptr; + } +} + payslipMap& DataStore::getPayslips() { return m_payslips; diff --git a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h index 972e580..8ab60b7 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h +++ b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h @@ -1,5 +1,11 @@ +/* + * File: DataStore.h + * Description: Central Storage for all the System Data. + * Author: Trenser + * Created: 01-Apr-2026 + */ + #pragma once -#include #include #include "Employee.h" #include "Log.h" @@ -21,22 +27,22 @@ #include "Payroll.h" #include "Payslip.h" -using employeeMap = std::map>; +using employeeMap = std::map; using payrollMap = std::map>; using payslipMap = std::map>; -using logMap = std::map>; +using logMap = std::map; using candidateMap = std::map>; class DataStore { private: - std::shared_ptr m_authenticatedEmployee; + Employee* m_authenticatedEmployee; employeeMap m_employees; payrollMap m_payrolls; payslipMap m_payslips; logMap m_logs; candidateMap m_candidates; - DataStore() = default; + DataStore() : m_authenticatedEmployee(nullptr) {}; public: static DataStore& getInstance(); DataStore(const DataStore&) = delete; @@ -48,6 +54,7 @@ public: payslipMap& getPayslips(); logMap& getLogs(); candidateMap& getCandidates(); - std::shared_ptr& getAuthenticatedEmployee(); - void setAuthenticatedEmployee(std::shared_ptr < Employee>); + Employee*& getAuthenticatedEmployee(); + void setAuthenticatedEmployee(Employee*); + ~DataStore(); }; \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/factories/Factory.h b/Trenser.Zenvy/Trenser.Zenvy/factories/Factory.h index 0c54b81..216a823 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/factories/Factory.h +++ b/Trenser.Zenvy/Trenser.Zenvy/factories/Factory.h @@ -1,13 +1,30 @@ +/* + * File: Factory.h + * Description: Provides a generic factory utility to create shared_ptr instances of objects. + * Author: Ajmal J S + * Created: 01-Apr-2026 + */ + #pragma once -#include #include 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) + static T* getObject(Args&&... args) { - return std::make_shared(std::forward(args)...); + return T*(std::forward(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 c483a61..b729750 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 403222b..ed34094 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 defines a simple object for managing announcement details. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "Announcement.h" int Announcement::m_uid = 0; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Announcement.h b/Trenser.Zenvy/Trenser.Zenvy/models/Announcement.h index 5c46514..ed70c16 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Announcement.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Announcement.h @@ -1,3 +1,9 @@ +/* + * File: Announcement.h + * Description: The Announcement class defines a simple object for managing announcement details. + * Author: Trenser + * Created: 31-Mar-2026 + */ #pragma once #include #include "Timestamp.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.cpp index b4a51ef..46a12bc 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 represents an attendance record by storing an ID, login and logout timestamps. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "Attendance.h" int Attendance::m_uid = 0; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.h b/Trenser.Zenvy/Trenser.Zenvy/models/Attendance.h index 013fb0b..0e43f92 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 1b0f141..e2c7861 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 represents a time‑based booking with employee and team details and supports duration calculation. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "Booking.h" int Booking::m_uid = 0; @@ -22,7 +28,7 @@ const std::string& Booking::getEmployeeId() const return m_employeeId; } -std::shared_ptr Booking::getTeam() const +Team* Booking::getTeam() const { return m_team; } @@ -47,7 +53,7 @@ void Booking::setEmployeeId(const std::string& employeeId) m_employeeId = employeeId; } -void Booking::setTeam(std::shared_ptr team) +void Booking::setTeam(Team* team) { m_team = team; } diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Booking.h b/Trenser.Zenvy/Trenser.Zenvy/models/Booking.h index 2100841..db7dc26 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Booking.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Booking.h @@ -1,6 +1,11 @@ +/* + * 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 #include "Team.h" #include "Timestamp.h" @@ -12,24 +17,24 @@ private: util::Timestamp m_startTime; util::Timestamp m_endTime; std::string m_employeeId; - std::shared_ptr m_team; + Team* m_team; public: Booking() : m_id("BK" + std::to_string(++m_uid)), m_startTime(), m_endTime(), m_employeeId(""), m_team(nullptr) {} Booking(const util::Timestamp& startTime, const util::Timestamp& endTime, const std::string& employeeId, - std::shared_ptr team) + Team* team) : m_id("BK" + std::to_string(++m_uid)), m_startTime(startTime), m_endTime(endTime), m_employeeId(employeeId), m_team(team) {} const std::string& getBookingId() const; const util::Timestamp& getStartTime() const; const util::Timestamp& getEndTime() const; const std::string& getEmployeeId() const; - std::shared_ptr getTeam() const; + Team* getTeam() const; void setBookingId(const std::string& id); void setStartTime(const util::Timestamp& startTime); void setEndTime(const util::Timestamp& endTime); void setEmployeeId(const std::string& employeeId); - void setTeam(std::shared_ptr team); + void setTeam(Team* team); double getDurationInHours() const; double getDurationInMinutes() const; }; \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.cpp index 254aff2..e9bc101 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 stores and manages a candidate’s information. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include "Candidate.h" int Candidate::m_uid = 0; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.h b/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.h index 59b9e9b..d5c5f79 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 9f7adf9..45b9d79 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 manages employee information and associated work records such as payroll, attendance, leaves, and payslips. + * Author: Trenser + * Created: 31-Mar-2026 + */ #include #include "Employee.h" #include "Factory.h" @@ -79,7 +85,7 @@ const std::string& Employee::getEmployeeTeamId() const return m_teamId; } -std::shared_ptr Employee::getPayroll() const +Payroll* Employee::getPayroll() const { return m_payroll; } @@ -134,12 +140,12 @@ void Employee::setEmployeeTeamId(const std::string& teamId) m_teamId = teamId; } -void Employee::setEmployeePayroll(std::shared_ptr payroll) +void Employee::setEmployeePayroll(Payroll* payroll) { m_payroll = payroll; } -void Employee::addPayslip(std::shared_ptr payslip) +void Employee::addPayslip(Payslip* payslip) { if (payslip) { @@ -147,7 +153,7 @@ void Employee::addPayslip(std::shared_ptr payslip) } } -void Employee::addAttendance(std::shared_ptr attendance) +void Employee::addAttendance(Attendance* attendance) { if (attendance) { @@ -155,7 +161,7 @@ void Employee::addAttendance(std::shared_ptr attendance) } } -void Employee::addLeave(std::shared_ptr leave) +void Employee::addLeave(Leave* leave) { if (leave) { diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Employee.h b/Trenser.Zenvy/Trenser.Zenvy/models/Employee.h index 46657c1..b10f86e 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Employee.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Employee.h @@ -1,6 +1,11 @@ +/* + * 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 #include #include "Payslip.h" #include "Attendance.h" @@ -8,9 +13,9 @@ #include "Payroll.h" #include "Enums.h" #include "ApplicationConfig.h" -using payslipMap = std::map>; -using attendanceMap = std::map>>; -using leaveMap = std::map>; +using payslipMap = std::map; +using attendanceMap = std::map>; +using leaveMap = std::map; class Employee { @@ -24,7 +29,7 @@ protected: Enums::AccountStatus m_accountStatus; Enums::TeamStatus m_teamStatus; std::string m_teamId; - std::shared_ptr m_payroll; + Payroll* m_payroll; payslipMap m_payslips; attendanceMap m_attendances; leaveMap m_leaves; @@ -44,7 +49,7 @@ public: const std::string& phone, const std::string& email, Enums::EmployeeType employeeType, - std::shared_ptr payroll) + Payroll* payroll) : m_id("EMP" + std::to_string(++m_uid)), m_password(Config::Authentication::DEFAULT_PASSWORD), m_name(name), @@ -72,7 +77,7 @@ public: Enums::AccountStatus getEmployeeAccountStatus() const; Enums::TeamStatus getEmployeeTeamStatus() const; const std::string& getEmployeeTeamId() const; - std::shared_ptr getPayroll() const; + Payroll* getPayroll() const; const payslipMap& getEmployeePayslips() const; const attendanceMap& getEmployeeAttendances() const; const leaveMap& getEmployeeLeaves() const; @@ -83,10 +88,10 @@ public: void setEmployeeAccountStatus(Enums::AccountStatus status); void setEmployeeTeamStatus(Enums::TeamStatus status); void setEmployeeTeamId(const std::string& teamId); - void setEmployeePayroll(std::shared_ptr payroll); - void addPayslip(std::shared_ptr payslip); - void addAttendance(std::shared_ptr attendance); - void addLeave(std::shared_ptr leave); + void setEmployeePayroll(Payroll* payroll); + void addPayslip(Payslip* payslip); + void addAttendance(Attendance* attendance); + void addLeave(Leave* leave); Enums::EmployeeType getEmployeeType() const; virtual std::string serialize() const; static std::shared_ptr deserialize(const std::string&); 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 e877627..fa69c08 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.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/GeneralEmployee.cpp index 00a7085..5005753 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/GeneralEmployee.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/GeneralEmployee.cpp @@ -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 + */ #include #include "GeneralEmployee.h" #include "Factory.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/GeneralEmployee.h b/Trenser.Zenvy/Trenser.Zenvy/models/GeneralEmployee.h index 61b1a06..3947f12 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" @@ -12,7 +18,7 @@ public: GeneralEmployee(const std::string& name, const std::string& phone, const std::string& email, - std::shared_ptr payroll, + Payroll* payroll, Enums::EmployeeDesignation designation) : Employee(name, phone, 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 43f572c..a912b3f 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 a69f673..4a48b5e 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 c2152cb..33c85e0 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.cpp @@ -1,3 +1,10 @@ +/* +File: JobListing.cpp +* Description : Represents a job opening along with its details and applied candidates. +* Author : Trenser +* Created : 01-Apr-2026 +*/ + #include "JobListing.h" int JobListing::m_uid = 0; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.h b/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.h index 61af21d..48f3ee7 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/JobListing.h @@ -1,10 +1,17 @@ +/* +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 #include #include "Candidate.h" #include "Enums.h" -using candidateMap = std::map>; +using candidateMap = std::map; class JobListing { diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Leave.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Leave.cpp index bbb0ff2..e7d4577 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Leave.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Leave.cpp @@ -1,3 +1,10 @@ +/* +File: Leave.cpp +* Description : Stores information related to an employee’s leave application. +* Author : Trenser +* Created : 31-Mar-2026 +*/ + #include "Leave.h" int Leave::m_uid = 0; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Leave.h b/Trenser.Zenvy/Trenser.Zenvy/models/Leave.h index 4c50bf1..a7cad19 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..af1e9e2 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..f258643 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 2f63026..4527e2e 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Notification.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Notification.cpp @@ -1,3 +1,10 @@ +/* +File: Notification.cpp +* Description : Represents an employee notification with message and status details. +* Author : Trenser +* Created : 31-Mar-2026 +*/ + #include "Notification.h" int Notification::m_uid = 0; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Notification.h b/Trenser.Zenvy/Trenser.Zenvy/models/Notification.h index 194183d..fa3e5a0 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 b85153b..99a0e90 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.cpp @@ -1,5 +1,10 @@ -#include -#include +/* +File: Payroll.cpp +* Description : Stores payroll and salary breakdown details for an employee. +* Author : Trenser +* Created : 31-Mar-2026 +*/ + #include "Payroll.h" #include "StringHelper.h" #include "Factory.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.h b/Trenser.Zenvy/Trenser.Zenvy/models/Payroll.h index 460c596..fbb360d 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 #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.cpp index 91e0b38..1c20103 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.cpp @@ -1,3 +1,10 @@ +/* +File: Payslip.cpp +* Description : Models a payslip entity that stores salary information. +* Author : Trenser +* Created : 31-Mar-2026 +*/ + #include #include "Payslip.h" #include "StringHelper.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.h b/Trenser.Zenvy/Trenser.Zenvy/models/Payslip.h index b8b971d..1b27587 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 #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Room.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Room.cpp index b5c4d50..364bd69 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Room.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Room.cpp @@ -1,3 +1,10 @@ +/* +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" int Room::m_uid = 0; @@ -27,7 +34,7 @@ void Room::setRoomName(const std::string& name) m_name = name; } -void Room::addBooking(std::shared_ptr booking) +void Room::addBooking(Booking* booking) { if (booking) { diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Room.h b/Trenser.Zenvy/Trenser.Zenvy/models/Room.h index 1dfe66a..23e3f95 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Room.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Room.h @@ -1,9 +1,16 @@ +/* +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 #include #include "Booking.h" -using bookingMap = std::map>; +using bookingMap = std::map; class Room { @@ -20,5 +27,5 @@ public: const bookingMap& getBookings() const; void setRoomId(const std::string& id); void setRoomName(const std::string& name); - void addBooking(std::shared_ptr booking); + void addBooking(Booking* booking); }; \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/TalentExecutive.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/TalentExecutive.cpp index de7213f..5c44816 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 90bc664..6f7c9ca 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 abf8a23..7aa1c97 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Team.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Team.cpp @@ -1,3 +1,10 @@ +/* +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" int Team::m_uid = 0; @@ -12,7 +19,7 @@ const std::string& Team::getTeamName() const return m_name; } -std::shared_ptr Team::getTeamLead() const +Employee* Team::getTeamLead() const { return m_lead; } @@ -37,7 +44,7 @@ void Team::setTeamName(const std::string& name) m_name = name; } -void Team::setTeamLead(std::shared_ptr lead) +void Team::setTeamLead(Employee* lead) { m_lead = lead; } diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Team.h b/Trenser.Zenvy/Trenser.Zenvy/models/Team.h index fca1698..25937a5 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Team.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Team.h @@ -1,9 +1,16 @@ +/* +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 #include #include "Employee.h" -using employeeMap = std::map>; +using employeeMap = std::map; class Team { @@ -11,25 +18,25 @@ private: static int m_uid; std::string m_id; std::string m_name; - std::shared_ptr m_lead; + Employee* m_lead; employeeMap m_employees; int m_maximumNumberOfEmployees; public: Team() : m_id("TM" + std::to_string(++m_uid)), m_name(""), m_lead(nullptr), m_maximumNumberOfEmployees(0) {} Team( const std::string& name, - std::shared_ptr lead, + Employee* lead, int maximumNumberOfEmployees) : m_id("TM" + std::to_string(++m_uid)), m_name(name), m_lead(lead), m_maximumNumberOfEmployees(maximumNumberOfEmployees) { } const std::string& getTeamId() const; const std::string& getTeamName() const; - std::shared_ptr getTeamLead() const; + Employee* getTeamLead() const; const employeeMap& getEmployeesInTeam() const; int getMaximumNumberOfEmployeesInTeam() const; void setTeamId(const std::string& id); void setTeamName(const std::string& name); - void setTeamLead(std::shared_ptr lead); + void setTeamLead(Employee* lead); void setEmployeesInTeam(const employeeMap& employees); void setMaximumNumberOfEmployeesInTeam(int maximumNumberOfEmployees); }; \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/TeamExecutive.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/TeamExecutive.cpp index df14a3f..c780ad7 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 3f79197..2fc41f1 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 84fd042..58fc5b7 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.cpp @@ -1,3 +1,10 @@ +/* +File: Ticket.cpp +* Description : Represents a support ticket with its associated details and status. +* Author : Trenser +* Created : 31-Mar-2026 +*/ + #include "Ticket.h" int Ticket::m_uid = 0; diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.h b/Trenser.Zenvy/Trenser.Zenvy/models/Ticket.h index 56d39af..a4ec474 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 0fd3b49..63b2dec 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 ccb90fb..4d4766c 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.cpp @@ -1,7 +1,25 @@ +/* + * 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(); @@ -29,7 +47,7 @@ AuthenticationDTO AuthenticationManagementService::login(const std::string& emai employeeType = employee.second->getEmployeeType(); if (employeeType == Enums::EmployeeType::GENERAL) { - std::shared_ptr generalEmployee = std::dynamic_pointer_cast(employee.second); + GeneralEmployee* generalEmployee = dynamic_cast(employee.second); if (generalEmployee) { employeeDesignation = generalEmployee->getDesignation(); @@ -51,24 +69,46 @@ AuthenticationDTO AuthenticationManagementService::login(const std::string& emai 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.getAuthenticatedEmployee(); - if (authenticatedUser) - { - authenticatedUser->setEmployeePassword(password); - } - else - { - throw std::runtime_error("User not found"); - } + Employee* 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.getAuthenticatedEmployee()) { + if (m_dataStore.getAuthenticatedEmployee()) + { m_dataStore.getAuthenticatedEmployee() = nullptr; } - else { + else + { throw std::runtime_error("No user currently logged In..."); } } \ No newline at end of file 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/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..6917cda 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" @@ -7,6 +14,6 @@ void LogService::log(const std::string& message) { DataStore& dataStore = DataStore::getInstance(); logMap& logs = dataStore.getLogs(); - std::shared_ptr log = Factory::getObject(message); + Log* log = Factory::getObject(message); logs.emplace(std::make_pair(log->getTimestamp(), log)); } 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 7c74f9a..6029d08 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.cpp @@ -1,3 +1,10 @@ +/* + * File: PayslipManagementService.cpp + * Description: Handle operations related to employee payslips + * Author: Trenser + * Created: 30-Mar-2026 + */ + #include #include #include "PayslipManagementService.h" diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.h index cf72793..fc71191 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 #include #include 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 0ac464a..6f939e4 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 #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/utilities/InputHelper.h b/Trenser.Zenvy/Trenser.Zenvy/utilities/InputHelper.h index a82c0a3..245ea34 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/utilities/InputHelper.h +++ b/Trenser.Zenvy/Trenser.Zenvy/utilities/InputHelper.h @@ -1,3 +1,10 @@ +/* + * File: InputHelper.h + * Description: Handles input validation and error handling + * Author: Smitha + * Created: 08-Apr-2026 + */ + #pragma once #include #include @@ -6,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) { @@ -17,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() { std::cout << std::endl; 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 1341da9..6172503 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{}; @@ -71,36 +137,101 @@ int util::Timestamp::getDay() const return timeStruct.tm_mday; } +/* +* 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 8aedc35..b55b7a8 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 ee99e68..2996d71 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/utilities/Validator.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/utilities/Validator.cpp @@ -1,8 +1,25 @@ +/* + * File: Validator.cpp + * Description: Validates inputs like phone number, email, password + * Author: Trenser + * Created: 01-Apr-2026 + */ + +#include #include #include "Validator.h" #include "Employee.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 +33,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) @@ -33,6 +59,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 588b820..c7d2b60 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 df08e23..0b6535a 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.cpp @@ -1,9 +1,25 @@ +/* + * 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" #include "MenuHelper.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; @@ -28,6 +44,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..6144d4e 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.h @@ -1,13 +1,19 @@ +/* + * File: AdminMenu.h + * Description: Declaration of the AdminMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once -#include #include"ZenvyController.h" class AdminMenu { private: - std::shared_ptr m_zenvyController; + ZenvyController* m_zenvyController; public: - AdminMenu() :m_zenvyController(std::make_shared()) {}; + AdminMenu() :m_zenvyController(new ZenvyController()) {}; void run(); bool handleOperation(int); }; diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.cpp index 8749ad8..a833dd4 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.cpp @@ -1,3 +1,10 @@ +/* + * File: EmployeeMenu.cpp + * Description: Implements the EmployeeMenu class functions including menu loop and operation handling. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #include #include #include "EmployeeMenu.h" @@ -5,6 +12,14 @@ #include "OutputHelper.h" #include "MenuHelper.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; @@ -29,6 +44,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..907ab82 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/EmployeeMenu.h @@ -1,13 +1,19 @@ +/* + * File: EmployeeMenu.h + * Description: Declaration of the EmployeeMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once -#include #include"ZenvyController.h" class EmployeeMenu { private: - std::shared_ptr m_zenvyController; + ZenvyController m_zenvyController; public: - EmployeeMenu() : m_zenvyController(std::make_shared()) {}; + EmployeeMenu() : m_zenvyController(new ZenvyController()) {}; void run(); bool handleOperation(int); }; diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.cpp index 2bfd221..c19318f 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/FinanceExecutiveMenu.cpp @@ -1,3 +1,10 @@ +/* + * 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" @@ -5,6 +12,14 @@ #include "MenuHelper.h" #include "Timestamp.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; @@ -52,15 +67,15 @@ void FinanceExecutiveMenu::updatePayroll() } } -void FinanceExecutiveMenu::generatePayslips() -{ - util::Timestamp currentTimestamp; - util::clear(); - m_zenvyController->generatePayslips(); - std::cout << "Generated payslips for the month of " << currentTimestamp.getMonth() << "-" << currentTimestamp.getYear() << " successfully."; - util::pressEnter(); -} - +/* + * 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 d757a03..664aa49 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 @@ -8,9 +15,9 @@ class FinanceExecutiveMenu { private: - std::shared_ptr m_zenvyController; + ZenvyController* m_zenvyController; public: - FinanceExecutiveMenu() : m_zenvyController(std::make_shared()) {}; + FinanceExecutiveMenu() : m_zenvyController(new ZenvyController()) {}; void run(); bool handleOperation(int); void updatePayroll(); diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp index 8c76ecb..ac108dd 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp @@ -1,9 +1,24 @@ +/* + * 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" #include "MenuHelper.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; @@ -28,6 +43,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..ed7c5fa 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.h @@ -1,13 +1,19 @@ +/* + * File: HRManagerMenu.h + * Description: Declaration of the EmployeeMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once -#include #include"ZenvyController.h" class HRManagerMenu { private: - std::shared_ptr m_zenvyController; + ZenvyController* m_zenvyController; public: - HRManagerMenu() : m_zenvyController(std::make_shared()) {}; + HRManagerMenu() : m_zenvyController(new ZenvyController()) {}; void run(); bool handleOperation(int); }; diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.cpp index cdc1c74..f491dd4 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.cpp @@ -1,9 +1,24 @@ +/* + * 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" #include "MenuHelper.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; @@ -28,6 +43,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..5d32d37 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/ITExecutiveMenu.h @@ -1,13 +1,19 @@ +/* + * File: ITExecutiveMenu.h + * Description: Declaration of the ITExecutiveMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once -#include #include"ZenvyController.h" class ITExecutiveMenu { private: - std::shared_ptr m_zenvyController; + ZenvyController* m_zenvyController; public: - ITExecutiveMenu() : m_zenvyController(std::make_shared()) {}; + ITExecutiveMenu() : m_zenvyController(new ZenvyController()) {}; void run(); bool handleOperation(int); }; diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.cpp index e82c9df..c16f65a 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.cpp @@ -1,9 +1,24 @@ +/* + * 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" #include "MenuHelper.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; @@ -28,6 +43,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..93946ae 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TalentExecutiveMenu.h @@ -1,13 +1,19 @@ +/* + * File: TalentExecutiveMenu.h + * Description: Declaration of the TalentExecutiveMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once -#include #include"ZenvyController.h" class TalentExecutiveMenu { private: - std::shared_ptr m_zenvyController; + ZenvyController* m_zenvyController; public: - TalentExecutiveMenu() : m_zenvyController(std::make_shared < ZenvyController>()) {}; + TalentExecutiveMenu() : m_zenvyController(new ZenvyController()) {}; void run(); bool handleOperation(int); }; diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.cpp index 78f06a0..ed22416 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.cpp @@ -1,9 +1,24 @@ +/* + * 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" #include "MenuHelper.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; @@ -28,6 +43,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..747b5d4 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TeamExecutiveMenu.h @@ -1,13 +1,19 @@ +/* + * File: TeamExecutiveMenu.h + * Description: Declaration of the TeamExecutiveMenu and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once -#include #include"ZenvyController.h" class TeamExecutiveMenu { private: - std::shared_ptr m_zenvyController; + ZenvyController* m_zenvyController; public: - TeamExecutiveMenu() : m_zenvyController(std::make_shared()) {}; + TeamExecutiveMenu() : m_zenvyController(new ZenvyController()) {}; void run(); bool handleOperation(int); }; diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.cpp index 740d7c7..bb44739 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.cpp @@ -1,9 +1,24 @@ +/* + * 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" #include "MenuHelper.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; @@ -28,6 +43,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..159f485 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/TeamLeadMenu.h @@ -1,13 +1,19 @@ +/* + * File: TeamLeadMenu.h + * Description: Declaration of the TeamLeadMenu class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once -#include #include"ZenvyController.h" class TeamLeadMenu { private: - std::shared_ptr m_zenvyController; + ZenvyController* m_zenvyController; public: - TeamLeadMenu() : m_zenvyController(std::make_shared()) {}; + TeamLeadMenu() : m_zenvyController(new ZenvyController()) {}; void run(); bool handleOperation(int); }; diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.cpp index f420867..2e619c4 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.cpp @@ -1,6 +1,12 @@ +/* + * 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 #include #include "UserInterface.h" #include "AdminMenu.h" @@ -16,6 +22,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; @@ -58,6 +72,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) @@ -75,6 +98,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; @@ -118,7 +149,6 @@ void UserInterface::login() } } util::clear(); - // Route to appropriate menu switch (employeeType) { case Enums::EmployeeType::ADMIN: @@ -177,4 +207,17 @@ void UserInterface::login() break; } m_controller->logout(); +} + +UserInterface::~UserInterface() +{ + delete m_controller; + delete m_employeeMenu; + delete m_adminMenu; + delete m_financeExecutiveMenu; + delete m_hrManagerMenu; + delete m_itExecutiveMenu; + delete m_talentExecutiveMenu; + delete m_teamExecutiveMenu; + delete m_teamLeadMenu; } \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.h b/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.h index c346301..e400ba6 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/UserInterface.h @@ -1,5 +1,11 @@ +/* + * File: UserInterface.h + * Description: Declaration of the UserInterface class and related functions. + * Author: Trenser + * Created: 02-Apr-2026 + */ + #pragma once -#include #include #include "AdminMenu.h" #include "EmployeeMenu.h" @@ -14,27 +20,28 @@ class UserInterface { private: - std::shared_ptr m_controller; - std::shared_ptr m_employeeMenu; - std::shared_ptr m_adminMenu; - std::shared_ptr m_financeExecutiveMenu; - std::shared_ptr m_hrManagerMenu; - std::shared_ptr m_itExecutiveMenu; - std::shared_ptr m_talentExecutiveMenu; - std::shared_ptr m_teamExecutiveMenu; - std::shared_ptr m_teamLeadMenu; + ZenvyController* m_controller; + EmployeeMenu* m_employeeMenu; + AdminMenu* m_adminMenu; + FinanceExecutiveMenu* m_financeExecutiveMenu; + HRManagerMenu* m_hrManagerMenu; + ITExecutiveMenu* m_itExecutiveMenu; + TalentExecutiveMenu* m_talentExecutiveMenu; + TeamExecutiveMenu* m_teamExecutiveMenu; + TeamLeadMenu* m_teamLeadMenu; public: - UserInterface() : m_controller(std::make_shared()), - m_employeeMenu(std::make_shared()), - m_adminMenu(std::make_shared()), - m_financeExecutiveMenu(std::make_shared()), - m_hrManagerMenu(std::make_shared()), - m_itExecutiveMenu(std::make_shared()), - m_talentExecutiveMenu(std::make_shared()), - m_teamExecutiveMenu(std::make_shared()), - m_teamLeadMenu(std::make_shared()) {}; - void run(); - bool handleOperation(int choice); - void login(); -}; - + UserInterface() : + m_controller(new ZenvyController()), + m_employeeMenu(new EmployeeMenu()), + m_adminMenu(new AdminMenu()), + m_financeExecutiveMenu(new FinanceExecutiveMenu()), + m_hrManagerMenu(new HRManagerMenu()), + m_itExecutiveMenu(new ITExecutiveMenu()), + m_talentExecutiveMenu(new TalentExecutiveMenu()), + m_teamExecutiveMenu(new TeamExecutiveMenu()), + m_teamLeadMenu(new TeamLeadMenu()) {}; + void run(); + bool handleOperation(int choice); + void login(); + ~UserInterface(); +}; \ No newline at end of file