Subversion Repositories SmartDukaan

Rev

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

Rev 29134 Rev 29213
Line 26... Line 26...
26
		partnerDashboardTraining("main-content");
26
		partnerDashboardTraining("main-content");
27
 
27
 
28
	});
28
	});
29
 
29
 
30
	$(document).on(
30
	$(document).on(
-
 
31
		'click',
-
 
32
		".partner-dealer-submit",
-
 
33
		function() {
-
 
34
 
-
 
35
			var row = $(this).closest("tr");
-
 
36
			console.log(row);
-
 
37
			var brandlength = $(this).data("brandlength");
-
 
38
			var onboardingId = $(row).find("td:eq(0)").text();
-
 
39
			var partnerCode = $(row).find("td:eq(4)").text();
-
 
40
 
-
 
41
			console.log("brandlength" + brandlength)
-
 
42
			var brandCodes = []
-
 
43
			for (let i = 5; i < 5 + brandlength; i++) {
-
 
44
 
-
 
45
				brandCodes.push($(row).find(
-
 
46
					"td:eq(" + i + ") input[type='text']").val());
-
 
47
			}
-
 
48
 
-
 
49
			console.log("bands" + brandCodes);
-
 
50
 
-
 
51
			dmsCode = {
-
 
52
				"onboardingId": onboardingId,
-
 
53
				"partnerCode": partnerCode,
-
 
54
 
-
 
55
				"brands": brandCodes,
-
 
56
			}
-
 
57
 
-
 
58
			var jsonObject = JSON.stringify(dmsCode)
-
 
59
 
-
 
60
			console.log("jsonObject" + jsonObject);
-
 
61
			if (confirm("Are you sure you want to submit") == true) {
-
 
62
				doAjaxRequestWithJsonHandler(context + "/partnerDealerSubmit",
-
 
63
					"POST", jsonObject, function(response) {
-
 
64
 
-
 
65
						row.html(response);
-
 
66
 
-
 
67
					});
-
 
68
			}
-
 
69
		});
-
 
70
 
-
 
71
	$(document)
-
 
72
		.on(
31
			'click',
73
			'click',
32
			".partner-dealer-submit",
74
			".partner-verification-resend",
33
			function() {
75
			function() {
34
 
76
 
35
				var row = $(this).closest("tr");
77
				var row = $(this).closest("tr");
36
				console.log(row);
78
				console.log(row);
37
				var brandlength = $(this).data("brandlength");
-
 
-
 
79
 
38
				var onboardingId = $(row).find("td:eq(0)").text();
80
				var onboardingId = $(row).find("td:eq(0)").text();
39
				var partnerCode = $(row).find("td:eq(4)").text();
-
 
40
 
81
 
-
 
82
				if (confirm("Are you sure you want to Resend this verification") == true) {
41
				console.log("brandlength" + brandlength)
83
					doPostAjaxRequestHandler(
-
 
84
						context
-
 
85
						+ "/partnerVerificationResend?onboardingId="
-
 
86
						+ onboardingId, function(response) {
42
				var brandCodes = []
87
							if (response == 'true') {
-
 
88
								alert("Successfully Resend");
43
				for (let i = 5; i < 5 + brandlength; i++) {
89
								panelListing("main-content");
-
 
90
							}
44
 
91
 
45
					brandCodes.push($(row).find(
92
						});
46
							"td:eq(" + i + ") input[type='text']").val());
-
 
47
				}
93
				}
48
 
94
 
49
				console.log("bands" + brandCodes);
95
			});
50
 
96
 
51
				dmsCode = {
-
 
52
					"onboardingId" : onboardingId,
-
 
53
					"partnerCode" : partnerCode,
-
 
54
 
97
 
-
 
98
	$(document).on('click', ".partner-verifi-update-checkbox", function() {
55
					"brands" : brandCodes,
99
		var row = $(this).closest("tr");
56
				}
100
		console.log(row);
-
 
101
		var onboardingId = $(row).find("td:eq(0)").text();
57
 
102
 
-
 
103
		doAjaxRequestHandler(context + "/partnerVerifiUpdateCheckbox?onboardingId=" + onboardingId, "GET", function(
-
 
104
			response) {
58
				var jsonObject = JSON.stringify(dmsCode)
105
			$('.myVerificationCheckboxUpdate').html(response);
59
 
106
 
60
				console.log("jsonObject" + jsonObject);
107
		});
61
				if (confirm("Are you sure you want to submit") == true) {
-
 
62
				doAjaxRequestWithJsonHandler(context + "/partnerDealerSubmit",
-
 
63
						"POST", jsonObject, function(response) {
-
 
64
 
108
 
65
							row.html(response);
-
 
66
 
109
 
67
						});
-
 
68
				}
-
 
69
			});
110
	});
