Subversion Repositories SmartDukaan

Rev

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

Rev 29268 Rev 31860
Line 6... Line 6...
6
			searchContent = "";
6
			searchContent = "";
7
		}
7
		}
8
		getRetailerDetailsByEmailIdOrMobileNumber(
8
		getRetailerDetailsByEmailIdOrMobileNumber(
9
			"retailer-details-container", searchContent);
9
			"retailer-details-container", searchContent);
10
	});
10
	});
11
	
11
 
12
	$(document).on('click', ".activate-store-temporary", function() {
12
	$(document).on('click', ".activate-store-temporary", function() {
13
		var row = $(this).closest("tr");
13
		var row = $(this).closest("tr");
14
		var fofoId = $(this).data("fofoid");
14
		var fofoId = $(this).data("fofoid");
15
		
15
 
16
		var ActiveDays = $(row).find("td:eq(4) input[type='text']").val();
16
		var ActiveDays = $(row).find("td:eq(4) input[type='text']").val();
17
		console.log("ActiveDays" + ActiveDays);
17
		console.log("ActiveDays" + ActiveDays);
18
		console.log("fofoId" + fofoId);
18
		console.log("fofoId" + fofoId);
19
		var days = parseInt(ActiveDays);
19
		var days = parseInt(ActiveDays);
20
		if (confirm("Are you sure you want to activate this store!") == true) {
20
		if (confirm("Are you sure you want to activate this store!") == true) {
21
		doPostAjaxRequestHandler(context + "/activateStoreTemporary?fofoId=" + fofoId + "&days=" + days,
21
			doPostAjaxRequestHandler(context + "/activateStoreTemporary?fofoId=" + fofoId + "&days=" + days,
22
				function(response) {
22
				function(response) {
23
					if (response == "true") {
23
					if (response == "true") {
24
						alert("successfully activated!");
24
						alert("successfully activated!");
25
						inactiveStoreInfo("main-content");
25
						inactiveStoreInfo("main-content");
26
					}
26
					}
27
 
27
 
28
				});
28
				});
29
		
29
 
30
		}
30
		}
31
		
31
 
32
 
32
 
33
	});
33
	});
34
	
34
 
35
	$(document).on('click', ".partner-info", function() {
35
	$(document).on('click', ".partner-info", function() {
36
		var userIds ={};
36
		var userIds = {};
37
		userIds['userIds'] =$('#fofo-users').val();
37
		userIds['userIds'] = $('#fofo-users').val();
38
		console.log(userIds)  
38
		console.log(userIds)
39
		doPostAjaxRequestWithJsonHandler(context+"/getPartnerinfo", JSON.stringify(userIds), function(response){
39
		doPostAjaxRequestWithJsonHandler(context + "/getPartnerinfo", JSON.stringify(userIds), function(response) {
40
			
40
 
41
			$('.storePartnerInfo').html(response);
41
			$('.storePartnerInfo').html(response);
42
		});
42
		});
43
		
43
 
44
	});
44
	});
45
	$(document).on('click', ".active-store", function() {
45
	$(document).on('click', ".active-store", function() {
46
		store("main-content");
46
		store("main-content");
47
	});
47
	});
48
	$(document).on('click', ".allStoreInfo", function() {
48
	$(document).on('click', ".allStoreInfo", function() {
49
		storeInfo("main-content");
49
		storeInfo("main-content");
50
	});
50
	});
51
	
51
 
52
	
52
 
53
	$(document).on('click', ".inactive-store", function() {
53
	$(document).on('click', ".inactive-store", function() {
54
		inactiveStoreInfo("main-content");
54
		inactiveStoreInfo("main-content");
55
	});
55
	});
