Subversion Repositories SmartDukaan

Rev

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

Rev 29774 Rev 29794
Line 4... Line 4...
4
		doGetAjaxRequestHandler(context + "/partnerStoreTimeline",
4
		doGetAjaxRequestHandler(context + "/partnerStoreTimeline",
5
			function(response) {
5
			function(response) {
6
				$('#' + 'main-content').html(response);
6
				$('#' + 'main-content').html(response);
7
			});
7
			});
8
	});
8
	});
-
 
9
 
-
 
10
	$(document).on('click', ".legal-kyc", function() {
-
 
11
		doGetAjaxRequestHandler(context + "/getOpenPartnerPendingKyc",
-
 
12
			function(response) {
-
 
13
				$('#' + 'main-content').html(response);
-
 
14
			});
-
 
15
	});
-
 
16
 
9
	$(document).on('click', '.submit1', function() {
17
	$(document).on('click', '.submit1', function() {
10
		var row = $(this).closest("tr");
18
		var row = $(this).closest("tr");
11
		console.log(row);
19
		console.log(row);
12
		var rowIndex = $(this).closest('tr').prevAll().length;
20
		var rowIndex = $(this).closest('tr').prevAll().length;
13
 
21
 
Line 613... Line 621...
613
				console.log(response)
621
				console.log(response)
614
				$('.' + "fofoKycContainer").html(response);
622
				$('.' + "fofoKycContainer").html(response);
615
 
623
 
616
			});
624
			});
617
 
625
 
618
	})
626
	});
-
 
627
 
-
 
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
 
-
 
646
		var id = $(row).find("td:eq(1)").text();
-
 
647
		var businessType = $(row).find("td:eq(2) option:selected").val();
-
 
648
		var firstName = $(row).find("td:eq(3) input[type='text']").val();
-
 
649
		var middleName = $(row).find("td:eq(4) input[type='text']").val();
-
 
650
		var lastName = $(row).find("td:eq(5) input[type='text']").val();
-
 
651
 
-
 
652
		var fatherName = $(row).find("td:eq(6) input[type='text']").val();
-
 
653
 
-
 
654
		var dob = $(row).find("td:eq(7) input[type='date']").val();
-
 
655
 
-
 
656
		if (dob != "") {
-
 
657
 
-
 
658
			dob = dob + "T00:00:00";
-
 
659
		}
-
 
660
 
-
 
661
		var gender = $(row).find("td:eq(8) option:selected").val();
-
 
662
		var maritalStatus = $(row).find("td:eq(9) option:selected").val();
-
 
663
 
-
 
664
		var email = $(row).find("td:eq(10) input[type='text']").val();
-
 
665
 
-
 
666
		var mobile = $(row).find("td:eq(11) input[type='text']").val();
-
 
667
		var pan = $(row).find("td:eq(12) input[type='text']").val();
-
 
668
 
-
 
669
 
-
 
670
		var pandocId = $(row).find(".pandoc input[type=hidden]").val();
-
 
671
 
-
 
672
		var poaNO = $(row).find("td:eq(14) input[type='text']").val();
-
 
673
		var poaType = $(row).find("td:eq(15) option:selected").val();
-
 
674
 
-
 
675
		var paoFrontd = $(row).find(".paof input[type=hidden]").val();
-
 
676
		var paoBackId = $(row).find(".paob input[type=hidden]").val();
-
 
677
 
-
 
678
		var address1 = $(row).find("td:eq(18) input[type='text']").val();
-
 
679
 
-
 
680
		var address2 = $(row).find("td:eq(19) input[type='text']").val();
-
 
681
 
-
 
682
		var address3 = $(row).find("td:eq(20) input[type='text']").val();
-
 
683
 
-
 
684
		var city = $(row).find("td:eq(21) input[type='text']").val();
-
 
685
 
-
 
686
 
-
 
687
		var state = $(row).find("td:eq(22) input[type='text']").val();
-
 
688
 
-
 
689
		var pincode = $(row).find("td:eq(23) input[type='text']").val();
-
 
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
	});
619
 
821
 
620
	$(document).on('click', ".partner-onboarding-index", function() {
822
	$(document).on('click', ".partner-onboarding-index", function() {
621
		panelListing("main-content");
823
		panelListing("main-content");
622
	});
824
	});
623
 
825
 
Line 641... Line 843...
641
		console.log("helo");
843
		console.log("helo");
642
 
844
 
643
		partnerOnboardingReject("main-content");
845
		partnerOnboardingReject("main-content");
644
	});
846
	});
645
 
847
 
-
 
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
	});
-
 
876
 
646
 
877
 
647
	$(document).on('input', 'table#fofokyctable input[type=file]', function() {
878
	$(document).on('input', 'table#fofokyctable input[type=file]', function() {
648
		if (confirm('Confirm upload ?')) {
879
		if (confirm('Confirm upload ?')) {
649
			var fileSelector = $(this)[0];
880
			var fileSelector = $(this)[0];
650
			if (fileSelector != undefined
881
			if (fileSelector != undefined
Line 1043... Line 1274...
1043
				});
1274
				});
1044
		}
1275
		}
1045
 
1276
 
1046
	});
1277
	});
1047
 
1278
 
-
 
1279
 
-
 
1280
 
-
 
1281
 
-
 
1282
 
1048
});
1283
});
1049
 
1284
 
1050
$(document).on('click', ".Del", function() {
1285
$(document).on('click', ".Del", function() {
1051
	var $td = $(this).closest("td");
1286
	var $td = $(this).closest("td");
1052
	//var delDoc=	$(this).closest('td').find('.gst', "input[type=hidden]").val();
1287
	//var delDoc=	$(this).closest('td').find('.gst', "input[type=hidden]").val();
Line 1068... Line 1303...
1068
 
1303
 
1069
 
1304
 
1070
 
1305
 
1071
 
1306
 
1072
 
1307
 
-
 
1308
 
-
 
1309
 
-
 
1310
 
1073
function panelListing(domId) {
1311
function panelListing(domId) {
1074
	doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
1312
	doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
1075
		function(response) {
1313
		function(response) {
1076
			$('#' + domId).html(response);
1314
			$('#' + domId).html(response);
1077
		});
1315
		});