a3e622ff8e
<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>
277 lines
5.8 KiB
C++
277 lines
5.8 KiB
C++
#pragma once
|
|
#include <string>
|
|
|
|
namespace Enums {
|
|
|
|
enum class AccountStatus
|
|
{
|
|
ACTIVE,
|
|
INACTIVE
|
|
};
|
|
|
|
enum class TeamStatus
|
|
{
|
|
IN_TEAM,
|
|
NOT_IN_TEAM
|
|
};
|
|
|
|
enum class CandidateStatus
|
|
{
|
|
PENDING,
|
|
SHORTLISTED,
|
|
REJECTED
|
|
};
|
|
|
|
enum class NotificationStatus
|
|
{
|
|
READ,
|
|
UNREAD
|
|
};
|
|
|
|
enum class LeaveStatus
|
|
{
|
|
PENDING,
|
|
APPROVED,
|
|
REJECTED
|
|
};
|
|
|
|
enum class LeaveType
|
|
{
|
|
GENERAL,
|
|
MEDICAL,
|
|
RESTRICTED
|
|
};
|
|
|
|
enum class JobListingStatus
|
|
{
|
|
OPEN,
|
|
CLOSED
|
|
};
|
|
|
|
enum class TicketStatus
|
|
{
|
|
OPEN,
|
|
RESOLVED,
|
|
CLOSED
|
|
};
|
|
|
|
enum class TicketType
|
|
{
|
|
IT,
|
|
FINANCE,
|
|
ATTENDANCE,
|
|
UNKNOWN
|
|
};
|
|
|
|
enum class EmployeeDesignation
|
|
{
|
|
JUNIOR,
|
|
SENIOR,
|
|
TEAM_LEAD,
|
|
INVALID
|
|
};
|
|
|
|
enum class EmployeeType
|
|
{
|
|
GENERAL,
|
|
IT,
|
|
FINANCE,
|
|
TAG,
|
|
HR,
|
|
TEAM,
|
|
ADMIN,
|
|
INVALID
|
|
};
|
|
|
|
enum class LoginStatus
|
|
{
|
|
SUCCESS,
|
|
FIRST_LOGIN,
|
|
USER_NOT_FOUND,
|
|
INVALID_PASSWORD
|
|
};
|
|
|
|
std::string getAccountStatus(AccountStatus status)
|
|
{
|
|
switch (status)
|
|
{
|
|
case AccountStatus::ACTIVE:
|
|
return "Active";
|
|
case AccountStatus::INACTIVE:
|
|
return "Inactive";
|
|
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)
|
|
{
|
|
case CandidateStatus::PENDING: return "Pending";
|
|
case CandidateStatus::SHORTLISTED: return "Shortlisted";
|
|
case CandidateStatus::REJECTED: return "Rejected";
|
|
default: return "Unknown";
|
|
}
|
|
}
|
|
|
|
std::string getNotificationStatus(NotificationStatus status) {
|
|
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 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 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 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 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";
|
|
}
|
|
}
|
|
}
|