56
	$(document).on('click', ".retailer-info", function() {
56
	$(document).on('click', ".retailer-info", function() {
57
		retailerInfo("main-content");
57
		retailerInfo("main-content");
Line 66... Line 66...
66
	$(document).on('click', ".block-brand-mapping", function() {
66
	$(document).on('click', ".block-brand-mapping", function() {
67
		blockBrandMapping("main-content")
67
		blockBrandMapping("main-content")
68
 
68
 
69
 
69
 
70
	});
70
	});
71
	
71
 
72
	$(document).on('click', ".brands-limit", function() {
72
	$(document).on('click', ".brands-limit", function() {
73
		brandsLimit("main-content")
73
		brandsLimit("main-content")
74
 
74
 
75
 
75
 
76
	});
76
	});
77
	
77
 
78
$(document).on('click', ".add-partner-pincode", function() {
78
	$(document).on('click', ".add-partner-pincode", function() {
79
		allPartnerPincode("main-content")
79
		allPartnerPincode("main-content")
80
 
80
 
81
 
81
 
82
	});
82
	});
83
 
83
 
Line 134... Line 134...
134
		if (confirm("Are you sure you want to activate this store!") == true) {
134
		if (confirm("Are you sure you want to activate this store!") == true) {
135
			activateStoreForever("main-content", fofoId);
135
			activateStoreForever("main-content", fofoId);
136
		}
136
		}
137
 
137
 
138
	});
138
	});
139
	
139
 
140
	$(document).on('click', ".login_as", function() {
140
	$(document).on('click', ".login_as", function() {
141
		var fofoId = $('#partnerId').val();
141
		var fofoId = $('#partnerId').val();
142
		loginAsPartner(fofoId);
142
		loginAsPartner(fofoId);
143
 
143
 
144
	});
144
	});
-
 
145
	$(document).on('click', ".partner-performance-access", function() {
145
 
146
 
-
 
147
 
-
 
148
		doGetAjaxRequestHandler(context + "/getPartnersForPerformance", function(response) {
-
 
149
			$('#' + "main-content").html(response);
-
 
150
		});
-
 
151
	});
-
 
152
 
-
 
153
	$(document).on('click', ".partnerPerformance", function() {
-
 
154
		var fofoId = $('#fofo-users').val();
-
 
155
 
-
 
156
		var url = context + "/partnerPerformance?fofoId=" + fofoId;
-
 
157
 
-
 
158
 
-
 
159
		$('.partner-performance-container').html(`<iframe class="wrapper" src="${url}" style="width:100%;height:100vh"> </iframe>`);
-
 
160
 
-
 
161
	});
146
	$(document).on('click', ".extend-billing", function() {
162
	$(document).on('click', ".extend-billing", function() {
147
		var fofoId = $(this).data("fofoid");
163
		var fofoId = $(this).data("fofoid");
148
		console.log(fofoId);
164
		console.log(fofoId);
149
		if (confirm("Are you sure you want to extend Billing?")) {
165
		if (confirm("Are you sure you want to extend Billing?")) {
150
			extendBilling($(this).parent(), fofoId);
166
			extendBilling($(this).parent(), fofoId);
151
		}
167
		}
152
 
168
 
153
	});
169
	});
154
 
170
 
155
    /*
171
	/*
156
     * $(document).on('change', '#retailerAddressState', function() { var stateName =
172
	 * $(document).on('change', '#retailerAddressState', function() { var stateName =
157
     * $(this).find('option:selected').text();
173
	 * $(this).find('option:selected').text();
158
     *
174
	 *
159
     * loadDistrictNames(stateName); });
175
	 * loadDistrictNames(stateName); });
160
     */
176
	 */
161
 
177
 
162
 
178
 
163
	$(document).on('click', "#location", function() {
179
	$(document).on('click', "#location", function() {
164
		if ($(this).is(":checked")) {
180
		if ($(this).is(":checked")) {
165
 
181
 
Line 210... Line 226...
210
					}
226
					}
211
				});
227
				});
212
			}
228
			}
213
 
229
 
214
		});
230
		});
215
		
231
 
216
	
232
 
217
 
233
 
218
 
234
 
219
	$(document).on('click', ".addlocationbutton",
235
	$(document).on('click', ".addlocationbutton",
220
		function() {
236
		function() {
221
			var userId = $('#retailerId').text();
237
			var userId = $('#retailerId').text();
Line 428... Line 444...
428
		function(response) {
444
		function(response) {
429
			window.create({
445
			window.create({
430
				"url": "/dashboard",
446
				"url": "/dashboard",
431
				"incognito": true
447
				"incognito": true
432
			});
448
			});
433
		
449
 
434
		});
450
		});
435
}
451
}
436
 
452
 
437
function loginAsPartnerReadonly(fofoId) {
453
function loginAsPartnerReadonly(fofoId) {
438
	doGetAjaxRequestHandler(context + "/login-as-partner-readonly?fofoId=" + fofoId,
454
	doGetAjaxRequestHandler(context + "/login-as-partner-readonly?fofoId=" + fofoId,