Subversion Repositories SmartDukaan

Rev

Rev 29841 | Rev 29887 | 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();
29884 tejbeer 647
		var status = $(row).find("td:eq(3) option:selected").val();
29794 tejbeer 648
 
649
 
29884 tejbeer 650
		var businessType = $(row).find("td:eq(4) option:selected").val();
651
		var firstName = $(row).find("td:eq(5) input[type='text']").val();
652
		var middleName = $(row).find("td:eq(6) input[type='text']").val();
653
		var lastName = $(row).find("td:eq(7) input[type='text']").val();
29794 tejbeer 654
 
29884 tejbeer 655
		var fatherName = $(row).find("td:eq(8) input[type='text']").val();
656
 
657
		var dob = $(row).find("td:eq(9) input[type='date']").val();
658
 
29794 tejbeer 659
		if (dob != "") {
660
 
661
			dob = dob + "T00:00:00";
662
		}
663
 
29884 tejbeer 664
		var gender = $(row).find("td:eq(10) option:selected").val();
665
		var maritalStatus = $(row).find("td:eq(11) option:selected").val();
29794 tejbeer 666
 
29884 tejbeer 667
		var email = $(row).find("td:eq(12) input[type='text']").val();
29794 tejbeer 668
 
29884 tejbeer 669
		var mobile = $(row).find("td:eq(13) input[type='text']").val();
670
		var pan = $(row).find("td:eq(14) input[type='text']").val();
29794 tejbeer 671
 
672
 
673
		var pandocId = $(row).find(".pandoc input[type=hidden]").val();
674
 
29884 tejbeer 675
		var poaNO = $(row).find("td:eq(16) input[type='text']").val();
676
		var poaType = $(row).find("td:eq(17) option:selected").val();
29794 tejbeer 677
 
678
		var paoFrontd = $(row).find(".paof input[type=hidden]").val();
679
		var paoBackId = $(row).find(".paob input[type=hidden]").val();
680
 
29884 tejbeer 681
		var address1 = $(row).find("td:eq(20) input[type='text']").val();
29794 tejbeer 682
 
29884 tejbeer 683
		var address2 = $(row).find("td:eq(21) input[type='text']").val();
29794 tejbeer 684
 
29884 tejbeer 685
		var address3 = $(row).find("td:eq(22) input[type='text']").val();
29794 tejbeer 686
 
29884 tejbeer 687
		var city = $(row).find("td:eq(23) input[type='text']").val();
29794 tejbeer 688
 
689
 
29884 tejbeer 690
		var state = $(row).find("td:eq(24) input[type='text']").val();
29794 tejbeer 691
 
29884 tejbeer 692
		var pincode = $(row).find("td:eq(25) input[type='text']").val();
29794 tejbeer 693
 
694
 
695
 
696
		console.log(city)
697
		if (dob === "") {
698
			alert("dob is required");
699
			return;
700
		}
701
 
702
 
703
		if (gender === "") {
704
			alert("gender is required");
705
			return;
706
		}
707
 
708
 
709
		if (fatherName === "") {
710
			alert("Father Name is required");
711
			return;
712
		}
713
 
714
		if (maritalStatus === "") {
715
			alert("Marital Status is required");
716
			return;
717
		}
718
 
719
		if (email === "") {
720
			alert("email is required");
721
			return;
722
		}
723
 
724
		if (mobile === "") {
725
			alert("mobile is required");
726
			return;
727
		}
728
 
729
		if (pan === "") {
730
			alert("pan is required");
731
			return;
732
		}
733
 
734
		if (pandocId === "") {
735
			alert("panDoc is required");
736
			return;
737
		}
738
 
739
		if (poaNO === "") {
740
			alert("paoNO is required");
741
			return;
742
		}
743
 
744
		if (poaType === "") {
745
			alert("paoType is required");
746
			return;
747
		}
748
 
749
		if (paoFrontd === "") {
750
			alert("paoFrontd is required");
751
			return;
752
		}
753
 
754
		if (paoBackId === "") {
755
			alert("paoBackId is required");
756
			return;
757
		}
758
 
759
		if (address1 === "") {
760
			alert("address1 is required");
761
			return;
762
		}
