Implement Update Salary
<UserStory>EMP08: Update Salary Details</UserStory> <Changes> - Added `updateSalary` method in ZenvyController to connect payroll updates with PayslipManagementService - Implemented `PayslipManagementService::updateSalary` with employee existence and Finance-role authorization checks - Extended Payroll model with setter methods for salary components - Improved error handling with clear runtime exceptions for invalid index selection, unauthorized access, and missing employees </Changes> <Review> Smitha Mohan </Review>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
#include "DataStore.h"
|
||||
#include <string>
|
||||
#include<stdexcept>
|
||||
#include"DataStore.h"
|
||||
|
||||
class PayslipManagementService
|
||||
{
|
||||
@@ -7,4 +9,5 @@ private:
|
||||
DataStore& m_dataStore;
|
||||
public:
|
||||
PayslipManagementService() : m_dataStore(DataStore::getInstance()) {};
|
||||
void updateSalary(const std::string&, const double, const double, const double, const double, const double);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user