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:
Jissin Sam Mathew
2026-04-07 15:34:08 +05:30
committed by Joel Thomas
parent f75bbaaae8
commit 63627075ef
13 changed files with 136 additions and 47 deletions
@@ -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);
};