763
		if (address2 === "") {
764
			alert("address2 is required");
765
			return;
766
		}
767
 
768
		if (city === "") {
769
			alert("city is required");
770
			return;
771
		}
772
		if (state === "") {
773
			alert("state is required");
774
			return;
775
		}
776
 
777
		if (pincode === "") {
778
			alert("pincode is required");
779
			return;
780
		}
781
 
782
		var kycDetail = {};
783
		kycDetail['id'] = id
29884 tejbeer 784
		kycDetail['status'] = status
29794 tejbeer 785
		kycDetail['businessType'] = businessType
786
		kycDetail['firstName'] = firstName
787
		kycDetail['middleName'] = middleName
788
		kycDetail['lastName'] = lastName
789
 
790
		kycDetail['fatherName'] = fatherName
791
 
792
		kycDetail['dob'] = dob
793
		kycDetail['gender'] = gender
794
		kycDetail['maritalStatus'] = maritalStatus
795
		kycDetail['email'] = email
796
		kycDetail['mobile'] = mobile
797
		kycDetail['pan'] = pan
798
		kycDetail['pandocId'] = pandocId
799
		kycDetail['poaNo'] = poaNO
800
		kycDetail['poaType'] = poaType
801
		kycDetail['paoFrontd'] = paoFrontd
802
		kycDetail['paoBackId'] = paoBackId
803
 
804
		kycDetail['address1'] = address1
805
		kycDetail['address2'] = address2
806
		kycDetail['address3'] = address3
807
		kycDetail['city'] = city
808
		kycDetail['state'] = state
809
		kycDetail['pincode'] = pincode
810
 
811
		var jsonObject = JSON.stringify(kycDetail);
812
		console.log("kycDetail" + jsonObject);
813
 
814
		console.log(jsonObject);
815
 
816
		if (confirm("Are you sure you want to submit the request") == true) {
817
			doAjaxRequestWithJsonHandler(context + "/addlegalPartnerKyc", "POST", jsonObject, function(response) {
818
				row.html(response);
819
 
820
 
821
			});
822
		}
823
 
824
	});
825
 
27829 tejbeer 826
	$(document).on('click', ".partner-onboarding-index", function() {
27763 tejbeer 827
		panelListing("main-content");
828
	});
27813 tejbeer 829
 
830
 
831
	$(document).on('click', ".partner-onboarding-open", function() {
832
		console.log("yes");
27799 tejbeer 833
		partnerOnboardingOpen("main-content");
834
	});
28908 tejbeer 835
 
28600 amit.gupta 836
	$(document).on('click', ".design-completed", function() {
837
		console.log("yes");
838
		partnerOnboardinDesignCompleted("main-content");
839
	});
28908 tejbeer 840
 
28600 amit.gupta 841
	$(document).on('click', ".design_tat", function() {
842
		console.log("yes");
843
		partnerOnboardingDesign("main-content");
844
	});
27813 tejbeer 845
 
27829 tejbeer 846
	$(document).on('click', ".partner-onboarding-reject", function() {
27799 tejbeer 847
		console.log("helo");
27763 tejbeer 848
 
27799 tejbeer 849
		partnerOnboardingReject("main-content");
850
	});
851
 
29794 tejbeer 852
	$(document).on('input', 'table#legalkyctable input[type=file]', function() {
853
		if (confirm('Confirm upload ?')) {
854
			var fileSelector = $(this)[0];
855
			if (fileSelector != undefined
856
				&& fileSelector.files[0] != undefined) {
857
				var url = `${context}/document-upload`;
858
				console.log(url);
859
				var file = this.files[0];
860
				console.log("file" + file);
861
				let fileInput = $(this);
862
				console.log("fileInput" + file);
863
				doAjaxUploadRequestHandler(
864
					url,
865
					'POST',
866
					file,
867
					function(response) {
868
						console.log(response);
869
						var documentId = response.response.document_id;
870
						console.log("documentId : " + documentId);
871
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
872
					});
873
				// alert("Retailer Shop Document
874
				// is required");
875
			}
876
		} else {
877
			// Do nothing!
878
		}
879
	});
