From 1836be1234369e40b02c14abcd4b8389394dad4a Mon Sep 17 00:00:00 2001 From: Ajmal Jalaludeen Date: Tue, 14 Apr 2026 14:48:58 +0530 Subject: [PATCH 1/4] To Add Shortlisted Candidates As Employee EMP012 : Add Shorlisted Candidates As Employee - Added getShorlistedCandidates method in ZenvyController - Added candidateMap to store candidate data in DataStore.h - Added addShortlistedCandidatesAsEmployee method in EmployeeManagementService.h and implemented the logic. Smitha Mohan --- .../controllers/ZenvyController.cpp | 5 ++ .../controllers/ZenvyController.h | 2 + .../Trenser.Zenvy/datastores/DataStore.cpp | 5 ++ .../Trenser.Zenvy/datastores/DataStore.h | 3 + .../Trenser.Zenvy/models/Candidate.cpp | 4 +- .../Trenser.Zenvy/models/Candidate.h | 10 +-- .../services/EmployeeManagementService.cpp | 14 +++ .../services/EmployeeManagementService.h | 1 + Trenser.Zenvy/Trenser.Zenvy/utilities/Enums.h | 3 +- .../Trenser.Zenvy/views/AdminMenu.cpp | 5 +- .../Trenser.Zenvy/views/HRManagerMenu.cpp | 5 +- .../Trenser.Zenvy/views/MenuHelper.cpp | 85 ++++++++++++++++++- .../Trenser.Zenvy/views/MenuHelper.h | 5 +- 13 files changed, 132 insertions(+), 15 deletions(-) diff --git a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp index 87164e6..1f095ee 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp @@ -47,6 +47,11 @@ bool ZenvyController::updateDesignation(const std::string& id,Enums::EmployeeDes return m_employeeManagementService->updateDesignation(id,designation); } +std::vector>& ZenvyController::getShorlistedCandidates() +{ + return m_employeeManagementService->getShorlistedCandidates(); +} + //Payslip Management void ZenvyController::updateSalary(const std::string& employeeId, double basicSalary, double houseRentAllowance, double foodAllowance, double employeePFContribution, double employerPFContribution) { diff --git a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h index 8345148..78b3123 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h +++ b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h @@ -51,6 +51,8 @@ public: void updateProfile(const std::string&,const std::string&); std::pair>> searchEmployee(const std::string&); bool updateDesignation(const std::string&,Enums::EmployeeDesignation); + std::vector>& getShorlistedCandidates(); + template Employees getEmployees(Types ...types) { diff --git a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp index fe9dad4..be0897e 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.cpp @@ -12,6 +12,11 @@ logMap& DataStore::getLogs() return m_logs; } +candidateMap& DataStore::getCandidates() +{ + return m_candidates; +} + std::shared_ptr& DataStore::getAuthenticatedEmployee() { return m_authenticatedEmployee; diff --git a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h index 9f79fc8..972e580 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h +++ b/Trenser.Zenvy/Trenser.Zenvy/datastores/DataStore.h @@ -25,6 +25,7 @@ using employeeMap = std::map>; using payrollMap = std::map>; using payslipMap = std::map>; using logMap = std::map>; +using candidateMap = std::map>; class DataStore { @@ -34,6 +35,7 @@ private: payrollMap m_payrolls; payslipMap m_payslips; logMap m_logs; + candidateMap m_candidates; DataStore() = default; public: static DataStore& getInstance(); @@ -45,6 +47,7 @@ public: payrollMap& getPayrolls(); payslipMap& getPayslips(); logMap& getLogs(); + candidateMap& getCandidates(); std::shared_ptr& getAuthenticatedEmployee(); void setAuthenticatedEmployee(std::shared_ptr < Employee>); }; \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.cpp b/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.cpp index 779652f..254aff2 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.cpp @@ -12,7 +12,7 @@ const std::string& Candidate::getCandidateName() const return m_name; } -long int Candidate::getCandidatePhone() const +const std::string& Candidate::getCandidatePhone() const { return m_phone; } @@ -37,7 +37,7 @@ void Candidate::setCandidateName(const std::string& name) m_name = name; } -void Candidate::setCandidatePhone(long int phone) +void Candidate::setCandidatePhone(const std::string& phone) { m_phone = phone; } diff --git a/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.h b/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.h index db55250..59b9e9b 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.h +++ b/Trenser.Zenvy/Trenser.Zenvy/models/Candidate.h @@ -8,24 +8,24 @@ private: static int m_uid; std::string m_id; std::string m_name; - long int m_phone; + std::string m_phone; std::string m_qualification; Enums::CandidateStatus m_status; public: - Candidate() : m_id("CD" + std::to_string(++m_uid)), m_name(""), m_phone(0), m_qualification(""), m_status(Enums::CandidateStatus::PENDING) {} + Candidate() : m_id("CD" + std::to_string(++m_uid)), m_name(""), m_phone(""), m_qualification(""), m_status(Enums::CandidateStatus::PENDING) {} Candidate(const std::string& name, - long int phone, + const std::string& phone, const std::string& qualification, Enums::CandidateStatus status) : m_id("CD" + std::to_string(++m_uid)), m_name(name), m_phone(phone), m_qualification(qualification), m_status(status) {} const std::string& getCandidateId() const; const std::string& getCandidateName() const; - long int getCandidatePhone() const; + const std::string& getCandidatePhone() const; const std::string& getCandidateQualification() const; Enums::CandidateStatus getCandidateStatus() const; void setCandidateId(const std::string& id); void setCandidateName(const std::string& name); - void setCandidatePhone(long int phone); + void setCandidatePhone(const std::string& phone); void setCandidateQualification(const std::string& qualification); void setCandidateStatus(Enums::CandidateStatus status); }; \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp index 179b057..d9add47 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp @@ -235,3 +235,17 @@ void EmployeeManagementService::saveEmployees() employeeFileManager.save(employees); generalEmployeeFileManager.save(generalEmployees); } + +std::vector>& EmployeeManagementService::getShorlistedCandidates() +{ + candidateMap candidates = m_dataStore.getCandidates(); + std::vector> shortlistedCandidates; + for (auto& candidate : candidates) + { + if (candidate.second->getCandidateStatus() == Enums::CandidateStatus::SHORTLISTED) + { + shortlistedCandidates.push_back(candidate.second); + } + } + return shortlistedCandidates; +} \ No newline at end of file diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.h index 45f4526..4cd2da2 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.h @@ -21,6 +21,7 @@ public: void updateProfile(const std::string&,const std::string&); std::pair>> searchEmployee(const std::string&); std::shared_ptr getCurrentEmployee(); + std::vector>& getShorlistedCandidates(); void loadEmployees(); void saveEmployees(); diff --git a/Trenser.Zenvy/Trenser.Zenvy/utilities/Enums.h b/Trenser.Zenvy/Trenser.Zenvy/utilities/Enums.h index 1539ee9..a9f29f5 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/utilities/Enums.h +++ b/Trenser.Zenvy/Trenser.Zenvy/utilities/Enums.h @@ -19,7 +19,8 @@ namespace Enums { { PENDING, SHORTLISTED, - REJECTED + REJECTED, + HIRED }; enum class NotificationStatus diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.cpp index bbe895b..df08e23 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/AdminMenu.cpp @@ -13,7 +13,7 @@ void AdminMenu::run() { int choice; util::clear(); - std::cout << "Admin Menu\n1. Create User\n2. View Employees\n3. Deactivate Employee\n4. Search Employee\n5. Update Profile\n6. Update Designation \n7. Logout\nEnter your Choice: "; + std::cout << "Admin Menu\n1. Create User\n2. View Employees\n3. Deactivate Employee\n4. Search Employee\n5. Update Profile\n6. Update Designation \n7. Add Shortlisted Candidate As Employee\n8. Logout\nEnter your Choice: "; util::read(choice); if (!handleOperation(choice)) { @@ -51,6 +51,9 @@ bool AdminMenu::handleOperation(int choice) updateDesignation(m_zenvyController); break; case 7: + addShortlistedCandidateAsEmployee(m_zenvyController); + break; + case 8: return false; default: std::cout << "Enter a valid choice!" << std::endl; diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp index d3723f7..580cf89 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp @@ -13,7 +13,7 @@ void HRManagerMenu::run() { int choice; util::clear(); - std::cout << "HR Manager Menu\n1. Apply Leave\n2. View Payslip\n3. View Payslip History\n4. View Employees\n5. Search Employee\n6. View Notification\n7. View Announcements\n8. Create Employee\n9. Regularize Attendance\n10. Update Leave Request\n11. Register CandidateAsEmployee\n12. Update Profile\n13. Deactivate Employee\n14. View Profile\n15. Update Designation\n16. Logout\nEnter your Choice: "; + std::cout << "HR Manager Menu\n1. Apply Leave\n2. View Payslip\n3. View Payslip History\n4. View Employees\n5. Search Employee\n6. View Notification\n7. View Announcements\n8. Create Employee\n9. Regularize Attendance\n10. Update Leave Request\n11. Register CandidateAsEmployee\n12. Update Profile\n13. Deactivate Employee\n14. View Profile\n15. Update Designation\n16. Add Shortlisted Candidate as Employee\n17. Logout\nEnter your Choice: "; util::read(choice); if (!handleOperation(choice)) { @@ -54,6 +54,9 @@ bool HRManagerMenu::handleOperation(int choice) updateDesignation(m_zenvyController); break; case 16: + addShortlistedCandidateAsEmployee(m_zenvyController); + break; + case 17: return false; default: std::cout << "Enter a valid choice!" << std::endl; diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp index 43b8faf..a88989c 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp @@ -30,12 +30,12 @@ static Enums::EmployeeType getEmployeeType(Enums::EmployeeType employeeType) { Enums::EmployeeType::TALENT_ACQUISITION, "Talent Executive" }, { Enums::EmployeeType::GENERAL, "General Employee" } }; - auto it = employeeTypeOptions.find(employeeType); - if (it == employeeTypeOptions.end()) + auto employeeOptionsIterator = employeeTypeOptions.find(employeeType); + if (employeeOptionsIterator == employeeTypeOptions.end()) { throw std::runtime_error("You do not have the authority to create a new Employee!"); } - const auto& options = it->second; + const auto& options = employeeOptionsIterator->second; std::cout << "Select Employee Type\n"; for (int index = 0; index < options.size(); ++index) { @@ -121,4 +121,81 @@ void createEmployee(std::shared_ptr controller) std::cout << "Employee not found\n"; util::pressEnter(); } -} \ No newline at end of file +} + +void displayCandidateDetails(const std::vector>& shorlistedCandidates) +{ + std::cout << std::left + << std::setw(10) << "Index" + << std::setw(10) << "ID" + << std::setw(20) << "Name" + << std::setw(15) << "Phone" + << std::setw(15) << "Qualification" + << std::setw(10) << "Status" + << std::endl; + int index = 0; + for (auto& candidate : shorlistedCandidates) + { + std::cout << std::left + << std::setw(10) << ++index + << std::setw(10) << candidate->getCandidateId() + << std::setw(20) << candidate->getCandidateName() + << std::setw(15) << candidate->getCandidatePhone() + << std::setw(15) << candidate->getCandidateQualification() + << std::setw(10) << Enums::getCandidateStatusString(candidate->getCandidateStatus()) + << std::endl; + } +} + +void addShortlistedCandidateAsEmployee(const std::shared_ptr& controller) +{ + int index; + std::string name, email, phone; + util::clear(); + std::vector> shortlistedCandidates = controller->getShorlistedCandidates(); + if (shortlistedCandidates.empty()) + { + std::cout << "No candidates Found!"; + util::pressEnter(); + return; + } + displayCandidateDetails(shortlistedCandidates); + std::cout << "Enter the Index: "; + util::read(index); + auto currentEmployee = controller->getCurrentEmployee(); + Enums::EmployeeType employeeType; + Enums::EmployeeDesignation employeeDesignation = Enums::EmployeeDesignation::INVALID; + if (index > 0 && index < shortlistedCandidates.size()) + { + employeeType = getEmployeeType(currentEmployee->getEmployeeType()); + std::shared_ptr candidate = shortlistedCandidates[index - 1]; + switch (employeeType) + { + case Enums::EmployeeType::INVALID: + std::cout << "Invalid Choice"; + util::pressEnter(); + return; + case Enums::EmployeeType::GENERAL: + employeeDesignation = getEmployeeDesignation(); + if (employeeDesignation == Enums::EmployeeDesignation::INVALID) + { + std::cout << "Invalid Choice"; + util::pressEnter(); + return; + } + break; + } + std::cout << "Enter email: "; + util::read(email); + name = candidate->getCandidateName(); + phone = candidate->getCandidatePhone(); + controller->createEmployee(employeeType, employeeDesignation, email, name, phone); + candidate->setCandidateStatus(Enums::CandidateStatus::HIRED); + std::cout << "\nCreated Employee Successfully."; + util::pressEnter(); + } + else + { + throw std::runtime_error("Enter a valid Index."); + } +} diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.h b/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.h index 940333c..61d96b7 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.h +++ b/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.h @@ -59,6 +59,9 @@ inline void viewProfile(std::shared_ptr controller) } } +void displayCandidateDetails(const std::vector>& shorlistedCandidates); +void addShortlistedCandidateAsEmployee(const std::shared_ptr& controller); + inline void updateProfile(std::shared_ptr m_zenvyController) { int choice; @@ -223,7 +226,7 @@ inline void viewEmployees(std::shared_ptr m_zenvyController) util::pressEnter(); } -inline void searchEmployee(std::shared_ptr& m_zenvyController) +inline void searchEmployee(std::shared_ptr m_zenvyController) { std::string name; util::clear(); From f15d5b7f1df2913f3e03182ce8c18b92887bca9e Mon Sep 17 00:00:00 2001 From: Ajmal Jalaludeen Date: Tue, 14 Apr 2026 18:32:02 +0530 Subject: [PATCH 2/4] Updates based on comments EMP012 : Add Shorlisted Candidates As Employee - Added clear method to clear console before displaying candidate details in MenuHelper.cpp - Removed spaces in MenuHelper.h Smitha Mohan --- Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp index a88989c..d1d4ba3 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp @@ -125,6 +125,7 @@ void createEmployee(std::shared_ptr controller) void displayCandidateDetails(const std::vector>& shorlistedCandidates) { + util::clear(); std::cout << std::left << std::setw(10) << "Index" << std::setw(10) << "ID" From 7351186baf7251c287353275885793a4668626dd Mon Sep 17 00:00:00 2001 From: Joel Thomas Date: Thu, 16 Apr 2026 10:05:19 +0530 Subject: [PATCH 3/4] Refactor shortlisted candidates access and fix index check EMP0012 : Employee Management - Changed getShorlistedCandidates() to return by value instead of reference - Updated controller and service method signatures accordingly - Fixed off-by-one error when selecting shortlisted candidate Smitha Mohan --- Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp | 2 +- Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h | 2 +- .../Trenser.Zenvy/services/EmployeeManagementService.cpp | 2 +- .../Trenser.Zenvy/services/EmployeeManagementService.h | 2 +- Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp index 1f095ee..ee04e1c 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.cpp @@ -47,7 +47,7 @@ bool ZenvyController::updateDesignation(const std::string& id,Enums::EmployeeDes return m_employeeManagementService->updateDesignation(id,designation); } -std::vector>& ZenvyController::getShorlistedCandidates() +std::vector> ZenvyController::getShorlistedCandidates() { return m_employeeManagementService->getShorlistedCandidates(); } diff --git a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h index 78b3123..0fbe2b8 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h +++ b/Trenser.Zenvy/Trenser.Zenvy/controllers/ZenvyController.h @@ -51,7 +51,7 @@ public: void updateProfile(const std::string&,const std::string&); std::pair>> searchEmployee(const std::string&); bool updateDesignation(const std::string&,Enums::EmployeeDesignation); - std::vector>& getShorlistedCandidates(); + std::vector> getShorlistedCandidates(); template Employees getEmployees(Types ...types) diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp index d9add47..855e445 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.cpp @@ -236,7 +236,7 @@ void EmployeeManagementService::saveEmployees() generalEmployeeFileManager.save(generalEmployees); } -std::vector>& EmployeeManagementService::getShorlistedCandidates() +std::vector> EmployeeManagementService::getShorlistedCandidates() { candidateMap candidates = m_dataStore.getCandidates(); std::vector> shortlistedCandidates; diff --git a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.h b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.h index 4cd2da2..a292c31 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.h +++ b/Trenser.Zenvy/Trenser.Zenvy/services/EmployeeManagementService.h @@ -21,7 +21,7 @@ public: void updateProfile(const std::string&,const std::string&); std::pair>> searchEmployee(const std::string&); std::shared_ptr getCurrentEmployee(); - std::vector>& getShorlistedCandidates(); + std::vector> getShorlistedCandidates(); void loadEmployees(); void saveEmployees(); diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp index d1d4ba3..bba68d0 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/MenuHelper.cpp @@ -166,7 +166,7 @@ void addShortlistedCandidateAsEmployee(const std::shared_ptr& c auto currentEmployee = controller->getCurrentEmployee(); Enums::EmployeeType employeeType; Enums::EmployeeDesignation employeeDesignation = Enums::EmployeeDesignation::INVALID; - if (index > 0 && index < shortlistedCandidates.size()) + if (index > 0 && index <= shortlistedCandidates.size()) { employeeType = getEmployeeType(currentEmployee->getEmployeeType()); std::shared_ptr candidate = shortlistedCandidates[index - 1]; From 72e7db04a501b10cde50fe2b7aad90e0b2ebab11 Mon Sep 17 00:00:00 2001 From: Joel Thomas Date: Thu, 16 Apr 2026 10:26:54 +0530 Subject: [PATCH 4/4] Fix HR Manager menu option ordering and switch mapping EMP012 : Employee Management - Updated HR Manager menu text to remove obsolete options - Reordered menu items to match current functionality Smitha Mohan --- .../Trenser.Zenvy/views/HRManagerMenu.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp b/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp index 580cf89..28dec14 100644 --- a/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp +++ b/Trenser.Zenvy/Trenser.Zenvy/views/HRManagerMenu.cpp @@ -13,7 +13,7 @@ void HRManagerMenu::run() { int choice; util::clear(); - std::cout << "HR Manager Menu\n1. Apply Leave\n2. View Payslip\n3. View Payslip History\n4. View Employees\n5. Search Employee\n6. View Notification\n7. View Announcements\n8. Create Employee\n9. Regularize Attendance\n10. Update Leave Request\n11. Register CandidateAsEmployee\n12. Update Profile\n13. Deactivate Employee\n14. View Profile\n15. Update Designation\n16. Add Shortlisted Candidate as Employee\n17. Logout\nEnter your Choice: "; + std::cout << "HR Manager Menu\n1. Apply Leave\n2. View Payslip\n3. View Payslip History\n4. View Employees\n5. Search Employee\n6. View Notification\n7. View Announcements\n8. Create Employee\n9. Regularize Attendance\n10. Update Leave Request\n11. Update Profile\n12. Deactivate Employee\n13. View Profile\n14. Update Designation\n15. Add Shortlisted Candidate as Employee\n16. Logout\nEnter your Choice: "; util::read(choice); if (!handleOperation(choice)) { @@ -41,22 +41,22 @@ bool HRManagerMenu::handleOperation(int choice) case 8: createEmployee(m_zenvyController); break; - case 12: + case 11: updateProfile(m_zenvyController); break; - case 13: + case 12: deactivateEmployee(m_zenvyController); break; - case 14: + case 13: viewProfile(m_zenvyController); break; - case 15: + case 14: updateDesignation(m_zenvyController); break; - case 16: + case 15: addShortlistedCandidateAsEmployee(m_zenvyController); break; - case 17: + case 16: return false; default: std::cout << "Enter a valid choice!" << std::endl;