Subversion Repositories SmartDukaan

Rev

Rev 29794 | Rev 29884 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
27763 tejbeer 1
$(function() {
29061 tejbeer 2
 
3
	$(document).on('click', ".onboarding_timeline", function() {
4
		doGetAjaxRequestHandler(context + "/partnerStoreTimeline",
5
			function(response) {
6
				$('#' + 'main-content').html(response);
7
			});
8
	});
29794 tejbeer 9
 
10
	$(document).on('click', ".legal-kyc", function() {
11
		doGetAjaxRequestHandler(context + "/getOpenPartnerPendingKyc",
12
			function(response) {
13
				$('#' + 'main-content').html(response);
14
			});
15
	});
16
 
27829 tejbeer 17
	$(document).on('click', '.submit1', function() {
18
		var row = $(this).closest("tr");
19
		console.log(row);
20
		var rowIndex = $(this).closest('tr').prevAll().length;
28908 tejbeer 21
 
27829 tejbeer 22
		var data0 = $(row).find("td:eq(0)").text();
28908 tejbeer 23
 
27836 tejbeer 24
		var data1 = $(row).find("td:eq(1)").text();
27833 tejbeer 25
		var data2 = $(row).find("td:eq(2)").text();
27829 tejbeer 26
		if (data2 != "") {
27
			data2 = data2 + "T00:00:00";
28
		}
27833 tejbeer 29
		var data3 = $(row).find("td:eq(3) input[type='date']").val();
30
		if (data3 != "") {
31
			data3 = data3 + "T00:00:00";
32
		}
33
		var data4 = $(row).find("td:eq(4) input[type='text']").val();
28908 tejbeer 34
 
27833 tejbeer 35
		var data5 = $(row).find("td:eq(5) input[type='number']").val();
28908 tejbeer 36
 
37
 
38
 
39
		var rbmAuthId = $(row).find("td:eq(6) input[type='hidden']").val();
40
 
41
		console.log(rbmAuthId)
42
 
28881 manish 43
		var data6 = $(row).find("td:eq(7) input[type='text']").val();
29763 tejbeer 44
 
45
 
46
 
29300 manish 47
		var data7 = $(row).find("td:eq(8) option:selected").val();
48
		var data8 = $(row).find("td:eq(9) option:selected").val();
27763 tejbeer 49
 
28881 manish 50
		var data9 = $(row).find("td:eq(10) input[type='text']").val();
51
		var data10 = $(row).find("td:eq(11) input[type='text']").val();
52
		var data11 = $(row).find("td:eq(12) input[type='date']").val();
27884 tejbeer 53
		if (data11 != "") {
54
			data11 = data11 + "T00:00:00";
55
		}
27813 tejbeer 56
 
28881 manish 57
		var data12 = $(row).find("td:eq(13) input[type='text']").val();
27833 tejbeer 58
 
28881 manish 59
		var data13 = $(row).find("td:eq(14) input[type='date']").val();
27884 tejbeer 60
		if (data13 != "") {
61
			data13 = data13 + "T00:00:00";
27829 tejbeer 62
		}
27884 tejbeer 63
		var data14 = $(row).find(".kyc input[type=hidden]").val();
64
		var data15 = $(row).find(".aadhar input[type=hidden]").val();
65
		var data16 = $(row).find(".pan input[type=hidden]").val();
66
		var data17 = $(row).find(".gst input[type=hidden]").val();
67
		var data18 = $(row).find(".cancheque input[type=hidden]").val();
68
		var data19 = $(row).find(".rent input[type=hidden]").val();
69
		console.log("data19" + data19);
70
		var data20 = $(row).find(".loi input[type=hidden]").val();
27829 tejbeer 71
		console.log("data18" + data18);
29061 tejbeer 72
 
73
		var docCompleted = $(row).find("td:eq(22) option:selected").val();
74
 
75
 
28977 manish 76
		var data21 = $(row).find("td:eq(23) input[type='text']").val();
28908 tejbeer 77
		console.log(data21);
28977 manish 78
		var data22 = $(row).find("td:eq(24) input[type='date']").val();
27829 tejbeer 79
		if (data22 != "") {
80
			data22 = data22 + "T00:00:00";
81
		}
28977 manish 82
		var data23 = $(row).find("td:eq(25) input[type='date']").val();
27829 tejbeer 83
		if (data23 != "") {
84
			data23 = data23 + "T00:00:00";
85
		}
28977 manish 86
		var data24 = $(row).find("td:eq(26) input[type='date']").val();
27833 tejbeer 87
		if (data24 != "") {
88
			data24 = data24 + "T00:00:00";
27829 tejbeer 89
		}
28977 manish 90
		var data25 = $(row).find("td:eq(27) input[type='date']").val();
27884 tejbeer 91
		if (data25 != "") {
92
			data25 = data25 + "T00:00:00";
27829 tejbeer 93
		}
28977 manish 94
		var data26 = $(row).find("td:eq(28) input[type='text']").val();
27813 tejbeer 95
 
28977 manish 96
		var data27 = $(row).find("td:eq(29) input[type='date']").val();
27833 tejbeer 97
		if (data27 != "") {
98
			data27 = data27 + "T00:00:00";
99
		}
27829 tejbeer 100
 
28977 manish 101
		var data28 = $(row).find("td:eq(30) input[type='date']").val();
27833 tejbeer 102
 
27884 tejbeer 103
		if (data28 != "") {
104
			data28 = data28 + "T00:00:00";
105
		}
28977 manish 106
		var data29 = $(row).find("td:eq(31) input[type='date']").val();
27833 tejbeer 107
 
28848 manish 108
		if (data29 != "") {
109
			data29 = data29 + "T00:00:00";
110
		}
27884 tejbeer 111
 
28977 manish 112
		var data30 = $(row).find("td:eq(32) input[type='checkbox']").is(":checked") ? 1 : 0;
27884 tejbeer 113
 
27829 tejbeer 114
		var prebookingListingObject = {};
115
		prebookingListingObject['id'] = data0
28908 tejbeer 116
 
117
 
27833 tejbeer 118
		prebookingListingObject['createdTimestamp'] = data2
119
		prebookingListingObject['acquiredDate'] = data3
120
		prebookingListingObject['outletName'] = data4
121
		prebookingListingObject['phoneNumber'] = data5
28908 tejbeer 122
 
123
		prebookingListingObject['authId'] = rbmAuthId
27833 tejbeer 124
		prebookingListingObject['city'] = data6
125
		prebookingListingObject['stateHead'] = data7
126
		prebookingListingObject['bdm'] = data8
27829 tejbeer 127
 
27833 tejbeer 128
		prebookingListingObject['agreedBrandFees'] = data9
28908 tejbeer 129
		prebookingListingObject['receivedBrandFees'] = data10
130
		prebookingListingObject['finalBrandFees'] = data11
27884 tejbeer 131
		prebookingListingObject['agreedWallet'] = data12
132
		prebookingListingObject['investmentDate'] = data13
133
		prebookingListingObject['kyc'] = data14
134
		prebookingListingObject['aadharDoc'] = data15
135
		prebookingListingObject['panDoc'] = data16
136
		prebookingListingObject['gst'] = data17
137
		prebookingListingObject['cancelCheque'] = data18
138
		prebookingListingObject['rentAgreement'] = data19
139
		prebookingListingObject['loi'] = data20
28977 manish 140
		prebookingListingObject['docCompleted'] = docCompleted
27884 tejbeer 141
		prebookingListingObject['code'] = data21
142
		prebookingListingObject['receePlaned'] = data22
143
		prebookingListingObject['receeActual'] = data23
28900 manish 144
		prebookingListingObject['deploymentPlanedDate'] = data24
145
		prebookingListingObject['deploymentDate'] = data25
27884 tejbeer 146
		prebookingListingObject['stockPayment'] = data26
147
		prebookingListingObject['expectedDate'] = data27
148
		prebookingListingObject['payDate'] = data28
28848 manish 149
		prebookingListingObject['inaugrationDate'] = data29
150
		prebookingListingObject['billingStatus'] = data30
27829 tejbeer 151
 
152
		var jsonObject = JSON.stringify(prebookingListingObject);
153
 
154
		console.log(jsonObject);
155
 
156
		if (confirm("Are you sure you want to submit the request") == true) {
28908 tejbeer 157
			doAjaxRequestWithJsonHandler(context + "/partnerOnBoardingListing", "POST", jsonObject, function(response) {
158
				row.html(response);
159
				row.css("background-color", "#F8F8FF");
27858 tejbeer 160
 
27842 tejbeer 161
			});
27829 tejbeer 162
		}
163
 
164
	});
28908 tejbeer 165
 
28600 amit.gupta 166
	$(document).on('click', '.submit-design', function() {
167
		var row = $(this).closest("tr");
168
		console.log(row);
169
		var rowIndex = $(this).closest('tr').prevAll().length;
28908 tejbeer 170
 
28600 amit.gupta 171
		var id = $(row).find("td:eq(0)").text();
28908 tejbeer 172
 
28648 amit.gupta 173
		var outletName = $(row).find("td:eq(1) input[type='text']").val();
28600 amit.gupta 174
		var createdTimestamp = $(row).find("td:eq(2)").text();
175
		if (createdTimestamp != "") {
176
			createdTimestamp = createdTimestamp + "T00:00:00";
177
		}
178
		var acquiredDate = $(row).find("td:eq(3) input[type='date']").val();
179
		if (acquiredDate != "") {
180
			acquiredDate = acquiredDate + "T00:00:00";
181
		}
28908 tejbeer 182
 
28600 amit.gupta 183
		var phoneNumber = $(row).find("td:eq(4) input[type='number']").val();
28908 tejbeer 184
 
185
 
186
 
28610 amit.gupta 187
		var city = $(row).find("td:eq(5) input[type='text']").val();
27829 tejbeer 188
 
29763 tejbeer 189
 
28610 amit.gupta 190
		var agreedBrandFees = $(row).find("td:eq(8) input[type='text']").val();
27829 tejbeer 191
 
28908 tejbeer 192
		console.log("agreedBrandFees" + agreedBrandFees);
193
 
194
 
28610 amit.gupta 195
		var investmentDate = $(row).find("td:eq(9) input[type='date']").val();
28600 amit.gupta 196
		if (investmentDate != "") {
197
			investmentDate = investmentDate + "T00:00:00";
198
		}
28908 tejbeer 199
		console.log("investmentDate" + investmentDate);
200
 
201
		var loi = $(row).find(".loiDesign input[type=hidden]").val();
28600 amit.gupta 202
		console.log("loi" + loi);
28908 tejbeer 203
 
28610 amit.gupta 204
		var kycDesign = $(row).find(".kycDesign input[type=hidden]").val();
28908 tejbeer 205
 
28600 amit.gupta 206
		var code = $(row).find("td:eq(12) input[type='text']").val();
28908 tejbeer 207
		console.log("code" + code);
208
 
209
 
28600 amit.gupta 210
		var receePlaned = $(row).find("td:eq(13) input[type='date']").val();
211
		if (receePlaned != "") {
212
			receePlaned = receePlaned + "T00:00:00";
213
		}
214
		var receeActual = $(row).find("td:eq(14) input[type='date']").val();
215
		if (receeActual != "") {
216
			receeActual = receeActual + "T00:00:00";
217
		}
28908 tejbeer 218
		console.log("receeActual" + receeActual);
219
 
220
 
28848 manish 221
		var twoDBoqPlanedDate = $(row).find("td:eq(16) input[type='date']").val();
28600 amit.gupta 222
		if (twoDBoqPlanedDate != "") {
223
			twoDBoqPlanedDate = twoDBoqPlanedDate + "T00:00:00";
224
		}
28908 tejbeer 225
 
28848 manish 226
		var twoDBoqdate = $(row).find("td:eq(17) input[type='date']").val();
28600 amit.gupta 227
		if (twoDBoqdate != "") {
228
			twoDBoqdate = twoDBoqdate + "T00:00:00";
229
		}
230
		var twodBOQ = $(row).find(".twoDBoq input[type=hidden]").val();
28908 tejbeer 231
 
28848 manish 232
		var threeDBoqPlanedDate = $(row).find("td:eq(19) input[type='date']").val();
28600 amit.gupta 233
		if (threeDBoqPlanedDate != "") {
234
			threeDBoqPlanedDate = threeDBoqPlanedDate + "T00:00:00";
235
		}
28908 tejbeer 236
 
28848 manish 237
		var threeDBoqdate = $(row).find("td:eq(20) input[type='date']").val();
28600 amit.gupta 238
		if (threeDBoqdate != "") {
239
			threeDBoqdate = threeDBoqdate + "T00:00:00";
240
		}
28908 tejbeer 241
 
28600 amit.gupta 242
		var threeDBoq = $(row).find(".threeDBoq input[type=hidden]").val();
28908 tejbeer 243
 
28848 manish 244
		var poVenderPlanedDate = $(row).find("td:eq(22) input[type='date']").val();
28600 amit.gupta 245
		if (poVenderPlanedDate != "") {
246
			poVenderPlanedDate = poVenderPlanedDate + "T00:00:00";
247
		}
28848 manish 248
		var poVenderDate = $(row).find("td:eq(23) input[type='date']").val();
28600 amit.gupta 249
		if (poVenderDate != "") {
250
			poVenderDate = poVenderDate + "T00:00:00";
251
		}
28908 tejbeer 252
 
253
 
28848 manish 254
		var briefingPartnerPlaned = $(row).find("td:eq(24) input[type='date']").val();
28600 amit.gupta 255
		if (briefingPartnerPlaned != "") {
256
			briefingPartnerPlaned = briefingPartnerPlaned + "T00:00:00";
257
		}
28848 manish 258
		var briefingPartner = $(row).find("td:eq(25) input[type='date']").val();
28600 amit.gupta 259
		if (briefingPartner != "") {
260
			briefingPartner = briefingPartner + "T00:00:00";
261
		}
28848 manish 262
		var deploymentPlanedDate = $(row).find("td:eq(26) input[type='date']").val();
28600 amit.gupta 263
		if (deploymentPlanedDate != "") {
264
			deploymentPlanedDate = deploymentPlanedDate + "T00:00:00";
265
		}
28848 manish 266
		var deploymentDate = $(row).find("td:eq(27) input[type='date']").val();
28600 amit.gupta 267
		if (deploymentDate != "") {
268
			deploymentDate = deploymentDate + "T00:00:00";
269
		}
28908 tejbeer 270
 
271
 
28848 manish 272
		var finalPicsOutletPlanedDate = $(row).find("td:eq(28) input[type='date']").val();
28600 amit.gupta 273
		if (finalPicsOutletPlanedDate != "") {
274
			finalPicsOutletPlanedDate = finalPicsOutletPlanedDate + "T00:00:00";
275
		}
28908 tejbeer 276
 
28848 manish 277
		var finalPicsOutletDate = $(row).find("td:eq(29) input[type='date']").val();
28600 amit.gupta 278
		if (finalPicsOutletDate != "") {
279
			finalPicsOutletDate = finalPicsOutletDate + "T00:00:00";
280
		}
281
		var finalPicsOutlet = $(row).find(".finalPics input[type=hidden]").val();
27829 tejbeer 282
 
28848 manish 283
		var nocDate = $(row).find("td:eq(31) input[type='date']").val();
28600 amit.gupta 284
		if (nocDate != "") {
285
			nocDate = nocDate + "T00:00:00";
286
		}
287
		var noc = $(row).find(".noc input[type=hidden]").val();
288
		var prebookingListingObject = {};
289
		prebookingListingObject['id'] = id
28908 tejbeer 290
		prebookingListingObject['outletName'] = outletName
291
 
28600 amit.gupta 292
		prebookingListingObject['createdTimestamp'] = createdTimestamp
293
		prebookingListingObject['acquiredDate'] = acquiredDate
28908 tejbeer 294
 
28600 amit.gupta 295
		prebookingListingObject['phoneNumber'] = phoneNumber
28908 tejbeer 296
 
28600 amit.gupta 297
		prebookingListingObject['city'] = city
298
 
29763 tejbeer 299
 
28600 amit.gupta 300
		prebookingListingObject['agreedBrandFees'] = agreedBrandFees
28908 tejbeer 301
 
28600 amit.gupta 302
		prebookingListingObject['investmentDate'] = investmentDate
303
		prebookingListingObject['loi'] = loi
28610 amit.gupta 304
		prebookingListingObject['kycDesign'] = kycDesign
28600 amit.gupta 305
		prebookingListingObject['code'] = code
306
		prebookingListingObject['receePlaned'] = receePlaned
307
		prebookingListingObject['receeActual'] = receeActual
308
		prebookingListingObject['twoDBoqPlanedDate'] = twoDBoqPlanedDate
309
		prebookingListingObject['twoDBoqdate'] = twoDBoqdate
310
		prebookingListingObject['twodBOQ'] = twodBOQ
311
		prebookingListingObject['threeDBoqPlanedDate'] = threeDBoqPlanedDate
312
		prebookingListingObject['threeDBoqdate'] = threeDBoqdate
313
		prebookingListingObject['threeDBoq'] = threeDBoq
314
		prebookingListingObject['poVenderPlanedDate'] = poVenderPlanedDate
315
		prebookingListingObject['poVenderDate'] = poVenderDate
28908 tejbeer 316
 
28600 amit.gupta 317
		prebookingListingObject['briefingPartnerPlaned'] = briefingPartnerPlaned
318
		prebookingListingObject['briefingPartner'] = briefingPartner
319
		prebookingListingObject['deploymentPlanedDate'] = deploymentPlanedDate
320
		prebookingListingObject['deploymentDate'] = deploymentDate
321
		prebookingListingObject['finalPicsOutletPlanedDate'] = finalPicsOutletPlanedDate
322
		prebookingListingObject['finalPicsOutletDate'] = finalPicsOutletDate
323
		prebookingListingObject['finalPicsOutlet'] = finalPicsOutlet
324
		prebookingListingObject['nocDate'] = nocDate
325
		prebookingListingObject['noc'] = noc
326
 
28908 tejbeer 327
 
328
 
28600 amit.gupta 329
		var jsonObject = JSON.stringify(prebookingListingObject);
330
 
331
		console.log(jsonObject);
332
 
333
		if (confirm("Are you sure you want to submit the request") == true) {
28908 tejbeer 334
			doAjaxRequestWithJsonHandler(context + "/partnerOnboardingDesignaTatPanel", "POST", jsonObject, function(response) {
335
				row.html(response);
336
				row.css("background-color", "#F8F8FF");
28600 amit.gupta 337
 
338
			});
339
		}
340
 
341
	});
342
 
343
 
28940 manish 344
	$(document).on('click', ".noticPartneronboarding", function() {
345
		var id = $(this).data('id');
346
		console.log(id);
347
		if (confirm("Are you sure you want to Notice Isssue this Partner") == true) {
348
			doPostAjaxRequestHandler(context + "/partnerOnboardingNotice?id=" + id,
349
				function(response) {
350
 
351
					console.log("reponse" + response);
352
					if (response == 'true') {
353
						alert("successfully Done");
29061 tejbeer 354
 
355
 
28940 manish 356
						panelListing("main-content");
357
					}
358
				});
29061 tejbeer 359
		}
28940 manish 360
	});
29061 tejbeer 361
 
362
 
363
 
28900 manish 364
	$(document).on('click', ".holdPartnerOnboarding", function() {
365
		var id = $(this).data('id');
366
		console.log(id);
367
		if (confirm("Are you sure you want to hold this Partner") == true) {
368
			doPostAjaxRequestHandler(context + "/partnerOnboardingHold?id=" + id,
369
				function(response) {
28600 amit.gupta 370
 
28900 manish 371
					console.log("reponse" + response);
372
					if (response == 'true') {
373
						alert("successfully Done");
29061 tejbeer 374
 
375
 
28900 manish 376
						panelListing("main-content");
377
					}
378
				});
29061 tejbeer 379
		}
28900 manish 380
	});
29061 tejbeer 381
 
382
 
28900 manish 383
	$(document).on('click', ".unHoldPartnerOnboarding", function() {
384
		var id = $(this).data('id');
385
		console.log(id);
386
		if (confirm("Are you sure you want to Unhold this Partner") == true) {
387
			doPostAjaxRequestHandler(context + "/partnerOnboardingUnhold?id=" + id,
388
				function(response) {
389
 
390
					console.log("reponse" + response);
391
					if (response == 'true') {
392
						alert("successfully Done");
393
						panelListing("main-content");
394
					}
395
				});
29061 tejbeer 396
		}
28900 manish 397
	});
29061 tejbeer 398
 
29763 tejbeer 399
 
400
 
401
 
402
	$(document).on('click', ".addKyc", function() {
403
		var id = $(this).data('id');
404
		console.log(id);
405
		doAjaxRequestHandler(context + "/getFofoKyc?onBoardingId=" + id, "GET",
406
			function(response) {
407
 
408
				console.log(response)
409
				$('.' + "fofoKycContainer").html(response);
410
 
411
			});
412
 
413
	});
414
 
415
 
416
	var table = $('#fofokyctable').DataTable();
417
	$(document).on('dblclick', '#fofokyctable tbody tr', function() {
418
		console.log("dblclick");
419
		var data = table.row(this).data();
420
 
421
		$(this).find(":selected").attr('disabled', false).show();
422
		$(this).find(":input").attr('disabled', false).show();
423
 
424
 
425
	});
426
 
427
 
428
 
429
 
430
	$(document).on('click', '.addKycdetail', function() {
431
		var row = $(this).closest("tr");
432
 
433
		var onBoardingId = $(this).data('onboardingid');
434
 
435
		console.log(row);
436
		var rowIndex = $(this).closest('tr').prevAll().length;
437
		var id = $(row).find("td:eq(0)").text();
438
		var firstName = $(row).find("td:eq(1) input[type='text']").val();
439
		var middleName = $(row).find("td:eq(2) input[type='text']").val();
440
		var lastName = $(row).find("td:eq(3) input[type='text']").val();
441
 
29774 tejbeer 442
		var fatherName = $(row).find("td:eq(4) input[type='text']").val();
29763 tejbeer 443
 
29774 tejbeer 444
		var dob = $(row).find("td:eq(5) input[type='date']").val();
445
 
29763 tejbeer 446
		if (dob != "") {
447
 
448
			dob = dob + "T00:00:00";
449
		}
450
 
29774 tejbeer 451
		var gender = $(row).find("td:eq(6) option:selected").val();
452
		var maritalStatus = $(row).find("td:eq(7) option:selected").val();
29763 tejbeer 453
 
29774 tejbeer 454
		var email = $(row).find("td:eq(8) input[type='text']").val();
29763 tejbeer 455
 
29774 tejbeer 456
		var mobile = $(row).find("td:eq(9) input[type='text']").val();
457
		var pan = $(row).find("td:eq(10) input[type='text']").val();
29763 tejbeer 458
 
459
 
460
		var pandocId = $(row).find(".pandoc input[type=hidden]").val();
461
 
29774 tejbeer 462
		var poaNO = $(row).find("td:eq(12) input[type='text']").val();
463
		var poaType = $(row).find("td:eq(13) option:selected").val();
29763 tejbeer 464
 
465
		var paoFrontd = $(row).find(".paof input[type=hidden]").val();
466
		var paoBackId = $(row).find(".paob input[type=hidden]").val();
467
 
29774 tejbeer 468
		var address1 = $(row).find("td:eq(16) input[type='text']").val();
29763 tejbeer 469
 
29774 tejbeer 470
		var address2 = $(row).find("td:eq(17) input[type='text']").val();
29763 tejbeer 471
 
29774 tejbeer 472
		var address3 = $(row).find("td:eq(18) input[type='text']").val();
29763 tejbeer 473
 
29774 tejbeer 474
		var city = $(row).find("td:eq(19) input[type='text']").val();
29763 tejbeer 475
 
476
 
29774 tejbeer 477
		var state = $(row).find("td:eq(20) input[type='text']").val();
29763 tejbeer 478
 
29774 tejbeer 479
		var pincode = $(row).find("td:eq(21) input[type='text']").val();
29763 tejbeer 480
 
481
 
482
 
483
		console.log(city)
484
		if (dob === "") {
485
			alert("dob is required");
486
			return;
487
		}
488
 
489
 
490
		if (gender === "") {
491
			alert("gender is required");
492
			return;
493
		}
494
 
29774 tejbeer 495
 
496
		if (fatherName === "") {
497
			alert("Father Name is required");
498
			return;
499
		}
500
 
29763 tejbeer 501
		if (maritalStatus === "") {
502
			alert("Marital Status is required");
503
			return;
504
		}
505
 
506
		if (email === "") {
507
			alert("email is required");
508
			return;
509
		}
510
 
511
		if (mobile === "") {
512
			alert("mobile is required");
513
			return;
514
		}
515
 
516
		if (pan === "") {
517
			alert("pan is required");
518
			return;
519
		}
520
 
521
		if (pandocId === "") {
522
			alert("panDoc is required");
523
			return;
524
		}
525
 
526
		if (poaNO === "") {
527
			alert("paoNO is required");
528
			return;
529
		}
530
 
531
		if (poaType === "") {
532
			alert("paoType is required");
533
			return;
534
		}
535
 
536
		if (paoFrontd === "") {
537
			alert("paoFrontd is required");
538
			return;
539
		}
540
 
541
		if (paoBackId === "") {
542
			alert("paoBackId is required");
543
			return;
544
		}
545
 
546
		if (address1 === "") {
547
			alert("address1 is required");
548
			return;
549
		}
550
		if (address2 === "") {
551
			alert("address2 is required");
552
			return;
553
		}
554
 
555
		if (city === "") {
556
			alert("city is required");
557
			return;
558
		}
559
		if (state === "") {
560
			alert("state is required");
561
			return;
562
		}
563
 
564
		if (pincode === "") {
565
			alert("pincode is required");
566
			return;
567
		}
568
 
569
		var kycDetail = {};
570
		kycDetail['id'] = id
571
 
572
		kycDetail['firstName'] = firstName
573
		kycDetail['middleName'] = middleName
574
		kycDetail['lastName'] = lastName
575
 
29774 tejbeer 576
		kycDetail['fatherName'] = fatherName
577
 
29763 tejbeer 578
		kycDetail['dob'] = dob
579
		kycDetail['gender'] = gender
580
		kycDetail['maritalStatus'] = maritalStatus
581
		kycDetail['email'] = email
582
		kycDetail['mobile'] = mobile
583
		kycDetail['pan'] = pan
584
		kycDetail['pandocId'] = pandocId
585
		kycDetail['poaNo'] = poaNO
586
		kycDetail['poaType'] = poaType
587
		kycDetail['paoFrontd'] = paoFrontd
588
		kycDetail['paoBackId'] = paoBackId
589
 
590
		kycDetail['address1'] = address1
591
		kycDetail['address2'] = address2
592
		kycDetail['address3'] = address3
593
		kycDetail['city'] = city
594
		kycDetail['state'] = state
595
		kycDetail['pincode'] = pincode
596
		kycDetail['onboardingId'] = onBoardingId
597
 
598
		var jsonObject = JSON.stringify(kycDetail);
599
		console.log("kycDetail" + jsonObject);
600
 
601
		console.log(jsonObject);
602
 
603
		if (confirm("Are you sure you want to submit the request") == true) {
604
			doAjaxRequestWithJsonHandler(context + "/addPartnerKyc", "POST", jsonObject, function(response) {
605
				row.html(response);
606
 
607
 
608
			});
609
		}
610
 
611
	});
612
 
613
 
614
 
615
	$(document).on('click', ".addNewRow", function() {
616
		var id = $(this).data('id');
617
		console.log(id);
618
		doAjaxRequestHandler(context + "/addKycRow?onBoardingId=" + id, "GET",
619
			function(response) {
620
 
621
				console.log(response)
622
				$('.' + "fofoKycContainer").html(response);
623
 
624
			});
625
 
29794 tejbeer 626
	});
29763 tejbeer 627
 
29794 tejbeer 628
 
629
	var table = $('#legalkyctable').DataTable();
630
	$(document).on('dblclick', '#legalkyctable tbody tr', function() {
631
		console.log("dblclick");
632
		var data = table.row(this).data();
633
 
634
		$(this).find(":selected").attr('disabled', false).show();
635
		$(this).find(":input").attr('disabled', false).show();
636
 
637
 
638
	});
639
 
640
 
641
	$(document).on('click', '.addlegalKycdetail', function() {
642
		var row = $(this).closest("tr");
643
 
644
		console.log(row);
645
 
29841 tejbeer 646
		var id = $(row).find("td:eq(2)").text();
647
		var businessType = $(row).find("td:eq(3) option:selected").val();
648
		var firstName = $(row).find("td:eq(4) input[type='text']").val();
649
		var middleName = $(row).find("td:eq(5) input[type='text']").val();
650
		var lastName = $(row).find("td:eq(6) input[type='text']").val();
29794 tejbeer 651
 
29841 tejbeer 652
		var fatherName = $(row).find("td:eq(7) input[type='text']").val();
29794 tejbeer 653
 
29841 tejbeer 654
		var dob = $(row).find("td:eq(8) input[type='date']").val();
29794 tejbeer 655
 
656
		if (dob != "") {
657
 
658
			dob = dob + "T00:00:00";
659
		}
660
 
29841 tejbeer 661
		var gender = $(row).find("td:eq(9) option:selected").val();
662
		var maritalStatus = $(row).find("td:eq(10) option:selected").val();
29794 tejbeer 663
 
29841 tejbeer 664
		var email = $(row).find("td:eq(11) input[type='text']").val();
29794 tejbeer 665
 
29841 tejbeer 666
		var mobile = $(row).find("td:eq(12) input[type='text']").val();
667
		var pan = $(row).find("td:eq(13) input[type='text']").val();
29794 tejbeer 668
 
669
 
670
		var pandocId = $(row).find(".pandoc input[type=hidden]").val();
671
 
29841 tejbeer 672
		var poaNO = $(row).find("td:eq(15) input[type='text']").val();
673
		var poaType = $(row).find("td:eq(16) option:selected").val();
29794 tejbeer 674
 
675
		var paoFrontd = $(row).find(".paof input[type=hidden]").val();
676
		var paoBackId = $(row).find(".paob input[type=hidden]").val();
677
 
29841 tejbeer 678
		var address1 = $(row).find("td:eq(19) input[type='text']").val();
29794 tejbeer 679
 
29841 tejbeer 680
		var address2 = $(row).find("td:eq(20) input[type='text']").val();
29794 tejbeer 681
 
29841 tejbeer 682
		var address3 = $(row).find("td:eq(21) input[type='text']").val();
29794 tejbeer 683
 
29841 tejbeer 684
		var city = $(row).find("td:eq(22) input[type='text']").val();
29794 tejbeer 685
 
686
 
29841 tejbeer 687
		var state = $(row).find("td:eq(23) input[type='text']").val();
29794 tejbeer 688
 
29841 tejbeer 689
		var pincode = $(row).find("td:eq(24) input[type='text']").val();
29794 tejbeer 690
 
691
 
692
 
693
		console.log(city)
694
		if (dob === "") {
695
			alert("dob is required");
696
			return;
697
		}
698
 
699
 
700
		if (gender === "") {
701
			alert("gender is required");
702
			return;
703
		}
704
 
705
 
706
		if (fatherName === "") {
707
			alert("Father Name is required");
708
			return;
709
		}
710
 
711
		if (maritalStatus === "") {
712
			alert("Marital Status is required");
713
			return;
714
		}
715
 
716
		if (email === "") {
717
			alert("email is required");
718
			return;
719
		}
720
 
721
		if (mobile === "") {
722
			alert("mobile is required");
723
			return;
724
		}
725
 
726
		if (pan === "") {
727
			alert("pan is required");
728
			return;
729
		}
730
 
731
		if (pandocId === "") {
732
			alert("panDoc is required");
733
			return;
734
		}
735
 
736
		if (poaNO === "") {
737
			alert("paoNO is required");
738
			return;
739
		}
740
 
741
		if (poaType === "") {
742
			alert("paoType is required");
743
			return;
744
		}
745
 
746
		if (paoFrontd === "") {
747
			alert("paoFrontd is required");
748
			return;
749
		}
750
 
751
		if (paoBackId === "") {
752
			alert("paoBackId is required");
753
			return;
754
		}
755
 
756
		if (address1 === "") {
757
			alert("address1 is required");
758
			return;
759
		}
760
		if (address2 === "") {
761
			alert("address2 is required");
762
			return;
763
		}
764
 
765
		if (city === "") {
766
			alert("city is required");
767
			return;
768
		}
769
		if (state === "") {
770
			alert("state is required");
771
			return;
772
		}
773
 
774
		if (pincode === "") {
775
			alert("pincode is required");
776
			return;
777
		}
778
 
779
		var kycDetail = {};
780
		kycDetail['id'] = id
781
		kycDetail['businessType'] = businessType
782
		kycDetail['firstName'] = firstName
783
		kycDetail['middleName'] = middleName
784
		kycDetail['lastName'] = lastName
785
 
786
		kycDetail['fatherName'] = fatherName
787
 
788
		kycDetail['dob'] = dob
789
		kycDetail['gender'] = gender
790
		kycDetail['maritalStatus'] = maritalStatus
791
		kycDetail['email'] = email
792
		kycDetail['mobile'] = mobile
793
		kycDetail['pan'] = pan
794
		kycDetail['pandocId'] = pandocId
795
		kycDetail['poaNo'] = poaNO
796
		kycDetail['poaType'] = poaType
797
		kycDetail['paoFrontd'] = paoFrontd
798
		kycDetail['paoBackId'] = paoBackId
799
 
800
		kycDetail['address1'] = address1
801
		kycDetail['address2'] = address2
802
		kycDetail['address3'] = address3
803
		kycDetail['city'] = city
804
		kycDetail['state'] = state
805
		kycDetail['pincode'] = pincode
806
 
807
		var jsonObject = JSON.stringify(kycDetail);
808
		console.log("kycDetail" + jsonObject);
809
 
810
		console.log(jsonObject);
811
 
812
		if (confirm("Are you sure you want to submit the request") == true) {
813
			doAjaxRequestWithJsonHandler(context + "/addlegalPartnerKyc", "POST", jsonObject, function(response) {
814
				row.html(response);
815
 
816
 
817
			});
818
		}
819
 
820
	});
821
 
27829 tejbeer 822
	$(document).on('click', ".partner-onboarding-index", function() {
27763 tejbeer 823
		panelListing("main-content");
824
	});
27813 tejbeer 825
 
826
 
827
	$(document).on('click', ".partner-onboarding-open", function() {
828
		console.log("yes");
27799 tejbeer 829
		partnerOnboardingOpen("main-content");
830
	});
28908 tejbeer 831
 
28600 amit.gupta 832
	$(document).on('click', ".design-completed", function() {
833
		console.log("yes");
834
		partnerOnboardinDesignCompleted("main-content");
835
	});
28908 tejbeer 836
 
28600 amit.gupta 837
	$(document).on('click', ".design_tat", function() {
838
		console.log("yes");
839
		partnerOnboardingDesign("main-content");
840
	});
27813 tejbeer 841
 
27829 tejbeer 842
	$(document).on('click', ".partner-onboarding-reject", function() {
27799 tejbeer 843
		console.log("helo");
27763 tejbeer 844
 
27799 tejbeer 845
		partnerOnboardingReject("main-content");
846
	});
847
 
29794 tejbeer 848
	$(document).on('input', 'table#legalkyctable input[type=file]', function() {
849
		if (confirm('Confirm upload ?')) {
850
			var fileSelector = $(this)[0];
851
			if (fileSelector != undefined
852
				&& fileSelector.files[0] != undefined) {
853
				var url = `${context}/document-upload`;
854
				console.log(url);
855
				var file = this.files[0];
856
				console.log("file" + file);
857
				let fileInput = $(this);
858
				console.log("fileInput" + file);
859
				doAjaxUploadRequestHandler(
860
					url,
861
					'POST',
862
					file,
863
					function(response) {
864
						console.log(response);
865
						var documentId = response.response.document_id;
866
						console.log("documentId : " + documentId);
867
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
868
					});
869
				// alert("Retailer Shop Document
870
				// is required");
871
			}
872
		} else {
873
			// Do nothing!
874
		}
875
	});
29763 tejbeer 876
 
29794 tejbeer 877
 
29763 tejbeer 878
	$(document).on('input', 'table#fofokyctable input[type=file]', function() {
879
		if (confirm('Confirm upload ?')) {
880
			var fileSelector = $(this)[0];
881
			if (fileSelector != undefined
882
				&& fileSelector.files[0] != undefined) {
883
				var url = `${context}/document-upload`;
884
				console.log(url);
885
				var file = this.files[0];
886
				console.log("file" + file);
887
				let fileInput = $(this);
888
				console.log("fileInput" + file);
889
				doAjaxUploadRequestHandler(
890
					url,
891
					'POST',
892
					file,
893
					function(response) {
894
						console.log(response);
895
						var documentId = response.response.document_id;
896
						console.log("documentId : " + documentId);
897
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
898
					});
899
				// alert("Retailer Shop Document
900
				// is required");
901
			}
902
		} else {
903
			// Do nothing!
904
		}
905
	});
906
 
27813 tejbeer 907
	$(document).on('input', 'table#example input[type=file]', function() {
908
		if (confirm('Confirm upload ?')) {
909
			var fileSelector = $(this)[0];
910
			if (fileSelector != undefined
911
				&& fileSelector.files[0] != undefined) {
912
				var url = `${context}/document-upload`;
913
				console.log(url);
914
				var file = this.files[0];
28908 tejbeer 915
				console.log("file" + file);
27813 tejbeer 916
				let fileInput = $(this);
28908 tejbeer 917
				console.log("fileInput" + file);
27813 tejbeer 918
				doAjaxUploadRequestHandler(
919
					url,
920
					'POST',
921
					file,
922
					function(response) {
923
						console.log(response);
924
						var documentId = response.response.document_id;
925
						console.log("documentId : " + documentId);
926
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
927
					});
928
				// alert("Retailer Shop Document
929
				// is required");
930
			}
931
		} else {
932
			// Do nothing!
933
		}
934
	});
29061 tejbeer 935
 
936
 
28977 manish 937
	$(document).on('input', 'table#partnerVerification input[type=file]', function() {
938
		if (confirm('Confirm upload ?')) {
939
			var fileSelector = $(this)[0];
940
			if (fileSelector != undefined
941
				&& fileSelector.files[0] != undefined) {
942
				var url = `${context}/document-upload`;
943
				console.log(url);
944
				var file = this.files[0];
945
				console.log("file" + file);
946
				let fileInput = $(this);
947
				console.log("fileInput" + file);
948
				doAjaxUploadRequestHandler(
949
					url,
950
					'POST',
951
					file,
952
					function(response) {
953
						console.log(response);
954
						var documentId = response.response.document_id;
955
						console.log("documentId : " + documentId);
956
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
957
					});
958
				// alert("Retailer Shop Document
959
				// is required");
960
			}
961
		} else {
962
			// Do nothing!
963
		}
964
	});
29061 tejbeer 965
 
966
 
967
 
28600 amit.gupta 968
	$(document).on('input', 'table#OnboardingDesign input[type=file]', function() {
969
		if (confirm('Confirm upload ?')) {
970
			var fileSelector = $(this)[0];
971
			if (fileSelector != undefined
972
				&& fileSelector.files[0] != undefined) {
973
				var url = `${context}/document-upload`;
974
				console.log(url);
975
				var file = this.files[0];
28908 tejbeer 976
				console.log("file" + file);
28600 amit.gupta 977
				let fileInput = $(this);
28908 tejbeer 978
				console.log("fileInput" + file);
28600 amit.gupta 979
				doAjaxUploadRequestHandler(
980
					url,
981
					'POST',
982
					file,
983
					function(response) {
984
						console.log(response);
985
						var documentId = response.response.document_id;
986
						console.log("documentId : " + documentId);
987
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
988
					});
989
				// alert("Retailer Shop Document
990
				// is required");
991
			}
992
		} else {
993
			// Do nothing!
994
		}
995
	});
27799 tejbeer 996
 
27829 tejbeer 997
	$(document).on('click', '#newmodal', function() {
29061 tejbeer 998
 
999
 
28977 manish 1000
		var prebookingListingObject = {};
1001
		var outletName = $('#outLetName1').val();
29061 tejbeer 1002
		var phoneNumber = $('#number1').val();
1003
 
1004
		if (outletName == "") {
1005
 
1006
			alert("outletName is required ");
1007
			return;
1008
		}
1009
		prebookingListingObject['outletName'] = $('#outLetName1').val();
1010
 
1011
		if (phoneNumber == "") {
1012
			alert("Phone Number is required ");
1013
			return false;
1014
 
1015
		}
1016
		if (phoneNumber.length > 6 && phoneNumber.length < 11) {
1017
 
1018
			prebookingListingObject['phoneNumber'] = $('#number1').val();
1019
 
1020
		}
1021
		else {
1022
			alert("Number should be greater then 6 and less then 11");
1023
			return false;
1024
 
1025
		}
1026
 
28977 manish 1027
		acquireddate1 = $('#acquireddate1').val();
1028
		if (acquireddate1 != "") {
1029
			acquireddate1 = acquireddate1 + "T00:00:00";
1030
		}
1031
		prebookingListingObject['authId'] = $('#authUserOnboarding').val();
27813 tejbeer 1032
 
28977 manish 1033
		prebookingListingObject['acquiredDate'] = acquireddate1
27813 tejbeer 1034
 
29061 tejbeer 1035
 
28977 manish 1036
		var json = JSON.stringify(prebookingListingObject);
27829 tejbeer 1037
		console.log(json);
1038
		doAjaxRequestWithJsonHandler(
1039
			context
1040
			+ "/partnerOnBoardingListing",
1041
			"POST",
1042
			json,
1043
			function(response) {
27813 tejbeer 1044
 
28908 tejbeer 1045
				panelListing("main-content");
1046
 
1047
 
27829 tejbeer 1048
			});
1049
	});
27813 tejbeer 1050
 
27829 tejbeer 1051
	var table = $('#example').DataTable();
1052
	$(document).on('dblclick', '#example tbody tr', function() {
27813 tejbeer 1053
 
27829 tejbeer 1054
		var data = table.row(this).data();
29061 tejbeer 1055
		var statusHold = $(this).find("td:eq(37) button[type='submit']").val();
1056
 
1057
		console.log("statusHold" + statusHold);
1058
		if (statusHold.localeCompare("hold")) {
1059
			$(this).find(":input").attr('disabled', true);
1060
			$(this).find("td:eq(37) button[type='submit']").attr('disabled', false);
1061
			$(this).find("td:eq(36) button[type='submit']").attr('disabled', false);
1062
		}
1063
		else {
1064
			$(this).find(":input").attr('disabled', false).show();
1065
			$(this).find(":selected").attr('disabled', false).show();
1066
 
1067
		}
28881 manish 1068
		$(this).find("input[name=rbmAuthId]").attr('disabled', true);
28900 manish 1069
		$(this).find("input[name=verificationStatusOnboarding]").attr('disabled', true);
29088 tejbeer 1070
		$(this).find("input[name=billingStatus]").attr('disabled', true);
29061 tejbeer 1071
 
29088 tejbeer 1072
 
27829 tejbeer 1073
		$(this).css("background-color", "#87d3f8");
29061 tejbeer 1074
		let a = 12;
1075
		let b = 12;
1076
		console.log("yes" + a == b);
1077
 
27829 tejbeer 1078
	});
28908 tejbeer 1079
 
28600 amit.gupta 1080
	var table = $('#OnboardingDesign').DataTable();
1081
	$(document).on('dblclick', '#OnboardingDesign tbody tr', function() {
27813 tejbeer 1082
 
28600 amit.gupta 1083
		var data = table.row(this).data();
28908 tejbeer 1084
 
1085
		$(this).find(":input").attr('disabled', false).show();
29300 manish 1086
		$(this).find(":selected").attr('disabled', true);
28908 tejbeer 1087
 
1088
		$(this).find("input[name=acquireddate]").attr('disabled', true);
1089
		$(this).find("input[name=outlateName]").attr('disabled', true);
1090
		$(this).find("input[name=phonenumber1]").attr('disabled', true);
1091
		$(this).find("input[name=kyc1]").attr('disabled', true);
1092
		$(this).find("input[name=city1]").attr('disabled', true);
1093
		$(this).find("input[name=shead1]").attr('disabled', true);
1094
		$(this).find("input[name=bdm1]").attr('disabled', true);
1095
		$(this).find("input[name=abrand1]").attr('disabled', true);
1096
		$(this).find("input[name=recbrand1]").attr('disabled', true);
1097
		$(this).find("input[name=BrandFeesdate1]").attr('disabled', true);
1098
		$(this).find("input[name=idate1]").attr('disabled', true);
1099
		$(this).find("input[name=loi1]").attr('disabled', true);
1100
		$(this).find("input[name=code1]").attr('disabled', true);
1101
		$(this).find("input[name=rplaned1]").attr('disabled', true);
1102
		$(this).find("input[name=stockPaymentDesign]").attr('disabled', true);
1103
		$(this).find("input[name=twoDBoq1]").attr('disabled', true);
1104
		$(this).find("input[name=threeBoqDate1]").attr('disabled', true);
1105
		$(this).find("input[name=poVenderDate1]").attr('disabled', true);
1106
		$(this).find("input[name=briefingPartnerPlanedDate1]").attr('disabled', true);
1107
		$(this).find("input[name=deploymentPlanedDate]").attr('disabled', true);
1108
		$(this).find("input[name=FinalPicsOutLets]").attr('disabled', true);
1109
		$(this).find("input[name=poVenderDate1]").attr('disabled', true);
28600 amit.gupta 1110
		$(this).css("background-color", "#87d3f8");
28908 tejbeer 1111
		let a = 12;
1112
		let b = 12;
1113
		console.log("yes" + a == b);
1114
 
28600 amit.gupta 1115
	});
1116
 
1117
 
29088 tejbeer 1118
	var billingtable = $('#partnerbilling').DataTable();
1119
	$(document).on('dblclick', '#partnerbilling tbody tr', function() {
1120
		var data = billingtable.row(this).data();
1121
 
1122
		$(this).find(":input").attr('disabled', false).show();
1123
 
1124
 
1125
	});
1126
 
1127
	$(document)
1128
		.on(
1129
			'click',
1130
			".submitOnboardingBilling",
1131
			function() {
1132
 
1133
				var row = $(this).closest("tr");
1134
				console.log(row);
1135
 
1136
				var onboardingId = $(row).find("td:eq(0)").text();
29559 manish 1137
				var stockPayment = $(row).find("td:eq(5) input[type='text']").val();
1138
				var advStock = $(row).find("td:eq(4) input[type='date']").val();
1139
				if (advStock != "") {
1140
					advStock = advStock + "T00:00:00";
1141
				}
29763 tejbeer 1142
 
29088 tejbeer 1143
				var billingStatus = $(row)
29559 manish 1144
					.find("td:eq(6) input[type='checkbox']").is(":checked") ? 1 : 0;
29088 tejbeer 1145
 
29763 tejbeer 1146
				doPostAjaxRequestHandler(context + "/partnerOnBoardingBillingSubmission?billingStatus=" + billingStatus + "&onBoardingId=" + onboardingId + "&advStock=" + advStock + "&stockPayment=" + stockPayment,
29088 tejbeer 1147
					function(response) {
1148
						row.html(response);
1149
						alert("successfully submit");
1150
 
1151
 
1152
 
1153
					});
1154
			});
1155
 
1156
 
27829 tejbeer 1157
	$(document).on('click', ".delete", function() {
27813 tejbeer 1158
 
27829 tejbeer 1159
		var id = $(this).data('id');
1160
		console.log('helo');
1161
		var id = $(this).data('id');
1162
		console.log(id);
1163
		if (confirm("Are you sure your outlet is open") == true) {
1164
			doPostAjaxRequestHandler(context + "/partnerOnBoardingOpen?id=" + id,
1165
				function(response) {
27813 tejbeer 1166
 
27829 tejbeer 1167
					console.log("reponse" + response);
1168
					if (response == 'true') {
1169
						alert("congratulations your outlet is successfully open");
27813 tejbeer 1170
 
27829 tejbeer 1171
						panelListing("main-content");
1172
					}
1173
				});
1174
		}
27813 tejbeer 1175
 
27829 tejbeer 1176
	});
28600 amit.gupta 1177
	$(document).on('click', ".design-complete", function() {
1178
		var id = $(this).data('id');
29007 manish 1179
		var row = $(this).closest("tr");
28600 amit.gupta 1180
		console.log('helo');
29007 manish 1181
		var receeActual = $(row).find("td:eq(14) input[type='date']").val();
1182
		if (receeActual != "") {
1183
			receeActual = receeActual + "T00:00:00";
1184
		}
1185
		var twoDBoqdate = $(row).find("td:eq(17) input[type='date']").val();
1186
		if (twoDBoqdate != "") {
1187
			twoDBoqdate = twoDBoqdate + "T00:00:00";
1188
		}
29061 tejbeer 1189
 
29007 manish 1190
		var poVenderDate = $(row).find("td:eq(23) input[type='date']").val();
1191
		if (poVenderDate != "") {
1192
			poVenderDate = poVenderDate + "T00:00:00";
1193
		}
1194
		var briefingPartner = $(row).find("td:eq(25) input[type='date']").val();
1195
		if (briefingPartner != "") {
1196
			briefingPartner = briefingPartner + "T00:00:00";
1197
		}
29061 tejbeer 1198
 
29007 manish 1199
		var deploymentDate = $(row).find("td:eq(27) input[type='date']").val();
1200
		if (deploymentDate != "") {
1201
			deploymentDate = deploymentDate + "T00:00:00";
1202
		}
29061 tejbeer 1203
 
29007 manish 1204
		var nocDate = $(row).find("td:eq(31) input[type='date']").val();
1205
		if (nocDate != "") {
1206
			nocDate = nocDate + "T00:00:00";
1207
		}
29061 tejbeer 1208
 
1209
		if (receeActual == "") {
29007 manish 1210
			alert("Please Fill The Recee Actual Date");
1211
			return
29061 tejbeer 1212
 
29007 manish 1213
		}
29061 tejbeer 1214
		if (twoDBoqdate == "") {
29007 manish 1215
			alert("Please Fill The 2D with BOQ Actual Date");
1216
			return
29061 tejbeer 1217
 
29007 manish 1218
		}
29088 tejbeer 1219
		if (poVenderDate == "") {
29007 manish 1220
			alert("Please Fill The PO To Vendor Actual Date");
1221
			return
29061 tejbeer 1222
 
29007 manish 1223
		}
29061 tejbeer 1224
		if (briefingPartner == "") {
29007 manish 1225
			alert("Please Fill The Briefing Partner Actual Date ");
1226
			return
29061 tejbeer 1227
 
29007 manish 1228
		}
29061 tejbeer 1229
 
1230
		if (deploymentDate == "") {
29007 manish 1231
			alert("Please Fill The Deployment Actual Date ");
1232
			return
29061 tejbeer 1233
 
29007 manish 1234
		}
29061 tejbeer 1235
		if (nocDate == "") {
29007 manish 1236
			alert("Please Fill The NOC Actual Date ");
1237
			return
29061 tejbeer 1238
 
29007 manish 1239
		}
29061 tejbeer 1240
 
1241
 
1242
 
28600 amit.gupta 1243
		var id = $(this).data('id');
1244
		console.log(id);
1245
		if (confirm("Are you sure your Design TAT is Complete") == true) {
1246
			doPostAjaxRequestHandler(context + "/partnerDesignTatCompleted?id=" + id,
1247
				function(response) {
27813 tejbeer 1248
 
28600 amit.gupta 1249
					console.log("reponse" + response);
1250
					if (response == 'true') {
1251
						alert("congratulations your Desiging is successfully Done");
29061 tejbeer 1252
						partnerOnboardingDesign("main-content");
28600 amit.gupta 1253
					}
1254
				});
1255
		}
1256
 
1257
	});
1258
 
1259
 
27829 tejbeer 1260
	$(document).on('click', ".rejectpartneronboarding", function() {
1261
		var id = $(this).data('id');
1262
		console.log('helo');
1263
		var id = $(this).data('id');
1264
		console.log(id);
1265
		if (confirm("Are you sure you want to reject the request") == true) {
1266
			doPostAjaxRequestHandler(context + "/partnerOnBoardingReject?id=" + id,
1267
				function(response) {
1268
 
1269
					console.log("reponse" + response);
1270
					if (response == 'true') {
1271
						alert("successfully rejected");
1272
						panelListing("main-content");
1273
					}
1274
				});
1275
		}
1276
 
1277
	});
1278
 
29794 tejbeer 1279
 
1280
 
1281
 
1282
 
27763 tejbeer 1283
});
1284
 
