0290467528
<UserStory>EMP008: Update Salary Details</UserStory>
<Changes>
- Refactored salary update and employee selection:
• Removed unnecessary const qualifiers from double parameters
• Renamed variables
• Replaced count() with find() for map lookups
• Excluded ADMIN employees from salary updates and selection lists
• Applied util::enforceAuthorization for access control
- Improved readability and consistency:
• Enhanced tabular output using setw() with left alignment
Implement Update Salary
</Changes>
<Review>
Smitha Mohan
</Review>
22 lines
693 B
C++
22 lines
693 B
C++
#pragma once
|
|
#include <vector>
|
|
#include <tuple>
|
|
#include "DataStore.h"
|
|
#include "Enums.h"
|
|
|
|
using Employees = std::vector<std::shared_ptr<const Employee>>;
|
|
|
|
class EmployeeManagementService
|
|
{
|
|
private:
|
|
DataStore& m_dataStore;
|
|
public:
|
|
EmployeeManagementService() : m_dataStore(DataStore::getInstance()) {};
|
|
void createEmployee(Enums::EmployeeType, Enums::EmployeeDesignation, const std::string&, const std::string&, const std::string&);
|
|
bool deactivateEmployee(const std::string&);
|
|
Employees getEmployees();
|
|
std::shared_ptr<const Employee> getEmployee(const std::string&);
|
|
void updateProfile(const std::string&,const std::string&);
|
|
std::shared_ptr<const Employee> getCurrentEmployee();
|
|
};
|