70
 
111
 
71
	$(document)
-
 
72
			.on(
-
 
73
					'click',
-
 
74
					".partner-verification-resend",
-
 
75
					function() {
-
 
76
 
-
 
77
						var row = $(this).closest("tr");
-
 
78
						console.log(row);
-
 
79
 
-
 
80
						var onboardingId = $(row).find("td:eq(0)").text();
-
 
81
 
-
 
82
						if (confirm("Are you sure you want to Resend this verification") == true) {
-
 
83
							doPostAjaxRequestHandler(
-
 
84
									context
-
 
85
											+ "/partnerVerificationResend?onboardingId="
-
 
86
											+ onboardingId, function(response) {
-
 
87
										if (response == 'true') {
-
 
88
											alert("Successfully Resend");
-
 
89
											panelListing("main-content");
-
 
90
										}
-
 
91
 
112
 
92
									});
113
	$(document).on('click', ".verification-checkbox-submit", function() {
93
						}
-
 
94
 
114
 
95
					});
-
 
96
	
-
 
97
	
115
 
98
	$(document).on(	'click',".partner-verifi-update-checkbox",function() {
116
		console.log("Hello");
99
		var row = $(this).closest("tr");
117
		var row = $(this).closest("tr");
100
		console.log(row);
118
		console.log(row);
101
		var onboardingId =	$(row).find("td:eq(0)").text();
-
 
102
		
-
 
103
		doAjaxRequestHandler(context + "/partnerVerifiUpdateCheckbox?onboardingId=" + onboardingId, "GET", function(
-
 
104
				response) {
-
 
105
		$('.myVerificationCheckboxUpdate').html(response);
-
 
106
			
-
 
107
		});
-
 
108
		
-
 
109
		
-
 
110
	});
-
 
111
	
-
 
112
	
-
 
113
	$(document).on(	'click',".verification-checkbox-submit",function() {
-
 
114
		
-
 
115
		
-
 
116
	console.log("Hello");
-
 
117
	var row = $(this).closest("tr");
-
 
118
	console.log(row);
-
 
119
	var onboardingId = $(this).data('id');
119
		var onboardingId = $(this).data('id');
120
	
120
 
121
	  var  trainingVerifi =  $('input[name="trainingVerifi"]').is(":checked") ? 1 : 0;
121
		var trainingVerifi = ('input[name="trainingVerifi"]').is(":checked") ? 1 : 0;
122
	  var  recceVerifi =  $('input[name="recceVerifi"]').is(":checked") ? 1 : 0;
122
		var ecceVerifi = $('input[name="recceVerifi"]').is(":checked") ? 1 : 0;
123
	  var  advStockPayment = $('input[name="advStockPayment"]').is(":checked") ? 1 : 0;
123
		var advStockPayment = $('input[name="advStockPayment"]').is(":checked") ? 1 : 0;
124
	  var  brandingVerifi = $('input[name="brandingVerifi"]').is(":checked") ? 1 : 0;
124
		var brandingVerifi = $('input[name="brandingVerifi"]').is(":checked") ? 1 : 0;
125
	  var  stockPay = $('input[name="stockPay"]').is(":checked") ? 1 : 0;
125
		var stockPay = $('input[name="stockPay"]').is(":checked") ? 1 : 0;
126
	  var  billingVerifi = $('input[name="billingVerifi"]').is(":checked") ? 1 : 0;
126
		var billingVerifi = $('input[name="billingVerifi"]').is(":checked") ? 1 : 0;
127
	  var  inaugrationVerifi =$('input[name="inaugrationVerifi"]').is(":checked") ? 1 : 0;
127
		var inaugrationVerifi = $('input[name="inaugrationVerifi"]').is(":checked") ? 1 : 0;
128
	  var  financialServices =$('input[name="financialServices"]').is(":checked") ? 1 : 0;
128
		var financialServices = $('input[name="financialServices"]').is(":checked") ? 1 : 0;
129
	  var  promotorVerifi = $('input[name="promotorVerifi"]').is(":checked") ? 1 : 0;
129
		var promotorVerifi = $('input[name="promotorVerifi"]').is(":checked") ? 1 : 0;
130
	  var verifiComments = $('input[name="verifiCommentCheckbox"]').val();
130
		var verifiComments = $('input[name="verifiCommentCheckbox"]').val();
131
	  
131
 
132
	 
132
 
133
	  var partnerVerficationCheckBoxObject = {};
133
		var partnerVerficationCheckBoxObject = {};
134
	  partnerVerficationCheckBoxObject['onboardingId'] = onboardingId
134
		partnerVerficationCheckBoxObject['onboardingId'] = onboardingId
135
	  partnerVerficationCheckBoxObject['trainingVerifi'] = trainingVerifi
135
		partnerVerficationCheckBoxObject['trainingVerifi'] = trainingVerifi
136
	  partnerVerficationCheckBoxObject['recceVerifi'] = recceVerifi
136
		partnerVerficationCheckBoxObject['recceVerifi'] = recceVerifi
137
	  partnerVerficationCheckBoxObject['advStockPayment'] = advStockPayment
137
		partnerVerficationCheckBoxObject['advStockPayment'] = advStockPayment
138
	  partnerVerficationCheckBoxObject['brandingVerifi'] = brandingVerifi
138
		partnerVerficationCheckBoxObject['brandingVerifi'] = brandingVerifi
139
		
139
 
140
	  partnerVerficationCheckBoxObject['stockPay'] =	stockPay
140
		partnerVerficationCheckBoxObject['stockPay'] = stockPay
141
 
141
 
142
	  partnerVerficationCheckBoxObject['billingVerifi'] = billingVerifi
142
		partnerVerficationCheckBoxObject['billingVerifi'] = billingVerifi
143
	  partnerVerficationCheckBoxObject['inaugrationVerifi'] = inaugrationVerifi
143
		partnerVerficationCheckBoxObject['inaugrationVerifi'] = inaugrationVerifi
144
	  partnerVerficationCheckBoxObject['financialServices'] = financialServices
144
		partnerVerficationCheckBoxObject['financialServices'] = financialServices
145
		
145
 
146
	  partnerVerficationCheckBoxObject['promotorVerifi'] =	promotorVerifi
146
		partnerVerficationCheckBoxObject['promotorVerifi'] = promotorVerifi
147
	  
147
 
148
	  partnerVerficationCheckBoxObject['verifiCheckboxComment'] =	verifiComments
148
		partnerVerficationCheckBoxObject['verifiCheckboxComment'] = verifiComments
149
 
149
 
150
 
150
 
151
		var jsonObject = JSON
151
		var jsonObject = JSON
152
				.stringify(partnerVerficationCheckBoxObject);
152
			.stringify(partnerVerficationCheckBoxObject);
153
 
153
 
154
		
154
 
155
	  console.log(jsonObject);
155
		console.log(jsonObject);
156
	  
156
 
157
	  
157
 
158
	  if (confirm("Are you sure you want to submit the request") == true) {
158
		if (confirm("Are you sure you want to submit the request") == true) {
159
			doAjaxRequestWithJsonHandler(context
159
			doAjaxRequestWithJsonHandler(context
160
					+ "/partnerVerificationCheckBoxSubmit", "POST",
160
				+ "/partnerVerificationCheckBoxSubmit", "POST",
161
					jsonObject, function(response) {
161
				jsonObject, function(response) {
162
				
162
 
163
				
163
 
164
					alert("successfully Submitted");
164
					alert("successfully Submitted");
165
					$('.myVerificationCheckboxUpdate').html(response);
165
					$('.myVerificationCheckboxUpdate').html(response);
166
 
166
 
167
					});
167
				});
168
		}
168
		}
169
			  
169
 
170
	
170
 
171
	
171
 
172
	});
172
	});