27855 tejbeer 1285
$(document).on('click', ".Del", function() {
28908 tejbeer 1286
	var $td = $(this).closest("td");
1287
	//var delDoc=	$(this).closest('td').find('.gst', "input[type=hidden]").val();
27855 tejbeer 1288
	//var columnName= $(this).closest('td' , "input[type=hidden]").val();
28908 tejbeer 1289
	var dataDel = $td.find("input[type=hidden]").val('0');
1290
	dataDel = 0;
27855 tejbeer 1291
	console.log(dataDel);
28715 amit.gupta 1292
	if (confirm("Are you sure you want to delete this doc") == true) {
27813 tejbeer 1293
 
28908 tejbeer 1294
		if (dataDel == 0) {
1295
			$td.css({ 'background-color': 'pink' });
1296
			console.log("true");
1297
			$td.find('a', ".download").hide();
1298
			$td.find('a', ".Del").hide();
1299
		}
27855 tejbeer 1300
 
28908 tejbeer 1301
	}
1302
});
28600 amit.gupta 1303
 
28908 tejbeer 1304
 
1305
 
27813 tejbeer 1306
 
1307
 
29794 tejbeer 1308
 
1309
 
1310
 
27829 tejbeer 1311
function panelListing(domId) {
1312
	doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
1313
		function(response) {
1314
			$('#' + domId).html(response);
1315
		});