29763 tejbeer 880
 
29794 tejbeer 881
 
29763 tejbeer 882
	$(document).on('input', 'table#fofokyctable input[type=file]', function() {
883
		if (confirm('Confirm upload ?')) {
884
			var fileSelector = $(this)[0];
885
			if (fileSelector != undefined
886
				&& fileSelector.files[0] != undefined) {
887
				var url = `${context}/document-upload`;
888
				console.log(url);
889
				var file = this.files[0];
890
				console.log("file" + file);
891
				let fileInput = $(this);
892
				console.log("fileInput" + file);
893
				doAjaxUploadRequestHandler(
894
					url,
895
					'POST',
896
					file,
897
					function(response) {
898
						console.log(response);
899
						var documentId = response.response.document_id;
900
						console.log("documentId : " + documentId);
901
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
902
					});
903
				// alert("Retailer Shop Document
904
				// is required");
905
			}
906
		} else {
907
			// Do nothing!
908
		}
909
	});
910
 
27813 tejbeer 911
	$(document).on('input', 'table#example input[type=file]', function() {
912
		if (confirm('Confirm upload ?')) {
913
			var fileSelector = $(this)[0];
914
			if (fileSelector != undefined
915
				&& fileSelector.files[0] != undefined) {
916
				var url = `${context}/document-upload`;
917
				console.log(url);
918
				var file = this.files[0];
28908 tejbeer 919
				console.log("file" + file);
27813 tejbeer 920
				let fileInput = $(this);
28908 tejbeer 921
				console.log("fileInput" + file);
27813 tejbeer 922
				doAjaxUploadRequestHandler(
923
					url,
924
					'POST',
925
					file,
926
					function(response) {
927
						console.log(response);
928
						var documentId = response.response.document_id;
929
						console.log("documentId : " + documentId);
930
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
931
					});
932
				// alert("Retailer Shop Document
933
				// is required");
934
			}
935
		} else {
936
			// Do nothing!
937
		}
938
	});
29061 tejbeer 939
 
940
 
28977 manish 941
	$(document).on('input', 'table#partnerVerification input[type=file]', function() {
942
		if (confirm('Confirm upload ?')) {
943
			var fileSelector = $(this)[0];
944
			if (fileSelector != undefined
945
				&& fileSelector.files[0] != undefined) {
946
				var url = `${context}/document-upload`;
947
				console.log(url);
948
				var file = this.files[0];
949
				console.log("file" + file);
950
				let fileInput = $(this);
951
				console.log("fileInput" + file);
952
				doAjaxUploadRequestHandler(
953
					url,
954
					'POST',
955
					file,
956
					function(response) {
957
						console.log(response);
958
						var documentId = response.response.document_id;
959
						console.log("documentId : " + documentId);
960
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
961
					});
962
				// alert("Retailer Shop Document
963
				// is required");
964
			}
965
		} else {
966
			// Do nothing!
967
		}
968
	});
29061 tejbeer 969
 
970
 
971
 
28600 amit.gupta 972
	$(document).on('input', 'table#OnboardingDesign input[type=file]', function() {
973
		if (confirm('Confirm upload ?')) {
974
			var fileSelector = $(this)[0];
975
			if (fileSelector != undefined
976
				&& fileSelector.files[0] != undefined) {
977
				var url = `${context}/document-upload`;
978
				console.log(url);
979
				var file = this.files[0];
28908 tejbeer 980
				console.log("file" + file);
28600 amit.gupta 981
				let fileInput = $(this);
28908 tejbeer 982
				console.log("fileInput" + file);
28600 amit.gupta 983
				doAjaxUploadRequestHandler(
984
					url,
985
					'POST',
986
					file,
987
					function(response) {
988
						console.log(response);
989
						var documentId = response.response.document_id;
990
						console.log("documentId : " + documentId);
991
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
992
					});
993
				// alert("Retailer Shop Document
994
				// is required");
995
			}
996
		} else {
997
			// Do nothing!
998
		}
999
	});
27799 tejbeer 1000
 
