diff options
author | SanJacobs | 2022-07-27 22:15:15 +0200 |
---|---|---|
committer | SanJacobs | 2022-07-27 22:15:15 +0200 |
commit | 157f8160bdb1a1cf0c91c861ea4daceb6a954518 (patch) | |
tree | 63ba30d626d116dd5a8481438846c1e1e9859185 /src/main.cpp | |
parent | db37f3b69dc2d8d0a8994b1c1f0e3a55e07d4e62 (diff) | |
download | satscalc-157f8160bdb1a1cf0c91c861ea4daceb6a954518.tar.gz satscalc-157f8160bdb1a1cf0c91c861ea4daceb6a954518.tar.bz2 satscalc-157f8160bdb1a1cf0c91c861ea4daceb6a954518.zip |
Started work on lunch break feature
Diffstat (limited to 'src/main.cpp')
-rwxr-xr-x | src/main.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 2deba1d..a9d1543 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -50,25 +50,35 @@ int main(int argc, char* argv[]) std::cout << "How many days do you want to submit?" << std::endl; int number_of_days; // std::cin >> number_of_days; - number_of_days = 3; // Just here for debugging + number_of_days = 1; // Just here for debugging std::vector<workday> workdays; moment previous_wrap{0, 16, 20, 11, 1000}; // Set to a long time ago for(int day=0; day<number_of_days; day++) { + // TODO: Asking for everything repeatedly like this is dumb, + // and needs to be replaced with a menu system. + // TODO: Inputing the dates should be done with a custom function and layout, + // not std::cin, because it openly allows for invalid input std::cout << "\n - DAY " << day+1 << "-\nCalltime:\n"; moment calltime = timeinput(); std::cout << "\nWraptime:\n"; moment wraptime = timeinput(calltime); std::cout << "\nPlanned wraptime:\n"; moment planned_wraptime = timeinput(calltime); + std::cout << "\nLunch start:\n"; + moment lunch_start = timeinput(calltime); + std::cout << "\nLunch end:\n"; + moment lunch_end = timeinput(calltime); workdays.push_back({previous_wrap, calltime, wraptime, planned_wraptime}); + if(lunch_start != lunch_end) workdays[day].lunch(lunch_start, lunch_end); + workday* current_workday = &workdays[day]; std::cout << "\nCalltime: " << timeprint(current_workday->call) << "\n"; |