Subversion Repositories SmartDukaan

Rev

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

Rev 29559 Rev 29763
Line 31... Line 31...
31
		var rbmAuthId = $(row).find("td:eq(6) input[type='hidden']").val();
31
		var rbmAuthId = $(row).find("td:eq(6) input[type='hidden']").val();
32
 
32
 
33
		console.log(rbmAuthId)
33
		console.log(rbmAuthId)
34
 
34
 
35
		var data6 = $(row).find("td:eq(7) input[type='text']").val();
35
		var data6 = $(row).find("td:eq(7) input[type='text']").val();
36
		
36
 
37
		
37
 
38
		
38
 
39
		var data7 = $(row).find("td:eq(8) option:selected").val();
39
		var data7 = $(row).find("td:eq(8) option:selected").val();
40
		var data8 = $(row).find("td:eq(9) option:selected").val();
40
		var data8 = $(row).find("td:eq(9) option:selected").val();
41
 
41
 
42
		var data9 = $(row).find("td:eq(10) input[type='text']").val();
42
		var data9 = $(row).find("td:eq(10) input[type='text']").val();
43
		var data10 = $(row).find("td:eq(11) input[type='text']").val();
43
		var data10 = $(row).find("td:eq(11) input[type='text']").val();
Line 175... Line 175...
175
		var phoneNumber = $(row).find("td:eq(4) input[type='number']").val();
175
		var phoneNumber = $(row).find("td:eq(4) input[type='number']").val();
176
 
176
 
177
 
177
 
178
 
178
 
179
		var city = $(row).find("td:eq(5) input[type='text']").val();
179
		var city = $(row).find("td:eq(5) input[type='text']").val();
180
		
180
 
181
 
181
 
182
		var agreedBrandFees = $(row).find("td:eq(8) input[type='text']").val();
182
		var agreedBrandFees = $(row).find("td:eq(8) input[type='text']").val();
183
 
183
 
184
		console.log("agreedBrandFees" + agreedBrandFees);
184
		console.log("agreedBrandFees" + agreedBrandFees);
185
 
185
 
Line 285... Line 285...
285
		prebookingListingObject['acquiredDate'] = acquiredDate
285
		prebookingListingObject['acquiredDate'] = acquiredDate
286
 
286
 
287
		prebookingListingObject['phoneNumber'] = phoneNumber
287
		prebookingListingObject['phoneNumber'] = phoneNumber
288
 
288
 
289
		prebookingListingObject['city'] = city
289
		prebookingListingObject['city'] = city
290
	
290
 
291
 
291
 
292
		prebookingListingObject['agreedBrandFees'] = agreedBrandFees
292
		prebookingListingObject['agreedBrandFees'] = agreedBrandFees
293
 
293
 
294
		prebookingListingObject['investmentDate'] = investmentDate
294
		prebookingListingObject['investmentDate'] = investmentDate
295
		prebookingListingObject['loi'] = loi
295
		prebookingListingObject['loi'] = loi
Line 386... Line 386...
386
					}
386
					}
387
				});
387
				});
388
		}
388
		}
389
	});
389
	});
390
 
390
 
-
 
391
 
-
 
392
 
-
 
393
 
-
 
394
	$(document).on('click', ".addKyc", function() {
-
 
395
		var id = $(this).data('id');
-
 
396
		console.log(id);
-
 
397
		doAjaxRequestHandler(context + "/getFofoKyc?onBoardingId=" + id, "GET",
-
 
398
			function(response) {
-
 
399
 
-
 
400
				console.log(response)
-
 
401
				$('.' + "fofoKycContainer").html(response);
-
 
402
 
-
 
403
			});
-
 
404
 
-
 
405
	});
-
 
406
 
-
 
407
 
-
 
408
	var table = $('#fofokyctable').DataTable();
-
 
