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:
Jissin Mathew
2026-06-01 18:00:27 +05:30
committed by Joel Thomas
parent 17f24b7733
commit ce50467816
2 changed files with 5 additions and 5 deletions
@@ -736,7 +736,7 @@ inline std::string selectJobCardToUpdate(util::Map<std::string, const JobCard*>&
util::Map<int, const JobCard* > incompleteJobCards; util::Map<int, const JobCard* > incompleteJobCards;
if (assignedJobCards.getSize() == 0) if (assignedJobCards.getSize() == 0)
{ {
std::cout << "No jobs available.\n\n"; std::cout << "\nNo jobs available.\n\n";
return ""; return "";
} }
int currentIndex = 1; int currentIndex = 1;
@@ -744,12 +744,12 @@ inline std::string selectJobCardToUpdate(util::Map<std::string, const JobCard*>&
if (selectedJobStatusType == util::ServiceJobStatus::STARTED) if (selectedJobStatusType == util::ServiceJobStatus::STARTED)
{ {
util::clear(); 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) else if (selectedJobStatusType == util::ServiceJobStatus::IN_PROGRESS)
{ {
util::clear(); util::clear();
std::cout << "Select a job to update to Completed\n"; std::cout << "Select a job to mark as Completed\n";
} }
else else
{ {
@@ -780,7 +780,7 @@ inline std::string selectJobCardToUpdate(util::Map<std::string, const JobCard*>&
incompleteJobCards.insert(currentIndex++, currentJobCard); incompleteJobCards.insert(currentIndex++, currentJobCard);
} }
} }
std::cout << "Select the Job Card to Update (Index): "; std::cout << "Enter the job index to update: ";
util::read(choice); util::read(choice);
int selectedJobCardIndex = incompleteJobCards.find(choice); int selectedJobCardIndex = incompleteJobCards.find(choice);
if (selectedJobCardIndex != -1) if (selectedJobCardIndex != -1)
@@ -121,7 +121,7 @@ void TechnicianMenu::updateJobStatus()
std::string selectedJobID; std::string selectedJobID;
util::ServiceJobStatus selectedJobStatus = util::ServiceJobStatus::PENDING; util::ServiceJobStatus selectedJobStatus = util::ServiceJobStatus::PENDING;
util::Map<std::string, const JobCard*> assignedJobCards = m_controller.getJobCardsByUser(); 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); util::read(choice);
if (choice == 1) if (choice == 1)
{ {