Subversion Repositories SmartDukaan

Rev

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

Rev 22090 Rev 22091
Line 31... Line 31...
31
        url : context+"/login",
31
        url : context+"/login",
32
        data: {"token":googleUser.getAuthResponse().id_token},
32
        data: {"token":googleUser.getAuthResponse().id_token},
33
        success: function(data, textStatus, request){
33
        success: function(data, textStatus, request){
34
        	console.log(data);
34
        	console.log(data);
35
        	addProfileInLocalDb();
35
        	addProfileInLocalDb();
36
        	window.location.href= context + "dashboard";
36
        	window.location.href= context+"//dashboard";
37
   		}
37
   		}
38
    });  
38
    });  
39
}
39
}
40
 
40
 
41
function addProfileInLocalDb(){
41
function addProfileInLocalDb(){
Line 45... Line 45...
45
 
45
 
46
 
46
 
47
function loadNewGrn(domId){
47
function loadNewGrn(domId){
48
	jQuery.ajax({
48
	jQuery.ajax({
49
        type : "GET",
49
        type : "GET",
50
        url : context + "purchase",
50
        url : context+"/purchase",
51
        success : function(response) {
51
        success : function(response) {
52
            $('#' + domId).html(response);
52
            $('#' + domId).html(response);
53
        }
53
        }
54
    });  
54
    });  
55
}
55
}
56
 
56
 
57
function loadGoodInventory(domId, search_text){
57
function loadGoodInventory(domId, search_text){
58
	jQuery.ajax({
58
	jQuery.ajax({
59
        type : "GET",
59
        type : "GET",
60
        url : context + "getCurrentInventorySnapshot/?searchTerm="+search_text,
60
        url : context+"/getCurrentInventorySnapshot/?searchTerm="+search_text,
61
        success : function(response) {
61
        success : function(response) {
62
            $('#' + domId).html(response);
62
            $('#' + domId).html(response);
63
        }
63
        }
64
    });  
64
    });  
65
}
65
}
66
 
66
 
67
function loadCatalog(domId, search_text){
67
function loadCatalog(domId, search_text){
68
	jQuery.ajax({
68
	jQuery.ajax({
69
        type : "GET",
69
        type : "GET",
70
        url : context + "getCatalog/?searchTerm="+search_text,
70
        url : context+"/getCatalog/?searchTerm="+search_text,
71
        success : function(response) {
71
        success : function(response) {
72
            $('#' + domId).html(response);
72
            $('#' + domId).html(response);
73
        }
73
        }
74
    });  
74
    });  
75
}
75
}