173
	
173
 
174
	
174
 
175
	
175
 
176
	
176
 
177
	
177
 
178
	
178
 
179
 
179
 
180
	$(document)
180
	$(document)
181
			.on(
181
		.on(
182
					'click',
182
			'click',
183
					".partner-verification-submit",
183
			".partner-verification-submit",
184
					function() {
184
			function() {
185
 
185
 
186
						var row = $(this).closest("tr");
186
				var row = $(this).closest("tr");
187
						console.log(row);
187
				console.log(row);
188
 
188
 
189
						var onboardingId = $(row).find("td:eq(0)").text();
189
				var onboardingId = $(row).find("td:eq(0)").text();
190
						var comment = $(row)
190
				var comment = $(row)
191
								.find("td:eq(9) input[type='text']").val();
191
					.find("td:eq(9) input[type='text']").val();
192
						
192
 
193
						var nocDocument=$(row).find(".nocDoc input[type=hidden]").val();
193
				var nocDocument = $(row).find(".nocDoc input[type=hidden]").val();
194
						console.log("nocDocument"+nocDocument);
194
				console.log("nocDocument" + nocDocument);
195
						
195
 
196
						var nocGt = $(row).find("td:eq(7) option:selected").val();
196
				var nocGt = $(row).find("td:eq(7) option:selected").val();
197
						
197
 
198
						var rbmReason = $(row).find("td:eq(8) option:selected")
198
				var rbmReason = $(row).find("td:eq(8) option:selected")
199
								.val();
199
					.val();
200
						var approval = $(row).find("td:eq(11) option:selected")
200
				var approval = $(row).find("td:eq(11) option:selected")
201
								.val();
201
					.val();
202
 
202
 
203
						console.log("onboardingId" + onboardingId);
203
				console.log("onboardingId" + onboardingId);
204
 
204
 
205
						console.log("approval" + approval);
205
				console.log("approval" + approval);
206
						console.log("nocGt" + nocGt);
206
				console.log("nocGt" + nocGt);
207
						console.log("comment" + comment);
207
				console.log("comment" + comment);
208
						
208
 
209
						
209
 
210
						if(nocGt== "NO" && approval== "YES")
210
				if (nocGt == "NO" && approval == "YES") {
211
						{
-
 
212
							alert("You Can Not Approved Approval Status Without Received NOC From GT")
211
					alert("You Can Not Approved Approval Status Without Received NOC From GT")
213
						return
212
					return
214
						}
213
				}
215
						
214
 
216
 
215
 
217
						var partnerVerficationObject = {};
216
				var partnerVerficationObject = {};
218
						partnerVerficationObject['onboardingId'] = onboardingId
217
				partnerVerficationObject['onboardingId'] = onboardingId
219
						partnerVerficationObject['comment'] = comment
218
				partnerVerficationObject['comment'] = comment
220
						partnerVerficationObject['nocGt'] = nocGt
219
				partnerVerficationObject['nocGt'] = nocGt
221
						partnerVerficationObject['rbmReason'] = rbmReason
220
				partnerVerficationObject['rbmReason'] = rbmReason
222
						
221
 
223
						partnerVerficationObject['nocDocument'] =	nocDocument
222
				partnerVerficationObject['nocDocument'] =	nocDocument
224
 
223
 
225
						partnerVerficationObject['approval'] = approval
224
				partnerVerficationObject['approval'] = approval
226
 
225
 
227
						var jsonObject = JSON
226
				var jsonObject = JSON
228
								.stringify(partnerVerficationObject);
227
					.stringify(partnerVerficationObject);
229
 
228
 
230
						console.log(jsonObject);
229
				console.log(jsonObject);
231
 
230
 
232
						if (confirm("Are you sure you want to submit the request") == true) {
231
				if (confirm("Are you sure you want to submit the request") == true) {
233
							doAjaxRequestWithJsonHandler(context
232
					doAjaxRequestWithJsonHandler(context
234
									+ "/partnerVerificationSubmit", "POST",
233
						+ "/partnerVerificationSubmit", "POST",
235
									jsonObject, function(response) {
234
						jsonObject, function(response) {
236
								
235
 
237
								if (response == 'true')
236
							if (response == 'true') {
238
									{
-
 
239
 
237
 
240
									partnerOnboardingVerification("main-content");
238
									partnerOnboardingVerification("main-content");
241
									}
239
									}
242
								else{
240
								else {
243
										row.html(response);
241
									row.html(response);
244
										row.css("background-color", "#F8F8FF");
242
									row.css("background-color", "#F8F8FF");
245
								   }
243
								}
246
 
244
 
247
									});
245
							});
248
						}
246
				}
249
 
247
 
250
					});
248
			});
