Fix Technician Job Status Update Screen UI and Formatting Issues
- Corrected inconsistent status label formatting: replaced "Inprogress" with "In Progress" in TechnicianMenu and MenuHelper. - Updated headings in selectJobCardToUpdate to clearer phrasing: - "Select a job to mark as In Progress" - "Select a job to mark as Completed". - Added spacing before and after the "No jobs available" message to improve readability and provide clear separation from headings. - Replaced duplicated prompt "Select the Job Card to Update (Index):" with concise "Enter the job index to update:". - Improved TechnicianMenu option display to show "In Progress" instead of "Inprogress". Fixes #1808
This commit is contained in:
@@ -736,7 +736,7 @@ inline std::string selectJobCardToUpdate(util::Map<std::string, const JobCard*>&
|
||||
util::Map<int, const JobCard* > incompleteJobCards;
|
||||
if (assignedJobCards.getSize() == 0)
|
||||
{
|
||||
std::cout << "No jobs available.\n\n";
|
||||
std::cout << "\nNo jobs available.\n\n";
|
||||
return "";
|
||||
}
|
||||
int currentIndex = 1;
|
||||
@@ -744,12 +744,12 @@ inline std::string selectJobCardToUpdate(util::Map<std::string, const JobCard*>&
|
||||
if (selectedJobStatusType == util::ServiceJobStatus::STARTED)
|
||||
{
|
||||
util::clear();
|
||||
std::cout << "Select a job to update to Inprogress\n";
|
||||
std::cout << "Select a job to mark as In Progress\n";
|
||||
}
|
||||
else if (selectedJobStatusType == util::ServiceJobStatus::IN_PROGRESS)
|
||||
{
|
||||
util::clear();
|
||||
std::cout << "Select a job to update to Completed\n";
|
||||
std::cout << "Select a job to mark as Completed\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -780,7 +780,7 @@ inline std::string selectJobCardToUpdate(util::Map<std::string, const JobCard*>&
|
||||
incompleteJobCards.insert(currentIndex++, currentJobCard);
|
||||
}
|
||||
}
|
||||
std::cout << "Select the Job Card to Update (Index): ";
|
||||
std::cout << "Enter the job index to update: ";
|
||||
util::read(choice);
|
||||
int selectedJobCardIndex = incompleteJobCards.find(choice);
|
||||
if (selectedJobCardIndex != -1)
|
||||
|
||||
@@ -121,7 +121,7 @@ void TechnicianMenu::updateJobStatus()
|
||||
std::string selectedJobID;
|
||||
util::ServiceJobStatus selectedJobStatus = util::ServiceJobStatus::PENDING;
|
||||
util::Map<std::string, const JobCard*> assignedJobCards = m_controller.getJobCardsByUser();
|
||||
std::cout << "Select the type of job you want to update\n1.Started\n2.Inprogress\nChoice: ";
|
||||
std::cout << "Select the type of job you want to update:\n1.Started\n2.In Progress\nChoice: ";
|
||||
util::read(choice);
|
||||
if (choice == 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user