409
	$(document).on('dblclick', '#fofokyctable tbody tr', function() {
-
 
410
		console.log("dblclick");
-
 
411
		var data = table.row(this).data();
-
 
412
 
-
 
413
		$(this).find(":selected").attr('disabled', false).show();
-
 
414
		$(this).find(":input").attr('disabled', false).show();
-
 
415
 
-
 
416
 
-
 
417
	});
-
 
418
 
-
 
419
 
-
 
420
 
-
 
421
 
-
 
422
	$(document).on('click', '.addKycdetail', function() {
-
 
423
		var row = $(this).closest("tr");
-
 
424
 
-
 
425
		var onBoardingId = $(this).data('onboardingid');
-
 
426
 
-
 
427
		console.log(row);
-
 
428
		var rowIndex = $(this).closest('tr').prevAll().length;
-
 
429
		var id = $(row).find("td:eq(0)").text();
-
 
430
		var firstName = $(row).find("td:eq(1) input[type='text']").val();
-
 
431
		var middleName = $(row).find("td:eq(2) input[type='text']").val();
-
 
432
		var lastName = $(row).find("td:eq(3) input[type='text']").val();
-
 
433
 
-
 
434
		var dob = $(row).find("td:eq(4) input[type='date']").val();
-
 
435
 
-
 
436
		if (dob != "") {
-
 
437
 
-
 
438
			dob = dob + "T00:00:00";
-
 
439
		}
-
 
440
 
-
 
441
		var gender = $(row).find("td:eq(5) option:selected").val();
-
 
442
		var maritalStatus = $(row).find("td:eq(6) option:selected").val();
-
 
443
 
-
 
444
		var email = $(row).find("td:eq(7) input[type='text']").val();
-
 
445
 
-
 
446
		var mobile = $(row).find("td:eq(8) input[type='text']").val();
-
 
447
		var pan = $(row).find("td:eq(9) input[type='text']").val();
-
 
448
 
-
 
449
 
-
 
450
		var pandocId = $(row).find(".pandoc input[type=hidden]").val();
-
 
451
 
-
 
452
		var poaNO = $(row).find("td:eq(11) input[type='text']").val();
-
 
453
		var poaType = $(row).find("td:eq(12) option:selected").val();
-
 
454
 
-
 
455
		var paoFrontd = $(row).find(".paof input[type=hidden]").val();
-
 
456
		var paoBackId = $(row).find(".paob input[type=hidden]").val();
-
 
457
 
-
 
458
		var address1 = $(row).find("td:eq(15) input[type='text']").val();
-
 
459
 
-
 
460
		var address2 = $(row).find("td:eq(16) input[type='text']").val();
-
 
461
 
-
 
462
		var address3 = $(row).find("td:eq(17) input[type='text']").val();
-
 
463
 
-
 
464
		var city = $(row).find("td:eq(18) input[type='text']").val();
-
 
465
 
-
 
466
 
-
 
467
		var state = $(row).find("td:eq(19) input[type='text']").val();
-
 
468
 
-
 
469
		var pincode = $(row).find("td:eq(20) input[type='text']").val();
-
 
470
 
-
 
471
 
-
 
472
 
-
 
473
		console.log(city)
-
 
474
		if (dob === "") {
-
 
475
			alert("dob is required");
-
 
476
			return;
-
 
477
		}
-
 
478
 
-
 
479
 
-
 
480
		if (gender === "") {
-
 
481
			alert("gender is required");
-
 
482
			return;
-
 
483
		}
-
 
484
 
-
 
485
		if (maritalStatus === "") {
-
 
486
			alert("Marital Status is required");
-
 
487
			return;
-
 
488
		}
-
 
489
 
-
 
490
		if (email === "") {
-
 
491
			alert("email is required");
-
 
492
			return;
-
 
493
		}
-
 
494
 
-
 
495
		if (mobile === "") {
-
 
496
			alert("mobile is required");
-
 
497
			return;
-
 
498
		}
-
 
499
 
-
 
500
		if (pan === "") {
-
 
501
			alert("pan is required");
-
 
502
			return;
-
 
503
		}
-
 
504
 
-
 
505
		if (pandocId === "") {
-
 
506
			alert("panDoc is required");
-
 
507
			return;
-
 
508
		}
-
 
509
 
-
 
510
		if (poaNO === "") {
-
 
511
			alert("paoNO is required");
-
 
512
			return;
-
 
513
		}
-
 
514
 
-
 
515
		if (poaType === "") {
-
 
516
			alert("paoType is required");
-
 
517
			return;
-
 
518
		}
-
 
519
 
-
 
520
		if (paoFrontd === "") {
-
 
521
			alert("paoFrontd is required");
-
 
522
			return;
-
 
523
		}
-
 
524
 
-
 
525
		if (paoBackId === "") {
-
 
526
			alert("paoBackId is required");
-
 
527
			return;
-
 
528
		}
-
 
529
 
-
 
530
		if (address1 === "") {
-
 
531
			alert("address1 is required");
-
 
532
			return;
-
 
533
		}
-
 
534
		if (address2 === "") {
-
 
535
			alert("address2 is required");
-
 
536
			return;
-
 
537
		}
-
 
538
 
-
 
539
		if (city === "") {
-
 
540
			alert("city is required");
-
 
541
			return;
-
 
542
		}
-
 
543
		if (state === "") {
-
 
544
			alert("state is required");
-
 
545
			return;
-
 
546
		}
-
 
547
 
-
 
548
		if (pincode === "") {
-
 
549
			alert("pincode is required");
-
 
550
			return;
-
 
551
		}
-
 
552
 
-
 
553
		var kycDetail = {};
-
 
554
		kycDetail['id'] = id
-
 
555
 
-
 
556
		kycDetail['firstName'] = firstName
-
 
557
		kycDetail['middleName'] = middleName
-
 
558
		kycDetail['lastName'] = lastName
-
 
559
 
-
 
560
		kycDetail['dob'] = dob
-
 
561
		kycDetail['gender'] = gender
-
 
562
		kycDetail['maritalStatus'] = maritalStatus
-
 
563
		kycDetail['email'] = email
-
 
564
		kycDetail['mobile'] = mobile
-
 
565
		kycDetail['pan'] = pan
-
 
566
		kycDetail['pandocId'] = pandocId
-
 
567
		kycDetail['poaNo'] = poaNO
-
 
568
		kycDetail['poaType'] = poaType
-
 
569
		kycDetail['paoFrontd'] = paoFrontd
-
 
570
		kycDetail['paoBackId'] = paoBackId
-
 
571
 
-
 
572
		kycDetail['address1'] = address1
-
 
573
		kycDetail['address2'] = address2
-
 
574
		kycDetail['address3'] = address3
-
 
575
		kycDetail['city'] = city
-
 
576
		kycDetail['state'] = state
-
 
577
		kycDetail['pincode'] = pincode
-
 
578
		kycDetail['onboardingId'] = onBoardingId
-
 
579
 
-
 
580
		var jsonObject = JSON.stringify(kycDetail);
-
 
581
		console.log("kycDetail" + jsonObject);
-
 
582
 
-
 
583
		console.log(jsonObject);
-
 
584
 
-
 
585
		if (confirm("Are you sure you want to submit the request") == true) {
-
 
586
			doAjaxRequestWithJsonHandler(context + "/addPartnerKyc", "POST", jsonObject, function(response) {
-
 
587
				row.html(response);
-
 
588
 
-
 
589
 
-
 
590
			});
-
 
591
		}
-
 
592
 
-
 
593
	});
