Blame view

DUREX Vendor Control/MenuTableViewController.h 3.82 KB
Imanol-Mikel Barba Sabariego authored
1
2
3
4
5
6
7
8
9
10
11
//
//  MenuTableViewController.h
//  DUREX Vendor Control
//
//  Created by Imanol Barba on 5/23/14.
//  Copyright (c) 2014 Emmoco. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "EMFramework.h"
#import "CommunicationProtocol.h"
Imanol-Mikel Barba Sabariego authored
12
#import "Stack.h"
Imanol-Mikel Barba Sabariego authored
13
#import "DatePickerViewController.h"
Imanol-Mikel Barba Sabariego authored
14
15
#import "PriceChangerViewController.h"
#import "NameChangerViewController.h"
Imanol-Mikel Barba Sabariego authored
16
#import "DateRangePickerViewController.h"
Imanol-Mikel Barba Sabariego authored
17
#import "Sensors.h"
Imanol-Mikel Barba Sabariego authored
18
#import "SalesLog.h"
Imanol-Mikel Barba Sabariego authored
19
#import "UIView+Toast.h"
Imanol-Mikel Barba Sabariego authored
20
21
22

#define num(x) [NSNumber numberWithUnsignedInt:x]
Imanol-Mikel Barba Sabariego authored
23
24
25
#define CELL_CARAT_TAG                  100

#define MENU_ELEMENTS                   @"[1000]Maintenance",@"[1001]Basic Configuration",@"[1002]Sending a Report"
Imanol-Mikel Barba Sabariego authored
26
#define MENU_CELLS_PER_SECTION          num(3)
Imanol-Mikel Barba Sabariego authored
27
#define MENU_HEADERS                    nil
Imanol-Mikel Barba Sabariego authored
28
Imanol-Mikel Barba Sabariego authored
29
30
#define MAINTENANCE_ELEMENTS            @">[2000]Channels Present",@">[2001]Product Present in Channel",@">[2002]Channel Engine Status",@"[2003]Door Sensor",@"[2004]Coil Sensor",@">[2005]Money Collected",@">[2006]Money Returned",@">[2007]Products Sold",@">[2008]Change Available",@"[2009]Sales log",@"[2010]Incident report",@"[2011]Send report"
#define MAINTENANCE_CHANNELS            @"*Channel 1",@"*Channel 2",@"*Channel 3",@"*Channel 4",@"*Channel 5",@"*Channel 6",@"*Channel 7",@"*Channel 8",@"*Channel 9",@"*Channel 10",@"*Channel 11",@"*Channel 12",@"*Channel 13",@"*Channel 14",@"*Channel 15",@"*Channel 16"
Imanol-Mikel Barba Sabariego authored
31
#define MAINTENANCE_MONEY_IN            @"*20€ Notes",@"*10€ Notes",@"*5€ Notes",@"*2€ Coins",@"*1€ Coins",@"*50c Coins"
Imanol-Mikel Barba Sabariego authored
32
33
34
35
#define MAINTENANCE_MONEY_OUT           @"*2€ Coins",@"*1€ Coins",@"*50c Coins"
#define MAINTENANCE_CHANGE              @"*1€ Coins",@"*50c Coins"
#define MAINTENANCE_PRODUCTS            @"*Product 1",@"*Product 2",@"*Product 3",@"*Product 4",@"*Product 5",@"*Product 6",@"*Product 7",@"*Product 8",@"*Product 9",@"*Product 10",@"*Product 11",@"*Product 12",@"*Product 13",@"*Product 14",@"*Product 15",@"*Product 16"
#define MAINTENANCE_CELLS_PER_SECTION   num(9),num(3)
Imanol-Mikel Barba Sabariego authored
36
#define MAINTENANCE_HEADERS              NSLocalizedString(@"Sensors", nil),NSLocalizedString(@"Commands", nil)
Imanol-Mikel Barba Sabariego authored
37
Imanol-Mikel Barba Sabariego authored
38
39
40
41
#define SALE_ELEMENTS            @">[3000]Money Paid",@"[3001]Channel",@"[3002]Product Code",@"[3003]Product Price",@">[3004]Money Returned"
#define SALE_MONEY_PAID          @"*20€ Notes",@"*10€ Notes",@"*5€ Notes",@"*2€ Coins",@"*1€ Coins",@"*50c Coins"
#define SALE_MONEY_RETURNED      @"*2€ Coins",@"*1€ Coins",@"*50c Coins"
#define SALE_CELLS_PER_SECTION  num(5)
Imanol-Mikel Barba Sabariego authored
42
#define SALE_HEADERS             nil
Imanol-Mikel Barba Sabariego authored
43
Imanol-Mikel Barba Sabariego authored
44
#define CONFIGURATION_ELEMENTS          @"[4000]Update Date & Time",@"[4001]Update product price",@"[4002]Update product name"
Imanol-Mikel Barba Sabariego authored
45
46
47
#define CONFIGURATION_CELLS_PER_SECTION num(3)
#define CONFIGURATION_HEADERS           nil
Imanol-Mikel Barba Sabariego authored
48
#define CELL_IDENTIFIERS                @"MenuCell",@"MaintenanceCell",@"SaleListCell",@"SaleCell",@"ConfigCell",@"ReportCell"
Imanol-Mikel Barba Sabariego authored
49
50
51
52

enum {
    MENU = 0,
    MAINTENANCE,
Imanol-Mikel Barba Sabariego authored
53
54
    SALE_LIST,
    SALE,
Imanol-Mikel Barba Sabariego authored
55
    BASIC_CONFIGURATION,
Imanol-Mikel Barba Sabariego authored
56
    REPORT,
Imanol-Mikel Barba Sabariego authored
57
58
} navigationLevel;
Imanol-Mikel Barba Sabariego authored
59
60
61
62
63
64
enum {
    SALES_LOG = 0,
    INCIDENT_LOG,
} logType;

@interface MenuTableViewController : UITableViewController <DatePickerViewControllerDelegate,PriceChangerViewControllerDelegate,NameChangerViewControllerDelegate, DateRangePickerViewControllerDelegate, NSURLConnectionDataDelegate>
Imanol-Mikel Barba Sabariego authored
65
Imanol-Mikel Barba Sabariego authored
66
@property (strong,nonatomic) Stack *parentLayout;
Imanol-Mikel Barba Sabariego authored
67
68
69
@property (strong,nonatomic) DatePickerViewController *datePickerViewController;
@property (strong,nonatomic) PriceChangerViewController *priceChangerViewController;
@property (strong,nonatomic) NameChangerViewController *nameChangerViewController;
Imanol-Mikel Barba Sabariego authored
70
@property (strong,nonatomic) DateRangePickerViewController *dateRangePickerViewController;
Imanol-Mikel Barba Sabariego authored
71
@property (strong,nonatomic) Sensors *sensorStatus;
Imanol-Mikel Barba Sabariego authored
72
@property (strong,nonatomic) SalesLog *salesLog;
Imanol-Mikel Barba Sabariego authored
73
74
@property (strong,nonatomic) Sale *currentSale;
@property (strong,nonatomic) NSString *machineMACAddr;
Imanol-Mikel Barba Sabariego authored
75
Imanol-Mikel Barba Sabariego authored
76
77
- (void) navBack;
Imanol-Mikel Barba Sabariego authored
78
@end