1316
}
27813 tejbeer 1317
 
1318
 
1319
 
27829 tejbeer 1320
 
27763 tejbeer 1321
function panelListing(domId) {
1322
	doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
1323
		function(response) {
1324
			$('#' + domId).html(response);
1325
		});
1326
}
27799 tejbeer 1327
function partnerOnboardingOpen(domId) {
1328
	doAjaxRequestHandler(context + "/partnerOnBoardingOpenShow", "GET",
1329
		function(response) {
1330
			$('#' + domId).html(response);
1331
		});
1332
}
28600 amit.gupta 1333
 
1334
function partnerOnboardinDesignCompleted(domId) {
1335
	doAjaxRequestHandler(context + "/DesignTatCompletedShow", "GET",
1336
		function(response) {
1337
			$('#' + domId).html(response);
1338
		});
1339
}
1340
 
1341
function partnerOnboardingDesign(domId) {
1342
	doAjaxRequestHandler(context + "/partnerOnBoardingDesign", "GET",
1343
		function(response) {
1344
			$('#' + domId).html(response);
1345
		});
1346
}
1347
 
27799 tejbeer 1348
function partnerOnboardingReject(domId) {
1349
	doAjaxRequestHandler(context + "/partnerOnBoardingRejectShow", "GET",
1350
		function(response) {
1351
			$('#' + domId).html(response);
1352
		});
1353
}
27763 tejbeer 1354
 
27813 tejbeer 1355
 
27763 tejbeer 1356
function panelOnBoardingListing(domId) {
1357
	doAjaxRequestHandler(context + "/partnerOnBoardingListing", "POST",
1358
		function(response) {
1359
			$('#' + domId).html(response);
1360
		});
1361
 
1362
}
1363
 
1364
 
28908 tejbeer 1365
function panelListing(domId) {
1366
	doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
1367
		function(response) {
1368
			$('#' + domId).html(response);
1369
		});
1370
}
27763 tejbeer 1371
 
1372
 
27842 tejbeer 1373
 
28908 tejbeer 1374