251
 
249
 
252
	$(document)
250
	$(document)
253
			.on(
251
		.on(
254
					'click',
252
			'click',
255
					".partner-training-submit",
253
			".partner-training-submit",
256
					function() {
254
			function() {
257
 
255
 
258
						var row = $(this).closest("tr");
256
				var row = $(this).closest("tr");
259
						console.log(row);
257
				console.log(row);
260
 
258
 
261
						var onboardingId = $(row).find("td:eq(0)").text();
259
				var onboardingId = $(row).find("td:eq(0)").text();
262
						
260
 
263
						var datePlaned = $(row).find(
261
				var datePlaned = $(row).find(
264
						"td:eq(8) input[type='date']").val();
262
					"td:eq(8) input[type='date']").val();
265
			       
263
 
266
						if (datePlaned != "") {
264
				if (datePlaned != "") {
267
							datePlaned = datePlaned + "T00:00:00";
265
					datePlaned = datePlaned + "T00:00:00";
268
			         	}
266
				}
269
 
267
 
270
						var dateCompleted = $(row).find(
268
				var dateCompleted = $(row).find(
271
								"td:eq(9) input[type='date']").val();
269
					"td:eq(9) input[type='date']").val();
272
						if (dateCompleted != "") {
270
				if (dateCompleted != "") {
273
							dateCompleted = dateCompleted + "T00:00:00";
271
					dateCompleted = dateCompleted + "T00:00:00";
274
						}
272
				}
275
 
273
 
276
						var dashboardTraining = $(row).find(
274
				var dashboardTraining = $(row).find(
277
								"td:eq(6) option:selected").val();
275
					"td:eq(6) option:selected").val();
278
						var appTraining = $(row).find(
276
				var appTraining = $(row).find(
279
								"td:eq(7) option:selected").val();
277
					"td:eq(7) option:selected").val();
280
 
278
 
281
						console.log("onboardingId" + onboardingId);
279
				console.log("onboardingId" + onboardingId);
282
						console.log("dateCompleted" + dateCompleted);
280
				console.log("dateCompleted" + dateCompleted);
283
						console.log("dashboardTraining" + dashboardTraining);
281
				console.log("dashboardTraining" + dashboardTraining);
284
						console.log("appTraining" + appTraining);
282
				console.log("appTraining" + appTraining);
285
 
283
 
286
						var partnerDashboardTraining = {};
284
				var partnerDashboardTraining = {};
287
						partnerDashboardTraining['onboardingId'] = onboardingId
285
				partnerDashboardTraining['onboardingId'] = onboardingId
288
						partnerDashboardTraining['datePlaned'] = datePlaned
286
				partnerDashboardTraining['datePlaned'] = datePlaned
289
						partnerDashboardTraining['dateCompleted'] = dateCompleted
287
				partnerDashboardTraining['dateCompleted'] = dateCompleted
290
						partnerDashboardTraining['dashboardTraining'] = dashboardTraining
288
				partnerDashboardTraining['dashboardTraining'] = dashboardTraining
291
						partnerDashboardTraining['appTraining'] = appTraining
289
				partnerDashboardTraining['appTraining'] = appTraining
292
 
290
 
293
						var jsonObject = JSON
291
				var jsonObject = JSON
294
								.stringify(partnerDashboardTraining);
292
					.stringify(partnerDashboardTraining);
295
 
293
 
296
						console.log(jsonObject);
294
				console.log(jsonObject);
297
 
295
 
298
						if (confirm("Are you sure you want to submit the request") == true) {
296
				if (confirm("Are you sure you want to submit the request") == true) {
299
							doAjaxRequestWithJsonHandler(context
297
					doAjaxRequestWithJsonHandler(context
300
									+ "/partnerDashboardTrainingSubmit",
298
						+ "/partnerDashboardTrainingSubmit",
301
									"POST", jsonObject, function(response) {
299
						"POST", jsonObject, function(response) {
302
										row.html(response);
300
							row.html(response);
303
										row.css("background-color", "#F8F8FF");
301
							row.css("background-color", "#F8F8FF");
-
 
302
 
-
 
303
						});
-
 
304
				}
-
 
305
 
-
 
306
			});
304
 
307
 
305
									});
-
 
306
						}
-
 
307
 
308
 
-
 
309
	$(document).on('input', 'table#onboardingLegal input[type=file]', function() {
-
 
310
		if (confirm('Confirm upload ?')) {
-
 
311
			var fileSelector = $(this)[0];
-
 
312
			if (fileSelector != undefined
-
 
313
				&& fileSelector.files[0] != undefined) {
-
 
314
				var url = `${context}/document-upload`;
-
 
315
				console.log(url);
-
 
316
				var file = this.files[0];
-
 
317
				console.log("file" + file);
-
 
318
				let fileInput = $(this);
-
 
319
				console.log("fileInput" + file);
-
 
320
				doAjaxUploadRequestHandler(
-
 
321
					url,
-
 
322
					'POST',
-
 
323
					file,
-
 
324
					function(response) {
-
 
325
						console.log(response);
-
 
326
						var documentId = response.response.document_id;
-
 
327
						console.log("documentId : " + documentId);
-
 
328
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
308
					});
329
					});
-
 
330
				// alert("Retailer Shop Document
-
 
331
				// is required");
-
 
332
			}
-
 
333
		} else {
-
 
334
			// Do nothing!
-
 
335
		}
-
 
336
	});
