Made report functions, monthly weekly for any month or week

This commit is contained in:
MassiveAtoms
2019-07-20 21:40:24 -03:00
parent a79081febf
commit 8c2cbb8a11
8 changed files with 70 additions and 66 deletions

View File

@@ -1,11 +1,7 @@
#include "Query.h"
using std::cin;
void interface(vector<Park_spot>& spots);
void interface_member(vector<Park_spot>& spots, Customer& c);
void interface_admin(vector<Park_spot>& spots);
@@ -15,9 +11,9 @@ void new_admin();
void new_parkspot(vector<Park_spot>& spots);
// time creation
pair<int, int> create_month_period() ;
pair<int, int> create_month_period();
pair<int, int> create_week_period();
// report stuff
void report_single_spot(bool weekly);
void report_all_spots(bool weekly)
void report_single_spot(bool weekly = false);
void report_all_spots(bool weekly = false);

View File

@@ -15,8 +15,8 @@ using std::cout;
using std::flush;
using std::string;
using std::to_string;
using std::this_thread::sleep_for;
using std::chrono::milliseconds;
using std::this_thread::sleep_for;
/*

View File

@@ -53,19 +53,16 @@ furhter.
*/
vector<Park_time> query_parktimes_for_customer(int cid);
vector<Customer> query_customer_with_name(string name);
Customer query_customer_with_id(int id);
vector<Park_spot> populate_spots();
Park_spot query_parkspot_with_id(int id, vector<Park_spot>& parkspots);
int query_role_customer(int id);
vector<Park_spot> populate_spots();
void reports_from_parkspot(int spotid, pair<int, int> period);
void reports_from_allparkspots(pair<int, int> period);
void current_status_parkspots(vector<Park_spot>& spots);
vector<Park_time> reports_from_customer(int cid, pair<int, int> period);
#endif // CUSTOMER_H