diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.cpp index e5a0d0e..e612cbc 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.cpp @@ -4,5 +4,4 @@ * 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 63b2dec..2658b8e 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/ApplicationConfig.h @@ -4,7 +4,6 @@ * 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 2ab575a..35ae237 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.cpp @@ -4,5 +4,4 @@ * 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 5f12270..a97103e 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/AttendanceManagementService.h @@ -4,7 +4,6 @@ * 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 4d4766c..4abd1ea 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.cpp @@ -4,7 +4,6 @@ * Author: Trenser * Created: 30-Mar-2026 */ - #include #include "AuthenticationManagementService.h" #include "ApplicationConfig.h" @@ -81,7 +80,7 @@ AuthenticationDTO AuthenticationManagementService::login(const std::string& emai */ void AuthenticationManagementService::changePassword(const std::string& password) { - Employee* authenticatedUser = m_dataStore.getAuthenticatedUser(); + Employee* authenticatedUser = m_dataStore.getAuthenticatedEmployee(); if (authenticatedUser) { authenticatedUser->setEmployeePassword(password); diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.h index 392065b..b7a5768 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/AuthenticationManagementService.h @@ -4,7 +4,6 @@ * Author: Trenser * Created: 30-Mar-2026 */ - #pragma once #include #include diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.cpp index cb032c3..2545535 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.cpp @@ -4,5 +4,4 @@ * 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 7f343a4..258ad18 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/BookingManagementService.h @@ -4,7 +4,6 @@ * Author: Trenser * Created: 30-Mar-2026 */ - #pragma once class BookingManagementService { diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp index 855e445..ecd60d9 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp @@ -18,14 +18,14 @@ void EmployeeManagementService::createEmployee(Enums::EmployeeType employeeType, Enums::EmployeeDesignation employeeDesignation, const std::string& email, const std::string& name, const std::string& phone) { auto& employees = m_dataStore.getEmployees(); - std::shared_ptr authenticatedEmployee = m_dataStore.getAuthenticatedEmployee(); + Employee* authenticatedEmployee = m_dataStore.getAuthenticatedEmployee(); if (!authenticatedEmployee) { throw std::runtime_error("No authenticated user"); } Enums::EmployeeType authenticatedEmployeeType = authenticatedEmployee->getEmployeeType(); - std::shared_ptr employee; - std::shared_ptr payroll; + Employee* employee; + Payroll* payroll; if (employeeType != Enums::EmployeeType::GENERAL && util::hasActiveEmployeeOfType(employeeType, employees)) { throw std::runtime_error("Cannot create more than one employee of type " + Enums::getEmployeeTypeString(employeeType)); @@ -135,13 +135,13 @@ bool EmployeeManagementService::updateDesignation(const std::string& id, Enums:: { auto& authenticatedEmployee = m_dataStore.getAuthenticatedEmployee(); util::enforceAuthorization(authenticatedEmployee->getEmployeeType(), Enums::EmployeeType::ADMIN, Enums::EmployeeType::HR); - std::map> employees = m_dataStore.getEmployees(); + std::map employees = m_dataStore.getEmployees(); auto employeeIterator = employees.find(id); if (employeeIterator == employees.end()) { return false; } - auto generalEmployee = std::dynamic_pointer_cast((*employeeIterator).second); + auto generalEmployee = dynamic_cast((*employeeIterator).second); if (generalEmployee) { generalEmployee->setDesignation(designation); @@ -149,24 +149,24 @@ bool EmployeeManagementService::updateDesignation(const std::string& id, Enums:: return true; } -std::shared_ptr EmployeeManagementService::getCurrentEmployee() +const Employee* EmployeeManagementService::getCurrentEmployee() { return m_dataStore.getAuthenticatedEmployee(); } void EmployeeManagementService::updateProfile(const std::string& name,const std::string& phone) { - std::shared_ptr employee = m_dataStore.getAuthenticatedEmployee(); + Employee* employee = m_dataStore.getAuthenticatedEmployee(); employee->setEmployeeName(name); employee->setEmployeePhone(phone); } -std::pair>> EmployeeManagementService::searchEmployee(const std::string& name) +std::pair> EmployeeManagementService::searchEmployee(const std::string& name) { - std::shared_ptr currentUser = m_dataStore.getAuthenticatedEmployee(); + Employee* currentUser = m_dataStore.getAuthenticatedEmployee(); Enums::EmployeeType employeeType = currentUser->getEmployeeType(); employeeMap& employees = m_dataStore.getEmployees(); - std::vector> employeeList; + std::vector employeeList; if (employees.empty()) { return std::make_pair(employeeType, employeeList); @@ -220,12 +220,12 @@ void EmployeeManagementService::saveEmployees() FileManager generalEmployeeFileManager(Config::File::GENERAL_EMPLOYEES_FILE); const auto& allEmployees = m_dataStore.getEmployees(); employeeMap employees; - std::map> generalEmployees; + std::map generalEmployees; for (auto& employeePair : allEmployees) { if (employeePair.second->getEmployeeType() == Enums::EmployeeType::GENERAL) { - generalEmployees.emplace(employeePair.first, std::static_pointer_cast(employeePair.second)); + generalEmployees.emplace(employeePair.first, static_cast(employeePair.second)); } else { @@ -236,10 +236,10 @@ void EmployeeManagementService::saveEmployees() generalEmployeeFileManager.save(generalEmployees); } -std::vector> EmployeeManagementService::getShorlistedCandidates() +std::vector EmployeeManagementService::getShorlistedCandidates() { candidateMap candidates = m_dataStore.getCandidates(); - std::vector> shortlistedCandidates; + std::vector shortlistedCandidates; for (auto& candidate : candidates) { if (candidate.second->getCandidateStatus() == Enums::CandidateStatus::SHORTLISTED) diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.cpp index 733f9eb..647154e 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.cpp @@ -4,5 +4,4 @@ * 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 1010ec4..40b2c4b 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/LeaveManagementService.h @@ -4,7 +4,6 @@ * 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 6917cda..535fb0b 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/LogService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/LogService.cpp @@ -4,7 +4,6 @@ * 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 c1cf644..93ff404 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/LogService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/LogService.h @@ -4,7 +4,6 @@ * 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 7eaa377..f7f94a7 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.cpp @@ -4,5 +4,4 @@ * 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 6b4aba1..cef9bfc 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/NotificationManagementService.h @@ -4,7 +4,6 @@ * 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 6029d08..d6d18ed 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.cpp @@ -4,7 +4,6 @@ * 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 fc71191..5a79ec8 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/PayslipManagementService.h @@ -4,7 +4,6 @@ * 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 9e0ef96..3fb9113 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.cpp @@ -4,5 +4,4 @@ * 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 ed0dd32..c120c72 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TalentAcquisitionManagementService.h @@ -4,7 +4,6 @@ * 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 8b13b81..5db2995 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.cpp @@ -4,5 +4,4 @@ * 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 21275da..eabb859 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TeamManagementService.h @@ -4,7 +4,6 @@ * 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 bc995f9..0325609 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.cpp @@ -4,5 +4,4 @@ * 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 8a38d98..caa6338 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/TicketManagementService.h @@ -4,7 +4,6 @@ * Author: Trenser * Created: 30-Mar-2026 */ - #pragma once class TicketManagementService {