60 lines
1.4 KiB
C++
60 lines
1.4 KiB
C++
#include <iostream>
|
|
#include "TalentExecutiveMenu.h"
|
|
#include "InputHelper.h"
|
|
#include "OutputHelper.h"
|
|
#include "MenuHelper.h"
|
|
|
|
void TalentExecutiveMenu::run()
|
|
{
|
|
bool isMenuActive = true;
|
|
while (isMenuActive)
|
|
{
|
|
try
|
|
{
|
|
int choice;
|
|
util::clear();
|
|
std::cout << "Talent Executive 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 New Job\n9. View Job Opening\n10. Add Candidate\n11. UpdateCandidate Status\n12. View Shortlisted Candidate\n13. Update Profile\n14. View Profile\n15. Logout\nEnter your Choice: ";
|
|
util::read(choice);
|
|
if (!handleOperation(choice))
|
|
{
|
|
isMenuActive = false;
|
|
}
|
|
}
|
|
catch (const std::exception& e)
|
|
{
|
|
std::cout << "Exception: " << e.what() << std::endl;
|
|
util::pressEnter();
|
|
}
|
|
}
|
|
}
|
|
|
|
bool TalentExecutiveMenu::handleOperation(int choice)
|
|
{
|
|
switch (choice)
|
|
{
|
|
case 2:
|
|
viewPayslip(m_zenvyController);
|
|
break;
|
|
case 3:
|
|
viewPayslipHistory(m_zenvyController);
|
|
break;
|
|
case 4:
|
|
viewEmployees(m_zenvyController);
|
|
break;
|
|
case 5:
|
|
searchEmployee(m_zenvyController);
|
|
break;
|
|
case 13:
|
|
updateProfile(m_zenvyController);
|
|
break;
|
|
case 14:
|
|
viewProfile(m_zenvyController);
|
|
break;
|
|
case 15:
|
|
return false;
|
|
default:
|
|
std::cout << "Enter a valid choice!" << std::endl;
|
|
util::pressEnter();
|
|
}
|
|
return true;
|
|
} |