27829 tejbeer 1001
	$(document).on('click', '#newmodal', function() {
29061 tejbeer 1002
 
1003
 
28977 manish 1004
		var prebookingListingObject = {};
1005
		var outletName = $('#outLetName1').val();
29061 tejbeer 1006
		var phoneNumber = $('#number1').val();
1007
 
1008
		if (outletName == "") {
1009
 
1010
			alert("outletName is required ");
1011
			return;
1012
		}
1013
		prebookingListingObject['outletName'] = $('#outLetName1').val();
1014
 
1015
		if (phoneNumber == "") {
1016
			alert("Phone Number is required ");
1017
			return false;
1018
 
1019
		}
1020
		if (phoneNumber.length > 6 && phoneNumber.length < 11) {
1021
 
1022
			prebookingListingObject['phoneNumber'] = $('#number1').val();
1023
 
1024
		}
1025
		else {
1026
			alert("Number should be greater then 6 and less then 11");
1027
			return false;
1028
 
1029
		}
1030
 
28977 manish 1031
		acquireddate1 = $('#acquireddate1').val();
1032
		if (acquireddate1 != "") {
1033
			acquireddate1 = acquireddate1 + "T00:00:00";
1034
		}
1035
		prebookingListingObject['authId'] = $('#authUserOnboarding').val();
27813 tejbeer 1036
 
28977 manish 1037
		prebookingListingObject['acquiredDate'] = acquireddate1
27813 tejbeer 1038
 
29061 tejbeer 1039
 
28977 manish 1040
		var json = JSON.stringify(prebookingListingObject);
27829 tejbeer 1041
		console.log(json);
1042
		doAjaxRequestWithJsonHandler(
1043
			context
1044
			+ "/partnerOnBoardingListing",
1045
			"POST",
1046
			json,
1047
			function(response) {
27813 tejbeer 1048
 
28908 tejbeer 1049
				panelListing("main-content");
1050
 
1051
 
27829 tejbeer 1052
			});
1053
	});
27813 tejbeer 1054
 
27829 tejbeer 1055
	var table = $('#example').DataTable();
1056
	$(document).on('dblclick', '#example tbody tr', function() {
27813 tejbeer 1057
 
27829 tejbeer 1058
		var data = table.row(this).data();
29061 tejbeer 1059
		var statusHold = $(this).find("td:eq(37) button[type='submit']").val();
1060
 
1061
		console.log("statusHold" + statusHold);
1062
		if (statusHold.localeCompare("hold")) {
1063
			$(this).find(":input").attr('disabled', true);
1064
			$(this).find("td:eq(37) button[type='submit']").attr('disabled', false);
1065
			$(this).find("td:eq(36) button[type='submit']").attr('disabled', false);
1066
		}
1067
		else {
1068
			$(this).find(":input").attr('disabled', false).show();
1069
			$(this).find(":selected").attr('disabled', false).show();
1070
 
1071
		}
28881 manish 1072
		$(this).find("input[name=rbmAuthId]").attr('disabled', true);
28900 manish 1073
		$(this).find("input[name=verificationStatusOnboarding]").attr('disabled', true);
29088 tejbeer 1074
		$(this).find("input[name=billingStatus]").attr('disabled', true);
29061 tejbeer 1075
 
29088 tejbeer 1076
 
27829 tejbeer 1077
		$(this).css("background-color", "#87d3f8");
29061 tejbeer 1078
		let a = 12;
1079
		let b = 12;
1080
		console.log("yes" + a == b);
1081
 
27829 tejbeer 1082
	});
28908 tejbeer 1083
 
28600 amit.gupta 1084
	var table = $('#OnboardingDesign').DataTable();