-
 
337
 
309
	
338
	
310
	
339
	
311
	$(document).on('input', 'table#onboardingLegal input[type=file]', function() {
340
	$(document).on('input', 'table#onboardingLegal input[type=file]', function() {
312
		if (confirm('Confirm upload ?')) {
341
		if (confirm('Confirm upload ?')) {
313
			var fileSelector = $(this)[0];
342
			var fileSelector = $(this)[0];
Line 337... Line 366...
337
		}
366
		}
338
	});
367
	});
339
 
368
 
340
	
369
	
341
	
370
	
-
 
371
	$(document).on('input', 'table#onboardingLegal input[type=file]', function() {
-
 
372
		if (confirm('Confirm upload ?')) {
-
 
373
			var fileSelector = $(this)[0];
-
 
374
			if (fileSelector != undefined
-
 
375
				&& fileSelector.files[0] != undefined) {
-
 
376
				var url = `${context}/document-upload`;
-
 
377
				console.log(url);
-
 
378
				var file = this.files[0];
-
 
379
				console.log("file" + file);
-
 
380
				let fileInput = $(this);
-
 
381
				console.log("fileInput" + file);
-
 
382
				doAjaxUploadRequestHandler(
-
 
383
					url,
-
 
384
					'POST',
-
 
385
					file,
-
 
386
					function(response) {
-
 
387
						console.log(response);
-
 
388
						var documentId = response.response.document_id;
-
 
389
						console.log("documentId : " + documentId);
-
 
390
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
-
 
391
					});
-
 
392
				// alert("Retailer Shop Document
-
 
393
				// is required");
-
 
394
			}
-
 
395
		} else {
-
 
396
			// Do nothing!
-
 
397
		}
-
 
398
	});
