diff options
Autocommit at 05.05.2022 @ 20:03
3 files changed, 16 insertions, 2 deletions
| -rw-r--r-- | src/ConsoleInterface/Toolbox.cpp | 8 | ||||
| -rw-r--r-- | src/ConsoleInterface/Toolbox.hpp | 1 | ||||
| -rw-r--r-- | src/VenueConsoleUI.cpp | 9 |
diff --git a/src/ConsoleInterface/Toolbox.cpp b/src/ConsoleInterface/Toolbox.cpp index fbc7806..4237861 100644 --- a/src/ConsoleInterface/Toolbox.cpp +++ b/src/ConsoleInterface/Toolbox.cpp @@ -25,10 +25,14 @@ void printTitle(const char* title) { } void printSuccess(const char* message) { - std::cout << "... " << message << std::endl; + std::cout << "<S> " << message << std::endl; +} + +void printWarning(const char* message) { + std::cout << "<W>" << message << std::endl; } void printError(const char* message) { - std::cout << "!!! Err: " << message << std::endl; + std::cout << "<E> " << message << std::endl; } diff --git a/src/ConsoleInterface/Toolbox.hpp b/src/ConsoleInterface/Toolbox.hpp index b75b597..9bfba55 100644 --- a/src/ConsoleInterface/Toolbox.hpp +++ b/src/ConsoleInterface/Toolbox.hpp @@ -58,6 +58,7 @@ void inputLineBox(const char* label, char* output, unsigned maxWidth); void printTitle(const char* title); void printSuccess(const char* message); +void printWarning(const char* message); void printError(const char* message); #endif diff --git a/src/VenueConsoleUI.cpp b/src/VenueConsoleUI.cpp index da5d3f4..5c53eff 100644 --- a/src/VenueConsoleUI.cpp +++ b/src/VenueConsoleUI.cpp @@ -53,7 +53,16 @@ void command_reserveTicket() { } void command_cancelReservation() { + char name[MAX_LINE_WIDTH]; + inputLineBox("Enter event name: ", name, MAX_LINE_WIDTH); + Date date; + inputBox("Enter event date: ", &date); + unsigned row; + inputBox("Enter row: ", &row); + unsigned seat; + inputBox("Enter seat: ", &seat); + handleStatusCode(v->get_es().cancelTicketReservation(name, date, row, seat), ticketManagementMenu); } void command_buyTicket() { |