1085
	$(document).on('dblclick', '#OnboardingDesign tbody tr', function() {
27813 tejbeer 1086
 
28600 amit.gupta 1087
		var data = table.row(this).data();
28908 tejbeer 1088
 
1089
		$(this).find(":input").attr('disabled', false).show();
29300 manish 1090
		$(this).find(":selected").attr('disabled', true);
28908 tejbeer 1091
 
1092
		$(this).find("input[name=acquireddate]").attr('disabled', true);
1093
		$(this).find("input[name=outlateName]").attr('disabled', true);
1094
		$(this).find("input[name=phonenumber1]").attr('disabled', true);
1095
		$(this).find("input[name=kyc1]").attr('disabled', true);
1096
		$(this).find("input[name=city1]").attr('disabled', true);
1097
		$(this).find("input[name=shead1]").attr('disabled', true);
1098
		$(this).find("input[name=bdm1]").attr('disabled', true);
1099
		$(this).find("input[name=abrand1]").attr('disabled', true);
1100
		$(this).find("input[name=recbrand1]").attr('disabled', true);
1101
		$(this).find("input[name=BrandFeesdate1]").attr('disabled', true);
1102
		$(this).find("input[name=idate1]").attr('disabled', true);
1103
		$(this).find("input[name=loi1]").attr('disabled', true);
1104
		$(this).find("input[name=code1]").attr('disabled', true);
1105
		$(this).find("input[name=rplaned1]").attr('disabled', true);
1106
		$(this).find("input[name=stockPaymentDesign]").attr('disabled', true);
1107
		$(this).find("input[name=twoDBoq1]").attr('disabled', true);
1108
		$(this).find("input[name=threeBoqDate1]").attr('disabled', true);
1109
		$(this).find("input[name=poVenderDate1]").attr('disabled', true);
1110
		$(this).find("input[name=briefingPartnerPlanedDate1]").attr('disabled', true);
1111
		$(this).find("input[name=deploymentPlanedDate]").attr('disabled', true);
1112
		$(this).find("input[name=FinalPicsOutLets]").attr('disabled', true);
1113
		$(this).find("input[name=poVenderDate1]").attr('disabled', true);
28600 amit.gupta 1114
		$(this).css("background-color", "#87d3f8");
28908 tejbeer 1115
		let a = 12;
1116
		let b = 12;
1117
		console.log("yes" + a == b);
1118
 
28600 amit.gupta 1119
	});
1120
 
1121
 
29088 tejbeer 1122
	var billingtable = $('#partnerbilling').DataTable();
1123
	$(document).on('dblclick', '#partnerbilling tbody tr', function() {
1124
		var data = billingtable.row(this).data();
1125
 
1126
		$(this).find(":input").attr('disabled', false).show();
1127
 
1128
 
1129
	});
1130
 
1131
	$(document)
1132
		.on(
1133
			'click',
1134
			".submitOnboardingBilling",
1135
			function() {
1136
 
1137
				var row = $(this).closest("tr");
1138
				console.log(row);
1139
 
1140
				var onboardingId = $(row).find("td:eq(0)").text();
29559 manish 1141
				var stockPayment = $(row).find("td:eq(5) input[type='text']").val();
1142
				var advStock = $(row).find("td:eq(4) input[type='date']").val();
1143
				if (advStock != "") {
1144
					advStock = advStock + "T00:00:00";
1145
				}
29763 tejbeer 1146
 
29088 tejbeer 1147
				var billingStatus = $(row)
29559 manish 1148
					.find("td:eq(6) input[type='checkbox']").is(":checked") ? 1 : 0;
29088 tejbeer 1149
 
29763 tejbeer 1150
				doPostAjaxRequestHandler(context + "/partnerOnBoardingBillingSubmission?billingStatus=" + billingStatus + "&onBoardingId=" + onboardingId + "&advStock=" + advStock + "&stockPayment=" + stockPayment,
29088 tejbeer 1151
					function(response) {
1152
						row.html(response);
1153
						alert("successfully submit");
1154
 
1155
 
1156
 
1157
					});
1158
			});
1159
 
1160
 
27829 tejbeer 1161
	$(document).on('click', ".delete", function() {
27813 tejbeer 1162
 
27829 tejbeer 1163
		var id = $(this).data('id');
1164
		console.log('helo');
1165
		var id = $(this).data('id');
1166
		console.log(id);
1167
		if (confirm("Are you sure your outlet is open") == true) {
1168
			doPostAjaxRequestHandler(context + "/partnerOnBoardingOpen?id=" + id,
1169
				function(response) {
27813 tejbeer 1170
 
27829 tejbeer 1171
					console.log("reponse" + response);
1172
					if (response == 'true') {
1173
						alert("congratulations your outlet is successfully open");
27813 tejbeer 1174
 
27829 tejbeer 1175
						panelListing("main-content");
1176
					}
1177
				});
1178
		}
27813 tejbeer 1179
 
27829 tejbeer 1180
	});