-
 
399
 
-
 
400
	
-
 
401
		$(document).on('input', 'table#onboardingLegal input[type=file]', function() {
-
 
402
		if (confirm('Confirm upload ?')) {
-
 
403
			var fileSelector = $(this)[0];
-
 
404
			if (fileSelector != undefined
-
 
405
				&& fileSelector.files[0] != undefined) {
-
 
406
				var url = `${context}/document-upload`;
-
 
407
				console.log(url);
-
 
408
				var file = this.files[0];
-
 
409
				console.log("file" + file);
-
 
410
				let fileInput = $(this);
-
 
411
				console.log("fileInput" + file);
-
 
412
				doAjaxUploadRequestHandler(
-
 
413
					url,
-
 
414
					'POST',
-
 
415
					file,
-
 
416
					function(response) {
-
 
417
						console.log(response);
-
 
418
						var documentId = response.response.document_id;
-
 
419
						console.log("documentId : " + documentId);
-
 
420
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
-
 
421
					});
-
 
422
				// alert("Retailer Shop Document
-
 
423
				// is required");
-
 
424
			}
-
 
425
		} else {
-
 
426
			// Do nothing!
-
 
427
		}
-
 
428
	});
342
	$(document)
429
	$(document)
343
	.on(
430
		.on(
344
			'click',
431
			'click',
345
			".submit-legal",
432
			".submit-legal",
346
			function() {
433
			function() {
347
 
434
 
348
				var row = $(this).closest("tr");
435
				var row = $(this).closest("tr");
349
				console.log(row);
436
				console.log(row);
350
 
437
 
351
				var onboardingId = $(row).find("td:eq(0)").text();
438
				var onboardingId = $(row).find("td:eq(0)").text();
352
				
439
 
353
				var outletName = $(row).find("td:eq(1) input[type='text']").val();
440
				var outletName = $(row).find("td:eq(1) input[type='text']").val();
354
				
441
 
355
				var aadhar = $(row).find(".aadhar input[type=hidden]").val();
442
				var aadhar = $(row).find(".aadhar input[type=hidden]").val();
356
				var pan = $(row).find(".pan input[type=hidden]").val();
443
				var pan = $(row).find(".pan input[type=hidden]").val();
357
				var gst = $(row).find(".gst input[type=hidden]").val();
444
				var gst = $(row).find(".gst input[type=hidden]").val();
358
				var cancheque = $(row).find(".cancheque input[type=hidden]").val();
445
				var cancheque = $(row).find(".cancheque input[type=hidden]").val();
359
				var rent = $(row).find(".rent input[type=hidden]").val();
446
				var rent = $(row).find(".rent input[type=hidden]").val();
360
				var loi = $(row).find(".loi input[type=hidden]").val();
447
				var loi = $(row).find(".loi input[type=hidden]").val();
361
				var docCompleted = $(row).find("td:eq(8) option:selected").val();
448
				var docCompleted = $(row).find("td:eq(12) option:selected").val();
362
				
449
 
363
				
450
 
364
				
451
 
365
				var anniversaryDate = $(row).find("td:eq(9) input[type='date']").val();
452
				var anniversaryDate = $(row).find("td:eq(13) input[type='date']").val();
366
 
453
 
367
				if (anniversaryDate != "") {
454
				if (anniversaryDate != "") {
368
					anniversaryDate = anniversaryDate + "T00:00:00";
455
					anniversaryDate = anniversaryDate + "T00:00:00";
369
				}
456
				}
370
				var dob= $(row).find("td:eq(10) input[type='date']").val();
457
				var dob = $(row).find("td:eq(14) input[type='date']").val();
371
 
458
 
372
				if (dob != "") {
459
				if (dob != "") {
373
					
460
 
374
					dob = dob + "T00:00:00";
461
					dob = dob + "T00:00:00";
375
				}
462
				}
376
				
463
 
377
				var code = $(row).find("td:eq(11) input[type='text']").val();
464
				var code = $(row).find("td:eq(11) input[type='text']").val();
378
				
465
 
379
 
466
 
380
				var prebookingListingObject = {};
467
				var prebookingListingObject = {};
381
				prebookingListingObject['id'] = onboardingId
468
				prebookingListingObject['id'] = onboardingId
382
				prebookingListingObject['outletName'] = outletName
469
				prebookingListingObject['outletName'] = outletName
383
				prebookingListingObject['aadharDoc'] = aadhar
470
				prebookingListingObject['aadharDoc'] = aadhar
384
 
471
 
385
				
472
 
386
				prebookingListingObject['panDoc'] = pan
473
				prebookingListingObject['panDoc'] = pan
387
				prebookingListingObject['gst'] = gst
474
				prebookingListingObject['gst'] = gst
388
				prebookingListingObject['cancelCheque'] = cancheque
475
				prebookingListingObject['cancelCheque'] = cancheque
389
				prebookingListingObject['rentAgreement'] = rent
476
				prebookingListingObject['rentAgreement'] = rent
390
				prebookingListingObject['loi'] = loi
477
				prebookingListingObject['loi'] = loi
391
				prebookingListingObject['docCompleted'] = docCompleted
478
				prebookingListingObject['docCompleted'] = docCompleted
392
				prebookingListingObject['code'] = code
479
				prebookingListingObject['code'] = code
393
				prebookingListingObject['anniversaryDate'] = anniversaryDate
480
				prebookingListingObject['anniversaryDate'] = anniversaryDate
394
				prebookingListingObject['dob'] = dob
481
				prebookingListingObject['dob'] = dob
395
				
482
 
396
			
483
 
397
 
484
 
398
				var jsonObject = JSON.stringify(prebookingListingObject);
485
				var jsonObject = JSON.stringify(prebookingListingObject);
399
				console.log("prebookingListingObject"+prebookingListingObject);
486
				console.log("prebookingListingObject" + prebookingListingObject);
400
				console.log("jsonObject"+jsonObject);
487
				console.log("jsonObject" + jsonObject);
401
				if (confirm("Are you sure you want to submit the request") == true) {
488
				if (confirm("Are you sure you want to submit the request") == true) {
402
					doAjaxRequestWithJsonHandler(context
489
					doAjaxRequestWithJsonHandler(context
403
							+ "/partnerOnboardingLegalSubmit",
490
						+ "/partnerOnboardingLegalSubmit",
404
							"POST", jsonObject, function(response) {
491
						"POST", jsonObject, function(response) {
405
								row.html(response);
492
							row.html(response);
406
								row.css("background-color", "#F8F8FF");
493
							row.css("background-color", "#F8F8FF");
407
 
494
 
408
							});
495
						});
409
				}
496
				}
410
 
497
 
411
			});
498
			});
