Updated Menu Helper and all User Menu
<UserStory> EMP006 : Search Employee </UserStory> <Changes> - Updated MenuHelper.h helper file for input validation - Updated search employee logic in employee management service - Removed comments in Enums.h and EmployeeManagementService.h - Included MenuHelper.h in all User Menu files </Changes> <Review> Smitha Mohan </Review>
This commit is contained in:
@@ -26,13 +26,13 @@ std::pair<Enums::EmployeeType, std::vector<std::shared_ptr<const Employee>>> Emp
|
||||
const auto& employee = entry.second;
|
||||
if (!employee)
|
||||
{
|
||||
continue; // skip if pointer is null
|
||||
continue;
|
||||
}
|
||||
std::string employeeName = employee->getEmployeeName();
|
||||
std::transform(employeeName.begin(), employeeName.end(), employeeName.begin(), ::tolower);
|
||||
std::string searchName = name;
|
||||
std::transform(searchName.begin(), searchName.end(), searchName.begin(), ::tolower);
|
||||
if (employeeName == searchName)
|
||||
if (employeeName.find(searchName) != std::string::npos)
|
||||
{
|
||||
employeeList.push_back(employee);
|
||||
}
|
||||
|
||||
@@ -91,52 +91,36 @@ namespace Enums {
|
||||
INVALID_PASSWORD
|
||||
};
|
||||
|
||||
/*std::string getEmployeeType(EmployeeType type)
|
||||
std::string getAccountStatus(AccountStatus status)
|
||||
{
|
||||
switch (type)
|
||||
switch (status)
|
||||
{
|
||||
case EmployeeType::HR:
|
||||
return "HR Manager";
|
||||
case EmployeeType::TEAM:
|
||||
return "Team Executive";
|
||||
case EmployeeType::ADMIN:
|
||||
return "Admin";
|
||||
case EmployeeType::IT:
|
||||
return "IT Executive";
|
||||
case EmployeeType::FINANCE:
|
||||
return "Finance Executive";
|
||||
case EmployeeType::TAG:
|
||||
return "Talent Acquisition Executive";
|
||||
case EmployeeType::GENERAL:
|
||||
return "General Employee";
|
||||
default:
|
||||
return "Invalid";
|
||||
case AccountStatus::ACTIVE:
|
||||
return "Active";
|
||||
case AccountStatus::INACTIVE:
|
||||
return "Inactive";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getTeamStatus(TeamStatus status)
|
||||
std::string getTeamStatus(TeamStatus status)
|
||||
{
|
||||
|
||||
}*/
|
||||
|
||||
std::string getAccountStatus(AccountStatus status) {
|
||||
switch (status) {
|
||||
case AccountStatus::ACTIVE: return "Active";
|
||||
case AccountStatus::INACTIVE: return "Inactive";
|
||||
default: return "Unknown";
|
||||
switch (status)
|
||||
{
|
||||
case TeamStatus::IN_TEAM:
|
||||
return "In Team";
|
||||
case TeamStatus::NOT_IN_TEAM:
|
||||
return "Not in Team";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getTeamStatus(TeamStatus status) {
|
||||
switch (status) {
|
||||
case TeamStatus::IN_TEAM: return "In Team";
|
||||
case TeamStatus::NOT_IN_TEAM: return "Not in Team";
|
||||
default: return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getCandidateStatus(CandidateStatus status) {
|
||||
switch (status) {
|
||||
std::string getCandidateStatus(CandidateStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case CandidateStatus::PENDING: return "Pending";
|
||||
case CandidateStatus::SHORTLISTED: return "Shortlisted";
|
||||
case CandidateStatus::REJECTED: return "Rejected";
|
||||
@@ -145,94 +129,148 @@ namespace Enums {
|
||||
}
|
||||
|
||||
std::string getNotificationStatus(NotificationStatus status) {
|
||||
switch (status) {
|
||||
case NotificationStatus::READ: return "Read";
|
||||
case NotificationStatus::UNREAD: return "Unread";
|
||||
default: return "Unknown";
|
||||
switch (status)
|
||||
{
|
||||
case NotificationStatus::READ:
|
||||
return "Read";
|
||||
case NotificationStatus::UNREAD:
|
||||
return "Unread";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getLeaveStatus(LeaveStatus status) {
|
||||
switch (status) {
|
||||
case LeaveStatus::PENDING: return "Pending";
|
||||
case LeaveStatus::APPROVED: return "Approved";
|
||||
case LeaveStatus::REJECTED: return "Rejected";
|
||||
default: return "Unknown";
|
||||
std::string getLeaveStatus(LeaveStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case LeaveStatus::PENDING:
|
||||
return "Pending";
|
||||
case LeaveStatus::APPROVED:
|
||||
return "Approved";
|
||||
case LeaveStatus::REJECTED:
|
||||
return "Rejected";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getLeaveType(LeaveType type) {
|
||||
switch (type) {
|
||||
case LeaveType::GENERAL: return "General Leave";
|
||||
case LeaveType::MEDICAL: return "Medical Leave";
|
||||
case LeaveType::RESTRICTED: return "Restricted Leave";
|
||||
default: return "Unknown";
|
||||
std::string getLeaveType(LeaveType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case LeaveType::GENERAL:
|
||||
return "General Leave";
|
||||
case LeaveType::MEDICAL:
|
||||
return "Medical Leave";
|
||||
case LeaveType::RESTRICTED:
|
||||
return "Restricted Leave";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getJobListingStatus(JobListingStatus status) {
|
||||
switch (status) {
|
||||
case JobListingStatus::OPEN: return "Open";
|
||||
case JobListingStatus::CLOSED: return "Closed";
|
||||
default: return "Unknown";
|
||||
std::string getJobListingStatus(JobListingStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case JobListingStatus::OPEN:
|
||||
return "Open";
|
||||
case JobListingStatus::CLOSED:
|
||||
return "Closed";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getTicketStatus(TicketStatus status) {
|
||||
switch (status) {
|
||||
case TicketStatus::OPEN: return "Open";
|
||||
case TicketStatus::RESOLVED: return "Resolved";
|
||||
case TicketStatus::CLOSED: return "Closed";
|
||||
default: return "Unknown";
|
||||
std::string getTicketStatus(TicketStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case TicketStatus::OPEN:
|
||||
return "Open";
|
||||
case TicketStatus::RESOLVED:
|
||||
return "Resolved";
|
||||
case TicketStatus::CLOSED:
|
||||
return "Closed";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getTicketType(TicketType type) {
|
||||
switch (type) {
|
||||
case TicketType::IT: return "IT";
|
||||
case TicketType::FINANCE: return "Finance";
|
||||
case TicketType::ATTENDANCE: return "Attendance";
|
||||
case TicketType::UNKNOWN: return "Unknown";
|
||||
default: return "Unknown";
|
||||
std::string getTicketType(TicketType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case TicketType::IT:
|
||||
return "IT";
|
||||
case TicketType::FINANCE:
|
||||
return "Finance";
|
||||
case TicketType::ATTENDANCE:
|
||||
return "Attendance";
|
||||
case TicketType::UNKNOWN:
|
||||
return "Unknown";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getEmployeeDesignation(EmployeeDesignation designation) {
|
||||
switch (designation) {
|
||||
case EmployeeDesignation::JUNIOR: return "Junior";
|
||||
case EmployeeDesignation::SENIOR: return "Senior";
|
||||
case EmployeeDesignation::TEAM_LEAD: return "Team Lead";
|
||||
case EmployeeDesignation::INVALID: return "Invalid";
|
||||
default: return "Unknown";
|
||||
std::string getEmployeeDesignation(EmployeeDesignation designation)
|
||||
{
|
||||
switch (designation)
|
||||
{
|
||||
case EmployeeDesignation::JUNIOR:
|
||||
return "Junior";
|
||||
case EmployeeDesignation::SENIOR:
|
||||
return "Senior";
|
||||
case EmployeeDesignation::TEAM_LEAD:
|
||||
return "Team Lead";
|
||||
case EmployeeDesignation::INVALID:
|
||||
return "Invalid";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getEmployeeType(EmployeeType type) {
|
||||
switch (type) {
|
||||
case EmployeeType::HR: return "HR Manager";
|
||||
case EmployeeType::TEAM: return "Team Executive";
|
||||
case EmployeeType::ADMIN: return "Admin";
|
||||
case EmployeeType::IT: return "IT Executive";
|
||||
case EmployeeType::FINANCE: return "Finance Executive";
|
||||
case EmployeeType::TAG: return "Talent Acquisition Executive";
|
||||
case EmployeeType::GENERAL: return "General Employee";
|
||||
case EmployeeType::INVALID: return "Invalid";
|
||||
default: return "Unknown";
|
||||
std::string getEmployeeType(EmployeeType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case EmployeeType::HR:
|
||||
return "HR Manager";
|
||||
case EmployeeType::TEAM:
|
||||
return "Team Executive";
|
||||
case EmployeeType::ADMIN:
|
||||
return "Admin";
|
||||
case EmployeeType::IT:
|
||||
return "IT Executive";
|
||||
case EmployeeType::FINANCE:
|
||||
return "Finance Executive";
|
||||
case EmployeeType::TAG:
|
||||
return "Talent Acquisition Executive";
|
||||
case EmployeeType::GENERAL:
|
||||
return "General Employee";
|
||||
case EmployeeType::INVALID:
|
||||
return "Invalid";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getLoginStatus(LoginStatus status) {
|
||||
switch (status) {
|
||||
case LoginStatus::SUCCESS: return "Login Success";
|
||||
case LoginStatus::FIRST_LOGIN: return "First Login";
|
||||
case LoginStatus::USER_NOT_FOUND: return "User Not Found";
|
||||
case LoginStatus::INVALID_PASSWORD: return "Invalid Password";
|
||||
default: return "Unknown";
|
||||
std::string getLoginStatus(LoginStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case LoginStatus::SUCCESS:
|
||||
return "Login Success";
|
||||
case LoginStatus::FIRST_LOGIN:
|
||||
return "First Login";
|
||||
case LoginStatus::USER_NOT_FOUND:
|
||||
return "User Not Found";
|
||||
case LoginStatus::INVALID_PASSWORD:
|
||||
return "Invalid Password";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Enums {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ bool AdminMenu::handleOperation(int choice)
|
||||
m_zenvyController.deactivateEmployee();
|
||||
break;*/
|
||||
case 5:
|
||||
searchEmployee();
|
||||
searchEmployee(m_zenvyController);
|
||||
break;
|
||||
case 6:
|
||||
return false;
|
||||
@@ -55,10 +55,3 @@ bool AdminMenu::handleOperation(int choice)
|
||||
return true;
|
||||
}
|
||||
|
||||
void AdminMenu::searchEmployee()
|
||||
{
|
||||
std::string name;
|
||||
std::cout << "Enter Employee Name: ";
|
||||
util::read(name);
|
||||
searchTheEmployee(name, m_zenvyController);
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include<memory>
|
||||
#include "MenuHelper.h"
|
||||
#include"ZenvyController.h"
|
||||
|
||||
class AdminMenu
|
||||
@@ -11,6 +10,5 @@ public:
|
||||
AdminMenu() :m_zenvyController(std::make_shared<ZenvyController>()) {};
|
||||
void run();
|
||||
bool handleOperation(int);
|
||||
void searchEmployee();
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "EmployeeMenu.h"
|
||||
#include"InputHelper.h"
|
||||
#include"OutputHelper.h"
|
||||
#include "MenuHelper.h"
|
||||
|
||||
void EmployeeMenu::run()
|
||||
{
|
||||
@@ -53,7 +54,7 @@ bool EmployeeMenu::handleOperation(int choice)
|
||||
m_zenvyController.viewEmployees();
|
||||
break;*/
|
||||
case 8:
|
||||
searchEmployee();
|
||||
searchEmployee(m_zenvyController);
|
||||
break;
|
||||
/*case 9:
|
||||
m_zenvyController.viewTeamMembers();
|
||||
@@ -77,10 +78,4 @@ bool EmployeeMenu::handleOperation(int choice)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void EmployeeMenu::searchEmployee()
|
||||
{
|
||||
std::string name;
|
||||
std::cout << "Enter Employee Name: ";
|
||||
util::read(name);
|
||||
searchTheEmployee(name, m_zenvyController);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#include<memory>
|
||||
#include <iomanip>
|
||||
#include "MenuHelper.h"
|
||||
#include"ZenvyController.h"
|
||||
|
||||
class EmployeeMenu
|
||||
@@ -12,6 +10,5 @@ public:
|
||||
EmployeeMenu() : m_zenvyController(std::make_shared<ZenvyController>()) {};
|
||||
void run();
|
||||
bool handleOperation(int);
|
||||
void searchEmployee();
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "FinanceExecutiveMenu.h"
|
||||
#include"InputHelper.h"
|
||||
#include"OutputHelper.h"
|
||||
#include "MenuHelper.h"
|
||||
|
||||
void FinanceExecutiveMenu::run()
|
||||
{
|
||||
@@ -44,7 +45,7 @@ bool FinanceExecutiveMenu::handleOperation(int choice)
|
||||
m_zenvyController.viewEmployees();
|
||||
break;*/
|
||||
case 5:
|
||||
searchEmployee();
|
||||
searchEmployee(m_zenvyController);
|
||||
break;
|
||||
/*case 6:
|
||||
m_zenvyController.viewNotifications();
|
||||
@@ -68,11 +69,3 @@ bool FinanceExecutiveMenu::handleOperation(int choice)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void FinanceExecutiveMenu::searchEmployee()
|
||||
{
|
||||
std::string name;
|
||||
std::cout << "Enter Employee Name: ";
|
||||
util::read(name);
|
||||
searchTheEmployee(name, m_zenvyController);
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include<memory>
|
||||
#include "MenuHelper.h"
|
||||
#include"ZenvyController.h"
|
||||
|
||||
class FinanceExecutiveMenu
|
||||
@@ -11,6 +10,5 @@ public:
|
||||
FinanceExecutiveMenu() : m_zenvyController(std::make_shared<ZenvyController>()) {};
|
||||
void run();
|
||||
bool handleOperation(int);
|
||||
void searchEmployee();
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "HRManagerMenu.h"
|
||||
#include"InputHelper.h"
|
||||
#include"OutputHelper.h"
|
||||
#include "MenuHelper.h"
|
||||
|
||||
void HRManagerMenu::run()
|
||||
{
|
||||
@@ -44,7 +45,7 @@ bool HRManagerMenu::handleOperation(int choice)
|
||||
m_zenvyController.viewEmployees();
|
||||
break;*/
|
||||
case 5:
|
||||
searchEmployee();
|
||||
searchEmployee(m_zenvyController);
|
||||
break;
|
||||
/*case 6:
|
||||
m_zenvyController.viewNotifications();
|
||||
@@ -71,11 +72,3 @@ bool HRManagerMenu::handleOperation(int choice)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void HRManagerMenu::searchEmployee()
|
||||
{
|
||||
std::string name;
|
||||
std::cout << "Enter Employee Name: ";
|
||||
util::read(name);
|
||||
searchTheEmployee(name, m_zenvyController);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include<memory>
|
||||
#include "MenuHelper.h"
|
||||
#include"ZenvyController.h"
|
||||
|
||||
class HRManagerMenu
|
||||
@@ -11,6 +10,5 @@ public:
|
||||
HRManagerMenu() : m_zenvyController(std::make_shared<ZenvyController>()) {};
|
||||
void run();
|
||||
bool handleOperation(int);
|
||||
void searchEmployee();
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "ITExecutiveMenu.h"
|
||||
#include"InputHelper.h"
|
||||
#include"OutputHelper.h"
|
||||
#include "MenuHelper.h"
|
||||
|
||||
void ITExecutiveMenu::run()
|
||||
{
|
||||
@@ -44,7 +45,7 @@ bool ITExecutiveMenu::handleOperation(int choice)
|
||||
m_zenvyController.viewEmployees();
|
||||
break;*/
|
||||
case 5:
|
||||
searchEmployee();
|
||||
searchEmployee(m_zenvyController);
|
||||
break;
|
||||
/*case 6:
|
||||
m_zenvyController.viewNotifications();
|
||||
@@ -62,11 +63,3 @@ bool ITExecutiveMenu::handleOperation(int choice)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void ITExecutiveMenu::searchEmployee()
|
||||
{
|
||||
std::string name;
|
||||
std::cout << "Enter Employee Name: ";
|
||||
util::read(name);
|
||||
searchTheEmployee(name, m_zenvyController);
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include<memory>
|
||||
#include "MenuHelper.h"
|
||||
#include"ZenvyController.h"
|
||||
|
||||
class ITExecutiveMenu
|
||||
@@ -11,6 +10,5 @@ public:
|
||||
ITExecutiveMenu() : m_zenvyController(std::make_shared<ZenvyController>()) {};
|
||||
void run();
|
||||
bool handleOperation(int);
|
||||
void searchEmployee();
|
||||
};
|
||||
|
||||
|
||||
@@ -11,8 +11,12 @@
|
||||
#include "ZenvyController.h"
|
||||
#include "Payroll.h"
|
||||
|
||||
inline void searchTheEmployee(const std::string& name, std::shared_ptr<ZenvyController>& m_zenvyController)
|
||||
inline void searchEmployee(std::shared_ptr<ZenvyController>& m_zenvyController)
|
||||
{
|
||||
std::string name;
|
||||
util::clear();
|
||||
std::cout << "Enter Employee Name: ";
|
||||
util::read(name);
|
||||
std::pair<Enums::EmployeeType, std::vector<std::shared_ptr<const Employee>>> searchResults = m_zenvyController->searchEmployee(name);
|
||||
if (!(searchResults.second).empty())
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "TalentExecutiveMenu.h"
|
||||
#include"InputHelper.h"
|
||||
#include"OutputHelper.h"
|
||||
#include "MenuHelper.h"
|
||||
|
||||
void TalentExecutiveMenu::run()
|
||||
{
|
||||
@@ -44,7 +45,7 @@ bool TalentExecutiveMenu::handleOperation(int choice)
|
||||
m_zenvyController.viewEmployees();
|
||||
break;*/
|
||||
case 5:
|
||||
searchEmployee();
|
||||
searchEmployee(m_zenvyController);
|
||||
break;
|
||||
/*case 6:
|
||||
m_zenvyController.viewNotifications();
|
||||
@@ -73,12 +74,4 @@ bool TalentExecutiveMenu::handleOperation(int choice)
|
||||
std::cout << "Enter a valid choice!" << std::endl;*/
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void TalentExecutiveMenu::searchEmployee()
|
||||
{
|
||||
std::string name;
|
||||
std::cout << "Enter Employee Name: ";
|
||||
util::read(name);
|
||||
searchTheEmployee(name, m_zenvyController);
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include<memory>
|
||||
#include "MenuHelper.h"
|
||||
#include"ZenvyController.h"
|
||||
|
||||
class TalentExecutiveMenu
|
||||
@@ -11,6 +10,5 @@ public:
|
||||
TalentExecutiveMenu() : m_zenvyController(std::make_shared < ZenvyController>()) {};
|
||||
void run();
|
||||
bool handleOperation(int);
|
||||
void searchEmployee();
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "TeamExecutiveMenu.h"
|
||||
#include"InputHelper.h"
|
||||
#include"OutputHelper.h"
|
||||
#include "MenuHelper.h"
|
||||
|
||||
void TeamExecutiveMenu::run()
|
||||
{
|
||||
@@ -44,7 +45,7 @@ bool TeamExecutiveMenu::handleOperation(int choice)
|
||||
m_zenvyController.viewEmployees();
|
||||
break;*/
|
||||
case 5:
|
||||
searchEmployee();
|
||||
searchEmployee(m_zenvyController);
|
||||
break;
|
||||
/*case 6:
|
||||
m_zenvyController.viewNotifications();
|
||||
@@ -76,12 +77,4 @@ bool TeamExecutiveMenu::handleOperation(int choice)
|
||||
std::cout << "Enter a valid choice!" << std::endl;*/
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void TalentExecutiveMenu::searchEmployee()
|
||||
{
|
||||
std::string name;
|
||||
std::cout << "Enter Employee Name: ";
|
||||
util::read(name);
|
||||
searchTheEmployee(name, m_zenvyController);
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include<memory>
|
||||
#include "MenuHelper.h"
|
||||
#include"ZenvyController.h"
|
||||
|
||||
class TeamExecutiveMenu
|
||||
@@ -11,6 +10,5 @@ public:
|
||||
TeamExecutiveMenu() : m_zenvyController(std::make_shared<ZenvyController>()) {};
|
||||
void run();
|
||||
bool handleOperation(int);
|
||||
void searchEmployee();
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "TeamLeadMenu.h"
|
||||
#include"InputHelper.h"
|
||||
#include"OutputHelper.h"
|
||||
#include "MenuHelper.h"
|
||||
|
||||
void TeamLeadMenu::run()
|
||||
{
|
||||
@@ -53,7 +54,7 @@ bool TeamLeadMenu::handleOperation(int choice)
|
||||
m_zenvyController.viewEmployees();
|
||||
break;*/
|
||||
case 8:
|
||||
searchEmployee();
|
||||
searchEmployee(m_zenvyController);
|
||||
break;
|
||||
/*case 9:
|
||||
m_zenvyController.viewTeamMembers();
|
||||
@@ -82,12 +83,4 @@ bool TeamLeadMenu::handleOperation(int choice)
|
||||
std::cout << "Enter a valid choice!" << std::endl;*/
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void TeamLeadMenu::searchEmployee()
|
||||
{
|
||||
std::string name;
|
||||
std::cout << "Enter Employee Name: ";
|
||||
util::read(name);
|
||||
searchTheEmployee(name, m_zenvyController);
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include<memory>
|
||||
#include "MenuHelper.h"
|
||||
#include"ZenvyController.h"
|
||||
|
||||
class TeamLeadMenu
|
||||
@@ -11,6 +10,5 @@ public:
|
||||
TeamLeadMenu() : m_zenvyController(std::make_shared<ZenvyController>()) {};
|
||||
void run();
|
||||
bool handleOperation(int);
|
||||
void searchEmployee();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user