Commit f5c2a25ae70453b6d01de748d2e807bd714fc330
1 parent
856f692349
Exists in
master
minor change
Showing
1 changed file
with
5 additions
and
50 deletions
Show diff stats
script.js
... | ... | @@ -368,7 +368,6 @@ |
368 | 368 | $scope.hidevalue = false; |
369 | 369 | localStorage.setItem("country",'INDIA'); |
370 | 370 | $scope.isShowHide = function (value) { |
371 | - console.log('--0-00-',value); | |
372 | 371 | var element = document.getElementById("defaultcountry"); |
373 | 372 | element.classList.remove("btn-active"); |
374 | 373 | localStorage.setItem("country",value); |
... | ... | @@ -410,7 +409,6 @@ |
410 | 409 | |
411 | 410 | // $scope.data.city = ''; |
412 | 411 | $scope.watch = function(value){ |
413 | - console.log("====",value); | |
414 | 412 | //document.getElementById("ahmedabad").src = ""; |
415 | 413 | // console.log("cllll",value) |
416 | 414 | $scope.data.city = value; |
... | ... | @@ -678,7 +676,6 @@ |
678 | 676 | // $scope.$on('city', function (event, value) { |
679 | 677 | $scope.data.city = localStorage.getItem("city"); |
680 | 678 | $scope.data.country = localStorage.getItem("country"); |
681 | - console.log("HERE===",$scope.data.country ); | |
682 | 679 | // }); |
683 | 680 | var data = { |
684 | 681 | "amount": $scope.payingAmnt, |
... | ... | @@ -716,7 +713,6 @@ |
716 | 713 | |
717 | 714 | $scope.ngShowhide = false; |
718 | 715 | $scope.GetValue = function(){ |
719 | - console.log("====$scope.value===",$scope.data.sector) | |
720 | 716 | if($scope.data.sector == "Other"){ |
721 | 717 | $scope.ngShowhide = true; |
722 | 718 | }else{ |
... | ... | @@ -725,7 +721,6 @@ |
725 | 721 | } |
726 | 722 | |
727 | 723 | $rootScope.tokenCall = function(val) { |
728 | - console.log('val-------->', val); | |
729 | 724 | if (val == undefined) { |
730 | 725 | $('#invalidToken').css('display', 'block'); |
731 | 726 | } else { |
... | ... | @@ -736,14 +731,11 @@ |
736 | 731 | } |
737 | 732 | $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": "' + val + '"}}') |
738 | 733 | .then(function(searchResult) { |
739 | - console.log("searchResult",searchResult) | |
740 | 734 | if (searchResult.data.length == 0) { |
741 | 735 | $scope.tokencheck = false; |
742 | 736 | $scope.discountAmount = 0; |
743 | 737 | } else { |
744 | - console.log("===searchResult.data[0].discount===",searchResult.data[0].discount); | |
745 | 738 | $scope.discountpercentage = searchResult.data[0].discount; |
746 | - console.log("===searchResultdiscountpercentage===",$scope.discountpercentage); | |
747 | 739 | $scope.tokencheck = true; |
748 | 740 | } |
749 | 741 | },function(err){ |
... | ... | @@ -752,7 +744,6 @@ |
752 | 744 | |
753 | 745 | } |
754 | 746 | }; |
755 | - console.log("$scope.data.country",$scope.data.country) | |
756 | 747 | if($scope.data.country == "INDIA"){ |
757 | 748 | $scope.submit = function() { |
758 | 749 | Analytics.trackEvent('register', 'click', 'Registration'); |
... | ... | @@ -774,11 +765,9 @@ |
774 | 765 | $scope.data.referalToken = "NA" |
775 | 766 | } |
776 | 767 | var file =document.getElementById('filePicker').files[0]; |
777 | - //console.log("file",filePicker) | |
778 | 768 | var image = BASE_URL+'/containers/images/download/' |
779 | 769 | var imagePath = file.name; |
780 | 770 | $scope.data.uploadFile = image + imagePath; |
781 | - //console.log($scope.data.uploadFile) | |
782 | 771 | var fd = new FormData() |
783 | 772 | fd.append('filePicker',file); |
784 | 773 | var deferred = $q.defer(); |
... | ... | @@ -797,34 +786,23 @@ |
797 | 786 | data: $scope.data, |
798 | 787 | headers: {} |
799 | 788 | }).then(function mySuccess(result) { |
800 | - console.log("=====result=====",result) | |
801 | - $scope.detail = result; | |
789 | + $scope.detail = result; | |
802 | 790 | data.applicantId = result.data.id; |
803 | 791 | $scope.userId = result.data.id; |
804 | - console.log("=====data=====",data) | |
805 | 792 | var amount = $scope.ticketAmnt * 100 |
806 | 793 | if($scope.tokencheck == true){ |
807 | 794 | var amount = $scope.ticketAmnt |
808 | - console.log("====$scope.discountpercentage====",$scope.discountpercentage); | |
809 | 795 | console.log("resultcity===",$scope.data.city) |
810 | 796 | if($scope.discountpercentage == "100") { |
811 | 797 | $scope.discountpercentage = "99.9"; |
812 | - console.log("$scope.discountpercentage====",$scope.discountpercentage) | |
813 | 798 | } |
814 | - console.log("====$scope.discountpercentage====",$scope.discountpercentage); | |
815 | 799 | $scope.percDiscount = $scope.discountpercentage/100; |
816 | - console.log("====$scope.percDiscount====",$scope.percDiscount); | |
817 | - console.log("====amount=====",amount); | |
818 | 800 | $scope.discountAmount = amount * $scope.percDiscount; |
819 | - console.log("finalAmount====>",$scope.discountAmount) | |
820 | 801 | } |
821 | 802 | var taxAmount = $scope.ticketAmnt - $scope.discountAmount |
822 | - console.log("$scope.taxTotal----",taxAmount) | |
823 | 803 | $scope.payingAmnt = taxAmount; |
824 | - console.log("====$scope.payingAmnt====",$scope.payingAmnt) | |
825 | 804 | $scope.payingAmnt = $scope.payingAmnt.toFixed() |
826 | 805 | data.amount = $scope.payingAmnt; |
827 | - console.log("data.amount==",data.amount) | |
828 | 806 | if($scope.detail != null){ |
829 | 807 | $http({ |
830 | 808 | method: 'POST', |
... | ... | @@ -832,8 +810,7 @@ |
832 | 810 | data: data, |
833 | 811 | headers: {} |
834 | 812 | }).then(function mySuccess(paymentResult) { |
835 | - $scope.loading = false; | |
836 | - console.log("paymentResult",paymentResult) | |
813 | + $scope.loading = false; | |
837 | 814 | $("p").html(paymentResult.data.data) |
838 | 815 | }, function myError(error) { |
839 | 816 | }); |
... | ... | @@ -907,7 +884,6 @@ |
907 | 884 | Analytics.trackEvent('register', 'click', 'Registration'); |
908 | 885 | $scope.loading = true; |
909 | 886 | $scope.data.uploadFile = $scope.base64textString; |
910 | - console.log($scope.data.uploadFile) | |
911 | 887 | // if($scope.tokencheck == false){ |
912 | 888 | // $scope.data.referalToken = null; |
913 | 889 | // } |
... | ... | @@ -946,34 +922,22 @@ |
946 | 922 | data: $scope.data, |
947 | 923 | headers: {} |
948 | 924 | }).then(function mySuccess(result) { |
949 | - console.log("=====result=====",result) | |
950 | - $scope.detail = result; | |
925 | + $scope.detail = result; | |
951 | 926 | data.applicantId = result.data.id; |
952 | 927 | $scope.userId = result.data.id; |
953 | - console.log("=====data=====",data) | |
954 | 928 | var amount = $scope.ticketAmnt * 100 |
955 | 929 | if($scope.tokencheck == true){ |
956 | 930 | var amount = $scope.ticketAmnt |
957 | - console.log("====$scope.discountpercentage====",$scope.discountpercentage); | |
958 | - console.log("resultcity===",$scope.data.city) | |
959 | 931 | if($scope.discountpercentage == "100") { |
960 | 932 | $scope.discountpercentage = "99.9"; |
961 | - console.log("$scope.discountpercentage====",$scope.discountpercentage) | |
962 | 933 | } |
963 | - console.log("====$scope.discountpercentage====",$scope.discountpercentage); | |
964 | 934 | $scope.percDiscount = $scope.discountpercentage/100; |
965 | - console.log("====$scope.percDiscount====",$scope.percDiscount); | |
966 | - console.log("====amount=====",amount); | |
967 | 935 | $scope.discountAmount = amount * $scope.percDiscount; |
968 | - console.log("finalAmount====>",$scope.discountAmount) | |
969 | 936 | } |
970 | 937 | var taxAmount = $scope.ticketAmnt - $scope.discountAmount |
971 | - console.log("$scope.taxTotal----",taxAmount) | |
972 | 938 | $scope.payingAmnt = taxAmount; |
973 | - console.log("====$scope.payingAmnt====",$scope.payingAmnt) | |
974 | 939 | $scope.payingAmnt = $scope.payingAmnt.toFixed() |
975 | 940 | data.amount = $scope.payingAmnt; |
976 | - console.log("data.amount==",data.amount) | |
977 | 941 | if($scope.detail != null){ |
978 | 942 | $http({ |
979 | 943 | method: 'POST', |
... | ... | @@ -981,8 +945,7 @@ |
981 | 945 | data: data, |
982 | 946 | headers: {} |
983 | 947 | }).then(function mySuccess(paymentResult) { |
984 | - $scope.loading = false; | |
985 | - console.log("paymentResult",paymentResult) | |
948 | + $scope.loading = false; | |
986 | 949 | $scope.paymentResult = paymentResult; |
987 | 950 | //$("p").html(paymentResult.data.data) |
988 | 951 | }, function myError(error) { |
... | ... | @@ -1021,21 +984,17 @@ |
1021 | 984 | rzp1.open(); |
1022 | 985 | $scope.paymentResponse = {}; |
1023 | 986 | function createPayment(response){ |
1024 | - console.log("response12333333",response) | |
1025 | - console.log("$scope.paymentResult",$scope.paymentResult) | |
1026 | 987 | $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; |
1027 | 988 | $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; |
1028 | 989 | $scope.paymentResponse.amount = data.amount; |
1029 | 990 | $scope.paymentResponse.currency = "INR"; |
1030 | 991 | $scope.paymentResponse.status = $scope.paymentResult.data.status; |
1031 | - console.log("$scope.paymentResponse.amount=====",$scope.paymentResponse.amount) | |
1032 | 992 | $http({ |
1033 | 993 | method: 'PUT', |
1034 | 994 | url: BASE_URL+'/payments/'+$scope.paymentResult.data.id, |
1035 | 995 | data: $scope.paymentResponse, |
1036 | 996 | headers: {} |
1037 | 997 | }).then(function mySuccess(searchResult) { |
1038 | - console.log("searchResult",searchResult) | |
1039 | 998 | $location.path("/confirm") |
1040 | 999 | }, function myError(error) { |
1041 | 1000 | }); |
... | ... | @@ -1062,7 +1021,6 @@ scotchApp.controller('confirmationController', function($scope, $http, $location |
1062 | 1021 | $scope.disApprovedMsg = false; |
1063 | 1022 | |
1064 | 1023 | var myParam = window.location.href.split('status=').splice(1).join('').split('&')[0] |
1065 | - console.log(myParam) | |
1066 | 1024 | // if(myParam){ |
1067 | 1025 | if(myParam == "approved"){ |
1068 | 1026 | $scope.approvedMsg = true; |
... | ... | @@ -1084,21 +1042,18 @@ scotchApp.controller('ambassadorController', function($scope, $http, $location, |
1084 | 1042 | $scope.numberCheck = false; |
1085 | 1043 | |
1086 | 1044 | $scope.submit = function() { |
1087 | - console.log($scope.data.name) | |
1088 | 1045 | //var randomNumber = ""+Math.random(); |
1089 | 1046 | var nameSpliced = $scope.data.name.slice(0,5); |
1090 | 1047 | //var numberSpliced = randomNumber.slice(2,4); |
1091 | - var numberSpliced = "15"; | |
1048 | + var numberSpliced = "99"; | |
1092 | 1049 | $scope.data.referalToken = nameSpliced+numberSpliced; |
1093 | 1050 | $scope.data.referalToken = $scope.data.referalToken.toUpperCase(); |
1094 | - console.log("dsdfs",numberSpliced); | |
1095 | 1051 | $http({ |
1096 | 1052 | method: 'POST', |
1097 | 1053 | url: BASE_URL + '/ambassadors', |
1098 | 1054 | data: $scope.data, |
1099 | 1055 | headers: {} |
1100 | 1056 | }).then(function mySuccess(result) { |
1101 | - console.log("result", result) | |
1102 | 1057 | $scope.detail = result; |
1103 | 1058 | $('#myModal').modal('show'); |
1104 | 1059 | $scope.data.name = ''; | ... | ... |