412
	
499
 
413
	
500
 
414
	
501
 
415
	
502
 
416
 
503
 
417
	var table = $('#partnerVerification').DataTable();
504
	var table = $('#partnerVerification').DataTable();
418
	$(document).on('dblclick', '#partnerVerification tbody tr', function() {
505
	$(document).on('dblclick', '#partnerVerification tbody tr', function() {
419
		console.log("dblclick");
506
		console.log("dblclick");
420
		var data = table.row(this).data();
507
		var data = table.row(this).data();
421
 
508
 
422
		$(this).find(":selected").attr('disabled', false).show();
509
		$(this).find(":selected").attr('disabled', false).show();
423
		$(this).find(":input").attr('disabled', false).show();
510
		$(this).find(":input").attr('disabled', false).show();
424
 
511
 
425
	});
512
	});
426
	
513
 
427
	var table = $('#onboardingLegal').DataTable();
514
	var table = $('#onboardingLegal').DataTable();
428
	$(document).on('dblclick', '#onboardingLegal tbody tr', function() {
515
	$(document).on('dblclick', '#onboardingLegal tbody tr', function() {
429
		console.log("dblclick");
516
		console.log("dblclick");
430
		var data = table.row(this).data();
517
		var data = table.row(this).data();
431
 
518
 
432
		$(this).find(":selected").attr('disabled', false).show();
519
		$(this).find(":selected").attr('disabled', false).show();
433
		$(this).find(":input").attr('disabled', false).show();
520
		$(this).find(":input").attr('disabled', false).show();
434
		
521
 
435
		$(this).find("input[name=codeLegal]").attr('disabled', true);
522
		$(this).find("input[name=codeLegal]").attr('disabled', true);
-
 
523
		$(this).find("input[name=shead1]").attr('disabled', true);
-
 
524
		$(this).find("input[name=bdm1]").attr('disabled', true);
-
 
525
		$(this).find("input[name=abrand1]").attr('disabled', true);
-
 
526
		$(this).find("input[name=recbrand1]").attr('disabled', true);
436
	});
527
	});
