0af64c140b
<UserStory> EMP011 : View Payslip History </UserStory> <Changes> - Removed getPayslips() method from ZenvyController and PayslipManagementService as part of review cleanup. - Reformatted Enums::getMonthString() and Enums::getMonth() functions for consistent indentation and readability. - Ensured switch-case blocks in Enums.h follow proper alignment and coding standards. </Changes> <Review> Smitha Mohan </Review>
68 lines
3.0 KiB
C++
68 lines
3.0 KiB
C++
#pragma once
|
|
#include <memory>
|
|
#include <utility>
|
|
#include "AuthenticationManagementService.h"
|
|
#include "AttendanceManagementService.h"
|
|
#include "BookingManagementService.h"
|
|
#include "EmployeeManagementService.h"
|
|
#include "LeaveManagementService.h"
|
|
#include "NotificationManagementService.h"
|
|
#include "PayslipManagementService.h"
|
|
#include "TalentAcquisitionManagementService.h"
|
|
#include "TeamManagementService.h"
|
|
#include "TicketManagementService.h"
|
|
#include "Enums.h"
|
|
|
|
class ZenvyController
|
|
{
|
|
private:
|
|
std::shared_ptr<AuthenticationManagementService> m_authenticationManagementService;
|
|
std::shared_ptr<AttendanceManagementService> m_attendanceManagementService;
|
|
std::shared_ptr<BookingManagementService> m_bookingManagementService;
|
|
std::shared_ptr<EmployeeManagementService> m_employeeManagementService;
|
|
std::shared_ptr<LeaveManagementService> m_leaveManagementService;
|
|
std::shared_ptr<NotificationManagementService> m_notificationManagementService;
|
|
std::shared_ptr<PayslipManagementService> m_payslipManagementService;
|
|
std::shared_ptr<TalentAcquisitionManagementService> m_talentAcquisitionManagementService;
|
|
std::shared_ptr<TeamManagementService> m_teamManagementService;
|
|
std::shared_ptr<TicketManagementService> m_ticketManagementService;
|
|
public:
|
|
ZenvyController() :
|
|
m_authenticationManagementService(std::make_shared<AuthenticationManagementService>()),
|
|
m_attendanceManagementService(std::make_shared<AttendanceManagementService>()),
|
|
m_bookingManagementService(std::make_shared<BookingManagementService>()),
|
|
m_employeeManagementService(std::make_shared<EmployeeManagementService>()),
|
|
m_leaveManagementService(std::make_shared<LeaveManagementService>()),
|
|
m_notificationManagementService(std::make_shared<NotificationManagementService>()),
|
|
m_payslipManagementService(std::make_shared<PayslipManagementService>()),
|
|
m_talentAcquisitionManagementService(std::make_shared<TalentAcquisitionManagementService>()),
|
|
m_teamManagementService(std::make_shared<TeamManagementService>()),
|
|
m_ticketManagementService(std::make_shared<TicketManagementService>()) {};
|
|
|
|
//Authentication
|
|
AuthenticationDTO login(const std::string& email, const std::string& password);
|
|
void logout();
|
|
void changePassword(const std::string&);
|
|
|
|
//Employee Management
|
|
void createEmployee(Enums::EmployeeType, Enums::EmployeeDesignation, const std::string&, const std::string&, const std::string&);
|
|
bool deactivateEmployee(const std::string&);
|
|
std::shared_ptr<const Employee> getCurrentEmployee();
|
|
void updateProfile(const std::string&,const std::string&);
|
|
std::pair<Enums::EmployeeType, std::vector<std::shared_ptr<const Employee>>> searchEmployee(const std::string&);
|
|
|
|
template <typename ...Types>
|
|
Employees getEmployees(Types ...types)
|
|
{
|
|
return m_employeeManagementService->getEmployees(types...);
|
|
}
|
|
|
|
//Payslip management
|
|
void updateSalary(const std::string&, double, double, double, double, double);
|
|
void generatePayslips();
|
|
|
|
//File Management
|
|
void loadStates();
|
|
void persistStates();
|
|
};
|