From 62866cac4eb109490ad1d79a3295a3848da8c134 Mon Sep 17 00:00:00 2001 From: SanJacobs Date: Tue, 12 Jul 2022 23:08:20 +0200 Subject: Adding and slicing workdays is now functional As well as adding dayrate, and thereby hourly rate, but pricing the timeblocks is not handled yet. --- src/main.cpp | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 2af0702..d3b0023 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -48,24 +48,39 @@ int main(int argc, char* argv[]) std::cout << "-----\nStep 1: Adding the days\n\n"; - while(1) { - std::cout << "Filling in a test-day, and that's it.\n"; - std::cout << "Storing multiple workdays in an efficient way will be figured out later." << std::endl; + 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 + std::vector workdays; + + moment previous_wrap{0, 16, 20, 11, 1000}; // Set to a long time ago + + for(int day=0; daycall) << "\n"; + std::cout << "Wraptime: " << timeprint(current_workday->wrap) << "\n"; + std::cout << "Planned wrap: " << timeprint(current_workday->planned_wrap) << "\n\n"; + + for(int i=0; itotal_timeblocks; i++) { + std::cout << "Timeblock " << i << ": " << timeprint(current_workday->blocks[i]) + << ". Total hours: " << current_workday->blocks[i].hourcount() << std::endl; + } + previous_wrap = wraptime; } return 0; -- cgit v1.2.1