-
 
594
 
-
 
595
 
-
 
596
 
-
 
597
	$(document).on('click', ".addNewRow", function() {
-
 
598
		var id = $(this).data('id');
-
 
599
		console.log(id);
-
 
600
		doAjaxRequestHandler(context + "/addKycRow?onBoardingId=" + id, "GET",
-
 
601
			function(response) {
-
 
602
 
-
 
603
				console.log(response)
-
 
604
				$('.' + "fofoKycContainer").html(response);
-
 
605
 
-
 
606
			});
-
 
607
 
-
 
608
	})
-
 
609
 
391
	$(document).on('click', ".partner-onboarding-index", function() {
610
	$(document).on('click', ".partner-onboarding-index", function() {
392
		panelListing("main-content");
611
		panelListing("main-content");
393
	});
612
	});
394
 
613
 
395
 
614
 
Line 412... Line 631...
412
		console.log("helo");
631
		console.log("helo");
413
 
632
 
414
		partnerOnboardingReject("main-content");
633
		partnerOnboardingReject("main-content");
415
	});
634
	});
416
 
635
 
-
 
636
 
-
 
637
	$(document).on('input', 'table#fofokyctable input[type=file]', function() {
-
 
638
		if (confirm('Confirm upload ?')) {
-
 
639
			var fileSelector = $(this)[0];
-
 
640
			if (fileSelector != undefined
-
 
641
				&& fileSelector.files[0] != undefined) {
-
 
642
				var url = `${context}/document-upload`;
-
 
643
				console.log(url);
-
 
644
				var file = this.files[0];
-
 
645
				console.log("file" + file);
-
 
646
				let fileInput = $(this);
-
 
647
				console.log("fileInput" + file);
-
 
648
				doAjaxUploadRequestHandler(
-
 
649
					url,
-
 
650
					'POST',
-
 
651
					file,
-
 
652
					function(response) {
-
 
653
						console.log(response);
-
 
654
						var documentId = response.response.document_id;
-
 
655
						console.log("documentId : " + documentId);
-
 
656
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
-
 
657
					});
-
 
658
				// alert("Retailer Shop Document
-
 
659
				// is required");
-
 
660
			}
-
 
661
		} else {
-
 
662
			// Do nothing!
-
 
663
		}
-
 
664
	});
