Subversion Repositories SmartDukaan

Rev

Rev 2843 | Rev 4356 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2843 Rev 3132
Line 6... Line 6...
6
import in.shop2020.hotspot.dashbaord.shared.actions.AuthResponse;
6
import in.shop2020.hotspot.dashbaord.shared.actions.AuthResponse;
7
import in.shop2020.hotspot.dashbaord.shared.actions.AuthResponse.NEXT;
7
import in.shop2020.hotspot.dashbaord.shared.actions.AuthResponse.NEXT;
8
import in.shop2020.hotspot.dashbaord.shared.actions.BillingType;
8
import in.shop2020.hotspot.dashbaord.shared.actions.BillingType;
9
import in.shop2020.hotspot.dashbaord.shared.actions.UserType;
9
import in.shop2020.hotspot.dashbaord.shared.actions.UserType;
10
import in.shop2020.model.v1.catalog.Warehouse;
10
import in.shop2020.model.v1.catalog.Warehouse;
11
import in.shop2020.thrift.clients.CatalogServiceClient;
11
import in.shop2020.thrift.clients.CatalogClient;
12
import in.shop2020.thrift.clients.HelperServiceClient;
12
import in.shop2020.thrift.clients.HelperClient;
13
import in.shop2020.utils.DashboardUser;
13
import in.shop2020.utils.DashboardUser;
14
import in.shop2020.utils.HelperService.Client;
14
import in.shop2020.utils.HelperService.Client;
15
import in.shop2020.utils.HelperServiceException;
15
import in.shop2020.utils.HelperServiceException;
16
import net.customware.gwt.dispatch.server.ActionHandler;
16
import net.customware.gwt.dispatch.server.ActionHandler;
17
import net.customware.gwt.dispatch.server.ExecutionContext;
17
import net.customware.gwt.dispatch.server.ExecutionContext;
Line 31... Line 31...
31
 
31
 
32
		NEXT nextScreen = null;
32
		NEXT nextScreen = null;
33
		String message = null;
33
		String message = null;
34
		
34
		
35
		try {
35
		try {
36
            HelperServiceClient hsc = new HelperServiceClient();
36
            HelperClient hsc = new HelperClient();
37
            Client client = hsc.getClient();
37
            Client client = hsc.getClient();
38
            DashboardUser dashboardUser = client.authenticateDashboardUser(userName, password);
38
            DashboardUser dashboardUser = client.authenticateDashboardUser(userName, password);
39
            switch (dashboardUser.getRole()) {
39
            switch (dashboardUser.getRole()) {
40
            case ADMIN:
40
            case ADMIN:
41
                userType = UserType.ADMIN;
41
                userType = UserType.ADMIN;
Line 48... Line 48...
48
            }
48
            }
49
			status = true;
49
			status = true;
50
			nextScreen = NEXT.INBOX;
50
			nextScreen = NEXT.INBOX;
51
			
51
			
52
			warehouseId = dashboardUser.getWarehouseId();
52
			warehouseId = dashboardUser.getWarehouseId();
53
			CatalogServiceClient csc = new CatalogServiceClient();
53
			CatalogClient csc = new CatalogClient();
54
			in.shop2020.model.v1.catalog.InventoryService.Client iClient = csc.getClient();
54
			in.shop2020.model.v1.catalog.InventoryService.Client iClient = csc.getClient();
55
			Warehouse warehouse = iClient.getWarehouse(warehouseId);
55
			Warehouse warehouse = iClient.getWarehouse(warehouseId);
56
			switch(warehouse.getBillingType()){
56
			switch(warehouse.getBillingType()){
57
			case OURS:
57
			case OURS:
58
			    billingType = BillingType.OURS;
58
			    billingType = BillingType.OURS;