28600 amit.gupta 1181
	$(document).on('click', ".design-complete", function() {
1182
		var id = $(this).data('id');
29007 manish 1183
		var row = $(this).closest("tr");
28600 amit.gupta 1184
		console.log('helo');
29007 manish 1185
		var receeActual = $(row).find("td:eq(14) input[type='date']").val();
1186
		if (receeActual != "") {
1187
			receeActual = receeActual + "T00:00:00";
1188
		}
1189
		var twoDBoqdate = $(row).find("td:eq(17) input[type='date']").val();
1190
		if (twoDBoqdate != "") {
1191
			twoDBoqdate = twoDBoqdate + "T00:00:00";
1192
		}
29061 tejbeer 1193
 
29007 manish 1194
		var poVenderDate = $(row).find("td:eq(23) input[type='date']").val();
1195
		if (poVenderDate != "") {
1196
			poVenderDate = poVenderDate + "T00:00:00";
1197
		}
1198
		var briefingPartner = $(row).find("td:eq(25) input[type='date']").val();
1199
		if (briefingPartner != "") {
1200
			briefingPartner = briefingPartner + "T00:00:00";
1201
		}
29061 tejbeer 1202
 
29007 manish 1203
		var deploymentDate = $(row).find("td:eq(27) input[type='date']").val();
1204
		if (deploymentDate != "") {
1205
			deploymentDate = deploymentDate + "T00:00:00";
1206
		}
29061 tejbeer 1207
 
29007 manish 1208
		var nocDate = $(row).find("td:eq(31) input[type='date']").val();
1209
		if (nocDate != "") {
1210
			nocDate = nocDate + "T00:00:00";
1211
		}
29061 tejbeer 1212
 
1213
		if (receeActual == "") {
29007 manish 1214
			alert("Please Fill The Recee Actual Date");
1215
			return
29061 tejbeer 1216
 
29007 manish 1217
		}
29061 tejbeer 1218
		if (twoDBoqdate == "") {
29007 manish 1219
			alert("Please Fill The 2D with BOQ Actual Date");
1220
			return
29061 tejbeer 1221
 
29007 manish 1222
		}
29088 tejbeer 1223
		if (poVenderDate == "") {
29007 manish 1224
			alert("Please Fill The PO To Vendor Actual Date");
1225
			return
29061 tejbeer 1226
 
29007 manish 1227
		}
29061 tejbeer 1228
		if (briefingPartner == "") {
29007 manish 1229
			alert("Please Fill The Briefing Partner Actual Date ");
1230
			return
29061 tejbeer 1231
 
29007 manish 1232
		}
29061 tejbeer 1233
 
1234
		if (deploymentDate == "") {
29007 manish 1235
			alert("Please Fill The Deployment Actual Date ");
1236
			return
29061 tejbeer 1237
 
29007 manish 1238
		}
29061 tejbeer 1239
		if (nocDate == "") {
29007 manish 1240
			alert("Please Fill The NOC Actual Date ");
1241
			return
29061 tejbeer 1242
 
29007 manish 1243
		}
29061 tejbeer 1244
 
1245
 
1246
 
28600 amit.gupta 1247
		var id = $(this).data('id');
1248
		console.log(id);
1249
		if (confirm("Are you sure your Design TAT is Complete") == true) {
1250
			doPostAjaxRequestHandler(context + "/partnerDesignTatCompleted?id=" + id,
1251
				function(response) {
27813 tejbeer 1252
 
28600 amit.gupta 1253
					console.log("reponse" + response);
1254
					if (response == 'true') {
1255
						alert("congratulations your Desiging is successfully Done");
29061 tejbeer 1256
						partnerOnboardingDesign("main-content");
28600 amit.gupta 1257
					}
1258
				});
1259
		}
1260
 
1261
	});
1262
 
1263
 
