diff --git a/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h index e9aed78..62d6e00 100644 --- a/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h +++ b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h @@ -91,7 +91,7 @@ Parameters: Returns: - void */ -static void selectInventoryItems(util::Map& currentInventoryItems, util::Vector& selectedInventoryItems) +inline void selectInventoryItems(util::Map& currentInventoryItems, util::Vector& selectedInventoryItems) { bool doRun = true, hasInventoryItems = false; util::Map currentInventoryMap; @@ -166,7 +166,7 @@ Parameters: Returns: - bool: True if pending services exist, False otherwise */ -static bool listServiceBookings(util::Map& currentBookings, int& bookingsSize, util::Map& serviceBookingsMap) +inline bool listServiceBookings(util::Map& currentBookings, int& bookingsSize, util::Map& serviceBookingsMap) { int currentIndex = 1; bool hasPendingService = false; @@ -220,7 +220,7 @@ Parameters: Returns: - const ServiceBooking*: Pointer to the selected booking, or nullptr if invalid */ -static const ServiceBooking* selectPendingServiceBookings(util::Map& serviceBookingsMap) +inline const ServiceBooking* selectPendingServiceBookings(util::Map& serviceBookingsMap) { int userInputIndex; std::cout << "Enter a valid service index: "; @@ -246,7 +246,7 @@ Parameters: Returns: - void */ -static void listAvailableTechnicians(util::Map currentAvailableTechnicians, int numberOfTechnicians, util::Map& currentAvailableTechniciansMap) +inline void listAvailableTechnicians(util::Map currentAvailableTechnicians, int numberOfTechnicians, util::Map& currentAvailableTechniciansMap) { bool hasTechnicians = false; int currentIndex = 1; @@ -284,7 +284,7 @@ Parameters: Returns: - const User*: Pointer to the selected technician, or nullptr if invalid */ -static const User* selectTechnician(util::Map& currentAvailableTechniciansMap) +inline const User* selectTechnician(util::Map& currentAvailableTechniciansMap) { int userInputIndex; util::read(userInputIndex); @@ -307,7 +307,7 @@ Parameters: Returns: - std::string: ID of the selected invoice, or empty string if none selected */ -static std::string selectInvoiceFromUserForPayment(const util::Map& currentInvoices) +inline std::string selectInvoiceFromUserForPayment(const util::Map& currentInvoices) { int currentIndex = 1, choice; util::Map pendingInvoicesForPayment; @@ -372,7 +372,7 @@ Parameters: Returns: - util::PaymentMode: Selected payment mode */ -static util::PaymentMode selectPaymentMode() +inline util::PaymentMode selectPaymentMode() { int choice; std::cout << "Enter the payment Mode\n1.OFFLINE\n2.ONLINE\nChoice: "; @@ -405,7 +405,7 @@ Returns: Throws: - std::runtime_error if a null invoice is encountered */ -static void displayInvoices(util::Map currentUserInvoices) +inline void displayInvoices(util::Map currentUserInvoices) { if (currentUserInvoices.getSize() == 0) { @@ -471,7 +471,7 @@ Parameters: Returns: - std::string: ID of the selected job card, or empty string if none selected */ -static std::string selectJobCardToComplete(util::Map& assignedJobCards, util::Map& incompleteJobCards) +inline std::string selectJobCardToComplete(util::Map& assignedJobCards, util::Map& incompleteJobCards) { int currentIndex = 1; int choice;