-
 
665
 
417
	$(document).on('input', 'table#example input[type=file]', function() {
666
	$(document).on('input', 'table#example input[type=file]', function() {
418
		if (confirm('Confirm upload ?')) {
667
		if (confirm('Confirm upload ?')) {
419
			var fileSelector = $(this)[0];
668
			var fileSelector = $(this)[0];
420
			if (fileSelector != undefined
669
			if (fileSelector != undefined
421
				&& fileSelector.files[0] != undefined) {
670
				&& fileSelector.files[0] != undefined) {
Line 647... Line 896...
647
				var stockPayment = $(row).find("td:eq(5) input[type='text']").val();
896
				var stockPayment = $(row).find("td:eq(5) input[type='text']").val();
648
				var advStock = $(row).find("td:eq(4) input[type='date']").val();
897
				var advStock = $(row).find("td:eq(4) input[type='date']").val();
649
				if (advStock != "") {
898
				if (advStock != "") {
650
					advStock = advStock + "T00:00:00";
899
					advStock = advStock + "T00:00:00";
651
				}
900
				}
652
				
901
 
653
				var billingStatus = $(row)
902
				var billingStatus = $(row)
654
					.find("td:eq(6) input[type='checkbox']").is(":checked") ? 1 : 0;
903
					.find("td:eq(6) input[type='checkbox']").is(":checked") ? 1 : 0;
655
 
904
 
656
				doPostAjaxRequestHandler(context + "/partnerOnBoardingBillingSubmission?billingStatus=" + billingStatus + "&onBoardingId=" + onboardingId +"&advStock=" + advStock + "&stockPayment=" +stockPayment,
905
				doPostAjaxRequestHandler(context + "/partnerOnBoardingBillingSubmission?billingStatus=" + billingStatus + "&onBoardingId=" + onboardingId + "&advStock=" + advStock + "&stockPayment=" + stockPayment,
657
					function(response) {
906
					function(response) {
658
						row.html(response);
907
						row.html(response);
659
						alert("successfully submit");
908
						alert("successfully submit");
660
 
909
 
661
 
910