27829 tejbeer 1264
	$(document).on('click', ".rejectpartneronboarding", function() {
1265
		var id = $(this).data('id');
1266
		console.log('helo');
1267
		var id = $(this).data('id');
1268
		console.log(id);
1269
		if (confirm("Are you sure you want to reject the request") == true) {
1270
			doPostAjaxRequestHandler(context + "/partnerOnBoardingReject?id=" + id,
1271
				function(response) {
1272
 
1273
					console.log("reponse" + response);
1274
					if (response == 'true') {
1275
						alert("successfully rejected");
1276
						panelListing("main-content");
1277
					}
1278
				});
1279
		}
1280
 
1281
	});
1282
 
29794 tejbeer 1283
 
1284
 
1285
 
1286
 
27763 tejbeer 1287
});
1288
 
27855 tejbeer 1289
$(document).on('click', ".Del", function() {
28908 tejbeer 1290
	var $td = $(this).closest("td");
1291
	//var delDoc=	$(this).closest('td').find('.gst', "input[type=hidden]").val();
27855 tejbeer 1292
	//var columnName= $(this).closest('td' , "input[type=hidden]").val();
28908 tejbeer 1293
	var dataDel = $td.find("input[type=hidden]").val('0');
1294
	dataDel = 0;
27855 tejbeer 1295
	console.log(dataDel);
28715 amit.gupta 1296
	if (confirm("Are you sure you want to delete this doc") == true) {
27813 tejbeer 1297
 
28908 tejbeer 1298
		if (dataDel == 0) {
1299
			$td.css({ 'background-color': 'pink' });
1300
			console.log("true");
1301
			$td.find('a', ".download").hide();
1302
			$td.find('a', ".Del").hide();
1303
		}
27855 tejbeer 1304
 
28908 tejbeer 1305
	}
1306
});
28600 amit.gupta 1307
 
28908 tejbeer 1308
 
1309
 
27813 tejbeer 1310
 
1311
 
29794 tejbeer 1312
 
1313
 
1314
 
27829 tejbeer 1315
function panelListing(domId) {
1316
	doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
1317
		function(response) {
1318
			$('#' + domId).html(response);
1319
		});
1320
}
27813 tejbeer 1321
 
1322
 
1323
 
27829 tejbeer 1324
 
27763 tejbeer 1325
function panelListing(domId) {
1326
	doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
1327
		function(response) {
1328
			$('#' + domId).html(response);
1329
		});
1330
}
27799 tejbeer 1331
function partnerOnboardingOpen(domId) {
1332
	doAjaxRequestHandler(context + "/partnerOnBoardingOpenShow", "GET",
1333
		function(response) {
1334
			$('#' + domId).html(response);
1335
		});
1336
}
28600 amit.gupta 1337
 
1338
function partnerOnboardinDesignCompleted(domId) {
1339
	doAjaxRequestHandler(context + "/DesignTatCompletedShow", "GET",
1340
		function(response) {
1341
			$('#' + domId).html(response);
1342
		});
1343
}
1344
 
1345
function partnerOnboardingDesign(domId) {
1346
	doAjaxRequestHandler(context + "/partnerOnBoardingDesign", "GET",
1347
		function(response) {
1348
			$('#' + domId).html(response);
1349
		});
1350
}
1351
 
27799 tejbeer 1352
function partnerOnboardingReject(domId) {
1353
	doAjaxRequestHandler(context + "/partnerOnBoardingRejectShow", "GET",
1354
		function(response) {
1355
			$('#' + domId).html(response);
1356
		});
1357
}
27763 tejbeer 1358
 
27813 tejbeer 1359
 
27763 tejbeer 1360
function panelOnBoardingListing(domId) {
1361
	doAjaxRequestHandler(context + "/partnerOnBoardingListing", "POST",
1362
		function(response) {
1363
			$('#' + domId).html(response);
1364
		});
1365
 
1366
}
1367
 
1368
 
28908 tejbeer 1369
function panelListing(domId) {
1370
	doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
1371
		function(response) {
1372
			$('#' + domId).html(response);
1373
		});
1374
}
27763 tejbeer 1375
 
1376
 
27842 tejbeer 1377
 
28908 tejbeer 1378