Commit 527754dcf9236ecb1462f8034a83da2348d32a95
1 parent
63f32ea64b
Exists in
master
minor change
Showing
2 changed files
with
3 additions
and
2 deletions
Show diff stats
pages/campusAmbassador.html
1 | <div class="header" > | 1 | <div class="header" > |
2 | <div> | 2 | <div> |
3 | <!-- <img src="images/LOGO.png" class="logojalsa"><span class="jalsaheadr">2018</span> | 3 | <!-- <img src="images/LOGO.png" class="logojalsa"><span class="jalsaheadr">2018</span> |
4 | <h4 class="PitchYourPower">#PitchYourPower</h4> --> | 4 | <h4 class="PitchYourPower">#PitchYourPower</h4> --> |
5 | </div> | 5 | </div> |
6 | <div class="clearfix"></div> | 6 | <div class="clearfix"></div> |
7 | </div> | 7 | </div> |
8 | <form name="homeForm"> | 8 | <form name="homeForm"> |
9 | <div class="city-meetup card-color"> | 9 | <div class="city-meetup card-color"> |
10 | <img src="images/Startup_JAlsa_logo.png" class="logojalsa"> | 10 | <img src="images/Startup_JAlsa_logo.png" class="logojalsa"> |
11 | <div class="jalsaHeader">CAMPUS AMBASSADOR PROGRAM</div> | 11 | <div class="jalsaHeader">CAMPUS AMBASSADOR PROGRAM</div> |
12 | <!-- <div class="col-md-12 happen-imagemeetup"> | 12 | <!-- <div class="col-md-12 happen-imagemeetup"> |
13 | <div class="row"> | 13 | <div class="row"> |
14 | <div class="col-sm-4 imagemeetup"> | 14 | <div class="col-sm-4 imagemeetup"> |
15 | <img src="images/1.2.png" class="imagecenter" style="margin:auto;display:block"> | 15 | <img src="images/1.2.png" class="imagecenter" style="margin:auto;display:block"> |
16 | <div class="imageText">Founder Talk</div> | 16 | <div class="imageText">Founder Talk</div> |
17 | <div class="imageTxt imagemargin">Listen to leading entrepreneurs about their first investment pitch.</div> | 17 | <div class="imageTxt imagemargin">Listen to leading entrepreneurs about their first investment pitch.</div> |
18 | </div> | 18 | </div> |
19 | <div class="col-sm-4 image-meet-up"> | 19 | <div class="col-sm-4 image-meet-up"> |
20 | <img src="images/3.2.png" class="imagecenter" style="margin:auto;display:block"> | 20 | <img src="images/3.2.png" class="imagecenter" style="margin:auto;display:block"> |
21 | <div class="imageText">Elevator Pitch</div> | 21 | <div class="imageText">Elevator Pitch</div> |
22 | <div class="imageTxt imagemargin">Startups will get 60 seconds to pitch their startups.</div> | 22 | <div class="imageTxt imagemargin">Startups will get 60 seconds to pitch their startups.</div> |
23 | </div> | 23 | </div> |
24 | <div class="col-sm-4"> | 24 | <div class="col-sm-4"> |
25 | <img src="images/2.2.png" class="imagecenter" style="margin:auto;display:block"> | 25 | <img src="images/2.2.png" class="imagecenter" style="margin:auto;display:block"> |
26 | <div class="imageText">Networking</div> | 26 | <div class="imageText">Networking</div> |
27 | <div class="imageTxt">Shortlisted startups get to network with fellow startups and founders.</div> | 27 | <div class="imageTxt">Shortlisted startups get to network with fellow startups and founders.</div> |
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
30 | <div class="apply-btn1"> | 30 | <div class="apply-btn1"> |
31 | <button class="btn submit-button" style="outline: none;" value="Apply" ng-click="apply()" >REGISTER</button> | 31 | <button class="btn submit-button" style="outline: none;" value="Apply" ng-click="apply()" >REGISTER</button> |
32 | </div> | 32 | </div> |
33 | </div> --> | 33 | </div> --> |
34 | <div class="col-xs-12"> | 34 | <div class="col-xs-12"> |
35 | <div class="happen-meetup"> | 35 | <div class="happen-meetup"> |
36 | <div class="startup-questions">About Startup Jalsa</div> | 36 | <div class="startup-questions">About Startup Jalsa</div> |
37 | <div class="startup-answers"><b>We are a startup platform - on a mission to inspire and invest in entrepreneurial talent - and help founders build enduring businesses.</b> Since our inception as a conference in 2015, over 2000 companies have participated in the various events of Startup Jalsa and they have gone on to raise cumulatively over 500crores in funding.</div> | 37 | <div class="startup-answers"><b>We are a startup platform - on a mission to inspire and invest in entrepreneurial talent - and help founders build enduring businesses.</b> Since our inception as a conference in 2015, over 2000 companies have participated in the various events of Startup Jalsa and they have gone on to raise cumulatively over 500crores in funding.</div> |
38 | </div> | 38 | </div> |
39 | <div class="happen-meetup"> | 39 | <div class="happen-meetup"> |
40 | <div class="startup-questions">About the Campus Ambassador Program:</div> | 40 | <div class="startup-questions">About the Campus Ambassador Program:</div> |
41 | <div class="startup-answers">We are passionate about empowering entrepreneurs in the deepest part of the corners of South Asia. Therefore, we are launching our Campus Ambassador Program to partner and support the top startup ecosystem builders. Following are the details to enrol for the Campus Ambassador:</div> | 41 | <div class="startup-answers">We are passionate about empowering entrepreneurs in the deepest part of the corners of South Asia. Therefore, we are launching our Campus Ambassador Program to partner and support the top startup ecosystem builders. Following are the details to enrol for the Campus Ambassador:</div> |
42 | </div> | 42 | </div> |
43 | <div class="happen-meetup"> | 43 | <div class="happen-meetup"> |
44 | <div class="startup-questions">Expected responsibilities:</div> | 44 | <div class="startup-questions">Expected responsibilities:</div> |
45 | <div class="startup-answers"> | 45 | <div class="startup-answers"> |
46 | <ul> | 46 | <ul> |
47 | <li>After pitch sessions, non-binding term sheet will be offered to the selected startups and the legal and financial due diligence will be initiated.</li> | 47 | <li>After pitch sessions, non-binding term sheet will be offered to the selected startups and the legal and financial due diligence will be initiated.</li> |
48 | <li>Spread word in your college, network through WhatsApp.</li> | 48 | <li>Spread word in your college, network through WhatsApp.</li> |
49 | <li>Get Start-ups in your network to participate – you can make cool pocket money – via 10% commission of all the sales that will be generated. We will give you a unique promo code to track all the sales. </li> | 49 | <li>Get Start-ups in your network to participate – you can make cool pocket money – via 10% commission of all the sales that will be generated. We will give you a unique promo code to track all the sales. </li> |
50 | </ul> | 50 | </ul> |
51 | </div> | 51 | </div> |
52 | </div> | 52 | </div> |
53 | <div class="happen-meetup"> | 53 | <div class="happen-meetup"> |
54 | <div class="startup-questions">Enrolling for the program and benefits: </div> | 54 | <div class="startup-questions">Enrolling for the program and benefits: </div> |
55 | <div class="startup-answers"> | 55 | <div class="startup-answers"> |
56 | <ul> | 56 | <ul> |
57 | <li>You will have to pay a refundable deposit of 500 Rs to register for the program. </li> | 57 | <li>You will have to pay a refundable deposit of 500 Rs to register for the program. </li> |
58 | <li>The same will be refunded after <b>ONE Startup</b> registers through your promo code.</li> | 58 | <li>The same will be refunded after <b>ONE Startup</b> registers through your promo code.</li> |
59 | <li>You will get free access to all Startup Jalsa events happening in 4 countries and 12 cities. Full list of dates and venues <a href="https://startupjalsa.com/events#/" target="_blank" style="color: #2196f3;">here</a>.</li> | 59 | <li>You will get free access to all Startup Jalsa events happening in 4 countries and 12 cities. Full list of dates and venues <a href="https://startupjalsa.com/events#/" target="_blank" style="color: #2196f3;">here</a>.</li> |
60 | <li>You will get special networking sessions with participating speakers and investors.</li> | 60 | <li>You will get special networking sessions with participating speakers and investors.</li> |
61 | <li>Get an exclusive license to host <b>Startup Jalsa Ideate Edition</b> in your colleges.</li> | 61 | <li>Get an exclusive license to host <b>Startup Jalsa Ideate Edition</b> in your colleges.</li> |
62 | <li>Get mentoring to raise sponsorships, speakers for your events.</li> | 62 | <li>Get mentoring to raise sponsorships, speakers for your events.</li> |
63 | <li>Fully sponsored trip to Startup Jalsa, Invest edition in Dharamshala 2019 for Campus Ambassadors who will register more than 10 startups. </li> | 63 | <li>Fully sponsored trip to Startup Jalsa, Invest edition in Dharamshala 2019 for Campus Ambassadors who will register more than 10 startups. </li> |
64 | </ul> | 64 | </ul> |
65 | </div> | 65 | </div> |
66 | </div> | 66 | </div> |
67 | <div class="apply-btn"> | 67 | <div class="apply-btn"> |
68 | <button class="btn submit-button" style="outline: none;" value="Apply" ng-click="applyCampusAmbassador()" >REGISTER</button> | 68 | <button class="btn submit-button" style="outline: none;" value="Apply" ng-click="applyForm()" >REGISTER</button> |
69 | </div> | 69 | </div> |
70 | </div> | 70 | </div> |
71 | </div> | 71 | </div> |
72 | </form> | 72 | </form> |
73 | <footer> | 73 | <footer> |
74 | <img id="footer" class="img-responsive banner"> | 74 | <img id="footer" class="img-responsive banner"> |
75 | <center class="footer"><a class="footer-link" href="http://www.viithiisys.com/" target="_blank"></a> </center> | 75 | <center class="footer"><a class="footer-link" href="http://www.viithiisys.com/" target="_blank"></a> </center> |
76 | </footer> | 76 | </footer> |
77 | <span ng-show="span == true"> | 77 | <span ng-show="span == true"> |
78 | <span id="chennai"></span> | 78 | <span id="chennai"></span> |
79 | <span id="mumbai"></span> | 79 | <span id="mumbai"></span> |
80 | <span id="hyderabad"></span> | 80 | <span id="hyderabad"></span> |
81 | <span id="kolkata"></span> | 81 | <span id="kolkata"></span> |
82 | <span id="delhi"></span> | 82 | <span id="delhi"></span> |
83 | <span id="ahmedabad"></span> | 83 | <span id="ahmedabad"></span> |
84 | <span id="bengaluru"></span> | 84 | <span id="bengaluru"></span> |
85 | <span id="jaipur"></span> | 85 | <span id="jaipur"></span> |
86 | <span id="kanpur"></span> | 86 | <span id="kanpur"></span> |
87 | <span id="dharamsala"></span> | 87 | <span id="dharamsala"></span> |
88 | </span> | 88 | </span> |
89 | 89 | ||
90 | 90 | ||
91 | 91 |
script.js
1 | // create the module and name it scotchApp | 1 | // create the module and name it scotchApp |
2 | var scotchApp = angular.module('scotchApp', ['ngRoute','angular-google-analytics']); | 2 | var scotchApp = angular.module('scotchApp', ['ngRoute','angular-google-analytics']); |
3 | 3 | ||
4 | // configure our routes | 4 | // configure our routes |
5 | scotchApp.config(function($routeProvider,$locationProvider) { | 5 | scotchApp.config(function($routeProvider,$locationProvider) { |
6 | 6 | ||
7 | // use the HTML5 History API | 7 | // use the HTML5 History API |
8 | // $locationProvider.html5Mode({ | 8 | // $locationProvider.html5Mode({ |
9 | // enabled: true, | 9 | // enabled: true, |
10 | // requireBase: false | 10 | // requireBase: false |
11 | // }); | 11 | // }); |
12 | //$locationProvider.hashPrefix('!'); | 12 | //$locationProvider.hashPrefix('!'); |
13 | $routeProvider | 13 | $routeProvider |
14 | // route for the Home page | 14 | // route for the Home page |
15 | .when('/', { | 15 | .when('/', { |
16 | templateUrl: 'pages/Home.html', | 16 | templateUrl: 'pages/Home.html', |
17 | controller: 'mainController' | 17 | controller: 'mainController' |
18 | }) | 18 | }) |
19 | 19 | ||
20 | // route for the caricatures page | 20 | // route for the caricatures page |
21 | .when('/caricatures', { | 21 | .when('/caricatures', { |
22 | templateUrl: 'pages/caricatures.html', | 22 | templateUrl: 'pages/caricatures.html', |
23 | controller: 'mainController' | 23 | controller: 'mainController' |
24 | }) | 24 | }) |
25 | 25 | ||
26 | // route for the registration page | 26 | // route for the registration page |
27 | .when('/registration', { | 27 | .when('/registration', { |
28 | templateUrl: 'pages/registration.html', | 28 | templateUrl: 'pages/registration.html', |
29 | controller: 'registrationController' | 29 | controller: 'registrationController' |
30 | }) | 30 | }) |
31 | 31 | ||
32 | //route for the ambassador page | 32 | //route for the ambassador page |
33 | .when('/startupJalsaPromocode', { | 33 | .when('/startupJalsaPromocode', { |
34 | templateUrl: 'pages/ambassador.html', | 34 | templateUrl: 'pages/ambassador.html', |
35 | controller: 'ambassadorController' | 35 | controller: 'ambassadorController' |
36 | }) | 36 | }) |
37 | 37 | ||
38 | //route for the campusAmbassador page | 38 | //route for the campusAmbassador page |
39 | .when('/campusAmbassador', { | 39 | .when('/campusAmbassador', { |
40 | templateUrl: 'pages/campusAmbassador.html', | 40 | templateUrl: 'pages/campusAmbassador.html', |
41 | controller: 'mainController' | 41 | controller: 'mainController' |
42 | }) | 42 | }) |
43 | 43 | ||
44 | //route for the campusAmbassador page | 44 | //route for the campusAmbassador page |
45 | .when('/campusAmbassadorForm', { | 45 | .when('/campusAmbassadorForm', { |
46 | templateUrl: 'pages/campusAmbassadorForm.html', | 46 | templateUrl: 'pages/campusAmbassadorForm.html', |
47 | controller: 'campusAmbassadorController' | 47 | controller: 'campusAmbassadorController' |
48 | }) | 48 | }) |
49 | 49 | ||
50 | // route for the confirmation page | 50 | // route for the confirmation page |
51 | // .when('/confirmation', { | 51 | // .when('/confirmation', { |
52 | // templateUrl: 'pages/confirmation.html', | 52 | // templateUrl: 'pages/confirmation.html', |
53 | // controller: 'confirmationController' | 53 | // controller: 'confirmationController' |
54 | // }) | 54 | // }) |
55 | 55 | ||
56 | // route for the confirmation page | 56 | // route for the confirmation page |
57 | .when('/confirmation', { | 57 | .when('/confirmation', { |
58 | templateUrl: 'pages/campusAmbassadorConfirm.html', | 58 | templateUrl: 'pages/campusAmbassadorConfirm.html', |
59 | controller: 'confirmationController' | 59 | controller: 'confirmationController' |
60 | }) | 60 | }) |
61 | 61 | ||
62 | // route for the confirmation page | 62 | // route for the confirmation page |
63 | .when('/confirm', { | 63 | .when('/confirm', { |
64 | templateUrl: 'pages/confirm.html', | 64 | templateUrl: 'pages/confirm.html', |
65 | controller: 'confirmationController' | 65 | controller: 'confirmationController' |
66 | }) | 66 | }) |
67 | 67 | ||
68 | // route for the paytm page | 68 | // route for the paytm page |
69 | .when('/paytm', { | 69 | .when('/paytm', { |
70 | templateUrl: 'pages/paytm.html', | 70 | templateUrl: 'pages/paytm.html', |
71 | controller: 'mainController' | 71 | controller: 'mainController' |
72 | }) | 72 | }) |
73 | 73 | ||
74 | // route for the paytm page | 74 | // route for the paytm page |
75 | .when('/paytm/caricatures', { | 75 | .when('/paytm/caricatures', { |
76 | templateUrl: 'pages/paytmCaricatures.html', | 76 | templateUrl: 'pages/paytmCaricatures.html', |
77 | controller: 'mainController' | 77 | controller: 'mainController' |
78 | }) | 78 | }) |
79 | 79 | ||
80 | // route for the paytm page | 80 | // route for the paytm page |
81 | .when('/paytm/checkout', { | 81 | .when('/paytm/checkout', { |
82 | templateUrl: 'pages/paytmCheckout.html', | 82 | templateUrl: 'pages/paytmCheckout.html', |
83 | controller: 'paytmController' | 83 | controller: 'paytmController' |
84 | }) | 84 | }) |
85 | 85 | ||
86 | // route for the confirmation page | 86 | // route for the confirmation page |
87 | .when('/paytm/confirm', { | 87 | .when('/paytm/confirm', { |
88 | templateUrl: 'pages/confirmed.html', | 88 | templateUrl: 'pages/confirmed.html', |
89 | controller: 'paytmController' | 89 | controller: 'paytmController' |
90 | }) | 90 | }) |
91 | 91 | ||
92 | .otherwise({ | 92 | .otherwise({ |
93 | redirectTo: '/' | 93 | redirectTo: '/' |
94 | }); | 94 | }); |
95 | 95 | ||
96 | }); | 96 | }); |
97 | 97 | ||
98 | scotchApp.config(['AnalyticsProvider', function (AnalyticsProvider) { | 98 | scotchApp.config(['AnalyticsProvider', function (AnalyticsProvider) { |
99 | // Add configuration code as desired | 99 | // Add configuration code as desired |
100 | AnalyticsProvider.setAccount('UA-123583154-1'); //UU-XXXXXXX-X should be your tracking code | 100 | AnalyticsProvider.setAccount('UA-123583154-1'); //UU-XXXXXXX-X should be your tracking code |
101 | 101 | ||
102 | // Track all routes (default is true). | 102 | // Track all routes (default is true). |
103 | AnalyticsProvider.trackPages(true); | 103 | AnalyticsProvider.trackPages(true); |
104 | 104 | ||
105 | // Track all URL query params (default is false). | 105 | // Track all URL query params (default is false). |
106 | AnalyticsProvider.trackUrlParams(true); | 106 | AnalyticsProvider.trackUrlParams(true); |
107 | 107 | ||
108 | }]).run(['Analytics', function(Analytics) { }]); | 108 | }]).run(['Analytics', function(Analytics) { }]); |
109 | 109 | ||
110 | scotchApp.constant("BASE_URL", "https://events.startupjalsa.com/v1") | 110 | scotchApp.constant("BASE_URL", "https://events.startupjalsa.com/v1") |
111 | //scotchApp.constant("BASE_URL", "http://0.0.0.0:4001/v1") | 111 | //scotchApp.constant("BASE_URL", "http://0.0.0.0:4001/v1") |
112 | 112 | ||
113 | scotchApp.directive('validFile',function(){ | 113 | scotchApp.directive('validFile',function(){ |
114 | return { | 114 | return { |
115 | require:'ngModel', | 115 | require:'ngModel', |
116 | link:function(scope,el,attrs,ngModel){ | 116 | link:function(scope,el,attrs,ngModel){ |
117 | //change event is fired when file is selected | 117 | //change event is fired when file is selected |
118 | el.bind('change',function(){ | 118 | el.bind('change',function(){ |
119 | scope.$apply(function(){ | 119 | scope.$apply(function(){ |
120 | ngModel.$setViewValue(el.val()); | 120 | ngModel.$setViewValue(el.val()); |
121 | ngModel.$render(); | 121 | ngModel.$render(); |
122 | }) | 122 | }) |
123 | }) | 123 | }) |
124 | } | 124 | } |
125 | } | 125 | } |
126 | }) | 126 | }) |
127 | 127 | ||
128 | // create the controller and inject Angular's $scope | 128 | // create the controller and inject Angular's $scope |
129 | scotchApp.controller('mainController', function($scope, $http, $window, $location, $route, $rootScope, BASE_URL, Analytics) { | 129 | scotchApp.controller('mainController', function($scope, $http, $window, $location, $route, $rootScope, BASE_URL, Analytics) { |
130 | $scope.data = { | 130 | $scope.data = { |
131 | show: true, | 131 | show: true, |
132 | hide: false | 132 | hide: false |
133 | }; | 133 | }; |
134 | jQuery('#defaultcountry').addClass('btn-active') | 134 | jQuery('#defaultcountry').addClass('btn-active') |
135 | // window.onload = function(){ | 135 | // window.onload = function(){ |
136 | // // var element = document.getElementById("defaultcountry"); | 136 | // // var element = document.getElementById("defaultcountry"); |
137 | // // element.classList.add("btn-active"); | 137 | // // element.classList.add("btn-active"); |
138 | // jQuery('#defaultcountry').addClass('btn-active') | 138 | // jQuery('#defaultcountry').addClass('btn-active') |
139 | // //document.getElementById("ahmedabad").src = "images/Ahmedabad_1.png"; | 139 | // //document.getElementById("ahmedabad").src = "images/Ahmedabad_1.png"; |
140 | // } | 140 | // } |
141 | 141 | ||
142 | var chennai = new Date("Sept 19, 2018 12:00:00").getTime(); | 142 | var chennai = new Date("Sept 19, 2018 12:00:00").getTime(); |
143 | // Update the count down every 1 second | 143 | // Update the count down every 1 second |
144 | var x = setInterval(function() { | 144 | var x = setInterval(function() { |
145 | // Get todays date and time | 145 | // Get todays date and time |
146 | var now = new Date().getTime(); | 146 | var now = new Date().getTime(); |
147 | // Find the distance between now an the count down date | 147 | // Find the distance between now an the count down date |
148 | var distance = chennai - now; | 148 | var distance = chennai - now; |
149 | // Time calculations for days, hours, minutes and seconds | 149 | // Time calculations for days, hours, minutes and seconds |
150 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 150 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
151 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 151 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
152 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 152 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
153 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 153 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
154 | $scope.timer = days + "d " + hours + "h " | 154 | $scope.timer = days + "d " + hours + "h " |
155 | + minutes + "m " + seconds + "s " | 155 | + minutes + "m " + seconds + "s " |
156 | // Output the result in an element with id="demo" | 156 | // Output the result in an element with id="demo" |
157 | document.getElementById("chennai").innerHTML = days + "d " + hours + "h " | 157 | document.getElementById("chennai").innerHTML = days + "d " + hours + "h " |
158 | + minutes + "m " + seconds + "s "; | 158 | + minutes + "m " + seconds + "s "; |
159 | // If the count down is over, write some text | 159 | // If the count down is over, write some text |
160 | if (distance < 0) { | 160 | if (distance < 0) { |
161 | clearInterval(x); | 161 | clearInterval(x); |
162 | document.getElementById("chennai").innerHTML = "EXPIRED"; | 162 | document.getElementById("chennai").innerHTML = "EXPIRED"; |
163 | } | 163 | } |
164 | }, 1000); | 164 | }, 1000); |
165 | 165 | ||
166 | var hyderabad = new Date("Sept 22, 2018 14:00:00").getTime(); | 166 | var hyderabad = new Date("Sept 22, 2018 14:00:00").getTime(); |
167 | // Update the count down every 1 second | 167 | // Update the count down every 1 second |
168 | var x = setInterval(function() { | 168 | var x = setInterval(function() { |
169 | // Get todays date and time | 169 | // Get todays date and time |
170 | var now = new Date().getTime(); | 170 | var now = new Date().getTime(); |
171 | // Find the distance between now an the count down date | 171 | // Find the distance between now an the count down date |
172 | var distance = hyderabad - now; | 172 | var distance = hyderabad - now; |
173 | // Time calculations for days, hours, minutes and seconds | 173 | // Time calculations for days, hours, minutes and seconds |
174 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 174 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
175 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 175 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
176 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 176 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
177 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 177 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
178 | $scope.timer = days + "d " + hours + "h " | 178 | $scope.timer = days + "d " + hours + "h " |
179 | + minutes + "m " + seconds + "s " | 179 | + minutes + "m " + seconds + "s " |
180 | // Output the result in an element with id="demo" | 180 | // Output the result in an element with id="demo" |
181 | document.getElementById("hyderabad").innerHTML = days + "d " + hours + "h " | 181 | document.getElementById("hyderabad").innerHTML = days + "d " + hours + "h " |
182 | + minutes + "m " + seconds + "s "; | 182 | + minutes + "m " + seconds + "s "; |
183 | // If the count down is over, write some text | 183 | // If the count down is over, write some text |
184 | if (distance < 0) { | 184 | if (distance < 0) { |
185 | clearInterval(x); | 185 | clearInterval(x); |
186 | document.getElementById("hyderabad").innerHTML = "EXPIRED"; | 186 | document.getElementById("hyderabad").innerHTML = "EXPIRED"; |
187 | } | 187 | } |
188 | }, 1000); | 188 | }, 1000); |
189 | 189 | ||
190 | var mumbai = new Date("Sept 26, 2018 14:00:00").getTime(); | 190 | var mumbai = new Date("Sept 26, 2018 14:00:00").getTime(); |
191 | // Update the count down every 1 second | 191 | // Update the count down every 1 second |
192 | var x = setInterval(function() { | 192 | var x = setInterval(function() { |
193 | // Get todays date and time | 193 | // Get todays date and time |
194 | var now = new Date().getTime(); | 194 | var now = new Date().getTime(); |
195 | // Find the distance between now an the count down date | 195 | // Find the distance between now an the count down date |
196 | var distance = mumbai - now; | 196 | var distance = mumbai - now; |
197 | // Time calculations for days, hours, minutes and seconds | 197 | // Time calculations for days, hours, minutes and seconds |
198 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 198 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
199 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 199 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
200 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 200 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
201 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 201 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
202 | $scope.timer = days + "d " + hours + "h " | 202 | $scope.timer = days + "d " + hours + "h " |
203 | + minutes + "m " + seconds + "s " | 203 | + minutes + "m " + seconds + "s " |
204 | // Output the result in an element with id="demo" | 204 | // Output the result in an element with id="demo" |
205 | document.getElementById("mumbai").innerHTML = days + "d " + hours + "h " | 205 | document.getElementById("mumbai").innerHTML = days + "d " + hours + "h " |
206 | + minutes + "m " + seconds + "s "; | 206 | + minutes + "m " + seconds + "s "; |
207 | // If the count down is over, write some text | 207 | // If the count down is over, write some text |
208 | if (distance < 0) { | 208 | if (distance < 0) { |
209 | clearInterval(x); | 209 | clearInterval(x); |
210 | document.getElementById("mumbai").innerHTML = "EXPIRED"; | 210 | document.getElementById("mumbai").innerHTML = "EXPIRED"; |
211 | } | 211 | } |
212 | }, 1000); | 212 | }, 1000); |
213 | 213 | ||
214 | var kolkata = new Date("Oct 3, 2018 14:00:00").getTime(); | 214 | var kolkata = new Date("Oct 3, 2018 14:00:00").getTime(); |
215 | // Update the count down every 1 second | 215 | // Update the count down every 1 second |
216 | var x = setInterval(function() { | 216 | var x = setInterval(function() { |
217 | // Get todays date and time | 217 | // Get todays date and time |
218 | var now = new Date().getTime(); | 218 | var now = new Date().getTime(); |
219 | // Find the distance between now an the count down date | 219 | // Find the distance between now an the count down date |
220 | var distance = kolkata - now; | 220 | var distance = kolkata - now; |
221 | // Time calculations for days, hours, minutes and seconds | 221 | // Time calculations for days, hours, minutes and seconds |
222 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 222 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
223 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 223 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
224 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 224 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
225 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 225 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
226 | $scope.timer = days + "d " + hours + "h " | 226 | $scope.timer = days + "d " + hours + "h " |
227 | + minutes + "m " + seconds + "s " | 227 | + minutes + "m " + seconds + "s " |
228 | // Output the result in an element with id="demo" | 228 | // Output the result in an element with id="demo" |
229 | document.getElementById("kolkata").innerHTML = days + "d " + hours + "h " | 229 | document.getElementById("kolkata").innerHTML = days + "d " + hours + "h " |
230 | + minutes + "m " + seconds + "s "; | 230 | + minutes + "m " + seconds + "s "; |
231 | // If the count down is over, write some text | 231 | // If the count down is over, write some text |
232 | if (distance < 0) { | 232 | if (distance < 0) { |
233 | clearInterval(x); | 233 | clearInterval(x); |
234 | document.getElementById("kolkata").innerHTML = "EXPIRED"; | 234 | document.getElementById("kolkata").innerHTML = "EXPIRED"; |
235 | } | 235 | } |
236 | }, 1000); | 236 | }, 1000); |
237 | 237 | ||
238 | var jaipur = new Date("Oct 5, 2018 14:00:00").getTime(); | 238 | var jaipur = new Date("Oct 5, 2018 14:00:00").getTime(); |
239 | // Update the count down every 1 second | 239 | // Update the count down every 1 second |
240 | var x = setInterval(function() { | 240 | var x = setInterval(function() { |
241 | // Get todays date and time | 241 | // Get todays date and time |
242 | var now = new Date().getTime(); | 242 | var now = new Date().getTime(); |
243 | // Find the distance between now an the count down date | 243 | // Find the distance between now an the count down date |
244 | var distance = jaipur - now; | 244 | var distance = jaipur - now; |
245 | // Time calculations for days, hours, minutes and seconds | 245 | // Time calculations for days, hours, minutes and seconds |
246 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 246 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
247 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 247 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
248 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 248 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
249 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 249 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
250 | $scope.timer = days + "d " + hours + "h " | 250 | $scope.timer = days + "d " + hours + "h " |
251 | + minutes + "m " + seconds + "s " | 251 | + minutes + "m " + seconds + "s " |
252 | // Output the result in an element with id="demo" | 252 | // Output the result in an element with id="demo" |
253 | document.getElementById("jaipur").innerHTML = days + "d " + hours + "h " | 253 | document.getElementById("jaipur").innerHTML = days + "d " + hours + "h " |
254 | + minutes + "m " + seconds + "s "; | 254 | + minutes + "m " + seconds + "s "; |
255 | // If the count down is over, write some text | 255 | // If the count down is over, write some text |
256 | if (distance < 0) { | 256 | if (distance < 0) { |
257 | clearInterval(x); | 257 | clearInterval(x); |
258 | document.getElementById("jaipur").innerHTML = "EXPIRED"; | 258 | document.getElementById("jaipur").innerHTML = "EXPIRED"; |
259 | } | 259 | } |
260 | }, 1000); | 260 | }, 1000); |
261 | 261 | ||
262 | var delhi = new Date("Oct 8, 2018 14:00:00").getTime(); | 262 | var delhi = new Date("Oct 8, 2018 14:00:00").getTime(); |
263 | // Update the count down every 1 second | 263 | // Update the count down every 1 second |
264 | var x = setInterval(function() { | 264 | var x = setInterval(function() { |
265 | // Get todays date and time | 265 | // Get todays date and time |
266 | var now = new Date().getTime(); | 266 | var now = new Date().getTime(); |
267 | // Find the distance between now an the count down date | 267 | // Find the distance between now an the count down date |
268 | var distance = delhi - now; | 268 | var distance = delhi - now; |
269 | // Time calculations for days, hours, minutes and seconds | 269 | // Time calculations for days, hours, minutes and seconds |
270 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 270 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
271 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 271 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
272 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 272 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
273 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 273 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
274 | $scope.timer = days + "d " + hours + "h " | 274 | $scope.timer = days + "d " + hours + "h " |
275 | + minutes + "m " + seconds + "s " | 275 | + minutes + "m " + seconds + "s " |
276 | // Output the result in an element with id="demo" | 276 | // Output the result in an element with id="demo" |
277 | document.getElementById("delhi").innerHTML = days + "d " + hours + "h " | 277 | document.getElementById("delhi").innerHTML = days + "d " + hours + "h " |
278 | + minutes + "m " + seconds + "s "; | 278 | + minutes + "m " + seconds + "s "; |
279 | // If the count down is over, write some text | 279 | // If the count down is over, write some text |
280 | if (distance < 0) { | 280 | if (distance < 0) { |
281 | clearInterval(x); | 281 | clearInterval(x); |
282 | document.getElementById("delhi").innerHTML = "EXPIRED"; | 282 | document.getElementById("delhi").innerHTML = "EXPIRED"; |
283 | } | 283 | } |
284 | }, 1000); | 284 | }, 1000); |
285 | 285 | ||
286 | var kanpur = new Date("Oct 10, 2018 14:00:00").getTime(); | 286 | var kanpur = new Date("Oct 10, 2018 14:00:00").getTime(); |
287 | // Update the count down every 1 second | 287 | // Update the count down every 1 second |
288 | var x = setInterval(function() { | 288 | var x = setInterval(function() { |
289 | // Get todays date and time | 289 | // Get todays date and time |
290 | var now = new Date().getTime(); | 290 | var now = new Date().getTime(); |
291 | // Find the distance between now an the count down date | 291 | // Find the distance between now an the count down date |
292 | var distance = kanpur - now; | 292 | var distance = kanpur - now; |
293 | // Time calculations for days, hours, minutes and seconds | 293 | // Time calculations for days, hours, minutes and seconds |
294 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 294 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
295 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 295 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
296 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 296 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
297 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 297 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
298 | $scope.timer = days + "d " + hours + "h " | 298 | $scope.timer = days + "d " + hours + "h " |
299 | + minutes + "m " + seconds + "s " | 299 | + minutes + "m " + seconds + "s " |
300 | // Output the result in an element with id="demo" | 300 | // Output the result in an element with id="demo" |
301 | document.getElementById("kanpur").innerHTML = days + "d " + hours + "h " | 301 | document.getElementById("kanpur").innerHTML = days + "d " + hours + "h " |
302 | + minutes + "m " + seconds + "s "; | 302 | + minutes + "m " + seconds + "s "; |
303 | // If the count down is over, write some text | 303 | // If the count down is over, write some text |
304 | if (distance < 0) { | 304 | if (distance < 0) { |
305 | clearInterval(x); | 305 | clearInterval(x); |
306 | document.getElementById("kanpur").innerHTML = "EXPIRED"; | 306 | document.getElementById("kanpur").innerHTML = "EXPIRED"; |
307 | } | 307 | } |
308 | }, 1000); | 308 | }, 1000); |
309 | 309 | ||
310 | var ahmedabad = new Date("Oct 12, 2018 14:00:00").getTime(); | 310 | var ahmedabad = new Date("Oct 12, 2018 14:00:00").getTime(); |
311 | // Update the count down every 1 second | 311 | // Update the count down every 1 second |
312 | var x = setInterval(function() { | 312 | var x = setInterval(function() { |
313 | // Get todays date and time | 313 | // Get todays date and time |
314 | var now = new Date().getTime(); | 314 | var now = new Date().getTime(); |
315 | // Find the distance between now an the count down date | 315 | // Find the distance between now an the count down date |
316 | var distance = ahmedabad - now; | 316 | var distance = ahmedabad - now; |
317 | // Time calculations for days, hours, minutes and seconds | 317 | // Time calculations for days, hours, minutes and seconds |
318 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 318 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
319 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 319 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
320 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 320 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
321 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 321 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
322 | $scope.timer = days + "d " + hours + "h " | 322 | $scope.timer = days + "d " + hours + "h " |
323 | + minutes + "m " + seconds + "s " | 323 | + minutes + "m " + seconds + "s " |
324 | // Output the result in an element with id="demo" | 324 | // Output the result in an element with id="demo" |
325 | document.getElementById("ahmedabad").innerHTML = days + "d " + hours + "h " | 325 | document.getElementById("ahmedabad").innerHTML = days + "d " + hours + "h " |
326 | + minutes + "m " + seconds + "s "; | 326 | + minutes + "m " + seconds + "s "; |
327 | // If the count down is over, write some text | 327 | // If the count down is over, write some text |
328 | if (distance < 0) { | 328 | if (distance < 0) { |
329 | clearInterval(x); | 329 | clearInterval(x); |
330 | document.getElementById("ahmedabad").innerHTML = "EXPIRED"; | 330 | document.getElementById("ahmedabad").innerHTML = "EXPIRED"; |
331 | } | 331 | } |
332 | }, 1000); | 332 | }, 1000); |
333 | 333 | ||
334 | var bengaluru = new Date("Oct 13, 2018 14:00:00").getTime(); | 334 | var bengaluru = new Date("Oct 13, 2018 14:00:00").getTime(); |
335 | // Update the count down every 1 second | 335 | // Update the count down every 1 second |
336 | var x = setInterval(function() { | 336 | var x = setInterval(function() { |
337 | // Get todays date and time | 337 | // Get todays date and time |
338 | var now = new Date().getTime(); | 338 | var now = new Date().getTime(); |
339 | // Find the distance between now an the count down date | 339 | // Find the distance between now an the count down date |
340 | var distance = bengaluru - now; | 340 | var distance = bengaluru - now; |
341 | // Time calculations for days, hours, minutes and seconds | 341 | // Time calculations for days, hours, minutes and seconds |
342 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 342 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
343 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 343 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
344 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 344 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
345 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 345 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
346 | $scope.timer = days + "d " + hours + "h " | 346 | $scope.timer = days + "d " + hours + "h " |
347 | + minutes + "m " + seconds + "s " | 347 | + minutes + "m " + seconds + "s " |
348 | // Output the result in an element with id="demo" | 348 | // Output the result in an element with id="demo" |
349 | document.getElementById("bengaluru").innerHTML = days + "d " + hours + "h " | 349 | document.getElementById("bengaluru").innerHTML = days + "d " + hours + "h " |
350 | + minutes + "m " + seconds + "s "; | 350 | + minutes + "m " + seconds + "s "; |
351 | // If the count down is over, write some text | 351 | // If the count down is over, write some text |
352 | if (distance < 0) { | 352 | if (distance < 0) { |
353 | clearInterval(x); | 353 | clearInterval(x); |
354 | document.getElementById("bengaluru").innerHTML = "EXPIRED"; | 354 | document.getElementById("bengaluru").innerHTML = "EXPIRED"; |
355 | } | 355 | } |
356 | }, 1000); | 356 | }, 1000); |
357 | 357 | ||
358 | var dharamsala = new Date("Dec 14, 2018 14:00:00").getTime(); | 358 | var dharamsala = new Date("Dec 14, 2018 14:00:00").getTime(); |
359 | // Update the count down every 1 second | 359 | // Update the count down every 1 second |
360 | var x = setInterval(function() { | 360 | var x = setInterval(function() { |
361 | // Get todays date and time | 361 | // Get todays date and time |
362 | var now = new Date().getTime(); | 362 | var now = new Date().getTime(); |
363 | // Find the distance between now an the count down date | 363 | // Find the distance between now an the count down date |
364 | var distance = dharamsala - now; | 364 | var distance = dharamsala - now; |
365 | // Time calculations for days, hours, minutes and seconds | 365 | // Time calculations for days, hours, minutes and seconds |
366 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 366 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
367 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 367 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
368 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 368 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
369 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 369 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
370 | $scope.timer = days + "d " + hours + "h " | 370 | $scope.timer = days + "d " + hours + "h " |
371 | + minutes + "m " + seconds + "s " | 371 | + minutes + "m " + seconds + "s " |
372 | // Output the result in an element with id="demo" | 372 | // Output the result in an element with id="demo" |
373 | document.getElementById("dharamsala").innerHTML = days + "d " + hours + "h " | 373 | document.getElementById("dharamsala").innerHTML = days + "d " + hours + "h " |
374 | + minutes + "m " + seconds + "s "; | 374 | + minutes + "m " + seconds + "s "; |
375 | // If the count down is over, write some text | 375 | // If the count down is over, write some text |
376 | if (distance < 0) { | 376 | if (distance < 0) { |
377 | clearInterval(x); | 377 | clearInterval(x); |
378 | document.getElementById("dharamsala").innerHTML = "EXPIRED"; | 378 | document.getElementById("dharamsala").innerHTML = "EXPIRED"; |
379 | } | 379 | } |
380 | }, 1000); | 380 | }, 1000); |
381 | 381 | ||
382 | $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ | 382 | $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ |
383 | $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ | 383 | $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ |
384 | // $scope.Textshow = "yes" | 384 | // $scope.Textshow = "yes" |
385 | $scope.max = 100; | 385 | $scope.max = 100; |
386 | $scope.formPage = false; | 386 | $scope.formPage = false; |
387 | $scope.current = 0; | 387 | $scope.current = 0; |
388 | $scope.payingAmnt = 0; | 388 | $scope.payingAmnt = 0; |
389 | $scope.data = {}; | 389 | $scope.data = {}; |
390 | $scope.discountAmount = 0; | 390 | $scope.discountAmount = 0; |
391 | // $scope.data.quantity = "1"; | 391 | // $scope.data.quantity = "1"; |
392 | $scope.check = false; | 392 | $scope.check = false; |
393 | $scope.numberCheck = false; | 393 | $scope.numberCheck = false; |
394 | $scope.paymentResult = {}; | 394 | $scope.paymentResult = {}; |
395 | var data = { | 395 | var data = { |
396 | "amount": $scope.payingAmnt, | 396 | "amount": $scope.payingAmnt, |
397 | "currency": "INR", | 397 | "currency": "INR", |
398 | "status": "pending" | 398 | "status": "pending" |
399 | } | 399 | } |
400 | 400 | ||
401 | $scope.showval = true; | 401 | $scope.showval = true; |
402 | $scope.hideval = false; | 402 | $scope.hideval = false; |
403 | $scope.showvalue = false; | 403 | $scope.showvalue = false; |
404 | $scope.hidevalue = false; | 404 | $scope.hidevalue = false; |
405 | localStorage.setItem("country",'INDIA'); | 405 | localStorage.setItem("country",'INDIA'); |
406 | $scope.isShowHide = function (value) { | 406 | $scope.isShowHide = function (value) { |
407 | var element = document.getElementById("defaultcountry"); | 407 | var element = document.getElementById("defaultcountry"); |
408 | element.classList.remove("btn-active"); | 408 | element.classList.remove("btn-active"); |
409 | localStorage.setItem("country",value); | 409 | localStorage.setItem("country",value); |
410 | if (value == "INDIA") { | 410 | if (value == "INDIA") { |
411 | console.log("value",value) | 411 | console.log("value",value) |
412 | $scope.showval = true; | 412 | $scope.showval = true; |
413 | $scope.hideval = false; | 413 | $scope.hideval = false; |
414 | $scope.showvalue = false; | 414 | $scope.showvalue = false; |
415 | $scope.hidevalue = false; | 415 | $scope.hidevalue = false; |
416 | } | 416 | } |
417 | else if (value == "SRI LANKA") { | 417 | else if (value == "SRI LANKA") { |
418 | console.log("value1",value) | 418 | console.log("value1",value) |
419 | $scope.showval = false; | 419 | $scope.showval = false; |
420 | $scope.hideval = true; | 420 | $scope.hideval = true; |
421 | $scope.showvalue = false; | 421 | $scope.showvalue = false; |
422 | $scope.hidevalue = false; | 422 | $scope.hidevalue = false; |
423 | } | 423 | } |
424 | else if (value == "BANGLADESH") { | 424 | else if (value == "BANGLADESH") { |
425 | console.log("value2",value) | 425 | console.log("value2",value) |
426 | $scope.showval = false; | 426 | $scope.showval = false; |
427 | $scope.hideval = false; | 427 | $scope.hideval = false; |
428 | $scope.showvalue = true; | 428 | $scope.showvalue = true; |
429 | $scope.hidevalue = false; | 429 | $scope.hidevalue = false; |
430 | } | 430 | } |
431 | else { | 431 | else { |
432 | console.log("value3",value) | 432 | console.log("value3",value) |
433 | $scope.showval = false; | 433 | $scope.showval = false; |
434 | $scope.hideval = false; | 434 | $scope.hideval = false; |
435 | $scope.showvalue = false; | 435 | $scope.showvalue = false; |
436 | $scope.hidevalue = true; | 436 | $scope.hidevalue = true; |
437 | } | 437 | } |
438 | } | 438 | } |
439 | 439 | ||
440 | $scope.apply = function() { | 440 | $scope.apply = function() { |
441 | $location.path("/caricatures") | 441 | $location.path("/caricatures") |
442 | //window.location.href = "https://startupjalsa.com/events#/caricatures?utm_source=RegisterNowUp&utm_medium=Reg"; | 442 | //window.location.href = "https://startupjalsa.com/events#/caricatures?utm_source=RegisterNowUp&utm_medium=Reg"; |
443 | 443 | ||
444 | } | 444 | } |
445 | 445 | ||
446 | $scope.applyRegister = function() { | 446 | $scope.applyRegister = function() { |
447 | $location.path("/paytm/caricatures") | 447 | $location.path("/paytm/caricatures") |
448 | //window.location.href = "https://startupjalsa.com/events#/caricatures?utm_source=RegisterNowDown&utm_medium=Register"; | 448 | //window.location.href = "https://startupjalsa.com/events#/caricatures?utm_source=RegisterNowDown&utm_medium=Register"; |
449 | } | 449 | } |
450 | 450 | ||
451 | $scope.applyCampusAmabassador = function() { | 451 | $scope.applyForm = function() { |
452 | //console.log("palak") | ||
452 | $location.path("/campusAmbassadorForm") | 453 | $location.path("/campusAmbassadorForm") |
453 | //window.location.href = "https://startupjalsa.com/events#/caricatures?utm_source=RegisterNowDown&utm_medium=Register"; | 454 | //window.location.href = "https://startupjalsa.com/events#/caricatures?utm_source=RegisterNowDown&utm_medium=Register"; |
454 | } | 455 | } |
455 | 456 | ||
456 | $scope.click=function(){ | 457 | $scope.click=function(){ |
457 | Analytics.trackEvent('whatsapp', 'click', 'Registration'); | 458 | Analytics.trackEvent('whatsapp', 'click', 'Registration'); |
458 | let redirectUrl = "https://wa.me/918283056881"; | 459 | let redirectUrl = "https://wa.me/918283056881"; |
459 | window.open(redirectUrl,"_blank") | 460 | window.open(redirectUrl,"_blank") |
460 | } | 461 | } |
461 | 462 | ||
462 | // $scope.data.city = ''; | 463 | // $scope.data.city = ''; |
463 | $scope.watch = function(value){ | 464 | $scope.watch = function(value){ |
464 | //document.getElementById("ahmedabad").src = ""; | 465 | //document.getElementById("ahmedabad").src = ""; |
465 | // console.log("cllll",value) | 466 | // console.log("cllll",value) |
466 | $scope.data.city = value; | 467 | $scope.data.city = value; |
467 | // if($scope.data.city == "Chennai"){ | 468 | // if($scope.data.city == "Chennai"){ |
468 | // console.log("cllll1",value) | 469 | // console.log("cllll1",value) |
469 | // $window.location.href = 'http://35.154.24.158:8007'; | 470 | // $window.location.href = 'http://35.154.24.158:8007'; |
470 | // }else{ | 471 | // }else{ |
471 | // console.log("cllll2",value) | 472 | // console.log("cllll2",value) |
472 | localStorage.setItem("city" ,value); | 473 | localStorage.setItem("city" ,value); |
473 | 474 | ||
474 | //$location.path('/registration').search({city: value}); | 475 | //$location.path('/registration').search({city: value}); |
475 | // $location.path('/registration/'+value+''); | 476 | // $location.path('/registration/'+value+''); |
476 | $location.path('/registration'); | 477 | $location.path('/registration'); |
477 | //$state.go('registration', { 'city': value}) | 478 | //$state.go('registration', { 'city': value}) |
478 | // } | 479 | // } |
479 | } | 480 | } |
480 | 481 | ||
481 | $scope.watchCity = function(value){ | 482 | $scope.watchCity = function(value){ |
482 | $scope.data.city = value; | 483 | $scope.data.city = value; |
483 | localStorage.setItem("city" ,value); | 484 | localStorage.setItem("city" ,value); |
484 | $location.path('/paytm/checkout'); | 485 | $location.path('/paytm/checkout'); |
485 | } | 486 | } |
486 | 487 | ||
487 | $scope.select = function(url){ | 488 | $scope.select = function(url){ |
488 | console.log("cllll") | 489 | console.log("cllll") |
489 | window.open(url) | 490 | window.open(url) |
490 | } | 491 | } |
491 | 492 | ||
492 | $scope.stagekeyPress = function() { | 493 | $scope.stagekeyPress = function() { |
493 | $('.icon-circle-a').css('background-color', 'rgb(25, 104, 157)'); | 494 | $('.icon-circle-a').css('background-color', 'rgb(25, 104, 157)'); |
494 | } | 495 | } |
495 | $scope.sectorkeyPress = function() { | 496 | $scope.sectorkeyPress = function() { |
496 | $('.icon-circle-b').css('background-color', 'rgb(25, 104, 157)'); | 497 | $('.icon-circle-b').css('background-color', 'rgb(25, 104, 157)'); |
497 | } | 498 | } |
498 | 499 | ||
499 | $scope.productLaunchkeyPress = function() { | 500 | $scope.productLaunchkeyPress = function() { |
500 | $('.icon-circle-ab').css('background-color', 'rgb(25, 104, 157)'); | 501 | $('.icon-circle-ab').css('background-color', 'rgb(25, 104, 157)'); |
501 | } | 502 | } |
502 | 503 | ||
503 | $scope.launchPeriodkeyPress = function() { | 504 | $scope.launchPeriodkeyPress = function() { |
504 | $('.icon-circle-abc').css('background-color', 'rgb(25, 104, 157)'); | 505 | $('.icon-circle-abc').css('background-color', 'rgb(25, 104, 157)'); |
505 | } | 506 | } |
506 | 507 | ||
507 | $scope.industrykeyPress = function(quantity) { | 508 | $scope.industrykeyPress = function(quantity) { |
508 | console.log("fghj",quantity) | 509 | console.log("fghj",quantity) |
509 | $('.icon-circle-abcdefg').css('background-color', 'rgb(25, 104, 157)'); | 510 | $('.icon-circle-abcdefg').css('background-color', 'rgb(25, 104, 157)'); |
510 | } | 511 | } |
511 | 512 | ||
512 | $scope.industryNamekeyPress = function(firstName) { | 513 | $scope.industryNamekeyPress = function(firstName) { |
513 | console.log("lastName==", firstName); | 514 | console.log("lastName==", firstName); |
514 | if (firstName == undefined) { | 515 | if (firstName == undefined) { |
515 | $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)'); | 516 | $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)'); |
516 | } else { | 517 | } else { |
517 | $('.icon-circle-o').css('background-color', 'rgb(25, 104, 157)'); | 518 | $('.icon-circle-o').css('background-color', 'rgb(25, 104, 157)'); |
518 | } | 519 | } |
519 | } | 520 | } |
520 | 521 | ||
521 | $scope.amountkeyPress = function() { | 522 | $scope.amountkeyPress = function() { |
522 | $('.icon-circle-bc').css('background-color', 'rgb(25, 104, 157)'); | 523 | $('.icon-circle-bc').css('background-color', 'rgb(25, 104, 157)'); |
523 | } | 524 | } |
524 | 525 | ||
525 | $scope.firstNamekeyPress = function(name) { | 526 | $scope.firstNamekeyPress = function(name) { |
526 | console.log("lastName==", name); | 527 | console.log("lastName==", name); |
527 | if (name == undefined) { | 528 | if (name == undefined) { |
528 | $('.icon-circle-c').css('background-color', 'rgb(102, 102, 102)'); | 529 | $('.icon-circle-c').css('background-color', 'rgb(102, 102, 102)'); |
529 | } else { | 530 | } else { |
530 | $('.icon-circle-c').css('background-color', 'rgb(25, 104, 157)'); | 531 | $('.icon-circle-c').css('background-color', 'rgb(25, 104, 157)'); |
531 | } | 532 | } |
532 | } | 533 | } |
533 | 534 | ||
534 | $scope.emailkeyPress = function(email) { | 535 | $scope.emailkeyPress = function(email) { |
535 | console.log("email", email); | 536 | console.log("email", email); |
536 | if (email == undefined) { | 537 | if (email == undefined) { |
537 | $('.icon-circle-d').css('background-color', 'rgb(102, 102, 102)'); | 538 | $('.icon-circle-d').css('background-color', 'rgb(102, 102, 102)'); |
538 | } else { | 539 | } else { |
539 | $('.icon-circle-d').css('background-color', 'rgb(25, 104, 157)'); | 540 | $('.icon-circle-d').css('background-color', 'rgb(25, 104, 157)'); |
540 | } | 541 | } |
541 | } | 542 | } |
542 | 543 | ||
543 | $scope.phonekeyPress = function(number) { | 544 | $scope.phonekeyPress = function(number) { |
544 | console.log("number", number); | 545 | console.log("number", number); |
545 | if (number == undefined || number == '') { | 546 | if (number == undefined || number == '') { |
546 | $('.icon-circle-e').css('background-color', 'rgb(102, 102, 102)'); | 547 | $('.icon-circle-e').css('background-color', 'rgb(102, 102, 102)'); |
547 | } else { | 548 | } else { |
548 | $('.icon-circle-e').css('background-color', 'rgb(25, 104, 157)'); | 549 | $('.icon-circle-e').css('background-color', 'rgb(25, 104, 157)'); |
549 | } | 550 | } |
550 | } | 551 | } |
551 | 552 | ||
552 | $scope.citykeyPress = function(city) { | 553 | $scope.citykeyPress = function(city) { |
553 | console.log("city", city); | 554 | console.log("city", city); |
554 | if (city == undefined) { | 555 | if (city == undefined) { |
555 | $('.icon-circle-f').css('background-color', 'rgb(102, 102, 102)'); | 556 | $('.icon-circle-f').css('background-color', 'rgb(102, 102, 102)'); |
556 | } else { | 557 | } else { |
557 | $('.icon-circle-f').css('background-color', 'rgb(25, 104, 157)'); | 558 | $('.icon-circle-f').css('background-color', 'rgb(25, 104, 157)'); |
558 | } | 559 | } |
559 | } | 560 | } |
560 | 561 | ||
561 | $scope.startupNamekeyPress = function(q) { | 562 | $scope.startupNamekeyPress = function(q) { |
562 | if (q == undefined) { | 563 | if (q == undefined) { |
563 | $('.icon-circle-x').css('background-color', 'rgb(102, 102, 102)'); | 564 | $('.icon-circle-x').css('background-color', 'rgb(102, 102, 102)'); |
564 | } else { | 565 | } else { |
565 | $('.icon-circle-x').css('background-color', 'rgb(25, 104, 157)'); | 566 | $('.icon-circle-x').css('background-color', 'rgb(25, 104, 157)'); |
566 | } | 567 | } |
567 | } | 568 | } |
568 | 569 | ||
569 | $scope.linkedInkeyPress = function(technology) { | 570 | $scope.linkedInkeyPress = function(technology) { |
570 | if (technology == undefined || technology == '') { | 571 | if (technology == undefined || technology == '') { |
571 | $('.icon-circle-h').css('background-color', 'rgb(102, 102, 102)'); | 572 | $('.icon-circle-h').css('background-color', 'rgb(102, 102, 102)'); |
572 | } else { | 573 | } else { |
573 | $('.icon-circle-h').css('background-color', 'rgb(25, 104, 157)'); | 574 | $('.icon-circle-h').css('background-color', 'rgb(25, 104, 157)'); |
574 | } | 575 | } |
575 | } | 576 | } |
576 | $scope.companykeyPress = function(problem) { | 577 | $scope.companykeyPress = function(problem) { |
577 | if (problem == undefined) { | 578 | if (problem == undefined) { |
578 | $('.icon-circle-i').css('background-color', 'rgb(102, 102, 102)'); | 579 | $('.icon-circle-i').css('background-color', 'rgb(102, 102, 102)'); |
579 | } else { | 580 | } else { |
580 | $('.icon-circle-i').css('background-color', 'rgb(25, 104, 157)'); | 581 | $('.icon-circle-i').css('background-color', 'rgb(25, 104, 157)'); |
581 | } | 582 | } |
582 | } | 583 | } |
583 | $scope.productNamekeyPress = function(solution) { | 584 | $scope.productNamekeyPress = function(solution) { |
584 | if (solution == undefined) { | 585 | if (solution == undefined) { |
585 | $('.icon-circle-j').css('background-color', 'rgb(102, 102, 102)'); | 586 | $('.icon-circle-j').css('background-color', 'rgb(102, 102, 102)'); |
586 | } else { | 587 | } else { |
587 | $('.icon-circle-j').css('background-color', 'rgb(25, 104, 157)'); | 588 | $('.icon-circle-j').css('background-color', 'rgb(25, 104, 157)'); |
588 | } | 589 | } |
589 | } | 590 | } |
590 | $scope.businesskeyPress = function(business) { | 591 | $scope.businesskeyPress = function(business) { |
591 | if (business == undefined) { | 592 | if (business == undefined) { |
592 | $('.icon-circle-p').css('background-color', 'rgb(102, 102, 102)'); | 593 | $('.icon-circle-p').css('background-color', 'rgb(102, 102, 102)'); |
593 | } else { | 594 | } else { |
594 | $('.icon-circle-p').css('background-color', 'rgb(25, 104, 157)'); | 595 | $('.icon-circle-p').css('background-color', 'rgb(25, 104, 157)'); |
595 | } | 596 | } |
596 | } | 597 | } |
597 | 598 | ||
598 | $scope.websitekeyPress = function(prototype) { | 599 | $scope.websitekeyPress = function(prototype) { |
599 | if (prototype == undefined || prototype == '') { | 600 | if (prototype == undefined || prototype == '') { |
600 | $('.icon-circle-k').css('background-color', 'rgb(102, 102, 102)'); | 601 | $('.icon-circle-k').css('background-color', 'rgb(102, 102, 102)'); |
601 | } else { | 602 | } else { |
602 | $('.icon-circle-k').css('background-color', 'rgb(25, 104, 157)'); | 603 | $('.icon-circle-k').css('background-color', 'rgb(25, 104, 157)'); |
603 | } | 604 | } |
604 | } | 605 | } |
605 | 606 | ||
606 | $scope.employeekeyPress = function(market) { | 607 | $scope.employeekeyPress = function(market) { |
607 | if (market == undefined || market == '') { | 608 | if (market == undefined || market == '') { |
608 | $('.icon-circle-l').css('background-color', 'rgb(102, 102, 102)'); | 609 | $('.icon-circle-l').css('background-color', 'rgb(102, 102, 102)'); |
609 | } else { | 610 | } else { |
610 | $('.icon-circle-l').css('background-color', 'rgb(25, 104, 157)'); | 611 | $('.icon-circle-l').css('background-color', 'rgb(25, 104, 157)'); |
611 | } | 612 | } |
612 | } | 613 | } |
613 | 614 | ||
614 | $scope.annualkeyPress = function(risk) { | 615 | $scope.annualkeyPress = function(risk) { |
615 | if (risk == undefined || risk == '') { | 616 | if (risk == undefined || risk == '') { |
616 | $('.icon-circle-m').css('background-color', 'rgb(102, 102, 102)'); | 617 | $('.icon-circle-m').css('background-color', 'rgb(102, 102, 102)'); |
617 | } else { | 618 | } else { |
618 | $('.icon-circle-m').css('background-color', 'rgb(25, 104, 157)'); | 619 | $('.icon-circle-m').css('background-color', 'rgb(25, 104, 157)'); |
619 | } | 620 | } |
620 | } | 621 | } |
621 | 622 | ||
622 | $scope.revenuekeyPress = function(team) { | 623 | $scope.revenuekeyPress = function(team) { |
623 | if (team == undefined) { | 624 | if (team == undefined) { |
624 | $('.icon-circle-n').css('background-color', 'rgb(102, 102, 102)'); | 625 | $('.icon-circle-n').css('background-color', 'rgb(102, 102, 102)'); |
625 | } else { | 626 | } else { |
626 | $('.icon-circle-n').css('background-color', 'rgb(25, 104, 157)'); | 627 | $('.icon-circle-n').css('background-color', 'rgb(25, 104, 157)'); |
627 | } | 628 | } |
628 | } | 629 | } |
629 | 630 | ||
630 | $scope.descriptionkeyPress = function(pitch) { | 631 | $scope.descriptionkeyPress = function(pitch) { |
631 | if (pitch == undefined) { | 632 | if (pitch == undefined) { |
632 | $('.icon-circle-z').css('background-color', 'rgb(102, 102, 102)'); | 633 | $('.icon-circle-z').css('background-color', 'rgb(102, 102, 102)'); |
633 | } else { | 634 | } else { |
634 | $('.icon-circle-z').css('background-color', 'rgb(25, 104, 157)'); | 635 | $('.icon-circle-z').css('background-color', 'rgb(25, 104, 157)'); |
635 | } | 636 | } |
636 | } | 637 | } |
637 | 638 | ||
638 | $scope.discountkeyPress = function(discount) { | 639 | $scope.discountkeyPress = function(discount) { |
639 | if (discount == undefined) { | 640 | if (discount == undefined) { |
640 | $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)'); | 641 | $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)'); |
641 | } else { | 642 | } else { |
642 | $('.icon-circle-o').css('background-color', 'rgb(25, 104, 157)'); | 643 | $('.icon-circle-o').css('background-color', 'rgb(25, 104, 157)'); |
643 | } | 644 | } |
644 | } | 645 | } |
645 | 646 | ||
646 | $scope.removeNooError = function() { | 647 | $scope.removeNooError = function() { |
647 | $('#invalidIdea').css('display', 'block'); | 648 | $('#invalidIdea').css('display', 'block'); |
648 | $('#noExist').css('display', 'none'); | 649 | $('#noExist').css('display', 'none'); |
649 | }; | 650 | }; |
650 | 651 | ||
651 | $scope.ideakeyPress = function(financial) { | 652 | $scope.ideakeyPress = function(financial) { |
652 | console.log("financial", financial); | 653 | console.log("financial", financial); |
653 | if (financial == undefined) { | 654 | if (financial == undefined) { |
654 | $('.icon-circle-q').css('background-color', 'rgb(102, 102, 102)'); | 655 | $('.icon-circle-q').css('background-color', 'rgb(102, 102, 102)'); |
655 | } else { | 656 | } else { |
656 | $('.icon-circle-q').css('background-color', 'rgb(25, 104, 157)'); | 657 | $('.icon-circle-q').css('background-color', 'rgb(25, 104, 157)'); |
657 | } | 658 | } |
658 | } | 659 | } |
659 | 660 | ||
660 | $scope.fundkeyPress = function(financial) { | 661 | $scope.fundkeyPress = function(financial) { |
661 | console.log("financial", financial); | 662 | console.log("financial", financial); |
662 | if (financial == undefined) { | 663 | if (financial == undefined) { |
663 | $('.icon-circle-y').css('background-color', 'rgb(102, 102, 102)'); | 664 | $('.icon-circle-y').css('background-color', 'rgb(102, 102, 102)'); |
664 | } else { | 665 | } else { |
665 | $('.icon-circle-y').css('background-color', 'rgb(25, 104, 157)'); | 666 | $('.icon-circle-y').css('background-color', 'rgb(25, 104, 157)'); |
666 | } | 667 | } |
667 | } | 668 | } |
668 | 669 | ||
669 | $scope.changeReferalIconColor = function(referalToken){ | 670 | $scope.changeReferalIconColor = function(referalToken){ |
670 | if (referalToken == undefined || referalToken == '') { | 671 | if (referalToken == undefined || referalToken == '') { |
671 | $('.referel-icon').css('background-color', 'rgb(102, 102, 102)'); | 672 | $('.referel-icon').css('background-color', 'rgb(102, 102, 102)'); |
672 | }else { | 673 | }else { |
673 | $('.referel-icon').css('background-color', 'rgb(25, 104, 157)'); | 674 | $('.referel-icon').css('background-color', 'rgb(25, 104, 157)'); |
674 | } | 675 | } |
675 | } | 676 | } |
676 | 677 | ||
677 | }); | 678 | }); |
678 | 679 | ||
679 | scotchApp.controller('registrationController', function($q, $scope, $http, $location, $rootScope,$route,BASE_URL,Analytics) { | 680 | scotchApp.controller('registrationController', function($q, $scope, $http, $location, $rootScope,$route,BASE_URL,Analytics) { |
680 | $scope.data = {}; | 681 | $scope.data = {}; |
681 | $scope.check = false; | 682 | $scope.check = false; |
682 | $scope.numberCheck = false; | 683 | $scope.numberCheck = false; |
683 | $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ | 684 | $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ |
684 | $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ | 685 | $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ |
685 | $scope.max = 100; | 686 | $scope.max = 100; |
686 | $scope.formPage = false; | 687 | $scope.formPage = false; |
687 | $scope.current = 0; | 688 | $scope.current = 0; |
688 | $scope.payingAmnt = 0; | 689 | $scope.payingAmnt = 0; |
689 | $scope.discountAmount = 0; | 690 | $scope.discountAmount = 0; |
690 | $scope.approvedMsg = false; | 691 | $scope.approvedMsg = false; |
691 | $scope.disApprovedMsg = false; | 692 | $scope.disApprovedMsg = false; |
692 | 693 | ||
693 | // $scope.data.quantity = "1"; | 694 | // $scope.data.quantity = "1"; |
694 | $scope.check = false; | 695 | $scope.check = false; |
695 | $scope.numberCheck = false; | 696 | $scope.numberCheck = false; |
696 | $scope.paymentResult = {}; | 697 | $scope.paymentResult = {}; |
697 | // var myParam = window.location.href.split('status=').splice(1).join('').split('&')[0] | 698 | // var myParam = window.location.href.split('status=').splice(1).join('').split('&')[0] |
698 | // if(myParam){ | 699 | // if(myParam){ |
699 | // if(myParam == "approved"){ | 700 | // if(myParam == "approved"){ |
700 | // $scope.showResponse = true; | 701 | // $scope.showResponse = true; |
701 | // }else{ | 702 | // }else{ |
702 | // $scope.disApprovedMsg = true; | 703 | // $scope.disApprovedMsg = true; |
703 | // } | 704 | // } |
704 | // }else{ | 705 | // }else{ |
705 | // $scope.disApprovedMsg = true; | 706 | // $scope.disApprovedMsg = true; |
706 | // } | 707 | // } |
707 | 708 | ||
708 | $scope.click=function(){ | 709 | $scope.click=function(){ |
709 | Analytics.trackEvent('whatsapp', 'click', 'Registration'); | 710 | Analytics.trackEvent('whatsapp', 'click', 'Registration'); |
710 | let redirectUrl = "https://wa.me/918283056881"; | 711 | let redirectUrl = "https://wa.me/918283056881"; |
711 | window.open(redirectUrl,"_blank") | 712 | window.open(redirectUrl,"_blank") |
712 | } | 713 | } |
713 | 714 | ||
714 | $scope.removeError = function() { | 715 | $scope.removeError = function() { |
715 | $('#invalidEmail').css('display', 'none'); | 716 | $('#invalidEmail').css('display', 'none'); |
716 | $('#alreadyExist').css('display', 'none'); | 717 | $('#alreadyExist').css('display', 'none'); |
717 | }; | 718 | }; |
718 | 719 | ||
719 | $scope.emailcheck = function(val) { | 720 | $scope.emailcheck = function(val) { |
720 | if (val == undefined) { | 721 | if (val == undefined) { |
721 | $('#invalidEmail').css('display', 'block'); | 722 | $('#invalidEmail').css('display', 'block'); |
722 | } else { | 723 | } else { |
723 | $('#alreadyExist').css('display', 'block'); | 724 | $('#alreadyExist').css('display', 'block'); |
724 | } | 725 | } |
725 | }; | 726 | }; |
726 | 727 | ||
727 | $scope.removeNoError = function() { | 728 | $scope.removeNoError = function() { |
728 | $('#invalidNumber').css('display', 'none'); | 729 | $('#invalidNumber').css('display', 'none'); |
729 | $('#alreadyExist').css('display', 'none'); | 730 | $('#alreadyExist').css('display', 'none'); |
730 | }; | 731 | }; |
731 | 732 | ||
732 | $scope.numbercheck = function(val) { | 733 | $scope.numbercheck = function(val) { |
733 | if (val == undefined) { | 734 | if (val == undefined) { |
734 | $('#invalidNumber').css('display', 'block'); | 735 | $('#invalidNumber').css('display', 'block'); |
735 | } else { | 736 | } else { |
736 | $('#alreadyExist').css('display', 'block'); | 737 | $('#alreadyExist').css('display', 'block'); |
737 | } | 738 | } |
738 | }; | 739 | }; |
739 | 740 | ||
740 | // $scope.$on('city', function (event, value) { | 741 | // $scope.$on('city', function (event, value) { |
741 | $scope.data.city = localStorage.getItem("city"); | 742 | $scope.data.city = localStorage.getItem("city"); |
742 | $scope.data.country = localStorage.getItem("country"); | 743 | $scope.data.country = localStorage.getItem("country"); |
743 | // }); | 744 | // }); |
744 | var data = { | 745 | var data = { |
745 | "amount": $scope.payingAmnt, | 746 | "amount": $scope.payingAmnt, |
746 | "currency": "INR", | 747 | "currency": "INR", |
747 | "status": "pending", | 748 | "status": "pending", |
748 | "paymentType": $scope.data.country | 749 | "paymentType": $scope.data.country |
749 | } | 750 | } |
750 | 751 | ||
751 | var handleFileSelect = function(evt) { | 752 | var handleFileSelect = function(evt) { |
752 | var files = evt.target.files; | 753 | var files = evt.target.files; |
753 | var file = files[0]; | 754 | var file = files[0]; |
754 | 755 | ||
755 | if (files && file) { | 756 | if (files && file) { |
756 | var reader = new FileReader(); | 757 | var reader = new FileReader(); |
757 | 758 | ||
758 | reader.onload = function(readerEvt) { | 759 | reader.onload = function(readerEvt) { |
759 | var binaryString = readerEvt.target.result; | 760 | var binaryString = readerEvt.target.result; |
760 | $scope.base64textString = btoa(binaryString); | 761 | $scope.base64textString = btoa(binaryString); |
761 | //console.log("base64textarea",$scope.base64textString) | 762 | //console.log("base64textarea",$scope.base64textString) |
762 | //$scope.data.uploadFile = file.name; | 763 | //$scope.data.uploadFile = file.name; |
763 | $scope.fileSelect = false; | 764 | $scope.fileSelect = false; |
764 | if($scope.data.uploadFile == null){ | 765 | if($scope.data.uploadFile == null){ |
765 | $scope.fileSelect = true; | 766 | $scope.fileSelect = true; |
766 | }else{ | 767 | }else{ |
767 | $scope.fileSelect = false; | 768 | $scope.fileSelect = false; |
768 | }; | 769 | }; |
769 | } | 770 | } |
770 | 771 | ||
771 | reader.readAsBinaryString(file); | 772 | reader.readAsBinaryString(file); |
772 | } | 773 | } |
773 | }; | 774 | }; |
774 | if (window.File && window.FileReader && window.FileList && window.Blob) { | 775 | if (window.File && window.FileReader && window.FileList && window.Blob) { |
775 | document.getElementById('filePicker').addEventListener('change', handleFileSelect, false); | 776 | document.getElementById('filePicker').addEventListener('change', handleFileSelect, false); |
776 | } | 777 | } |
777 | 778 | ||
778 | $scope.ngShowhide = false; | 779 | $scope.ngShowhide = false; |
779 | $scope.GetValue = function(){ | 780 | $scope.GetValue = function(){ |
780 | if($scope.data.sector == "Other"){ | 781 | if($scope.data.sector == "Other"){ |
781 | $scope.ngShowhide = true; | 782 | $scope.ngShowhide = true; |
782 | }else{ | 783 | }else{ |
783 | $scope.ngShowhide = false; | 784 | $scope.ngShowhide = false; |
784 | } | 785 | } |
785 | } | 786 | } |
786 | 787 | ||
787 | $scope.ngShow = false; | 788 | $scope.ngShow = false; |
788 | $scope.getValue = function(){ | 789 | $scope.getValue = function(){ |
789 | if($scope.data.hear == "Other"){ | 790 | if($scope.data.hear == "Other"){ |
790 | $scope.ngShow = true; | 791 | $scope.ngShow = true; |
791 | }else{ | 792 | }else{ |
792 | $scope.ngShow = false; | 793 | $scope.ngShow = false; |
793 | } | 794 | } |
794 | } | 795 | } |
795 | $scope.payingAmnt = 1180; | 796 | $scope.payingAmnt = 1180; |
796 | $rootScope.tokenCall = function(val) { | 797 | $rootScope.tokenCall = function(val) { |
797 | if (val == undefined) { | 798 | if (val == undefined) { |
798 | $('#invalidToken').css('display', 'block'); | 799 | $('#invalidToken').css('display', 'block'); |
799 | } else { | 800 | } else { |
800 | val = val.toUpperCase(); | 801 | val = val.toUpperCase(); |
801 | if(((val == "IITH99" || val == "IITH90") && $scope.data.city != "Hyderabad") || (val == "IITM99" && $scope.data.city != "Chennai") || (val == "IITD99" && $scope.data.city != "Delhi") || (val == "IITB99" && $scope.data.city != "Mumbai") || (val == "IITK99" && $scope.data.city != "Kanpur") || (val == "IIMC99" && $scope.data.city != "Kolkata") || (val == "IIMB99" && $scope.data.city != "Bengaluru") || (val == "IIMA99" && $scope.data.city != "Ahmedabad")){ | 802 | if(((val == "IITH99" || val == "IITH90") && $scope.data.city != "Hyderabad") || (val == "IITM99" && $scope.data.city != "Chennai") || (val == "IITD99" && $scope.data.city != "Delhi") || (val == "IITB99" && $scope.data.city != "Mumbai") || (val == "IITK99" && $scope.data.city != "Kanpur") || (val == "IIMC99" && $scope.data.city != "Kolkata") || (val == "IIMB99" && $scope.data.city != "Bengaluru") || (val == "IIMA99" && $scope.data.city != "Ahmedabad")){ |
802 | $scope.tokencheck = false; | 803 | $scope.tokencheck = false; |
803 | return; | 804 | return; |
804 | } | 805 | } |
805 | $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": "' + val + '"}}') | 806 | $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": "' + val + '"}}') |
806 | .then(function(searchResult) { | 807 | .then(function(searchResult) { |
807 | if (searchResult.data.length == 0) { | 808 | if (searchResult.data.length == 0) { |
808 | $scope.tokencheck = false; | 809 | $scope.tokencheck = false; |
809 | $scope.discountAmount = 0; | 810 | $scope.discountAmount = 0; |
810 | 811 | ||
811 | } else { | 812 | } else { |
812 | $scope.discountpercentage = searchResult.data[0].discount; | 813 | $scope.discountpercentage = searchResult.data[0].discount; |
813 | $scope.tokencheck = true; | 814 | $scope.tokencheck = true; |
814 | } | 815 | } |
815 | $scope.ticketAmnt = 1180; | 816 | $scope.ticketAmnt = 1180; |
816 | var amount = $scope.ticketAmnt * 100 | 817 | var amount = $scope.ticketAmnt * 100 |
817 | if($scope.tokencheck == true){ | 818 | if($scope.tokencheck == true){ |
818 | var amount = $scope.ticketAmnt | 819 | var amount = $scope.ticketAmnt |
819 | if($scope.discountpercentage == "100") { | 820 | if($scope.discountpercentage == "100") { |
820 | $scope.discountpercentage = "99.9"; | 821 | $scope.discountpercentage = "99.9"; |
821 | } | 822 | } |
822 | $scope.percDiscount = $scope.discountpercentage/100; | 823 | $scope.percDiscount = $scope.discountpercentage/100; |
823 | $scope.discountAmount = amount * $scope.percDiscount; | 824 | $scope.discountAmount = amount * $scope.percDiscount; |
824 | } | 825 | } |
825 | var taxAmount = $scope.ticketAmnt - $scope.discountAmount | 826 | var taxAmount = $scope.ticketAmnt - $scope.discountAmount |
826 | $scope.payingAmnt = taxAmount; | 827 | $scope.payingAmnt = taxAmount; |
827 | $scope.payingAmnt = $scope.payingAmnt.toFixed() | 828 | $scope.payingAmnt = $scope.payingAmnt.toFixed() |
828 | },function(err){ | 829 | },function(err){ |
829 | console.log(err) | 830 | console.log(err) |
830 | }); | 831 | }); |
831 | 832 | ||
832 | } | 833 | } |
833 | }; | 834 | }; |
834 | // if($scope.data.country == "INDIA"){ | 835 | // if($scope.data.country == "INDIA"){ |
835 | // $scope.submit = function() { | 836 | // $scope.submit = function() { |
836 | // Analytics.trackEvent('register', 'click', 'Registration'); | 837 | // Analytics.trackEvent('register', 'click', 'Registration'); |
837 | // $scope.loading = true; | 838 | // $scope.loading = true; |
838 | // $scope.data.uploadFile = $scope.base64textString; | 839 | // $scope.data.uploadFile = $scope.base64textString; |
839 | // console.log($scope.data.uploadFile) | 840 | // console.log($scope.data.uploadFile) |
840 | // // if($scope.tokencheck == false){ | 841 | // // if($scope.tokencheck == false){ |
841 | // // $scope.data.referalToken = null; | 842 | // // $scope.data.referalToken = null; |
842 | // // } | 843 | // // } |
843 | // // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { | 844 | // // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { |
844 | // // var x = document.getElementById("snackbar") | 845 | // // var x = document.getElementById("snackbar") |
845 | // // setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); | 846 | // // setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); |
846 | // // }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { | 847 | // // }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { |
847 | // $scope.infoForm = true; | 848 | // $scope.infoForm = true; |
848 | // $scope.ticketAmnt = 1180; | 849 | // $scope.ticketAmnt = 1180; |
849 | // $scope.detail = {}; | 850 | // $scope.detail = {}; |
850 | // $scope.data.phone = "+91"+$scope.data.number; | 851 | // $scope.data.phone = "+91"+$scope.data.number; |
851 | // if($scope.data.referalToken == null){ | 852 | // if($scope.data.referalToken == null){ |
852 | // $scope.data.referalToken = "NA" | 853 | // $scope.data.referalToken = "NA" |
853 | // } | 854 | // } |
854 | // var file =document.getElementById('filePicker').files[0]; | 855 | // var file =document.getElementById('filePicker').files[0]; |
855 | // var image = BASE_URL+'/containers/images/download/' | 856 | // var image = BASE_URL+'/containers/images/download/' |
856 | // var imagePath = file.name; | 857 | // var imagePath = file.name; |
857 | // $scope.data.uploadFile = image + imagePath; | 858 | // $scope.data.uploadFile = image + imagePath; |
858 | // var fd = new FormData() | 859 | // var fd = new FormData() |
859 | // fd.append('filePicker',file); | 860 | // fd.append('filePicker',file); |
860 | // var deferred = $q.defer(); | 861 | // var deferred = $q.defer(); |
861 | // $http({ | 862 | // $http({ |
862 | // method:'POST', | 863 | // method:'POST', |
863 | // url: BASE_URL+'/containers/images/upload', | 864 | // url: BASE_URL+'/containers/images/upload', |
864 | // data:fd, | 865 | // data:fd, |
865 | // transformRequest:angular.identity, | 866 | // transformRequest:angular.identity, |
866 | // headers:{'Content-Type':undefined} | 867 | // headers:{'Content-Type':undefined} |
867 | // }) | 868 | // }) |
868 | // .success(function(result){ | 869 | // .success(function(result){ |
869 | // deferred.resolve(result); | 870 | // deferred.resolve(result); |
870 | // $http({ | 871 | // $http({ |
871 | // method: 'POST', | 872 | // method: 'POST', |
872 | // url: BASE_URL+'/applicants', | 873 | // url: BASE_URL+'/applicants', |
873 | // data: $scope.data, | 874 | // data: $scope.data, |
874 | // headers: {} | 875 | // headers: {} |
875 | // }).then(function mySuccess(result) { | 876 | // }).then(function mySuccess(result) { |
876 | // $scope.detail = result; | 877 | // $scope.detail = result; |
877 | // data.applicantId = result.data.id; | 878 | // data.applicantId = result.data.id; |
878 | // $scope.userId = result.data.id; | 879 | // $scope.userId = result.data.id; |
879 | // var amount = $scope.ticketAmnt * 100 | 880 | // var amount = $scope.ticketAmnt * 100 |
880 | // if($scope.tokencheck == true){ | 881 | // if($scope.tokencheck == true){ |
881 | // var amount = $scope.ticketAmnt | 882 | // var amount = $scope.ticketAmnt |
882 | // console.log("resultcity===",$scope.data.city) | 883 | // console.log("resultcity===",$scope.data.city) |
883 | // if($scope.discountpercentage == "100") { | 884 | // if($scope.discountpercentage == "100") { |
884 | // $scope.discountpercentage = "99.9"; | 885 | // $scope.discountpercentage = "99.9"; |
885 | // } | 886 | // } |
886 | // $scope.percDiscount = $scope.discountpercentage/100; | 887 | // $scope.percDiscount = $scope.discountpercentage/100; |
887 | // $scope.discountAmount = amount * $scope.percDiscount; | 888 | // $scope.discountAmount = amount * $scope.percDiscount; |
888 | // } | 889 | // } |
889 | // var taxAmount = $scope.ticketAmnt - $scope.discountAmount | 890 | // var taxAmount = $scope.ticketAmnt - $scope.discountAmount |
890 | // $scope.payingAmnt = taxAmount; | 891 | // $scope.payingAmnt = taxAmount; |
891 | // $scope.payingAmnt = $scope.payingAmnt.toFixed() | 892 | // $scope.payingAmnt = $scope.payingAmnt.toFixed() |
892 | // data.amount = $scope.payingAmnt; | 893 | // data.amount = $scope.payingAmnt; |
893 | // if($scope.detail != null){ | 894 | // if($scope.detail != null){ |
894 | // $http({ | 895 | // $http({ |
895 | // method: 'POST', | 896 | // method: 'POST', |
896 | // url: BASE_URL+'/payments', | 897 | // url: BASE_URL+'/payments', |
897 | // data: data, | 898 | // data: data, |
898 | // headers: {} | 899 | // headers: {} |
899 | // }).then(function mySuccess(paymentResult) { | 900 | // }).then(function mySuccess(paymentResult) { |
900 | // $scope.loading = false; | 901 | // $scope.loading = false; |
901 | // //$("p").html(paymentResult.data.data) | 902 | // //$("p").html(paymentResult.data.data) |
902 | // }, function myError(error) { | 903 | // }, function myError(error) { |
903 | // }); | 904 | // }); |
904 | // } | 905 | // } |
905 | // var i = 0; | 906 | // var i = 0; |
906 | // $scope.payingAmnt = $scope.payingAmnt * 100; | 907 | // $scope.payingAmnt = $scope.payingAmnt * 100; |
907 | // var options = { | 908 | // var options = { |
908 | // "key": "rzp_test_YwHsVFiDIQ2WUQ", | 909 | // "key": "rzp_test_YwHsVFiDIQ2WUQ", |
909 | // //"key": "rzp_live_mkmCb4FkstuWaS", | 910 | // //"key": "rzp_live_mkmCb4FkstuWaS", |
910 | // "amount": $scope.payingAmnt, | 911 | // "amount": $scope.payingAmnt, |
911 | 912 | ||
912 | // "name": "Startup Jalsa", | 913 | // "name": "Startup Jalsa", |
913 | // "description":"amount", | 914 | // "description":"amount", |
914 | // "currency": "INR", | 915 | // "currency": "INR", |
915 | // "status": "done", | 916 | // "status": "done", |
916 | 917 | ||
917 | // "prefill": { | 918 | // "prefill": { |
918 | // "email": $scope.detail.email, | 919 | // "email": $scope.detail.email, |
919 | // "contact": $scope.detail.phone | 920 | // "contact": $scope.detail.phone |
920 | // }, | 921 | // }, |
921 | 922 | ||
922 | // "theme": { | 923 | // "theme": { |
923 | // "color": "#2196f3 ", | 924 | // "color": "#2196f3 ", |
924 | // "image_padding":"NO" | 925 | // "image_padding":"NO" |
925 | // }, | 926 | // }, |
926 | // "modal": { | 927 | // "modal": { |
927 | // "ondismiss": function(){ | 928 | // "ondismiss": function(){ |
928 | // } | 929 | // } |
929 | // }, | 930 | // }, |
930 | // "handler": function (response){ | 931 | // "handler": function (response){ |
931 | // createPayment(response); | 932 | // createPayment(response); |
932 | // } | 933 | // } |
933 | // }; | 934 | // }; |
934 | // var rzp1 = new Razorpay(options); | 935 | // var rzp1 = new Razorpay(options); |
935 | // rzp1.open(); | 936 | // rzp1.open(); |
936 | // $scope.paymentResponse = {}; | 937 | // $scope.paymentResponse = {}; |
937 | // function createPayment(response){ | 938 | // function createPayment(response){ |
938 | // $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; | 939 | // $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; |
939 | // $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; | 940 | // $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; |
940 | // $scope.paymentResponse.amount = data.amount; | 941 | // $scope.paymentResponse.amount = data.amount; |
941 | // $scope.paymentResponse.currency = "INR"; | 942 | // $scope.paymentResponse.currency = "INR"; |
942 | // $scope.paymentResponse.status = $scope.paymentResult.data.status; | 943 | // $scope.paymentResponse.status = $scope.paymentResult.data.status; |
943 | // $http({ | 944 | // $http({ |
944 | // method: 'PUT', | 945 | // method: 'PUT', |
945 | // url: BASE_URL+'/payments/'+$scope.paymentResult.data.id, | 946 | // url: BASE_URL+'/payments/'+$scope.paymentResult.data.id, |
946 | // data: $scope.paymentResponse, | 947 | // data: $scope.paymentResponse, |
947 | // headers: {} | 948 | // headers: {} |
948 | // }).then(function mySuccess(searchResult) { | 949 | // }).then(function mySuccess(searchResult) { |
949 | // Analytics.trackEvent('register', 'click', 'Registration'); | 950 | // Analytics.trackEvent('register', 'click', 'Registration'); |
950 | // $location.path("/confirm") | 951 | // $location.path("/confirm") |
951 | // }, function myError(error) { | 952 | // }, function myError(error) { |
952 | // }); | 953 | // }); |
953 | // } | 954 | // } |
954 | // //} | 955 | // //} |
955 | 956 | ||
956 | // }, function myError(error) { | 957 | // }, function myError(error) { |
957 | 958 | ||
958 | // }); | 959 | // }); |
959 | 960 | ||
960 | // }) | 961 | // }) |
961 | 962 | ||
962 | // // }) | 963 | // // }) |
963 | 964 | ||
964 | // //} | 965 | // //} |
965 | 966 | ||
966 | // } | 967 | // } |
967 | // }else{ | 968 | // }else{ |
968 | // $scope.ticketAmnt = 1180; | 969 | // $scope.ticketAmnt = 1180; |
969 | // var amount = $scope.ticketAmnt * 100 | 970 | // var amount = $scope.ticketAmnt * 100 |
970 | // console.log("amount",amount) | 971 | // console.log("amount",amount) |
971 | // console.log("amount",$scope.tokencheck) | 972 | // console.log("amount",$scope.tokencheck) |
972 | // if($scope.tokencheck == true){ | 973 | // if($scope.tokencheck == true){ |
973 | // var amount = $scope.ticketAmnt | 974 | // var amount = $scope.ticketAmnt |
974 | // console.log("amount",amount) | 975 | // console.log("amount",amount) |
975 | // if($scope.discountpercentage == "100") { | 976 | // if($scope.discountpercentage == "100") { |
976 | // $scope.discountpercentage = "99.9"; | 977 | // $scope.discountpercentage = "99.9"; |
977 | // } | 978 | // } |
978 | // $scope.percDiscount = $scope.discountpercentage/100; | 979 | // $scope.percDiscount = $scope.discountpercentage/100; |
979 | // console.log("$scope.percDiscount",$scope.percDiscount) | 980 | // console.log("$scope.percDiscount",$scope.percDiscount) |
980 | // $scope.discountAmount = amount * $scope.percDiscount; | 981 | // $scope.discountAmount = amount * $scope.percDiscount; |
981 | // } | 982 | // } |
982 | // console.log("$scope.discountAmount",$scope.discountAmount) | 983 | // console.log("$scope.discountAmount",$scope.discountAmount) |
983 | // var taxAmount = $scope.ticketAmnt - $scope.discountAmount | 984 | // var taxAmount = $scope.ticketAmnt - $scope.discountAmount |
984 | // console.log("taxAmount",taxAmount) | 985 | // console.log("taxAmount",taxAmount) |
985 | // $scope.payingAmnt = taxAmount; | 986 | // $scope.payingAmnt = taxAmount; |
986 | // $scope.payingAmnt = $scope.payingAmnt.toFixed() | 987 | // $scope.payingAmnt = $scope.payingAmnt.toFixed() |
987 | 988 | ||
988 | $scope.submit = function() { | 989 | $scope.submit = function() { |
989 | Analytics.trackEvent('register', 'click', 'Registration'); | 990 | Analytics.trackEvent('register', 'click', 'Registration'); |
990 | $scope.loading = true; | 991 | $scope.loading = true; |
991 | $scope.data.uploadFile = $scope.base64textString; | 992 | $scope.data.uploadFile = $scope.base64textString; |
992 | // if($scope.tokencheck == false){ | 993 | // if($scope.tokencheck == false){ |
993 | // $scope.data.referalToken = null; | 994 | // $scope.data.referalToken = null; |
994 | // } | 995 | // } |
995 | // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { | 996 | // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { |
996 | // var x = document.getElementById("snackbar") | 997 | // var x = document.getElementById("snackbar") |
997 | // setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); | 998 | // setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); |
998 | // }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { | 999 | // }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { |
999 | $scope.infoForm = true; | 1000 | $scope.infoForm = true; |
1000 | $scope.ticketAmnt = 1180; | 1001 | $scope.ticketAmnt = 1180; |
1001 | $scope.detail = {}; | 1002 | $scope.detail = {}; |
1002 | $scope.paymentResultt = {}; | 1003 | $scope.paymentResultt = {}; |
1003 | $rootScope.applicantResult = {}; | 1004 | $rootScope.applicantResult = {}; |
1004 | $scope.data.phone = "+91"+$scope.data.number; | 1005 | $scope.data.phone = "+91"+$scope.data.number; |
1005 | if($scope.data.referalToken == null){ | 1006 | if($scope.data.referalToken == null){ |
1006 | $scope.data.referalToken = "NA" | 1007 | $scope.data.referalToken = "NA" |
1007 | } | 1008 | } |
1008 | var file =document.getElementById('filePicker').files[0]; | 1009 | var file =document.getElementById('filePicker').files[0]; |
1009 | //console.log("file",filePicker) | 1010 | //console.log("file",filePicker) |
1010 | var image = BASE_URL+'/containers/images/download/' | 1011 | var image = BASE_URL+'/containers/images/download/' |
1011 | var imagePath = file.name; | 1012 | var imagePath = file.name; |
1012 | $scope.data.uploadFile = image + imagePath; | 1013 | $scope.data.uploadFile = image + imagePath; |
1013 | //console.log($scope.data.uploadFile) | 1014 | //console.log($scope.data.uploadFile) |
1014 | var fd = new FormData() | 1015 | var fd = new FormData() |
1015 | fd.append('filePicker',file); | 1016 | fd.append('filePicker',file); |
1016 | var deferred = $q.defer(); | 1017 | var deferred = $q.defer(); |
1017 | $http({ | 1018 | $http({ |
1018 | method:'POST', | 1019 | method:'POST', |
1019 | url: BASE_URL+'/containers/images/upload', | 1020 | url: BASE_URL+'/containers/images/upload', |
1020 | data:fd, | 1021 | data:fd, |
1021 | transformRequest:angular.identity, | 1022 | transformRequest:angular.identity, |
1022 | headers:{'Content-Type':undefined} | 1023 | headers:{'Content-Type':undefined} |
1023 | }) | 1024 | }) |
1024 | .success(function(result){ | 1025 | .success(function(result){ |
1025 | deferred.resolve(result); | 1026 | deferred.resolve(result); |
1026 | $http({ | 1027 | $http({ |
1027 | method: 'POST', | 1028 | method: 'POST', |
1028 | url: BASE_URL+'/applicants', | 1029 | url: BASE_URL+'/applicants', |
1029 | data: $scope.data, | 1030 | data: $scope.data, |
1030 | headers: {} | 1031 | headers: {} |
1031 | }).then(function mySuccess(result) { | 1032 | }).then(function mySuccess(result) { |
1032 | $scope.detail = result; | 1033 | $scope.detail = result; |
1033 | data.applicantId = result.data.id; | 1034 | data.applicantId = result.data.id; |
1034 | $scope.userId = result.data.id; | 1035 | $scope.userId = result.data.id; |
1035 | var amount = $scope.ticketAmnt * 100 | 1036 | var amount = $scope.ticketAmnt * 100 |
1036 | if($scope.tokencheck == true){ | 1037 | if($scope.tokencheck == true){ |
1037 | var amount = $scope.ticketAmnt | 1038 | var amount = $scope.ticketAmnt |
1038 | if($scope.discountpercentage == "100") { | 1039 | if($scope.discountpercentage == "100") { |
1039 | $scope.discountpercentage = "99.9"; | 1040 | $scope.discountpercentage = "99.9"; |
1040 | } | 1041 | } |
1041 | $scope.percDiscount = $scope.discountpercentage/100; | 1042 | $scope.percDiscount = $scope.discountpercentage/100; |
1042 | $scope.discountAmount = amount * $scope.percDiscount; | 1043 | $scope.discountAmount = amount * $scope.percDiscount; |
1043 | } | 1044 | } |
1044 | var taxAmount = $scope.ticketAmnt - $scope.discountAmount | 1045 | var taxAmount = $scope.ticketAmnt - $scope.discountAmount |
1045 | $scope.payingAmnt = taxAmount; | 1046 | $scope.payingAmnt = taxAmount; |
1046 | $scope.payingAmnt = $scope.payingAmnt.toFixed() | 1047 | $scope.payingAmnt = $scope.payingAmnt.toFixed() |
1047 | data.amount = $scope.payingAmnt; | 1048 | data.amount = $scope.payingAmnt; |
1048 | if($scope.detail != null){ | 1049 | if($scope.detail != null){ |
1049 | $http({ | 1050 | $http({ |
1050 | method: 'POST', | 1051 | method: 'POST', |
1051 | url: BASE_URL+'/payments', | 1052 | url: BASE_URL+'/payments', |
1052 | data: data, | 1053 | data: data, |
1053 | headers: {} | 1054 | headers: {} |
1054 | }).then(function mySuccess(paymentResult) { | 1055 | }).then(function mySuccess(paymentResult) { |
1055 | $scope.loading = false; | 1056 | $scope.loading = false; |
1056 | $scope.paymentResult = paymentResult; | 1057 | $scope.paymentResult = paymentResult; |
1057 | //$("p").html(paymentResult.data.data) | 1058 | //$("p").html(paymentResult.data.data) |
1058 | }, function myError(error) { | 1059 | }, function myError(error) { |
1059 | }); | 1060 | }); |
1060 | } | 1061 | } |
1061 | var i = 0; | 1062 | var i = 0; |
1062 | $scope.payingAmntt = $scope.payingAmnt * 100; | 1063 | $scope.payingAmntt = $scope.payingAmnt * 100; |
1063 | var options = { | 1064 | var options = { |
1064 | //"key": "rzp_test_YwHsVFiDIQ2WUQ", | 1065 | //"key": "rzp_test_YwHsVFiDIQ2WUQ", |
1065 | "key": "rzp_live_mkmCb4FkstuWaS", | 1066 | "key": "rzp_live_mkmCb4FkstuWaS", |
1066 | "amount": $scope.payingAmntt, | 1067 | "amount": $scope.payingAmntt, |
1067 | 1068 | ||
1068 | "name": "Startup Jalsa", | 1069 | "name": "Startup Jalsa", |
1069 | "description":"amount", | 1070 | "description":"amount", |
1070 | "currency": "INR", | 1071 | "currency": "INR", |
1071 | "status": "done", | 1072 | "status": "done", |
1072 | 1073 | ||
1073 | "prefill": { | 1074 | "prefill": { |
1074 | "email": $scope.detail.email, | 1075 | "email": $scope.detail.email, |
1075 | "contact": $scope.detail.phone | 1076 | "contact": $scope.detail.phone |
1076 | }, | 1077 | }, |
1077 | 1078 | ||
1078 | "theme": { | 1079 | "theme": { |
1079 | "color": "#2196f3 ", | 1080 | "color": "#2196f3 ", |
1080 | "image_padding":"NO" | 1081 | "image_padding":"NO" |
1081 | }, | 1082 | }, |
1082 | "modal": { | 1083 | "modal": { |
1083 | "ondismiss": function(){ | 1084 | "ondismiss": function(){ |
1084 | } | 1085 | } |
1085 | }, | 1086 | }, |
1086 | "handler": function (response){ | 1087 | "handler": function (response){ |
1087 | createPayment(response); | 1088 | createPayment(response); |
1088 | } | 1089 | } |
1089 | }; | 1090 | }; |
1090 | var rzp1 = new Razorpay(options); | 1091 | var rzp1 = new Razorpay(options); |
1091 | rzp1.open(); | 1092 | rzp1.open(); |
1092 | $scope.paymentResponse = {}; | 1093 | $scope.paymentResponse = {}; |
1093 | function createPayment(response){ | 1094 | function createPayment(response){ |
1094 | $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; | 1095 | $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; |
1095 | $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; | 1096 | $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; |
1096 | $scope.paymentResponse.amount = data.amount; | 1097 | $scope.paymentResponse.amount = data.amount; |
1097 | $scope.paymentResponse.currency = "INR"; | 1098 | $scope.paymentResponse.currency = "INR"; |
1098 | $scope.paymentResponse.status = $scope.paymentResult.data.status; | 1099 | $scope.paymentResponse.status = $scope.paymentResult.data.status; |
1099 | $http({ | 1100 | $http({ |
1100 | method: 'PUT', | 1101 | method: 'PUT', |
1101 | url: BASE_URL+'/payments/'+$scope.paymentResult.data.id, | 1102 | url: BASE_URL+'/payments/'+$scope.paymentResult.data.id, |
1102 | data: $scope.paymentResponse, | 1103 | data: $scope.paymentResponse, |
1103 | headers: {} | 1104 | headers: {} |
1104 | }).then(function mySuccess(searchResult) { | 1105 | }).then(function mySuccess(searchResult) { |
1105 | console.log("searchResult",searchResult) | 1106 | console.log("searchResult",searchResult) |
1106 | //$location.path("/confirm") | 1107 | //$location.path("/confirm") |
1107 | $rootScope.paymentResultt = searchResult.data; | 1108 | $rootScope.paymentResultt = searchResult.data; |
1108 | $http({ | 1109 | $http({ |
1109 | method: 'GET', | 1110 | method: 'GET', |
1110 | url: BASE_URL+'/applicants/'+$rootScope.paymentResultt.applicantId, | 1111 | url: BASE_URL+'/applicants/'+$rootScope.paymentResultt.applicantId, |
1111 | data: $scope.data, | 1112 | data: $scope.data, |
1112 | headers: {} | 1113 | headers: {} |
1113 | }).then(function mySuccess(result) { | 1114 | }).then(function mySuccess(result) { |
1114 | //console.log("result2323324434",result) | 1115 | //console.log("result2323324434",result) |
1115 | $rootScope.applicantResult = result.data; | 1116 | $rootScope.applicantResult = result.data; |
1116 | if (result.data.city == "Chennai") { | 1117 | if (result.data.city == "Chennai") { |
1117 | $rootScope.applicantResult.location= "Auditorium, IITM Research Park, Kanagam Road, 32, Kanagam, Tharamani, Chennai, Tamil Nadu 600113", | 1118 | $rootScope.applicantResult.location= "Auditorium, IITM Research Park, Kanagam Road, 32, Kanagam, Tharamani, Chennai, Tamil Nadu 600113", |
1118 | $rootScope.applicantResult.date= "October 1st, 2019", | 1119 | $rootScope.applicantResult.date= "October 1st, 2019", |
1119 | $rootScope.applicantResult.time= "3 PM" | 1120 | $rootScope.applicantResult.time= "3 PM" |
1120 | 1121 | ||
1121 | } else if (result.data.city == "Hyderabad") { | 1122 | } else if (result.data.city == "Hyderabad") { |
1122 | $rootScope.applicantResult.location= "Academic block A, Room no. 220, IIT Hyderabad Kandi, Sangareddy 502285", | 1123 | $rootScope.applicantResult.location= "Academic block A, Room no. 220, IIT Hyderabad Kandi, Sangareddy 502285", |
1123 | $rootScope.applicantResult.date= "September 14th, 2019", | 1124 | $rootScope.applicantResult.date= "September 14th, 2019", |
1124 | $rootScope.applicantResult.time= "3 PM" | 1125 | $rootScope.applicantResult.time= "3 PM" |
1125 | 1126 | ||
1126 | } else if (result.data.city == "Mumbai") { | 1127 | } else if (result.data.city == "Mumbai") { |
1127 | $rootScope.applicantResult.location= "LC 101, Lecture Hall Complex, Academic Area, IIT Bombay, Powai, Maharashtra - 40076", | 1128 | $rootScope.applicantResult.location= "LC 101, Lecture Hall Complex, Academic Area, IIT Bombay, Powai, Maharashtra - 40076", |
1128 | $rootScope.applicantResult.date= "September 4th, 2019", | 1129 | $rootScope.applicantResult.date= "September 4th, 2019", |
1129 | $rootScope.applicantResult.time= "3 PM" | 1130 | $rootScope.applicantResult.time= "3 PM" |
1130 | 1131 | ||
1131 | } else if (result.data.city == "Ahmedabad") { | 1132 | } else if (result.data.city == "Ahmedabad") { |
1132 | $rootScope.applicantResult.location= "Sunil Mehta Conference Hall, First Floor, CIIE Building, IIM New Campus, Vastrapur Road, Ahmedabad 380015", | 1133 | $rootScope.applicantResult.location= "Sunil Mehta Conference Hall, First Floor, CIIE Building, IIM New Campus, Vastrapur Road, Ahmedabad 380015", |
1133 | $rootScope.applicantResult.date= "September 11th, 2019", | 1134 | $rootScope.applicantResult.date= "September 11th, 2019", |
1134 | $rootScope.applicantResult.time= "3 PM" | 1135 | $rootScope.applicantResult.time= "3 PM" |
1135 | 1136 | ||
1136 | } else if (result.data.city == "Jaipur") { | 1137 | } else if (result.data.city == "Jaipur") { |
1137 | $rootScope.applicantResult.location= "Startup Oasis, M8, RIICO Software Complex, EPIP, Sitapura Industrial Area, Jaipur", | 1138 | $rootScope.applicantResult.location= "Startup Oasis, M8, RIICO Software Complex, EPIP, Sitapura Industrial Area, Jaipur", |
1138 | $rootScope.applicantResult.date= "September 24th, 2019", | 1139 | $rootScope.applicantResult.date= "September 24th, 2019", |
1139 | $rootScope.applicantResult.time= "3 PM" | 1140 | $rootScope.applicantResult.time= "3 PM" |
1140 | 1141 | ||
1141 | } else if (result.data.city == "Kolkata") { | 1142 | } else if (result.data.city == "Kolkata") { |
1142 | $rootScope.applicantResult.location= "New Academic Block, IIM Calcutta, Diamond Harbour Rd., Joka, Kolkata (700104)", | 1143 | $rootScope.applicantResult.location= "New Academic Block, IIM Calcutta, Diamond Harbour Rd., Joka, Kolkata (700104)", |
1143 | $rootScope.applicantResult.time= "3 PM", | 1144 | $rootScope.applicantResult.time= "3 PM", |
1144 | $rootScope.applicantResult.date= "September 17th, 2019" | 1145 | $rootScope.applicantResult.date= "September 17th, 2019" |
1145 | 1146 | ||
1146 | } else if (result.data.city == "Bengaluru") { | 1147 | } else if (result.data.city == "Bengaluru") { |
1147 | $rootScope.applicantResult.location= "NSRCEL, Indian Institute of Management Bangalore, Bannerghatta Main Road, Bengaluru 560076", | 1148 | $rootScope.applicantResult.location= "NSRCEL, Indian Institute of Management Bangalore, Bannerghatta Main Road, Bengaluru 560076", |
1148 | $rootScope.applicantResult.time= "3 PM", | 1149 | $rootScope.applicantResult.time= "3 PM", |
1149 | $rootScope.applicantResult.date= "September 7th, 2019" | 1150 | $rootScope.applicantResult.date= "September 7th, 2019" |
1150 | 1151 | ||
1151 | } else if (result.data.city == "Delhi") { | 1152 | } else if (result.data.city == "Delhi") { |
1152 | $rootScope.applicantResult.location= "Vishwakarma Bhavan Auditorium(Ground Floor), Vishwakarma Bhavan, IIT Delhi, Saheed Jeet Singh Marg, Hauz Khas, New Delhi, Delhi 110016", | 1153 | $rootScope.applicantResult.location= "Vishwakarma Bhavan Auditorium(Ground Floor), Vishwakarma Bhavan, IIT Delhi, Saheed Jeet Singh Marg, Hauz Khas, New Delhi, Delhi 110016", |
1153 | $rootScope.applicantResult.time= "12 PM", | 1154 | $rootScope.applicantResult.time= "12 PM", |
1154 | $rootScope.applicantResult.date= "October 16th, 2019" | 1155 | $rootScope.applicantResult.date= "October 16th, 2019" |
1155 | 1156 | ||
1156 | } else if (result.data.city == "Kanpur"){ | 1157 | } else if (result.data.city == "Kanpur"){ |
1157 | $rootScope.applicantResult.location= "L14, Academic Area IIT Kanpur, Kanpur - 208016", | 1158 | $rootScope.applicantResult.location= "L14, Academic Area IIT Kanpur, Kanpur - 208016", |
1158 | $rootScope.applicantResult.time= "3 PM", | 1159 | $rootScope.applicantResult.time= "3 PM", |
1159 | $rootScope.applicantResult.date= "September 28th, 2019" | 1160 | $rootScope.applicantResult.date= "September 28th, 2019" |
1160 | 1161 | ||
1161 | }else if (result.data.city == "Colombo") { | 1162 | }else if (result.data.city == "Colombo") { |
1162 | $rootScope.applicantResult.location= "Likuid Spcaes, Ground Floor, 5 Charles Place, Colpetty, Colombo, 00300, Sri Lanka", | 1163 | $rootScope.applicantResult.location= "Likuid Spcaes, Ground Floor, 5 Charles Place, Colpetty, Colombo, 00300, Sri Lanka", |
1163 | $rootScope.applicantResult.time= "3 PM", | 1164 | $rootScope.applicantResult.time= "3 PM", |
1164 | $rootScope.applicantResult.date= "October 5th, 2019" | 1165 | $rootScope.applicantResult.date= "October 5th, 2019" |
1165 | 1166 | ||
1166 | } else if (result.data.city == "Dhaka") { | 1167 | } else if (result.data.city == "Dhaka") { |
1167 | $rootScope.applicantResult.location= "The Business Center, The Inspiration Hall Level 2, Lift number-2, Celebration Point, Plot: 3 & 5 (Beside Shahabuddin Medical College) Road: 113/A, Gulshan-2, Dhaka-1212", | 1168 | $rootScope.applicantResult.location= "The Business Center, The Inspiration Hall Level 2, Lift number-2, Celebration Point, Plot: 3 & 5 (Beside Shahabuddin Medical College) Road: 113/A, Gulshan-2, Dhaka-1212", |
1168 | $rootScope.applicantResult.date= "September 21st, 2019", | 1169 | $rootScope.applicantResult.date= "September 21st, 2019", |
1169 | $rootScope.applicantResult.time= "3 PM" | 1170 | $rootScope.applicantResult.time= "3 PM" |
1170 | 1171 | ||
1171 | } else { | 1172 | } else { |
1172 | $rootScope.applicantResult.location= "Innovative Hive, 1st Floor, M&S Tower, Pulchowk, lalitpur Nepal, POB No 24445", | 1173 | $rootScope.applicantResult.location= "Innovative Hive, 1st Floor, M&S Tower, Pulchowk, lalitpur Nepal, POB No 24445", |
1173 | $rootScope.applicantResult.time= "3 PM", | 1174 | $rootScope.applicantResult.time= "3 PM", |
1174 | $rootScope.applicantResult.date= "October 12th, 2019" | 1175 | $rootScope.applicantResult.date= "October 12th, 2019" |
1175 | } | 1176 | } |
1176 | Analytics.trackEvent('success', 'click', 'Registration'); | 1177 | Analytics.trackEvent('success', 'click', 'Registration'); |
1177 | $location.path("/confirm") | 1178 | $location.path("/confirm") |
1178 | }) | 1179 | }) |
1179 | }, function myError(error) { | 1180 | }, function myError(error) { |
1180 | }); | 1181 | }); |
1181 | } | 1182 | } |
1182 | //} | 1183 | //} |
1183 | 1184 | ||
1184 | }, function myError(error) { | 1185 | }, function myError(error) { |
1185 | 1186 | ||
1186 | }); | 1187 | }); |
1187 | 1188 | ||
1188 | }) | 1189 | }) |
1189 | 1190 | ||
1190 | // }) | 1191 | // }) |
1191 | 1192 | ||
1192 | //} | 1193 | //} |
1193 | 1194 | ||
1194 | } | 1195 | } |
1195 | //} | 1196 | //} |
1196 | 1197 | ||
1197 | }); | 1198 | }); |
1198 | 1199 | ||
1199 | scotchApp.controller('confirmationController', function($scope, $http, $location, $route, BASE_URL) { | 1200 | scotchApp.controller('confirmationController', function($scope, $http, $location, $route, BASE_URL) { |
1200 | $scope.approvedMsg = false; | 1201 | $scope.approvedMsg = false; |
1201 | $scope.disApprovedMsg = false; | 1202 | $scope.disApprovedMsg = false; |
1202 | 1203 | ||
1203 | var myParam = window.location.href.split('status=').splice(1).join('').split('&')[0] | 1204 | var myParam = window.location.href.split('status=').splice(1).join('').split('&')[0] |
1204 | // if(myParam){ | 1205 | // if(myParam){ |
1205 | if(myParam == "approved"){ | 1206 | if(myParam == "approved"){ |
1206 | $scope.approvedMsg = true; | 1207 | $scope.approvedMsg = true; |
1207 | $scope.disApprovedMsg = false; | 1208 | $scope.disApprovedMsg = false; |
1208 | }else{ | 1209 | }else{ |
1209 | $scope.approvedMsg = false; | 1210 | $scope.approvedMsg = false; |
1210 | $scope.disApprovedMsg = true; | 1211 | $scope.disApprovedMsg = true; |
1211 | } | 1212 | } |
1212 | // }else{ | 1213 | // }else{ |
1213 | // $scope.disApprovedMsg = true; | 1214 | // $scope.disApprovedMsg = true; |
1214 | // } | 1215 | // } |
1215 | 1216 | ||
1216 | }); | 1217 | }); |
1217 | 1218 | ||
1218 | scotchApp.controller('paytmController', function($q, $scope, $http, $location, $rootScope,$route,BASE_URL,Analytics) { | 1219 | scotchApp.controller('paytmController', function($q, $scope, $http, $location, $rootScope,$route,BASE_URL,Analytics) { |
1219 | $scope.data = {}; | 1220 | $scope.data = {}; |
1220 | $scope.data.city = localStorage.getItem("city"); | 1221 | $scope.data.city = localStorage.getItem("city"); |
1221 | $scope.data.country = localStorage.getItem("country");; | 1222 | $scope.data.country = localStorage.getItem("country");; |
1222 | var data = { | 1223 | var data = { |
1223 | //"amount": $scope.payingAmnt, | 1224 | //"amount": $scope.payingAmnt, |
1224 | //"currency": "INR", | 1225 | //"currency": "INR", |
1225 | "status": "captured", | 1226 | "status": "captured", |
1226 | "paymentType": "Manual_Paytm" | 1227 | "paymentType": "Manual_Paytm" |
1227 | } | 1228 | } |
1228 | var handleFileSelect = function(evt) { | 1229 | var handleFileSelect = function(evt) { |
1229 | var files = evt.target.files; | 1230 | var files = evt.target.files; |
1230 | var file = files[0]; | 1231 | var file = files[0]; |
1231 | 1232 | ||
1232 | if (files && file) { | 1233 | if (files && file) { |
1233 | var reader = new FileReader(); | 1234 | var reader = new FileReader(); |
1234 | 1235 | ||
1235 | reader.onload = function(readerEvt) { | 1236 | reader.onload = function(readerEvt) { |
1236 | var binaryString = readerEvt.target.result; | 1237 | var binaryString = readerEvt.target.result; |
1237 | $scope.base64textString = btoa(binaryString); | 1238 | $scope.base64textString = btoa(binaryString); |
1238 | //console.log("base64textarea",$scope.base64textString) | 1239 | //console.log("base64textarea",$scope.base64textString) |
1239 | //$scope.data.uploadFile = file.name; | 1240 | //$scope.data.uploadFile = file.name; |
1240 | $scope.fileSelect = false; | 1241 | $scope.fileSelect = false; |
1241 | if($scope.data.uploadFile == null){ | 1242 | if($scope.data.uploadFile == null){ |
1242 | $scope.fileSelect = true; | 1243 | $scope.fileSelect = true; |
1243 | }else{ | 1244 | }else{ |
1244 | $scope.fileSelect = false; | 1245 | $scope.fileSelect = false; |
1245 | }; | 1246 | }; |
1246 | } | 1247 | } |
1247 | 1248 | ||
1248 | reader.readAsBinaryString(file); | 1249 | reader.readAsBinaryString(file); |
1249 | } | 1250 | } |
1250 | }; | 1251 | }; |
1251 | if (window.File && window.FileReader && window.FileList && window.Blob) { | 1252 | if (window.File && window.FileReader && window.FileList && window.Blob) { |
1252 | document.getElementById('filePicker').addEventListener('change', handleFileSelect, false); | 1253 | document.getElementById('filePicker').addEventListener('change', handleFileSelect, false); |
1253 | } | 1254 | } |
1254 | 1255 | ||
1255 | $scope.ngShowhide = false; | 1256 | $scope.ngShowhide = false; |
1256 | $scope.GetValue = function(){ | 1257 | $scope.GetValue = function(){ |
1257 | if($scope.data.sector == "Other"){ | 1258 | if($scope.data.sector == "Other"){ |
1258 | $scope.ngShowhide = true; | 1259 | $scope.ngShowhide = true; |
1259 | }else{ | 1260 | }else{ |
1260 | $scope.ngShowhide = false; | 1261 | $scope.ngShowhide = false; |
1261 | } | 1262 | } |
1262 | } | 1263 | } |
1263 | 1264 | ||
1264 | $scope.ngShow = false; | 1265 | $scope.ngShow = false; |
1265 | $scope.getValue = function(){ | 1266 | $scope.getValue = function(){ |
1266 | if($scope.data.hear == "Other"){ | 1267 | if($scope.data.hear == "Other"){ |
1267 | $scope.ngShow = true; | 1268 | $scope.ngShow = true; |
1268 | }else{ | 1269 | }else{ |
1269 | $scope.ngShow = false; | 1270 | $scope.ngShow = false; |
1270 | } | 1271 | } |
1271 | } | 1272 | } |
1272 | 1273 | ||
1273 | $scope.register = function() { | 1274 | $scope.register = function() { |
1274 | Analytics.trackEvent('register', 'click', 'Registration'); | 1275 | Analytics.trackEvent('register', 'click', 'Registration'); |
1275 | $scope.loading = true; | 1276 | $scope.loading = true; |
1276 | $scope.data.uploadFile = $scope.base64textString; | 1277 | $scope.data.uploadFile = $scope.base64textString; |
1277 | $scope.infoForm = true; | 1278 | $scope.infoForm = true; |
1278 | //$scope.ticketAmnt = 1180; | 1279 | //$scope.ticketAmnt = 1180; |
1279 | $scope.detail = {}; | 1280 | $scope.detail = {}; |
1280 | $scope.data.phone = "+91"+$scope.data.number; | 1281 | $scope.data.phone = "+91"+$scope.data.number; |
1281 | 1282 | ||
1282 | var file =document.getElementById('filePicker').files[0]; | 1283 | var file =document.getElementById('filePicker').files[0]; |
1283 | var image = BASE_URL+'/containers/images/download/' | 1284 | var image = BASE_URL+'/containers/images/download/' |
1284 | var imagePath = file.name; | 1285 | var imagePath = file.name; |
1285 | $scope.data.uploadFile = image + imagePath; | 1286 | $scope.data.uploadFile = image + imagePath; |
1286 | var fd = new FormData() | 1287 | var fd = new FormData() |
1287 | fd.append('filePicker',file); | 1288 | fd.append('filePicker',file); |
1288 | var deferred = $q.defer(); | 1289 | var deferred = $q.defer(); |
1289 | $http({ | 1290 | $http({ |
1290 | method:'POST', | 1291 | method:'POST', |
1291 | url: BASE_URL+'/containers/images/upload', | 1292 | url: BASE_URL+'/containers/images/upload', |
1292 | data:fd, | 1293 | data:fd, |
1293 | transformRequest:angular.identity, | 1294 | transformRequest:angular.identity, |
1294 | headers:{'Content-Type':undefined} | 1295 | headers:{'Content-Type':undefined} |
1295 | }) | 1296 | }) |
1296 | .success(function(result){ | 1297 | .success(function(result){ |
1297 | deferred.resolve(result); | 1298 | deferred.resolve(result); |
1298 | $http({ | 1299 | $http({ |
1299 | method: 'POST', | 1300 | method: 'POST', |
1300 | url: BASE_URL+'/applicantIns', | 1301 | url: BASE_URL+'/applicantIns', |
1301 | data: $scope.data, | 1302 | data: $scope.data, |
1302 | headers: {} | 1303 | headers: {} |
1303 | }).then(function mySuccess(result) { | 1304 | }).then(function mySuccess(result) { |
1304 | $scope.detail = result; | 1305 | $scope.detail = result; |
1305 | data.applicantInId = result.data.id; | 1306 | data.applicantInId = result.data.id; |
1306 | $scope.userId = result.data.id; | 1307 | $scope.userId = result.data.id; |
1307 | // var amount = $scope.ticketAmnt * 100 | 1308 | // var amount = $scope.ticketAmnt * 100 |
1308 | // if($scope.tokencheck == true){ | 1309 | // if($scope.tokencheck == true){ |
1309 | // var amount = $scope.ticketAmnt | 1310 | // var amount = $scope.ticketAmnt |
1310 | // console.log("resultcity===",$scope.data.city) | 1311 | // console.log("resultcity===",$scope.data.city) |
1311 | // if($scope.discountpercentage == "100") { | 1312 | // if($scope.discountpercentage == "100") { |
1312 | // $scope.discountpercentage = "99.9"; | 1313 | // $scope.discountpercentage = "99.9"; |
1313 | // } | 1314 | // } |
1314 | // $scope.percDiscount = $scope.discountpercentage/100; | 1315 | // $scope.percDiscount = $scope.discountpercentage/100; |
1315 | // $scope.discountAmount = amount * $scope.percDiscount; | 1316 | // $scope.discountAmount = amount * $scope.percDiscount; |
1316 | // } | 1317 | // } |
1317 | // var taxAmount = $scope.ticketAmnt - $scope.discountAmount | 1318 | // var taxAmount = $scope.ticketAmnt - $scope.discountAmount |
1318 | // $scope.payingAmnt = taxAmount; | 1319 | // $scope.payingAmnt = taxAmount; |
1319 | // $scope.payingAmnt = $scope.payingAmnt.toFixed() | 1320 | // $scope.payingAmnt = $scope.payingAmnt.toFixed() |
1320 | // data.amount = $scope.payingAmnt; | 1321 | // data.amount = $scope.payingAmnt; |
1321 | if($scope.detail != null){ | 1322 | if($scope.detail != null){ |
1322 | $http({ | 1323 | $http({ |
1323 | method: 'POST', | 1324 | method: 'POST', |
1324 | url: BASE_URL+'/paymentsIns', | 1325 | url: BASE_URL+'/paymentsIns', |
1325 | data: data, | 1326 | data: data, |
1326 | headers: {} | 1327 | headers: {} |
1327 | }).then(function mySuccess(paymentResult) { | 1328 | }).then(function mySuccess(paymentResult) { |
1328 | $scope.loading = false; | 1329 | $scope.loading = false; |
1329 | $scope.paymentResult = paymentResult; | 1330 | $scope.paymentResult = paymentResult; |
1330 | $location.path("/paytm/confirm") | 1331 | $location.path("/paytm/confirm") |
1331 | }, function myError(error) { | 1332 | }, function myError(error) { |
1332 | }); | 1333 | }); |
1333 | } | 1334 | } |
1334 | 1335 | ||
1335 | }, function myError(error) { | 1336 | }, function myError(error) { |
1336 | 1337 | ||
1337 | }); | 1338 | }); |
1338 | 1339 | ||
1339 | }) | 1340 | }) |
1340 | 1341 | ||
1341 | } | 1342 | } |
1342 | 1343 | ||
1343 | }); | 1344 | }); |
1344 | 1345 | ||
1345 | scotchApp.controller('campusAmbassadorController', function($q, $scope, $http, $location, $rootScope,$route,BASE_URL,Analytics) { | 1346 | scotchApp.controller('campusAmbassadorController', function($q, $scope, $http, $location, $rootScope,$route,BASE_URL,Analytics) { |
1346 | $scope.data = {}; | 1347 | $scope.data = {}; |
1347 | var data = { | 1348 | var data = { |
1348 | "amount": $scope.ticketAmnt, | 1349 | "amount": $scope.ticketAmnt, |
1349 | "currency": "INR", | 1350 | "currency": "INR", |
1350 | "status": "pending", | 1351 | "status": "pending", |
1351 | } | 1352 | } |
1352 | 1353 | ||
1353 | $scope.ngShowhide = false; | 1354 | $scope.ngShowhide = false; |
1354 | $scope.GetValue = function(){ | 1355 | $scope.GetValue = function(){ |
1355 | if($scope.data.sector == "Other"){ | 1356 | if($scope.data.sector == "Other"){ |
1356 | $scope.ngShowhide = true; | 1357 | $scope.ngShowhide = true; |
1357 | }else{ | 1358 | }else{ |
1358 | $scope.ngShowhide = false; | 1359 | $scope.ngShowhide = false; |
1359 | } | 1360 | } |
1360 | } | 1361 | } |
1361 | 1362 | ||
1362 | $scope.ngShow = false; | 1363 | $scope.ngShow = false; |
1363 | $scope.getValue = function(){ | 1364 | $scope.getValue = function(){ |
1364 | if($scope.data.hear == "Other"){ | 1365 | if($scope.data.hear == "Other"){ |
1365 | $scope.ngShow = true; | 1366 | $scope.ngShow = true; |
1366 | }else{ | 1367 | }else{ |
1367 | $scope.ngShow = false; | 1368 | $scope.ngShow = false; |
1368 | } | 1369 | } |
1369 | } | 1370 | } |
1370 | 1371 | ||
1371 | $scope.formRegister = function() { | 1372 | $scope.formRegister = function() { |
1372 | //Analytics.trackEvent('register', 'click', 'Registration'); | 1373 | //Analytics.trackEvent('register', 'click', 'Registration'); |
1373 | $scope.loading = true; | 1374 | $scope.loading = true; |
1374 | //$scope.data.uploadFile = $scope.base64textString; | 1375 | //$scope.data.uploadFile = $scope.base64textString; |
1375 | $scope.infoForm = true; | 1376 | $scope.infoForm = true; |
1376 | $scope.ticketAmnt = 590; | 1377 | $scope.ticketAmnt = 590; |
1377 | $scope.detail = {}; | 1378 | $scope.detail = {}; |
1378 | $scope.data.phone = "+91"+$scope.data.number; | 1379 | $scope.data.phone = "+91"+$scope.data.number; |
1379 | 1380 | ||
1380 | $http({ | 1381 | $http({ |
1381 | method: 'POST', | 1382 | method: 'POST', |
1382 | url: BASE_URL+'/campusAmbassadors', | 1383 | url: BASE_URL+'/campusAmbassadors', |
1383 | data: $scope.data, | 1384 | data: $scope.data, |
1384 | headers: {} | 1385 | headers: {} |
1385 | }).then(function mySuccess(result) { | 1386 | }).then(function mySuccess(result) { |
1386 | $scope.detail = result; | 1387 | $scope.detail = result; |
1387 | data.campusAmbassadorId = result.data.id; | 1388 | data.campusAmbassadorId = result.data.id; |
1388 | $scope.userId = result.data.id; | 1389 | $scope.userId = result.data.id; |
1389 | var amount = $scope.ticketAmnt * 100 | 1390 | var amount = $scope.ticketAmnt * 100 |
1390 | 1391 | ||
1391 | if($scope.detail != null){ | 1392 | if($scope.detail != null){ |
1392 | $http({ | 1393 | $http({ |
1393 | method: 'POST', | 1394 | method: 'POST', |
1394 | url: BASE_URL+'/ambassadorPayments', | 1395 | url: BASE_URL+'/ambassadorPayments', |
1395 | data: data, | 1396 | data: data, |
1396 | headers: {} | 1397 | headers: {} |
1397 | }).then(function mySuccess(paymentResult) { | 1398 | }).then(function mySuccess(paymentResult) { |
1398 | console.log(paymentResult) | 1399 | console.log(paymentResult) |
1399 | $scope.loading = false; | 1400 | $scope.loading = false; |
1400 | $scope.paymentResult = paymentResult; | 1401 | $scope.paymentResult = paymentResult; |
1401 | //$location.path("/paytm/confirm") | 1402 | //$location.path("/paytm/confirm") |
1402 | }, function myError(error) { | 1403 | }, function myError(error) { |
1403 | }); | 1404 | }); |
1404 | } | 1405 | } |
1405 | 1406 | ||
1406 | var i = 0; | 1407 | var i = 0; |
1407 | $scope.payingAmntt = $scope.ticketAmnt * 100; | 1408 | $scope.payingAmntt = $scope.ticketAmnt * 100; |
1408 | data.amount = $scope.ticketAmnt; | 1409 | data.amount = $scope.ticketAmnt; |
1409 | var options = { | 1410 | var options = { |
1410 | //"key": "rzp_test_YwHsVFiDIQ2WUQ", | 1411 | //"key": "rzp_test_YwHsVFiDIQ2WUQ", |
1411 | "key": "rzp_live_mkmCb4FkstuWaS", | 1412 | "key": "rzp_live_mkmCb4FkstuWaS", |
1412 | "amount": $scope.payingAmntt, | 1413 | "amount": $scope.payingAmntt, |
1413 | 1414 | ||
1414 | "name": "Startup Jalsa", | 1415 | "name": "Startup Jalsa", |
1415 | "description":"amount", | 1416 | "description":"amount", |
1416 | "currency": "INR", | 1417 | "currency": "INR", |
1417 | "status": "done", | 1418 | "status": "done", |
1418 | 1419 | ||
1419 | "prefill": { | 1420 | "prefill": { |
1420 | "email": $scope.detail.email, | 1421 | "email": $scope.detail.email, |
1421 | "contact": $scope.detail.phone | 1422 | "contact": $scope.detail.phone |
1422 | }, | 1423 | }, |
1423 | 1424 | ||
1424 | "theme": { | 1425 | "theme": { |
1425 | "color": "#2196f3 ", | 1426 | "color": "#2196f3 ", |
1426 | "image_padding":"NO" | 1427 | "image_padding":"NO" |
1427 | }, | 1428 | }, |
1428 | "modal": { | 1429 | "modal": { |
1429 | "ondismiss": function(){ | 1430 | "ondismiss": function(){ |
1430 | } | 1431 | } |
1431 | }, | 1432 | }, |
1432 | "handler": function (response){ | 1433 | "handler": function (response){ |
1433 | createPayment(response); | 1434 | createPayment(response); |
1434 | } | 1435 | } |
1435 | }; | 1436 | }; |
1436 | var rzp1 = new Razorpay(options); | 1437 | var rzp1 = new Razorpay(options); |
1437 | rzp1.open(); | 1438 | rzp1.open(); |
1438 | $scope.paymentResponse = {}; | 1439 | $scope.paymentResponse = {}; |
1439 | function createPayment(response){ | 1440 | function createPayment(response){ |
1440 | console.log("response",response) | 1441 | console.log("response",response) |
1441 | console.log($scope.paymentResult) | 1442 | console.log($scope.paymentResult) |
1442 | $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; | 1443 | $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; |
1443 | $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; | 1444 | $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; |
1444 | $scope.paymentResponse.amount = data.amount; | 1445 | $scope.paymentResponse.amount = data.amount; |
1445 | $scope.paymentResponse.currency = "INR"; | 1446 | $scope.paymentResponse.currency = "INR"; |
1446 | $scope.paymentResponse.status = $scope.paymentResult.data.status; | 1447 | $scope.paymentResponse.status = $scope.paymentResult.data.status; |
1447 | $http({ | 1448 | $http({ |
1448 | method: 'PUT', | 1449 | method: 'PUT', |
1449 | url: BASE_URL+'/ambassadorPayments/'+$scope.paymentResult.data.id, | 1450 | url: BASE_URL+'/ambassadorPayments/'+$scope.paymentResult.data.id, |
1450 | data: $scope.paymentResponse, | 1451 | data: $scope.paymentResponse, |
1451 | headers: {} | 1452 | headers: {} |
1452 | }).then(function mySuccess(searchResult) { | 1453 | }).then(function mySuccess(searchResult) { |
1453 | console.log("searchResult",searchResult) | 1454 | console.log("searchResult",searchResult) |
1454 | $location.path("/confirmation") | 1455 | $location.path("/confirmation") |
1455 | //$scope.paymentResultt = searchResult.data; | 1456 | //$scope.paymentResultt = searchResult.data; |
1456 | // $http({ | 1457 | // $http({ |
1457 | // method: 'GET', | 1458 | // method: 'GET', |
1458 | // url: BASE_URL+'/campusAmbassadors/'+$rootScope.paymentResultt.campusAmbassadorId, | 1459 | // url: BASE_URL+'/campusAmbassadors/'+$rootScope.paymentResultt.campusAmbassadorId, |
1459 | // data: $scope.data, | 1460 | // data: $scope.data, |
1460 | // headers: {} | 1461 | // headers: {} |
1461 | // }).then(function mySuccess(result) { | 1462 | // }).then(function mySuccess(result) { |
1462 | // //console.log("result2323324434",result) | 1463 | // //console.log("result2323324434",result) |
1463 | // //Analytics.trackEvent('success', 'click', 'Registration'); | 1464 | // //Analytics.trackEvent('success', 'click', 'Registration'); |
1464 | // $location.path("/confirm") | 1465 | // $location.path("/confirm") |
1465 | // }) | 1466 | // }) |
1466 | }, function myError(error) { | 1467 | }, function myError(error) { |
1467 | }); | 1468 | }); |
1468 | } | 1469 | } |
1469 | //} | 1470 | //} |
1470 | 1471 | ||
1471 | }, function myError(error) { | 1472 | }, function myError(error) { |
1472 | 1473 | ||
1473 | }); | 1474 | }); |
1474 | 1475 | ||
1475 | //}) | 1476 | //}) |
1476 | 1477 | ||
1477 | } | 1478 | } |
1478 | 1479 | ||
1479 | }); | 1480 | }); |
1480 | 1481 | ||
1481 | 1482 | ||
1482 | scotchApp.controller('ambassadorController', function($scope, $http, $location, $route, BASE_URL) { | 1483 | scotchApp.controller('ambassadorController', function($scope, $http, $location, $route, BASE_URL) { |
1483 | $scope.data = {}; | 1484 | $scope.data = {}; |
1484 | $scope.check = false; | 1485 | $scope.check = false; |
1485 | $scope.numberCheck = false; | 1486 | $scope.numberCheck = false; |
1486 | 1487 | ||
1487 | $scope.submit = function() { | 1488 | $scope.submit = function() { |
1488 | //var randomNumber = ""+Math.random(); | 1489 | //var randomNumber = ""+Math.random(); |
1489 | var nameSpliced = $scope.data.name.slice(0,5); | 1490 | var nameSpliced = $scope.data.name.slice(0,5); |
1490 | //var numberSpliced = randomNumber.slice(2,4); | 1491 | //var numberSpliced = randomNumber.slice(2,4); |
1491 | //var numberSpliced = "90"; | 1492 | //var numberSpliced = "90"; |
1492 | //$scope.data.referalToken = nameSpliced+numberSpliced; | 1493 | //$scope.data.referalToken = nameSpliced+numberSpliced; |
1493 | $scope.data.referalToken = nameSpliced; | 1494 | $scope.data.referalToken = nameSpliced; |
1494 | $scope.data.referalToken = $scope.data.referalToken.toUpperCase(); | 1495 | $scope.data.referalToken = $scope.data.referalToken.toUpperCase(); |
1495 | //$scope.data.referalToken = $scope.data.referalToken.toString(); | 1496 | //$scope.data.referalToken = $scope.data.referalToken.toString(); |
1496 | $http({ | 1497 | $http({ |
1497 | method: 'POST', | 1498 | method: 'POST', |
1498 | url: BASE_URL + '/ambassadors', | 1499 | url: BASE_URL + '/ambassadors', |
1499 | data: $scope.data, | 1500 | data: $scope.data, |
1500 | headers: {} | 1501 | headers: {} |
1501 | }).then(function mySuccess(result) { | 1502 | }).then(function mySuccess(result) { |
1502 | $scope.detail = result; | 1503 | $scope.detail = result; |
1503 | $('#myModal').modal('show'); | 1504 | $('#myModal').modal('show'); |
1504 | $scope.data.name = ''; | 1505 | $scope.data.name = ''; |
1505 | $scope.data.email = ''; | 1506 | $scope.data.email = ''; |
1506 | $scope.data.mobile = ''; | 1507 | $scope.data.mobile = ''; |
1507 | //$scope.data.discount = ''; | 1508 | //$scope.data.discount = ''; |
1508 | 1509 | ||
1509 | }, function myError(error) { | 1510 | }, function myError(error) { |
1510 | console.log(error) | 1511 | console.log(error) |
1511 | console.log(error.data.error.message) | 1512 | console.log(error.data.error.message) |
1512 | }); | 1513 | }); |
1513 | } | 1514 | } |
1514 | }); | 1515 | }); |
1515 | 1516 | ||
1516 | 1517 | ||
1517 | 1518 | ||
1518 | 1519 | ||
1519 | 1520 |