diff --git a/pages/ambassador.html b/pages/ambassador.html index ddb17e6..a60855a 100644 --- a/pages/ambassador.html +++ b/pages/ambassador.html @@ -41,8 +41,8 @@
location_city
- + diff --git a/pages/registration.html b/pages/registration.html index 7034c9b..53df223 100644 --- a/pages/registration.html +++ b/pages/registration.html @@ -22,7 +22,7 @@
- +
@@ -46,7 +46,7 @@
- +
@@ -70,7 +70,7 @@
- +
@@ -94,7 +94,7 @@
- +
@@ -123,7 +123,7 @@
- +
@@ -147,7 +147,7 @@
- +
@@ -171,7 +171,7 @@
- +
@@ -195,7 +195,7 @@
- +
@@ -224,7 +224,7 @@
- +
@@ -248,7 +248,7 @@
- +
diff --git a/script.js b/script.js index 5b862cf..378f8e4 100644 --- a/script.js +++ b/script.js @@ -17,11 +17,11 @@ controller: 'mainController' }) - // route for the paymentVerify page - .when('/pendingPayment/:id', { - templateUrl: 'pages/verify.html', - controller: 'verifyController' - }) + // // route for the paymentVerify page + // .when('/pendingPayment/:id', { + // templateUrl: 'pages/verify.html', + // controller: 'verifyController' + // }) // route for the ambassador page .when('/registration', { @@ -59,223 +59,6 @@ hide: false }; - // var maininvest = new Date("Dec 16, 2017 06:00:00").getTime(); - // // Update the count down every 1 second - // var x = setInterval(function() { - // // Get todays date and time - // var now = new Date().getTime(); - // // Find the distance between now an the count down date - // var distance = maininvest - now; - // // Time calculations for days, hours, minutes and seconds - // var days = Math.floor(distance / (1000 * 60 * 60 * 24)); - // var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - // var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - // var seconds = Math.floor((distance % (1000 * 60)) / 1000); - // $scope.timer = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s " - // // Output the result in an element with id="demo" - // document.getElementById("maininvest").innerHTML = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s "; - // // If the count down is over, write some text - // if (distance < 0) { - // // $scope.extendedAmount = - // clearInterval(x); - // document.getElementById("maininvest").innerHTML = "EXPIRED"; - // } - // }, 1000); - - // var pune = new Date("Nov 11, 2017 12:00:00").getTime(); - // // Update the count down every 1 second - // var x = setInterval(function() { - // // Get todays date and time - // var now = new Date().getTime(); - // // Find the distance between now an the count down date - // var distance = pune - now; - // // Time calculations for days, hours, minutes and seconds - // var days = Math.floor(distance / (1000 * 60 * 60 * 24)); - // var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - // var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - // var seconds = Math.floor((distance % (1000 * 60)) / 1000); - // $scope.timer = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s " - // // Output the result in an element with id="demo" - // document.getElementById("pune").innerHTML = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s "; - // // If the count down is over, write some text - // if (distance < 0) { - // clearInterval(x); - // document.getElementById("pune").innerHTML = "EXPIRED"; - // } - // }, 1000); - - // var mumbai = new Date("Nov 13, 2017 16:00:00").getTime(); - // // Update the count down every 1 second - // var x = setInterval(function() { - // // Get todays date and time - // var now = new Date().getTime(); - // // Find the distance between now an the count down date - // var distance = mumbai - now; - // // Time calculations for days, hours, minutes and seconds - // var days = Math.floor(distance / (1000 * 60 * 60 * 24)); - // var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - // var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - // var seconds = Math.floor((distance % (1000 * 60)) / 1000); - // $scope.timer = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s " - // // Output the result in an element with id="demo" - // document.getElementById("mumbai").innerHTML = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s "; - // // If the count down is over, write some text - // if (distance < 0) { - // clearInterval(x); - // document.getElementById("mumbai").innerHTML = "EXPIRED"; - // } - // }, 1000); - - // var ahmedabad = new Date("Nov 15, 2017 16:00:00").getTime(); - // // Update the count down every 1 second - // var x = setInterval(function() { - // // Get todays date and time - // var now = new Date().getTime(); - // // Find the distance between now an the count down date - // var distance = ahmedabad - now; - // // Time calculations for days, hours, minutes and seconds - // var days = Math.floor(distance / (1000 * 60 * 60 * 24)); - // var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - // var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - // var seconds = Math.floor((distance % (1000 * 60)) / 1000); - // $scope.timer = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s " - // // Output the result in an element with id="demo" - // document.getElementById("ahmedabad").innerHTML = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s "; - // // If the count down is over, write some text - // if (distance < 0) { - // clearInterval(x); - // document.getElementById("ahmedabad").innerHTML = "EXPIRED"; - // } - // }, 1000); - - // var jaipur = new Date("Nov 17, 2017 16:00:00").getTime(); - // // Update the count down every 1 second - // var x = setInterval(function() { - // // Get todays date and time - // var now = new Date().getTime(); - // // Find the distance between now an the count down date - // var distance = jaipur - now; - // // Time calculations for days, hours, minutes and seconds - // var days = Math.floor(distance / (1000 * 60 * 60 * 24)); - // var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - // var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - // var seconds = Math.floor((distance % (1000 * 60)) / 1000); - // $scope.timer = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s " - // // Output the result in an element with id="demo" - // document.getElementById("jaipur").innerHTML = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s "; - // // If the count down is over, write some text - // if (distance < 0) { - // clearInterval(x); - // document.getElementById("jaipur").innerHTML = "EXPIRED"; - // } - // }, 1000); - - // var bangalore = new Date("Nov 22, 2017 16:00:00").getTime(); - // // Update the count down every 1 second - // var x = setInterval(function() { - // // Get todays date and time - // var now = new Date().getTime(); - // // Find the distance between now an the count down date - // var distance = bangalore - now; - // // Time calculations for days, hours, minutes and seconds - // var days = Math.floor(distance / (1000 * 60 * 60 * 24)); - // var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - // var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - // var seconds = Math.floor((distance % (1000 * 60)) / 1000); - // $scope.timer = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s " - // // Output the result in an element with id="demo" - // document.getElementById("bangalore").innerHTML = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s "; - // // If the count down is over, write some text - // if (distance < 0) { - // clearInterval(x); - // document.getElementById("bangalore").innerHTML = "EXPIRED"; - // } - // }, 1000); - - // var hyderabad = new Date("Nov 21, 2017 16:00:00").getTime(); - // // Update the count down every 1 second - // var x = setInterval(function() { - // // Get todays date and time - // var now = new Date().getTime(); - // // Find the distance between now an the count down date - // var distance = hyderabad - now; - // // Time calculations for days, hours, minutes and seconds - // var days = Math.floor(distance / (1000 * 60 * 60 * 24)); - // var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - // var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - // var seconds = Math.floor((distance % (1000 * 60)) / 1000); - // $scope.timer = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s " - // // Output the result in an element with id="demo" - // document.getElementById("hyderabad").innerHTML = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s "; - // // If the count down is over, write some text - // if (distance < 0) { - // clearInterval(x); - // document.getElementById("hyderabad").innerHTML = "EXPIRED"; - // } - // }, 1000); - - // var delhi = new Date("Nov 27, 2017 12:00:00").getTime(); - // // Update the count down every 1 second - // var x = setInterval(function() { - // // Get todays date and time - // var now = new Date().getTime(); - // // Find the distance between now an the count down date - // var distance = delhi - now; - // // Time calculations for days, hours, minutes and seconds - // var days = Math.floor(distance / (1000 * 60 * 60 * 24)); - // var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - // var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - // var seconds = Math.floor((distance % (1000 * 60)) / 1000); - // $scope.timer = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s " - // // Output the result in an element with id="demo" - // document.getElementById("delhi").innerHTML = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s "; - // // If the count down is over, write some text - // if (distance < 0) { - // clearInterval(x); - // document.getElementById("delhi").innerHTML = "EXPIRED"; - // } - // }, 1000); - - // var chandigarh = new Date("Nov 30, 2017 12:00:00").getTime(); - // // Update the count down every 1 second - // var x = setInterval(function() { - // // Get todays date and time - // var now = new Date().getTime(); - // // Find the distance between now an the count down date - // var distance = chandigarh - now; - // // Time calculations for days, hours, minutes and seconds - // var days = Math.floor(distance / (1000 * 60 * 60 * 24)); - // var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - // var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - // var seconds = Math.floor((distance % (1000 * 60)) / 1000); - // $scope.timer = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s " - // // Output the result in an element with id="demo" - // document.getElementById("chandigarh").innerHTML = days + "d " + hours + "h " - // + minutes + "m " + seconds + "s "; - // // If the count down is over, write some text - // if (distance < 0) { - // clearInterval(x); - // document.getElementById("chandigarh").innerHTML = "EXPIRED"; - // } - // }, 1000); - $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ // $scope.Textshow = "yes" @@ -283,14 +66,7 @@ $scope.formPage = false; $scope.current = 0; $scope.payingAmnt = 0; - // if ($scope.data.stage == 'select') { - - // } - - //$scope.author = 'Swarn Singh'; $scope.data = {}; - // $scope.data.stage = 'Pitch your Business plan'; - // $scope.data.networkDinner = "true"; $scope.discountAmount = 0; // $scope.data.quantity = "1"; $scope.check = false; @@ -302,509 +78,21 @@ "status": "pending" } - /*open videos in modal*/ - // $scope.openyoutube16 = function(){ - // $('#videoModel').modal('show'); - // } - - // $scope.openyoutube17 = function(){ - // $('#videoModels').modal('show'); - // } - - // $scope.closeModal = function(){ - // var url = $('#youtubePlayer').attr('src'); - // $('#youtubePlayer').attr('src', ''); - // $('#youtubePlayer').attr('src', url); - // } - - - // $scope.closed = function(){ - // var url = $('#youtubePlayersss').attr('src'); - // $('#youtubePlayersss').attr('src', ''); - // $('#youtubePlayersss').attr('src', url); - // } - /*open videos ends here*/ $scope.apply = function() { - Analytics.trackEvent('register', 'click', 'Registration'); + //Analytics.trackEvent('register', 'click', 'Registration'); $location.path("/caricatures") } - // $scope.data.citymeetup = ''; - $scope.register = function(value){ - // $scope.data.citymeetup = value; - // if (value == 'mainevent') { - // $scope.eventType = true; - // $scope.mainType = false; - // $scope.data.stage = null; - // } - // else{ - // $scope.eventType = false; - // $scope.mainType = true; - // } - $('.hiddenForm').slideDown(); - $('html, body').animate({ - scrollTop: $('.hiddenForm').offset().top - }, 1000); - console.log('gdggsg', value); - } - - // $scope.removeError = function() { - // $('#invalidEmail').css('display', 'none'); - // $('#alreadyExist').css('display', 'none'); - // }; - - // $scope.emailcheck = function(val) { - // console.log(val) - // $scope.space = /\s/g.test(val); - // console.log("space",$scope.space) - // if (val == undefined) { - // $('#invalidEmail').css('display', 'block'); - // } else { - // $http({ - // method: 'GET', - // url: BASE_URL + '/applicants?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}', - // headers: {} - // }).then(function mySuccess(searchResult) { - // console.log("searchResult1===>", searchResult) - // if (searchResult.data.length == 0) { - // $scope.check = false; - // } else { - // $scope.check = true; - // $scope.emailId = searchResult.data[0].id - // $('#alreadyExist').css('display', 'block'); - - // } - // console.log("$scope.data.id",searchResult.data) - // }, function myError(error) {}); - // } - // }; - - // $scope.removeNoError = function() { - // $('#noExist').css('display', 'none'); - // }; - - // $scope.numbercheck = function(number) { - // $http({ - // method: 'GET', - // url: BASE_URL + '/applicants?filter={"where": {"phone": {"like":"%25' + number + '%25"}}}', - // data: $scope.data, - // headers: {} - // }).then(function mySuccess(searchResult) { - // console.log("searchResult===>", searchResult) - // if (searchResult.data.length == 0) { - // $scope.numberCheck = false; - - // } else { - // $scope.numberCheck = true; - // $('#noExist').css('display', 'block'); - // } - // }, function myError(error) {}); - // }; - - // $rootScope.tokenCall = function(val) { - // console.log('val-------->', val); - // if (val == undefined) { - // $('#invalidToken').css('display', 'block'); - // } else { - // val = val.toUpperCase(); - // $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": {"like":"%25' + val + '%25"}}}') - // .then(function(searchResult) { - // console.log("searchResult",searchResult) - // if (searchResult.data.length == 0) { - // $scope.tokencheck = false; - // $scope.discountAmount = 0; - // } else { - // $scope.discountpercentage = searchResult.data[0].discount; - // $scope.tokencheck = true; - // } - // },function(err){ - // console.log(err) - // }); - - // } - // }; - - // $scope.IfDinnerCheck = function(value){ - // $scope.data.networkDinner = value; - // console.log("value",value) - // } - - // /*THIS CODE FOR ENABLED SUBMIT BUTTON AFTER UPLOAD IMAGE*/ - // $(document).ready( - // function() { - // $('input:submit').attr('disabled', true); - // $('input:file').change( - // function() { - // if ($("#picture").val()) { - // $('input:submit').removeAttr('disabled'); - // } else { - // $('input:submit').attr('disabled', true); - // } - // }); - // }); - - /*****THIS IS FOR STEP ONE FORM ******/ - // $scope.next = function() { - // $scope.data.status = null - // if ($scope.data.stage == undefined || $scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined || $scope.data.city == undefined) { - // var x = document.getElementById("snackbar") - // x.className = "show"; - // setTimeout(function() { - // x.className = x.className.replace("show", ""); - // }, 3000); - // } else if ($scope.data.stage != undefined && $scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined && $scope.data.city != undefined) { - // $scope.infoForm = true; - // console.log("sdasdasdsa"); - // $scope.data.stage = $scope.data.stage; - // $scope.detail = {}; - // $scope.data.phone = "+91" + $scope.data.number; - // $http({ - // method: 'POST', - // url: BASE_URL + '/information', - // data: $scope.data, - // headers: {} - // }).then(function mySuccess(result) { - // Analytics.trackEvent('information', 'click', 'django.mp4'); - // console.log("result", result) - // $scope.detail = result; - // data.applicantId = result.data.id; - // $scope.userId = result.data.id; - - // }, function myError(error) {}); - - // } - - // } - $scope.watch = function(){ - console.log("cllll") - // window.open(url) - $location.path("/registration") - } - - $scope.calculateAmount = function(){ - if($scope.tokencheck == false){ - $scope.data.referalToken = null; - } - if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { - var x = document.getElementById("snackbar") - x.className = "show"; - setTimeout(function() { - x.className = x.className.replace("show", ""); - }, 3000); - } else if ($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { - $scope.infoForm = true; - console.log("sdasdasdsa"); - $scope.data.stage = $scope.data.stage; - $scope.detail = {}; - $scope.data.phone = "+91" + $scope.data.number; - $http({ - method: 'POST', - url: BASE_URL + '/applicants', - data: $scope.data, - headers: {} - }).then(function mySuccess(result) { - Analytics.trackEvent('applicants', 'click','Users'); - console.log("result", result) - $scope.detail = result; - data.applicantId = result.data.id; - //$scope.userId = result.data.id; - - if($scope.data.networkDinner == "true"){ - if($scope.data.citymeetup == "chandigarh"){ - if ($scope.data.stage == "Pitch your Business plan") { - console.log("$scope.data", $scope.data) - $scope.ticketAmnt = 3500; - $scope.ticketAmnt = parseInt($scope.data.quantity)*$scope.ticketAmnt; - } - - if ($scope.data.stage == "Pitch your Startup") { - $scope.ticketAmnt = 4250; - $scope.ticketAmnt = parseInt($scope.data.quantity)*$scope.ticketAmnt; - } - - // if ($scope.data.stage == "Growth") { - // $scope.ticketAmnt = 1400; - // } - } - } - - else{ - if($scope.data.citymeetup == "chandigarh"){ - if ($scope.data.stage == "Pitch your Business plan") { - console.log("$scope.data", $scope.data) - /*add 25%*/ - $scope.ticketAmnt = 1500 ; - $scope.ticketAmnt = parseInt($scope.data.quantity)*$scope.ticketAmnt; - } - - if ($scope.data.stage == "Pitch your Startup") { - $scope.ticketAmnt = 2250; - $scope.ticketAmnt = parseInt($scope.data.quantity)*$scope.ticketAmnt; - } - - // if ($scope.data.stage == "Growth") { - // $scope.ticketAmnt = 1400; - // } - } - } - - // else{ - // if ($scope.data.stage == "Pitch your Idea") { - // console.log("$scope.data", $scope.data) - // $scope.ticketAmnt = 500; - // } - - // if ($scope.data.stage == "Pitch your Startup") { - // $scope.ticketAmnt = 1000; - // } - - // // if ($scope.data.stage == "Growth") { - // // $scope.ticketAmnt = 1000; - // // } - // } - // if ($scope.data.stage == "Visitor") { - // $scope.ticketAmnt = 500; - // } - var amount = $scope.ticketAmnt * 100 - if($scope.tokencheck == true){ - var amount = $scope.ticketAmnt - $scope.discountAmount = (amount * $scope.discountpercentage)/100 - console.log("finalAmount====>",$scope.discountAmount) - } - - var taxAmount = $scope.ticketAmnt - $scope.discountAmount - console.log("$scope.taxTotal----",taxAmount) - $scope.taxTotal = (taxAmount * 18)/100 - $scope.payingAmnt = taxAmount + $scope.taxTotal - $scope.payingAmnt = $scope.payingAmnt.toFixed() - console.log("taxincludedamount----", $scope.payingAmnt) - console.log("$scope.taxTotal----", $scope.taxTotal) - // } - - /*****THIS IS FOR STEP THREE FORM ******/ - // $scope.create = function() { - // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { - // var x = document.getElementById("snackbar") - // x.className = "show"; - // setTimeout(function() { - // x.className = x.className.replace("show", ""); - // }, 3000); - // } else if ($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { - // $scope.infoForm = true; - // console.log("sdasdasdsa"); - // $scope.data.stage = $scope.data.stage; - // $scope.detail = {}; - // $scope.data.phone = "+91" + $scope.data.number; - // $http({ - // method: 'POST', - // url: BASE_URL + '/applicants', - // data: $scope.data, - // headers: {} - // }).then(function mySuccess(result) { - - // console.log("=====result=====", result) - // $scope.detail = result; - // data.applicantId = result.data.id; - // $scope.userId = result.data.id; - // console.log("=====data=====", data) - // data.amount = $scope.payingAmnt + $scope.taxTotal; - data.amount = $scope.payingAmnt; - console.log("$scope.taxTotal",data.amount) - if ($scope.detail != null) { - $http({ - method: 'POST', - url: BASE_URL + '/payments', - data: data, - headers: {} - }).then(function mySuccess(paymentResult) { - console.log("paymentResult",paymentResult) - $scope.paymentResult = paymentResult; - }, function myError(error) {}); - } - var i = 0; - //$scope.payingAmnt = ($scope.payingAmnt + $scope.taxTotal) * 100; - - $scope.payingAmnt = $scope.payingAmnt * 100; - - console.log("$scope.taxTotal----", $scope.payingAmnt) - var options = { - "key": "rzp_live_mkmCb4FkstuWaS", - //"key": "rzp_test_YwHsVFiDIQ2WUQ", - "amount": $scope.payingAmnt , - - "name": "Startup Jalsa", - "description": "amount", - "currency": "INR", - "status": "done", - - "theme": { - "color": "#2196f3 ", - "image_padding": "NO" - }, - "modal": { - "ondismiss": function() {} - }, - "handler": function(response) { - createPayment(response); - } - }; - var rzp1 = new Razorpay(options); - rzp1.open(); - $scope.paymentResponse = {}; - - function createPayment(response) { - console.log("response====from===razorpay",response) - $route.reload(); - $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; - $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; - $scope.paymentResponse.amount = data.amount; - $scope.paymentResponse.currency = "INR"; - $scope.paymentResponse.status = $scope.paymentResult.data.status; - Analytics.trackEvent('payment','Successfully Done',$scope.data.email,$scope.paymentResponse.amount); - $http({ - method: 'PUT', - url: BASE_URL + '/payments/' + $scope.paymentResult.data.id, - data: $scope.paymentResponse, - headers: {} - }).then(function mySuccess(searchResult) { - // if(paymentResult.data.status == "created"){ - - // } - console.log("searchResult", searchResult) - $location.path("/confirmation") - //$scope.showToastr() - //toaster.success("Registration done successfully"); - - }, function myError(error) {}); - } - }, function myError(error) { - console.log("error",error) - // $scope.emailId = error.data.error.message; - // $scope.id = error.data.error.id; - // $('#myModal').modal('show'); - }); - } - - } - - //}, function myError(error) {}); - //} - - //} - - // $scope.showToastr = function() { - // console.log("called toast") - // var x = document.getElementById("snacsskbar") - // x.className = "show"; - // setTimeout(function() { - // x.className = x.className.replace("show", ""); - // }, 3000); - // } - - /*kk***This code for change data when click to chooses stages***/ - $scope.proto = true; - $scope.businessmodel = true; - $scope.Idea = true; - $scope.current = true; - - $scope.stage = function(stage) { - $scope.stagekeyPress(); - console.log("stage--2",stage) - - if (stage == 'Pitch your Business plan') { - $scope.Productshow = "no"; - $scope.current = 10; - $scope.proto = true; - // $scope.visitType = true; - $scope.prototyp = false; - $scope.protyp = false; - $scope.market = false; - $scope.risks = false; - $scope.team = false; - $scope.pitch = false; - $scope.financials = false; - $scope.businessmodel = true; - $scope.data.stage = stage; - // for right content - $scope.Idea = true; - $scope.Product = false; - $scope.Growth = false; - // $scope.Visitor = false; - } else if (stage == 'Pitch your Startup') { - $scope.Productshow = "no"; - $scope.current = 10; - $scope.proto = true; - // $scope.visitType = true; - $scope.prototyp = true; - $scope.protyp = true; - $scope.market = true; - $scope.risks = true; - $scope.team = true; - $scope.pitch = true; - $scope.financials = true; - $scope.businessmodel = false; - $scope.data.stage = stage; - // for right content - $scope.Idea = false; - $scope.Product = true; - $scope.Growth = false; - // $scope.Visitor = false; - } else if (stage == 'Growth') { - $scope.Productshow = "yes"; - $scope.current = 10; - $scope.proto = false; - // $scope.visitType = true; - $scope.prototyp = true; - $scope.protyp = false; - $scope.market = true; - $scope.risks = true; - $scope.team = true; - $scope.pitch = true; - $scope.financials = true; - $scope.businessmodel = false; - // for right content - $scope.Idea = false; - $scope.Product = false; - $scope.Growth = true; - // $scope.Visitor = false; - // } else if (stage == 'Visitor') { - // $scope.Productshow = "no"; - // $scope.current = 10; - // $scope.proto = false; - // $scope.visitType = false; - // $scope.prototyp = false; - // $scope.protyp = false; - // $scope.market = false; - // $scope.risks = false; - // $scope.team = false; - // $scope.pitch = false; - // $scope.financials = false; - // $scope.businessmodel = false; - // $scope.data.stage = stage; - // // for right content - // $scope.Idea = false; - // $scope.Product = false; - // $scope.Growth = false; - // $scope.Visitor = true; - $scope.data.stage = stage; - } + $scope.data.city = ''; + $scope.watch = function(value){ + console.log("cllll",value) + $scope.data.city = value; + localStorage.setItem("city" ,value); + //$location.path('/registration').search({city: value}); + $location.path('/registration/'); + //$state.go('registration', { 'city': value}) } - // $scope.emailTest = function(s){ - // $scope.space = /\s/g.test(s.delegateTarget.value); - // console.log("space",$scope.space) - - // } - // $scope.enterbusiness = function(business) { - // console.log("business", business); - // if (name == undefined) { - // $scope.current = false; - - // } else if (name != undefined) { - // $scope.current = true; - // } - // } - /*******FOR FILL THE DATA AND SHOWS ICON GREEN*/ $scope.stagekeyPress = function() { $('.icon-circle-a').css('background-color', 'rgb(25, 104, 157)'); } @@ -823,15 +111,6 @@ $scope.industrykeyPress = function(quantity) { console.log("fghj",quantity) $('.icon-circle-abcdefg').css('background-color', 'rgb(25, 104, 157)'); - // $scope.addOther = false; - // $scope.hideSelectBox = true; - // $('.icon-circle-abcdefg').css('background-color', 'rgb(66, 181, 73)'); - // var e = document.getElementById("dataIndustry"); - // var dataIndustry = e.options[e.selectedIndex].value; - // if(dataIndustry == "others") { - // $scope.addOther = true; - // $scope.hideSelectBox = false; - // } } $scope.industryNamekeyPress = function(firstName) { @@ -865,30 +144,6 @@ } } - $scope.textCheck = function(){ - console.log("Val1:::", $scope.textCheck); - var e = document.getElementById("fundingDiv"); - var funding = e.options[e.selectedIndex].value; - $scope.Textshow = "no"; - if(funding == "yes") { - $scope.Textshow = "yes"; - console.log("Val:::", $scope.Textshow); - } - - } - - $scope.productCheck = function(){ - console.log("Val2:::", $scope.productCheck); - var e = document.getElementById("productDiv"); - var product = e.options[e.selectedIndex].value; - $scope.Productshow = "no"; - if(product == "yes") { - $scope.Productshow = "yes"; - console.log("Val1:::", $scope.Productshow); - } - - } - $scope.phonekeyPress = function(number) { console.log("number", number); if (number == undefined || number == '') { @@ -1021,130 +276,16 @@ }); - scotchApp.controller('verifyController', function($scope, $http, $location, $route, BASE_URL, Analytics) { - - $scope.pendingPaymentId = $route.current.params.id - $http({ - method: "GET", - url: BASE_URL + '/applicants/' + $scope.pendingPaymentId, - }).then(function mySuccess(response) { - $scope.data = response.data; - console.log("response-1", response); - $scope.pendingPaymentId = $route.current.params.id; - - $http({ - method: "GET", - url: BASE_URL + '/payments?filter={"where":{"applicantId":' + $scope.pendingPaymentId + '}}', - }).then(function mySuccess(response) { - $scope.paymentRecord = response.data; - }, function myError(response) { - console.log("response-2", response); - }); - }, function myError(response) { - $scope.myWelcome = response.statusText; - }); - - $scope.checkView = false; - $scope.verifyView = false; - $scope.searchResult = {} - $scope.pendingPaymentId = ''; - - $scope.update = function() { - - $http({ - method: 'GET', - url: BASE_URL + '/payments?filter={"where":{"applicantId": ' + $scope.pendingPaymentId + '}}', - headers: {} - }).then(function mySuccess(searchResult) { - if (searchResult.data[0].status == "created") { - //if (searchResult.data[0].status == "cancelled") { - $scope.checkView = true; - $scope.verifyView = false; - $scope.amount = searchResult.data[0].amount; - $scope.searchResult = searchResult.data[0]; - console.log('====searchResult===', searchResult); - console.log("searchResult=====",searchResult.data[0].razorOrderId) - var i = 0; - $scope.amount = $scope.amount * 100; - var options = { - "key": "rzp_live_mhSE1uOBlXvFyJ", - //"key" : "rzp_test_YwHsVFiDIQ2WUQ", - "amount": $scope.amount, - - "name": "Startup Jalsa", - "description": "amount", - "currency": "INR", - "status": "done", - - "theme": { - "color": "#2196f3 ", - "image_padding": "NO" - }, - "modal": { - "ondismiss": function() {} - }, - "handler": function(response) { - createPayment(response); - } - }; - var rzp1 = new Razorpay(options); - rzp1.open(); - $scope.paymentResponse = {}; - function createPayment(response) { - console.log("response======retepaymen",response); - $scope.amount = $scope.amount/100; - - $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; - $scope.paymentResponse.razorOrderId = $scope.searchResult.razorOrderId; - $scope.paymentResponse.amount = $scope.amount; - $scope.paymentResponse.currency = $scope.searchResult.currency; - $scope.paymentResponse.status = $scope.searchResult.status; - $scope.paymentResponse.applicantId = $scope.searchResult.applicantId; - console.log("$scope.paymentResponse", $scope.paymentResponse) - $http({ - method: 'PUT', - url: BASE_URL + '/payments/' + $scope.searchResult.id, - data: $scope.paymentResponse, - headers: {} - }).then(function mySuccess(searchResult) { - console.log("searchResult--->",searchResult) - // if(paymentResult.data.status == "created"){ - // Analytics.trackEvent('payments', 'click', 'Thankyou'); - // } - console.log("finalsearchResult",searchResult) - $location.path("/confirmation") - Analytics.trackEvent('payment','Successfully Done',$scope.data.email,$scope.paymentResponse.amount); - }, function myError(error) { - - }); - } - } else { - - } - - }, function myError(error) {}); - } - }); - scotchApp.controller('ambassadorController', function($scope, $http, $location, $route,BASE_URL) { $scope.data = {}; $scope.check = false; $scope.numberCheck = false; $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ - // $scope.Textshow = "yes" $scope.max = 100; $scope.formPage = false; $scope.current = 0; $scope.payingAmnt = 0; - // if ($scope.data.stage == 'select') { - - // } - - //$scope.author = 'Swarn Singh'; - $scope.data = {}; - // $scope.data.stage = 'Pitch your Business plan'; - // $scope.data.networkDinner = "true"; $scope.discountAmount = 0; // $scope.data.quantity = "1"; $scope.check = false; @@ -1156,22 +297,6 @@ "status": "pending" } - /*open videos in modal*/ - $scope.openyoutube16 = function(){ - $('#videoModel').modal('show'); - } - - $scope.openyoutube17 = function(){ - $('#videoModels').modal('show'); - } - - $scope.closeModal = function(){ - var url = $('#youtubePlayer').attr('src'); - $('#youtubePlayer').attr('src', ''); - $('#youtubePlayer').attr('src', url); - } - /*open videos ends here*/ - $scope.removeError = function() { $('#invalidEmail').css('display', 'none'); $('#alreadyExist').css('display', 'none'); @@ -1182,85 +307,20 @@ $('#invalidEmail').css('display', 'block'); } else { $('#alreadyExist').css('display', 'block'); - // $http({ - // method: 'GET', - // url: BASE_URL + '/ambassadors?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}', - // headers: {} - // }).then(function mySuccess(searchResult) { - // console.log("searchResult1===>", searchResult) - // if (searchResult.data.length == 0) { - // $scope.check = false; - // } else { - // $scope.check = true; - // $('#alreadyExist').css('display', 'block'); - // } - // }, function myError(error) {}); } }; - // $scope.removeNoError = function() { - // $('#invalidNumber').css('display', 'none'); - // $('#noExist').css('display', 'none'); - // }; - - // $scope.numbercheck = function(number) { - // // if (val == undefined) { - // // $('#invalidNumber').css('display', 'block'); - // // } else { - // $http({ - // method: 'GET', - // url: BASE_URL + '/ambassadors?filter={"where": {"mobile": {"like":"%25' + number + '%25"}}}', - // data: $scope.data, - // headers: {} - // }).then(function mySuccess(searchResult) { - // console.log("searchResult===>", searchResult) - // if (searchResult.data.length == 0) { - // $scope.numberCheck = false; - // } else { - // $scope.numberCheck = true; - // $('#noExist').css('display', 'block'); - // } - // }, function myError(error) {}); - // //} - - // }; - + // $scope.$on('city', function (event, value) { + $scope.city = localStorage.getItem("city"); + console.log("HERE===",$scope.city ); + // }); $scope.submit = function() { $scope.payingAmnt = 100; if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { var x = document.getElementById("snackbar") - x.className = "show"; setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); - }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { - - - // if($scope.data.identity == "a"){ - - - // var image = BASE_URL+'/container1s/proof/download/' - // var image = document.getElementById('picture').files[0]; - // var imagePath = image.name; - // $scope.NewIamge = image + imagePath; - // $scope.data.pic = $scope.NewIamge; - // var fd = new FormData() - // fd.append('file',image); - // $http({ - // method:'POST', - // url: BASE_URL+'/container1s/proof/upload', - // data:fd, - // transformRequest:angular.identity, - // headers:{'Content-Type':undefined} - // }).then(function mySuccess(sucessResponse) { - - - // }, function myError(error) { - // }); - - // } - + }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { $scope.infoForm = true; - console.log("sdasdasdsa"); - // $scope.data.stage = $scope.data.stage; $scope.detail = {}; $scope.data.phone = "+91"+$scope.data.number; $http({ @@ -1337,36 +397,14 @@ } }, function myError(error) { + }); + } - // console.log($scope.data.name) - // var randomNumber = ""+Math.random(); - // var nameSpliced = $scope.data.name.slice(0,3); - // var numberSpliced = randomNumber.slice(2,5); - // $scope.data.referalToken = nameSpliced+numberSpliced; - // $scope.data.referalToken = $scope.data.referalToken.toUpperCase(); - // $http({ - // method: 'POST', - // url: BASE_URL + '/ambassadors', - // data: $scope.data, - // headers: {} - // }).then(function mySuccess(result) { - // console.log("result", result) - // $scope.detail = result; - // $('#myModal').modal('show'); - // $scope.data.name = ''; - // $scope.data.email = ''; - // $scope.data.mobile = ''; - // // $scope.data.discount = ''; - - // }, function myError(error) { - // console.log(error) - // console.log(error.data.error.message) - // }); - // console.log($scope.data) - } - }); + } + +});