437
 
528
 
438
	var table = $('#partnerDashboardTraining').DataTable();
529
	var table = $('#partnerDashboardTraining').DataTable();
439
	$(document).on('dblclick', '#partnerDashboardTraining tbody tr',
530
	$(document).on('dblclick', '#partnerDashboardTraining tbody tr',
440
			function() {
531
		function() {
441
				console.log("dblclick");
532
			console.log("dblclick");
442
				var data = table.row(this).data();
533
			var data = table.row(this).data();
443
 
534
 
444
				$(this).find(":selected").attr('disabled', false).show();
535
			$(this).find(":selected").attr('disabled', false).show();
445
				$(this).find(":input").attr('disabled', false).show();
536
			$(this).find(":input").attr('disabled', false).show();
446
				
-
 
447
 
537
 
-
 
538
 
448
			});
539
		});
449
 
540
 
450
	var table = $('#partnerDealerMapping').DataTable();
541
	var table = $('#partnerDealerMapping').DataTable();
451
	$(document).on('dblclick', '#partnerDealerMapping tbody tr', function() {
542
	$(document).on('dblclick', '#partnerDealerMapping tbody tr', function() {
452
		console.log("dblclick");
543
		console.log("dblclick");
453
		var data = table.row(this).data();
544
		var data = table.row(this).data();
Line 458... Line 549...
458
 
549
 
459
});
550
});
460
 
551
 
461
function partnerDealerMapping(domId) {
552
function partnerDealerMapping(domId) {
462
	doAjaxRequestHandler(context + "/partnerDealerMapping", "GET", function(
553
	doAjaxRequestHandler(context + "/partnerDealerMapping", "GET", function(
463
			response) {
554
		response) {
464
		$('#' + domId).html(response);
555
		$('#' + domId).html(response);
465
	});
556
	});
466
}
557
}
467
 
558
 
468
function partnerOnboardingLegal(domId) {
559
function partnerOnboardingLegal(domId) {
469
	doAjaxRequestHandler(context + "/partnerOnboardingLegal", "GET", function(
560
	doAjaxRequestHandler(context + "/partnerOnboardingLegal", "GET", function(
470
			response) {
561
		response) {
471
		$('#' + domId).html(response);
562
		$('#' + domId).html(response);
472
	});
563
	});
473
}
564
}
474
 
565
 
475
function partnerDashboardTraining(domId) {
566
function partnerDashboardTraining(domId) {
476
	doAjaxRequestHandler(context + "/partnerDashboardTraining", "GET",
567
	doAjaxRequestHandler(context + "/partnerDashboardTraining", "GET",
477
			function(response) {
568
		function(response) {
478
				$('#' + domId).html(response);
569
			$('#' + domId).html(response);
479
			});
570
		});
480
}
571
}
481
 
572
 
482
function partnerOnboardingVerification(domId) {
573
function partnerOnboardingVerification(domId) {
483
	doAjaxRequestHandler(context + "/partnerOnboardingVerification", "GET",
574
	doAjaxRequestHandler(context + "/partnerOnboardingVerification", "GET",
484
			function(response) {
575
		function(response) {
485
				$('#' + domId).html(response);
576
			$('#' + domId).html(response);
486
			});
577
		});
487
}
578
}