Commit e6e8fcf6dbbeacd484656371d4dc76c71d93418f

Authored by Shilpi Saini
1 parent 51da4bffe4
Exists in master

razor pay integrate

Showing 1 changed file with 7 additions and 1 deletions   Show diff stats
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 paymentVerify page 26 // route for the paymentVerify page
27 .when('/pendingPayment/:id', { 27 .when('/pendingPayment/:id', {
28 templateUrl: 'pages/verify.html', 28 templateUrl: 'pages/verify.html',
29 controller: 'verifyController' 29 controller: 'verifyController'
30 }) 30 })
31 31
32 // route for the registration page 32 // route for the registration page
33 .when('/registration', { 33 .when('/registration', {
34 templateUrl: 'pages/registration.html', 34 templateUrl: 'pages/registration.html',
35 controller: 'registrationController' 35 controller: 'registrationController'
36 }) 36 })
37 37
38 //route for the ambassador page 38 //route for the ambassador page
39 .when('/startupJalsaPromocode', { 39 .when('/startupJalsaPromocode', {
40 templateUrl: 'pages/ambassador.html', 40 templateUrl: 'pages/ambassador.html',
41 controller: 'ambassadorController' 41 controller: 'ambassadorController'
42 }) 42 })
43 43
44 // route for the confirmation page 44 // route for the confirmation page
45 .when('/confirmation', { 45 .when('/confirmation', {
46 templateUrl: 'pages/confirmation.html', 46 templateUrl: 'pages/confirmation.html',
47 controller: 'confirmationController' 47 controller: 'confirmationController'
48 }) 48 })
49 49
50 // route for the confirmation page 50 // route for the confirmation page
51 .when('/confirm', { 51 .when('/confirm', {
52 templateUrl: 'pages/confirm.html', 52 templateUrl: 'pages/confirm.html',
53 controller: 'confirmationController' 53 controller: 'confirmationController'
54 }) 54 })
55 55
56 // route for the paytm page 56 // route for the paytm page
57 .when('/paytm', { 57 .when('/paytm', {
58 templateUrl: 'pages/paytm.html', 58 templateUrl: 'pages/paytm.html',
59 controller: 'paytmController' 59 controller: 'paytmController'
60 }) 60 })
61 61
62 .otherwise({ 62 .otherwise({
63 redirectTo: '/' 63 redirectTo: '/'
64 }); 64 });
65 65
66 }); 66 });
67 67
68 scotchApp.config(['AnalyticsProvider', function (AnalyticsProvider) { 68 scotchApp.config(['AnalyticsProvider', function (AnalyticsProvider) {
69 // Add configuration code as desired 69 // Add configuration code as desired
70 AnalyticsProvider.setAccount('UA-123583154-1'); //UU-XXXXXXX-X should be your tracking code 70 AnalyticsProvider.setAccount('UA-123583154-1'); //UU-XXXXXXX-X should be your tracking code
71 71
72 // Track all routes (default is true). 72 // Track all routes (default is true).
73 AnalyticsProvider.trackPages(true); 73 AnalyticsProvider.trackPages(true);
74 74
75 // Track all URL query params (default is false). 75 // Track all URL query params (default is false).
76 AnalyticsProvider.trackUrlParams(true); 76 AnalyticsProvider.trackUrlParams(true);
77 77
78 }]).run(['Analytics', function(Analytics) { }]); 78 }]).run(['Analytics', function(Analytics) { }]);
79 79
80 scotchApp.constant("BASE_URL", "https://events.startupjalsa.com/v1") 80 scotchApp.constant("BASE_URL", "https://events.startupjalsa.com/v1")
81 //scotchApp.constant("BASE_URL", "http://0.0.0.0:4001/v1") 81 //scotchApp.constant("BASE_URL", "http://0.0.0.0:4001/v1")
82 82
83 scotchApp.directive('validFile',function(){ 83 scotchApp.directive('validFile',function(){
84 return { 84 return {
85 require:'ngModel', 85 require:'ngModel',
86 link:function(scope,el,attrs,ngModel){ 86 link:function(scope,el,attrs,ngModel){
87 //change event is fired when file is selected 87 //change event is fired when file is selected
88 el.bind('change',function(){ 88 el.bind('change',function(){
89 scope.$apply(function(){ 89 scope.$apply(function(){
90 ngModel.$setViewValue(el.val()); 90 ngModel.$setViewValue(el.val());
91 ngModel.$render(); 91 ngModel.$render();
92 }) 92 })
93 }) 93 })
94 } 94 }
95 } 95 }
96 }) 96 })
97 97
98 // create the controller and inject Angular's $scope 98 // create the controller and inject Angular's $scope
99 scotchApp.controller('mainController', function($scope, $http, $window, $location, $route, $rootScope, BASE_URL, Analytics) { 99 scotchApp.controller('mainController', function($scope, $http, $window, $location, $route, $rootScope, BASE_URL, Analytics) {
100 $scope.data = { 100 $scope.data = {
101 show: true, 101 show: true,
102 hide: false 102 hide: false
103 }; 103 };
104 jQuery('#defaultcountry').addClass('btn-active') 104 jQuery('#defaultcountry').addClass('btn-active')
105 // window.onload = function(){ 105 // window.onload = function(){
106 // // var element = document.getElementById("defaultcountry"); 106 // // var element = document.getElementById("defaultcountry");
107 // // element.classList.add("btn-active"); 107 // // element.classList.add("btn-active");
108 // jQuery('#defaultcountry').addClass('btn-active') 108 // jQuery('#defaultcountry').addClass('btn-active')
109 // //document.getElementById("ahmedabad").src = "images/Ahmedabad_1.png"; 109 // //document.getElementById("ahmedabad").src = "images/Ahmedabad_1.png";
110 // } 110 // }
111 111
112 var chennai = new Date("Sept 19, 2018 12:00:00").getTime(); 112 var chennai = new Date("Sept 19, 2018 12:00:00").getTime();
113 // Update the count down every 1 second 113 // Update the count down every 1 second
114 var x = setInterval(function() { 114 var x = setInterval(function() {
115 // Get todays date and time 115 // Get todays date and time
116 var now = new Date().getTime(); 116 var now = new Date().getTime();
117 // Find the distance between now an the count down date 117 // Find the distance between now an the count down date
118 var distance = chennai - now; 118 var distance = chennai - now;
119 // Time calculations for days, hours, minutes and seconds 119 // Time calculations for days, hours, minutes and seconds
120 var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 120 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
121 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 121 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
122 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 122 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
123 var seconds = Math.floor((distance % (1000 * 60)) / 1000); 123 var seconds = Math.floor((distance % (1000 * 60)) / 1000);
124 $scope.timer = days + "d " + hours + "h " 124 $scope.timer = days + "d " + hours + "h "
125 + minutes + "m " + seconds + "s " 125 + minutes + "m " + seconds + "s "
126 // Output the result in an element with id="demo" 126 // Output the result in an element with id="demo"
127 document.getElementById("chennai").innerHTML = days + "d " + hours + "h " 127 document.getElementById("chennai").innerHTML = days + "d " + hours + "h "
128 + minutes + "m " + seconds + "s "; 128 + minutes + "m " + seconds + "s ";
129 // If the count down is over, write some text 129 // If the count down is over, write some text
130 if (distance < 0) { 130 if (distance < 0) {
131 clearInterval(x); 131 clearInterval(x);
132 document.getElementById("chennai").innerHTML = "EXPIRED"; 132 document.getElementById("chennai").innerHTML = "EXPIRED";
133 } 133 }
134 }, 1000); 134 }, 1000);
135 135
136 var hyderabad = new Date("Sept 22, 2018 14:00:00").getTime(); 136 var hyderabad = new Date("Sept 22, 2018 14:00:00").getTime();
137 // Update the count down every 1 second 137 // Update the count down every 1 second
138 var x = setInterval(function() { 138 var x = setInterval(function() {
139 // Get todays date and time 139 // Get todays date and time
140 var now = new Date().getTime(); 140 var now = new Date().getTime();
141 // Find the distance between now an the count down date 141 // Find the distance between now an the count down date
142 var distance = hyderabad - now; 142 var distance = hyderabad - now;
143 // Time calculations for days, hours, minutes and seconds 143 // Time calculations for days, hours, minutes and seconds
144 var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 144 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
145 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 145 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
146 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 146 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
147 var seconds = Math.floor((distance % (1000 * 60)) / 1000); 147 var seconds = Math.floor((distance % (1000 * 60)) / 1000);
148 $scope.timer = days + "d " + hours + "h " 148 $scope.timer = days + "d " + hours + "h "
149 + minutes + "m " + seconds + "s " 149 + minutes + "m " + seconds + "s "
150 // Output the result in an element with id="demo" 150 // Output the result in an element with id="demo"
151 document.getElementById("hyderabad").innerHTML = days + "d " + hours + "h " 151 document.getElementById("hyderabad").innerHTML = days + "d " + hours + "h "
152 + minutes + "m " + seconds + "s "; 152 + minutes + "m " + seconds + "s ";
153 // If the count down is over, write some text 153 // If the count down is over, write some text
154 if (distance < 0) { 154 if (distance < 0) {
155 clearInterval(x); 155 clearInterval(x);
156 document.getElementById("hyderabad").innerHTML = "EXPIRED"; 156 document.getElementById("hyderabad").innerHTML = "EXPIRED";
157 } 157 }
158 }, 1000); 158 }, 1000);
159 159
160 var mumbai = new Date("Sept 26, 2018 14:00:00").getTime(); 160 var mumbai = new Date("Sept 26, 2018 14:00:00").getTime();
161 // Update the count down every 1 second 161 // Update the count down every 1 second
162 var x = setInterval(function() { 162 var x = setInterval(function() {
163 // Get todays date and time 163 // Get todays date and time
164 var now = new Date().getTime(); 164 var now = new Date().getTime();
165 // Find the distance between now an the count down date 165 // Find the distance between now an the count down date
166 var distance = mumbai - now; 166 var distance = mumbai - now;
167 // Time calculations for days, hours, minutes and seconds 167 // Time calculations for days, hours, minutes and seconds
168 var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 168 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
169 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 169 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
170 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 170 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
171 var seconds = Math.floor((distance % (1000 * 60)) / 1000); 171 var seconds = Math.floor((distance % (1000 * 60)) / 1000);
172 $scope.timer = days + "d " + hours + "h " 172 $scope.timer = days + "d " + hours + "h "
173 + minutes + "m " + seconds + "s " 173 + minutes + "m " + seconds + "s "
174 // Output the result in an element with id="demo" 174 // Output the result in an element with id="demo"
175 document.getElementById("mumbai").innerHTML = days + "d " + hours + "h " 175 document.getElementById("mumbai").innerHTML = days + "d " + hours + "h "
176 + minutes + "m " + seconds + "s "; 176 + minutes + "m " + seconds + "s ";
177 // If the count down is over, write some text 177 // If the count down is over, write some text
178 if (distance < 0) { 178 if (distance < 0) {
179 clearInterval(x); 179 clearInterval(x);
180 document.getElementById("mumbai").innerHTML = "EXPIRED"; 180 document.getElementById("mumbai").innerHTML = "EXPIRED";
181 } 181 }
182 }, 1000); 182 }, 1000);
183 183
184 var kolkata = new Date("Oct 3, 2018 14:00:00").getTime(); 184 var kolkata = new Date("Oct 3, 2018 14:00:00").getTime();
185 // Update the count down every 1 second 185 // Update the count down every 1 second
186 var x = setInterval(function() { 186 var x = setInterval(function() {
187 // Get todays date and time 187 // Get todays date and time
188 var now = new Date().getTime(); 188 var now = new Date().getTime();
189 // Find the distance between now an the count down date 189 // Find the distance between now an the count down date
190 var distance = kolkata - now; 190 var distance = kolkata - now;
191 // Time calculations for days, hours, minutes and seconds 191 // Time calculations for days, hours, minutes and seconds
192 var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 192 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
193 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 193 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
194 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 194 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
195 var seconds = Math.floor((distance % (1000 * 60)) / 1000); 195 var seconds = Math.floor((distance % (1000 * 60)) / 1000);
196 $scope.timer = days + "d " + hours + "h " 196 $scope.timer = days + "d " + hours + "h "
197 + minutes + "m " + seconds + "s " 197 + minutes + "m " + seconds + "s "
198 // Output the result in an element with id="demo" 198 // Output the result in an element with id="demo"
199 document.getElementById("kolkata").innerHTML = days + "d " + hours + "h " 199 document.getElementById("kolkata").innerHTML = days + "d " + hours + "h "
200 + minutes + "m " + seconds + "s "; 200 + minutes + "m " + seconds + "s ";
201 // If the count down is over, write some text 201 // If the count down is over, write some text
202 if (distance < 0) { 202 if (distance < 0) {
203 clearInterval(x); 203 clearInterval(x);
204 document.getElementById("kolkata").innerHTML = "EXPIRED"; 204 document.getElementById("kolkata").innerHTML = "EXPIRED";
205 } 205 }
206 }, 1000); 206 }, 1000);
207 207
208 var jaipur = new Date("Oct 5, 2018 14:00:00").getTime(); 208 var jaipur = new Date("Oct 5, 2018 14:00:00").getTime();
209 // Update the count down every 1 second 209 // Update the count down every 1 second
210 var x = setInterval(function() { 210 var x = setInterval(function() {
211 // Get todays date and time 211 // Get todays date and time
212 var now = new Date().getTime(); 212 var now = new Date().getTime();
213 // Find the distance between now an the count down date 213 // Find the distance between now an the count down date
214 var distance = jaipur - now; 214 var distance = jaipur - now;
215 // Time calculations for days, hours, minutes and seconds 215 // Time calculations for days, hours, minutes and seconds
216 var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 216 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
217 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 217 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
218 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 218 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
219 var seconds = Math.floor((distance % (1000 * 60)) / 1000); 219 var seconds = Math.floor((distance % (1000 * 60)) / 1000);
220 $scope.timer = days + "d " + hours + "h " 220 $scope.timer = days + "d " + hours + "h "
221 + minutes + "m " + seconds + "s " 221 + minutes + "m " + seconds + "s "
222 // Output the result in an element with id="demo" 222 // Output the result in an element with id="demo"
223 document.getElementById("jaipur").innerHTML = days + "d " + hours + "h " 223 document.getElementById("jaipur").innerHTML = days + "d " + hours + "h "
224 + minutes + "m " + seconds + "s "; 224 + minutes + "m " + seconds + "s ";
225 // If the count down is over, write some text 225 // If the count down is over, write some text
226 if (distance < 0) { 226 if (distance < 0) {
227 clearInterval(x); 227 clearInterval(x);
228 document.getElementById("jaipur").innerHTML = "EXPIRED"; 228 document.getElementById("jaipur").innerHTML = "EXPIRED";
229 } 229 }
230 }, 1000); 230 }, 1000);
231 231
232 var delhi = new Date("Oct 8, 2018 14:00:00").getTime(); 232 var delhi = new Date("Oct 8, 2018 14:00:00").getTime();
233 // Update the count down every 1 second 233 // Update the count down every 1 second
234 var x = setInterval(function() { 234 var x = setInterval(function() {
235 // Get todays date and time 235 // Get todays date and time
236 var now = new Date().getTime(); 236 var now = new Date().getTime();
237 // Find the distance between now an the count down date 237 // Find the distance between now an the count down date
238 var distance = delhi - now; 238 var distance = delhi - now;
239 // Time calculations for days, hours, minutes and seconds 239 // Time calculations for days, hours, minutes and seconds
240 var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 240 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
241 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 241 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
242 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 242 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
243 var seconds = Math.floor((distance % (1000 * 60)) / 1000); 243 var seconds = Math.floor((distance % (1000 * 60)) / 1000);
244 $scope.timer = days + "d " + hours + "h " 244 $scope.timer = days + "d " + hours + "h "
245 + minutes + "m " + seconds + "s " 245 + minutes + "m " + seconds + "s "
246 // Output the result in an element with id="demo" 246 // Output the result in an element with id="demo"
247 document.getElementById("delhi").innerHTML = days + "d " + hours + "h " 247 document.getElementById("delhi").innerHTML = days + "d " + hours + "h "
248 + minutes + "m " + seconds + "s "; 248 + minutes + "m " + seconds + "s ";
249 // If the count down is over, write some text 249 // If the count down is over, write some text
250 if (distance < 0) { 250 if (distance < 0) {
251 clearInterval(x); 251 clearInterval(x);
252 document.getElementById("delhi").innerHTML = "EXPIRED"; 252 document.getElementById("delhi").innerHTML = "EXPIRED";
253 } 253 }
254 }, 1000); 254 }, 1000);
255 255
256 var kanpur = new Date("Oct 10, 2018 14:00:00").getTime(); 256 var kanpur = new Date("Oct 10, 2018 14:00:00").getTime();
257 // Update the count down every 1 second 257 // Update the count down every 1 second
258 var x = setInterval(function() { 258 var x = setInterval(function() {
259 // Get todays date and time 259 // Get todays date and time
260 var now = new Date().getTime(); 260 var now = new Date().getTime();
261 // Find the distance between now an the count down date 261 // Find the distance between now an the count down date
262 var distance = kanpur - now; 262 var distance = kanpur - now;
263 // Time calculations for days, hours, minutes and seconds 263 // Time calculations for days, hours, minutes and seconds
264 var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 264 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
265 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 265 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
266 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 266 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
267 var seconds = Math.floor((distance % (1000 * 60)) / 1000); 267 var seconds = Math.floor((distance % (1000 * 60)) / 1000);
268 $scope.timer = days + "d " + hours + "h " 268 $scope.timer = days + "d " + hours + "h "
269 + minutes + "m " + seconds + "s " 269 + minutes + "m " + seconds + "s "
270 // Output the result in an element with id="demo" 270 // Output the result in an element with id="demo"
271 document.getElementById("kanpur").innerHTML = days + "d " + hours + "h " 271 document.getElementById("kanpur").innerHTML = days + "d " + hours + "h "
272 + minutes + "m " + seconds + "s "; 272 + minutes + "m " + seconds + "s ";
273 // If the count down is over, write some text 273 // If the count down is over, write some text
274 if (distance < 0) { 274 if (distance < 0) {
275 clearInterval(x); 275 clearInterval(x);
276 document.getElementById("kanpur").innerHTML = "EXPIRED"; 276 document.getElementById("kanpur").innerHTML = "EXPIRED";
277 } 277 }
278 }, 1000); 278 }, 1000);
279 279
280 var ahmedabad = new Date("Oct 12, 2018 14:00:00").getTime(); 280 var ahmedabad = new Date("Oct 12, 2018 14:00:00").getTime();
281 // Update the count down every 1 second 281 // Update the count down every 1 second
282 var x = setInterval(function() { 282 var x = setInterval(function() {
283 // Get todays date and time 283 // Get todays date and time
284 var now = new Date().getTime(); 284 var now = new Date().getTime();
285 // Find the distance between now an the count down date 285 // Find the distance between now an the count down date
286 var distance = ahmedabad - now; 286 var distance = ahmedabad - now;
287 // Time calculations for days, hours, minutes and seconds 287 // Time calculations for days, hours, minutes and seconds
288 var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 288 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
289 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 289 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
290 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 290 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
291 var seconds = Math.floor((distance % (1000 * 60)) / 1000); 291 var seconds = Math.floor((distance % (1000 * 60)) / 1000);
292 $scope.timer = days + "d " + hours + "h " 292 $scope.timer = days + "d " + hours + "h "
293 + minutes + "m " + seconds + "s " 293 + minutes + "m " + seconds + "s "
294 // Output the result in an element with id="demo" 294 // Output the result in an element with id="demo"
295 document.getElementById("ahmedabad").innerHTML = days + "d " + hours + "h " 295 document.getElementById("ahmedabad").innerHTML = days + "d " + hours + "h "
296 + minutes + "m " + seconds + "s "; 296 + minutes + "m " + seconds + "s ";
297 // If the count down is over, write some text 297 // If the count down is over, write some text
298 if (distance < 0) { 298 if (distance < 0) {
299 clearInterval(x); 299 clearInterval(x);
300 document.getElementById("ahmedabad").innerHTML = "EXPIRED"; 300 document.getElementById("ahmedabad").innerHTML = "EXPIRED";
301 } 301 }
302 }, 1000); 302 }, 1000);
303 303
304 var bengaluru = new Date("Oct 13, 2018 14:00:00").getTime(); 304 var bengaluru = new Date("Oct 13, 2018 14:00:00").getTime();
305 // Update the count down every 1 second 305 // Update the count down every 1 second
306 var x = setInterval(function() { 306 var x = setInterval(function() {
307 // Get todays date and time 307 // Get todays date and time
308 var now = new Date().getTime(); 308 var now = new Date().getTime();
309 // Find the distance between now an the count down date 309 // Find the distance between now an the count down date
310 var distance = bengaluru - now; 310 var distance = bengaluru - now;
311 // Time calculations for days, hours, minutes and seconds 311 // Time calculations for days, hours, minutes and seconds
312 var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 312 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
313 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 313 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
314 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 314 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
315 var seconds = Math.floor((distance % (1000 * 60)) / 1000); 315 var seconds = Math.floor((distance % (1000 * 60)) / 1000);
316 $scope.timer = days + "d " + hours + "h " 316 $scope.timer = days + "d " + hours + "h "
317 + minutes + "m " + seconds + "s " 317 + minutes + "m " + seconds + "s "
318 // Output the result in an element with id="demo" 318 // Output the result in an element with id="demo"
319 document.getElementById("bengaluru").innerHTML = days + "d " + hours + "h " 319 document.getElementById("bengaluru").innerHTML = days + "d " + hours + "h "
320 + minutes + "m " + seconds + "s "; 320 + minutes + "m " + seconds + "s ";
321 // If the count down is over, write some text 321 // If the count down is over, write some text
322 if (distance < 0) { 322 if (distance < 0) {
323 clearInterval(x); 323 clearInterval(x);
324 document.getElementById("bengaluru").innerHTML = "EXPIRED"; 324 document.getElementById("bengaluru").innerHTML = "EXPIRED";
325 } 325 }
326 }, 1000); 326 }, 1000);
327 327
328 var dharamsala = new Date("Dec 14, 2018 14:00:00").getTime(); 328 var dharamsala = new Date("Dec 14, 2018 14:00:00").getTime();
329 // Update the count down every 1 second 329 // Update the count down every 1 second
330 var x = setInterval(function() { 330 var x = setInterval(function() {
331 // Get todays date and time 331 // Get todays date and time
332 var now = new Date().getTime(); 332 var now = new Date().getTime();
333 // Find the distance between now an the count down date 333 // Find the distance between now an the count down date
334 var distance = dharamsala - now; 334 var distance = dharamsala - now;
335 // Time calculations for days, hours, minutes and seconds 335 // Time calculations for days, hours, minutes and seconds
336 var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 336 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
337 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 337 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
338 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 338 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
339 var seconds = Math.floor((distance % (1000 * 60)) / 1000); 339 var seconds = Math.floor((distance % (1000 * 60)) / 1000);
340 $scope.timer = days + "d " + hours + "h " 340 $scope.timer = days + "d " + hours + "h "
341 + minutes + "m " + seconds + "s " 341 + minutes + "m " + seconds + "s "
342 // Output the result in an element with id="demo" 342 // Output the result in an element with id="demo"
343 document.getElementById("dharamsala").innerHTML = days + "d " + hours + "h " 343 document.getElementById("dharamsala").innerHTML = days + "d " + hours + "h "
344 + minutes + "m " + seconds + "s "; 344 + minutes + "m " + seconds + "s ";
345 // If the count down is over, write some text 345 // If the count down is over, write some text
346 if (distance < 0) { 346 if (distance < 0) {
347 clearInterval(x); 347 clearInterval(x);
348 document.getElementById("dharamsala").innerHTML = "EXPIRED"; 348 document.getElementById("dharamsala").innerHTML = "EXPIRED";
349 } 349 }
350 }, 1000); 350 }, 1000);
351 351
352 $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ 352 $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/
353 $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ 353 $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/
354 // $scope.Textshow = "yes" 354 // $scope.Textshow = "yes"
355 $scope.max = 100; 355 $scope.max = 100;
356 $scope.formPage = false; 356 $scope.formPage = false;
357 $scope.current = 0; 357 $scope.current = 0;
358 $scope.payingAmnt = 0; 358 $scope.payingAmnt = 0;
359 $scope.data = {}; 359 $scope.data = {};
360 $scope.discountAmount = 0; 360 $scope.discountAmount = 0;
361 // $scope.data.quantity = "1"; 361 // $scope.data.quantity = "1";
362 $scope.check = false; 362 $scope.check = false;
363 $scope.numberCheck = false; 363 $scope.numberCheck = false;
364 $scope.paymentResult = {}; 364 $scope.paymentResult = {};
365 var data = { 365 var data = {
366 "amount": $scope.payingAmnt, 366 "amount": $scope.payingAmnt,
367 "currency": "INR", 367 "currency": "INR",
368 "status": "pending" 368 "status": "pending"
369 } 369 }
370 370
371 $scope.showval = true; 371 $scope.showval = true;
372 $scope.hideval = false; 372 $scope.hideval = false;
373 $scope.showvalue = false; 373 $scope.showvalue = false;
374 $scope.hidevalue = false; 374 $scope.hidevalue = false;
375 localStorage.setItem("country",'INDIA'); 375 localStorage.setItem("country",'INDIA');
376 $scope.isShowHide = function (value) { 376 $scope.isShowHide = function (value) {
377 var element = document.getElementById("defaultcountry"); 377 var element = document.getElementById("defaultcountry");
378 element.classList.remove("btn-active"); 378 element.classList.remove("btn-active");
379 localStorage.setItem("country",value); 379 localStorage.setItem("country",value);
380 if (value == "INDIA") { 380 if (value == "INDIA") {
381 console.log("value",value) 381 console.log("value",value)
382 $scope.showval = true; 382 $scope.showval = true;
383 $scope.hideval = false; 383 $scope.hideval = false;
384 $scope.showvalue = false; 384 $scope.showvalue = false;
385 $scope.hidevalue = false; 385 $scope.hidevalue = false;
386 } 386 }
387 else if (value == "SRI LANKA") { 387 else if (value == "SRI LANKA") {
388 console.log("value1",value) 388 console.log("value1",value)
389 $scope.showval = false; 389 $scope.showval = false;
390 $scope.hideval = true; 390 $scope.hideval = true;
391 $scope.showvalue = false; 391 $scope.showvalue = false;
392 $scope.hidevalue = false; 392 $scope.hidevalue = false;
393 } 393 }
394 else if (value == "BANGLADESH") { 394 else if (value == "BANGLADESH") {
395 console.log("value2",value) 395 console.log("value2",value)
396 $scope.showval = false; 396 $scope.showval = false;
397 $scope.hideval = false; 397 $scope.hideval = false;
398 $scope.showvalue = true; 398 $scope.showvalue = true;
399 $scope.hidevalue = false; 399 $scope.hidevalue = false;
400 } 400 }
401 else { 401 else {
402 console.log("value3",value) 402 console.log("value3",value)
403 $scope.showval = false; 403 $scope.showval = false;
404 $scope.hideval = false; 404 $scope.hideval = false;
405 $scope.showvalue = false; 405 $scope.showvalue = false;
406 $scope.hidevalue = true; 406 $scope.hidevalue = true;
407 } 407 }
408 } 408 }
409 409
410 $scope.apply = function() { 410 $scope.apply = function() {
411 //Analytics.trackEvent('register', 'click', 'Registration'); 411 //Analytics.trackEvent('register', 'click', 'Registration');
412 //$location.path("/caricatures") 412 //$location.path("/caricatures")
413 window.location.href = "https://startupjalsa.com/events#/caricatures?utm_source=RegisterNowUp&utm_medium=Reg"; 413 window.location.href = "https://startupjalsa.com/events#/caricatures?utm_source=RegisterNowUp&utm_medium=Reg";
414 414
415 } 415 }
416 416
417 $scope.apply1 = function() { 417 $scope.apply1 = function() {
418 //Analytics.trackEvent('register', 'click', 'Registration'); 418 //Analytics.trackEvent('register', 'click', 'Registration');
419 window.location.href = "https://startupjalsa.com/events#/caricatures?utm_source=RegisterNowDown&utm_medium=Register"; 419 window.location.href = "https://startupjalsa.com/events#/caricatures?utm_source=RegisterNowDown&utm_medium=Register";
420 420
421 } 421 }
422 422
423 $scope.click=function(){ 423 $scope.click=function(){
424 //Analytics.trackEvent('register', 'click', 'Registration'); 424 Analytics.trackEvent('register', 'click', 'Registration');
425 let redirectUrl = "https://wa.me/918283056881"; 425 let redirectUrl = "https://wa.me/918283056881";
426 window.open(redirectUrl,"_blank") 426 window.open(redirectUrl,"_blank")
427 } 427 }
428 428
429 // $scope.data.city = ''; 429 // $scope.data.city = '';
430 $scope.watch = function(value){ 430 $scope.watch = function(value){
431 //document.getElementById("ahmedabad").src = ""; 431 //document.getElementById("ahmedabad").src = "";
432 // console.log("cllll",value) 432 // console.log("cllll",value)
433 $scope.data.city = value; 433 $scope.data.city = value;
434 // if($scope.data.city == "Chennai"){ 434 // if($scope.data.city == "Chennai"){
435 // console.log("cllll1",value) 435 // console.log("cllll1",value)
436 // $window.location.href = 'http://35.154.24.158:8007'; 436 // $window.location.href = 'http://35.154.24.158:8007';
437 // }else{ 437 // }else{
438 // console.log("cllll2",value) 438 // console.log("cllll2",value)
439 localStorage.setItem("city" ,value); 439 localStorage.setItem("city" ,value);
440 440
441 //$location.path('/registration').search({city: value}); 441 //$location.path('/registration').search({city: value});
442 // $location.path('/registration/'+value+''); 442 // $location.path('/registration/'+value+'');
443 $location.path('/registration'); 443 $location.path('/registration');
444 //$state.go('registration', { 'city': value}) 444 //$state.go('registration', { 'city': value})
445 // } 445 // }
446 } 446 }
447 447
448 $scope.select = function(url){ 448 $scope.select = function(url){
449 console.log("cllll") 449 console.log("cllll")
450 window.open(url) 450 window.open(url)
451 } 451 }
452 452
453 $scope.stagekeyPress = function() { 453 $scope.stagekeyPress = function() {
454 $('.icon-circle-a').css('background-color', 'rgb(25, 104, 157)'); 454 $('.icon-circle-a').css('background-color', 'rgb(25, 104, 157)');
455 } 455 }
456 $scope.sectorkeyPress = function() { 456 $scope.sectorkeyPress = function() {
457 $('.icon-circle-b').css('background-color', 'rgb(25, 104, 157)'); 457 $('.icon-circle-b').css('background-color', 'rgb(25, 104, 157)');
458 } 458 }
459 459
460 $scope.productLaunchkeyPress = function() { 460 $scope.productLaunchkeyPress = function() {
461 $('.icon-circle-ab').css('background-color', 'rgb(25, 104, 157)'); 461 $('.icon-circle-ab').css('background-color', 'rgb(25, 104, 157)');
462 } 462 }
463 463
464 $scope.launchPeriodkeyPress = function() { 464 $scope.launchPeriodkeyPress = function() {
465 $('.icon-circle-abc').css('background-color', 'rgb(25, 104, 157)'); 465 $('.icon-circle-abc').css('background-color', 'rgb(25, 104, 157)');
466 } 466 }
467 467
468 $scope.industrykeyPress = function(quantity) { 468 $scope.industrykeyPress = function(quantity) {
469 console.log("fghj",quantity) 469 console.log("fghj",quantity)
470 $('.icon-circle-abcdefg').css('background-color', 'rgb(25, 104, 157)'); 470 $('.icon-circle-abcdefg').css('background-color', 'rgb(25, 104, 157)');
471 } 471 }
472 472
473 $scope.industryNamekeyPress = function(firstName) { 473 $scope.industryNamekeyPress = function(firstName) {
474 console.log("lastName==", firstName); 474 console.log("lastName==", firstName);
475 if (firstName == undefined) { 475 if (firstName == undefined) {
476 $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)'); 476 $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)');
477 } else { 477 } else {
478 $('.icon-circle-o').css('background-color', 'rgb(25, 104, 157)'); 478 $('.icon-circle-o').css('background-color', 'rgb(25, 104, 157)');
479 } 479 }
480 } 480 }
481 481
482 $scope.amountkeyPress = function() { 482 $scope.amountkeyPress = function() {
483 $('.icon-circle-bc').css('background-color', 'rgb(25, 104, 157)'); 483 $('.icon-circle-bc').css('background-color', 'rgb(25, 104, 157)');
484 } 484 }
485 485
486 $scope.firstNamekeyPress = function(name) { 486 $scope.firstNamekeyPress = function(name) {
487 console.log("lastName==", name); 487 console.log("lastName==", name);
488 if (name == undefined) { 488 if (name == undefined) {
489 $('.icon-circle-c').css('background-color', 'rgb(102, 102, 102)'); 489 $('.icon-circle-c').css('background-color', 'rgb(102, 102, 102)');
490 } else { 490 } else {
491 $('.icon-circle-c').css('background-color', 'rgb(25, 104, 157)'); 491 $('.icon-circle-c').css('background-color', 'rgb(25, 104, 157)');
492 } 492 }
493 } 493 }
494 494
495 $scope.emailkeyPress = function(email) { 495 $scope.emailkeyPress = function(email) {
496 console.log("email", email); 496 console.log("email", email);
497 if (email == undefined) { 497 if (email == undefined) {
498 $('.icon-circle-d').css('background-color', 'rgb(102, 102, 102)'); 498 $('.icon-circle-d').css('background-color', 'rgb(102, 102, 102)');
499 } else { 499 } else {
500 $('.icon-circle-d').css('background-color', 'rgb(25, 104, 157)'); 500 $('.icon-circle-d').css('background-color', 'rgb(25, 104, 157)');
501 } 501 }
502 } 502 }
503 503
504 $scope.phonekeyPress = function(number) { 504 $scope.phonekeyPress = function(number) {
505 console.log("number", number); 505 console.log("number", number);
506 if (number == undefined || number == '') { 506 if (number == undefined || number == '') {
507 $('.icon-circle-e').css('background-color', 'rgb(102, 102, 102)'); 507 $('.icon-circle-e').css('background-color', 'rgb(102, 102, 102)');
508 } else { 508 } else {
509 $('.icon-circle-e').css('background-color', 'rgb(25, 104, 157)'); 509 $('.icon-circle-e').css('background-color', 'rgb(25, 104, 157)');
510 } 510 }
511 } 511 }
512 512
513 $scope.citykeyPress = function(city) { 513 $scope.citykeyPress = function(city) {
514 console.log("city", city); 514 console.log("city", city);
515 if (city == undefined) { 515 if (city == undefined) {
516 $('.icon-circle-f').css('background-color', 'rgb(102, 102, 102)'); 516 $('.icon-circle-f').css('background-color', 'rgb(102, 102, 102)');
517 } else { 517 } else {
518 $('.icon-circle-f').css('background-color', 'rgb(25, 104, 157)'); 518 $('.icon-circle-f').css('background-color', 'rgb(25, 104, 157)');
519 } 519 }
520 } 520 }
521 521
522 $scope.startupNamekeyPress = function(q) { 522 $scope.startupNamekeyPress = function(q) {
523 if (q == undefined) { 523 if (q == undefined) {
524 $('.icon-circle-x').css('background-color', 'rgb(102, 102, 102)'); 524 $('.icon-circle-x').css('background-color', 'rgb(102, 102, 102)');
525 } else { 525 } else {
526 $('.icon-circle-x').css('background-color', 'rgb(25, 104, 157)'); 526 $('.icon-circle-x').css('background-color', 'rgb(25, 104, 157)');
527 } 527 }
528 } 528 }
529 529
530 $scope.linkedInkeyPress = function(technology) { 530 $scope.linkedInkeyPress = function(technology) {
531 if (technology == undefined || technology == '') { 531 if (technology == undefined || technology == '') {
532 $('.icon-circle-h').css('background-color', 'rgb(102, 102, 102)'); 532 $('.icon-circle-h').css('background-color', 'rgb(102, 102, 102)');
533 } else { 533 } else {
534 $('.icon-circle-h').css('background-color', 'rgb(25, 104, 157)'); 534 $('.icon-circle-h').css('background-color', 'rgb(25, 104, 157)');
535 } 535 }
536 } 536 }
537 $scope.companykeyPress = function(problem) { 537 $scope.companykeyPress = function(problem) {
538 if (problem == undefined) { 538 if (problem == undefined) {
539 $('.icon-circle-i').css('background-color', 'rgb(102, 102, 102)'); 539 $('.icon-circle-i').css('background-color', 'rgb(102, 102, 102)');
540 } else { 540 } else {
541 $('.icon-circle-i').css('background-color', 'rgb(25, 104, 157)'); 541 $('.icon-circle-i').css('background-color', 'rgb(25, 104, 157)');
542 } 542 }
543 } 543 }
544 $scope.productNamekeyPress = function(solution) { 544 $scope.productNamekeyPress = function(solution) {
545 if (solution == undefined) { 545 if (solution == undefined) {
546 $('.icon-circle-j').css('background-color', 'rgb(102, 102, 102)'); 546 $('.icon-circle-j').css('background-color', 'rgb(102, 102, 102)');
547 } else { 547 } else {
548 $('.icon-circle-j').css('background-color', 'rgb(25, 104, 157)'); 548 $('.icon-circle-j').css('background-color', 'rgb(25, 104, 157)');
549 } 549 }
550 } 550 }
551 $scope.businesskeyPress = function(business) { 551 $scope.businesskeyPress = function(business) {
552 if (business == undefined) { 552 if (business == undefined) {
553 $('.icon-circle-p').css('background-color', 'rgb(102, 102, 102)'); 553 $('.icon-circle-p').css('background-color', 'rgb(102, 102, 102)');
554 } else { 554 } else {
555 $('.icon-circle-p').css('background-color', 'rgb(25, 104, 157)'); 555 $('.icon-circle-p').css('background-color', 'rgb(25, 104, 157)');
556 } 556 }
557 } 557 }
558 558
559 $scope.websitekeyPress = function(prototype) { 559 $scope.websitekeyPress = function(prototype) {
560 if (prototype == undefined || prototype == '') { 560 if (prototype == undefined || prototype == '') {
561 $('.icon-circle-k').css('background-color', 'rgb(102, 102, 102)'); 561 $('.icon-circle-k').css('background-color', 'rgb(102, 102, 102)');
562 } else { 562 } else {
563 $('.icon-circle-k').css('background-color', 'rgb(25, 104, 157)'); 563 $('.icon-circle-k').css('background-color', 'rgb(25, 104, 157)');
564 } 564 }
565 } 565 }
566 566
567 $scope.employeekeyPress = function(market) { 567 $scope.employeekeyPress = function(market) {
568 if (market == undefined || market == '') { 568 if (market == undefined || market == '') {
569 $('.icon-circle-l').css('background-color', 'rgb(102, 102, 102)'); 569 $('.icon-circle-l').css('background-color', 'rgb(102, 102, 102)');
570 } else { 570 } else {
571 $('.icon-circle-l').css('background-color', 'rgb(25, 104, 157)'); 571 $('.icon-circle-l').css('background-color', 'rgb(25, 104, 157)');
572 } 572 }
573 } 573 }
574 574
575 $scope.annualkeyPress = function(risk) { 575 $scope.annualkeyPress = function(risk) {
576 if (risk == undefined || risk == '') { 576 if (risk == undefined || risk == '') {
577 $('.icon-circle-m').css('background-color', 'rgb(102, 102, 102)'); 577 $('.icon-circle-m').css('background-color', 'rgb(102, 102, 102)');
578 } else { 578 } else {
579 $('.icon-circle-m').css('background-color', 'rgb(25, 104, 157)'); 579 $('.icon-circle-m').css('background-color', 'rgb(25, 104, 157)');
580 } 580 }
581 } 581 }
582 582
583 $scope.revenuekeyPress = function(team) { 583 $scope.revenuekeyPress = function(team) {
584 if (team == undefined) { 584 if (team == undefined) {
585 $('.icon-circle-n').css('background-color', 'rgb(102, 102, 102)'); 585 $('.icon-circle-n').css('background-color', 'rgb(102, 102, 102)');
586 } else { 586 } else {
587 $('.icon-circle-n').css('background-color', 'rgb(25, 104, 157)'); 587 $('.icon-circle-n').css('background-color', 'rgb(25, 104, 157)');
588 } 588 }
589 } 589 }
590 590
591 $scope.descriptionkeyPress = function(pitch) { 591 $scope.descriptionkeyPress = function(pitch) {
592 if (pitch == undefined) { 592 if (pitch == undefined) {
593 $('.icon-circle-z').css('background-color', 'rgb(102, 102, 102)'); 593 $('.icon-circle-z').css('background-color', 'rgb(102, 102, 102)');
594 } else { 594 } else {
595 $('.icon-circle-z').css('background-color', 'rgb(25, 104, 157)'); 595 $('.icon-circle-z').css('background-color', 'rgb(25, 104, 157)');
596 } 596 }
597 } 597 }
598 598
599 $scope.discountkeyPress = function(discount) { 599 $scope.discountkeyPress = function(discount) {
600 if (discount == undefined) { 600 if (discount == undefined) {
601 $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)'); 601 $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)');
602 } else { 602 } else {
603 $('.icon-circle-o').css('background-color', 'rgb(25, 104, 157)'); 603 $('.icon-circle-o').css('background-color', 'rgb(25, 104, 157)');
604 } 604 }
605 } 605 }
606 606
607 $scope.removeNooError = function() { 607 $scope.removeNooError = function() {
608 $('#invalidIdea').css('display', 'block'); 608 $('#invalidIdea').css('display', 'block');
609 $('#noExist').css('display', 'none'); 609 $('#noExist').css('display', 'none');
610 }; 610 };
611 611
612 $scope.ideakeyPress = function(financial) { 612 $scope.ideakeyPress = function(financial) {
613 console.log("financial", financial); 613 console.log("financial", financial);
614 if (financial == undefined) { 614 if (financial == undefined) {
615 $('.icon-circle-q').css('background-color', 'rgb(102, 102, 102)'); 615 $('.icon-circle-q').css('background-color', 'rgb(102, 102, 102)');
616 } else { 616 } else {
617 $('.icon-circle-q').css('background-color', 'rgb(25, 104, 157)'); 617 $('.icon-circle-q').css('background-color', 'rgb(25, 104, 157)');
618 } 618 }
619 } 619 }
620 620
621 $scope.fundkeyPress = function(financial) { 621 $scope.fundkeyPress = function(financial) {
622 console.log("financial", financial); 622 console.log("financial", financial);
623 if (financial == undefined) { 623 if (financial == undefined) {
624 $('.icon-circle-y').css('background-color', 'rgb(102, 102, 102)'); 624 $('.icon-circle-y').css('background-color', 'rgb(102, 102, 102)');
625 } else { 625 } else {
626 $('.icon-circle-y').css('background-color', 'rgb(25, 104, 157)'); 626 $('.icon-circle-y').css('background-color', 'rgb(25, 104, 157)');
627 } 627 }
628 } 628 }
629 629
630 $scope.changeReferalIconColor = function(referalToken){ 630 $scope.changeReferalIconColor = function(referalToken){
631 if (referalToken == undefined || referalToken == '') { 631 if (referalToken == undefined || referalToken == '') {
632 $('.referel-icon').css('background-color', 'rgb(102, 102, 102)'); 632 $('.referel-icon').css('background-color', 'rgb(102, 102, 102)');
633 }else { 633 }else {
634 $('.referel-icon').css('background-color', 'rgb(25, 104, 157)'); 634 $('.referel-icon').css('background-color', 'rgb(25, 104, 157)');
635 } 635 }
636 } 636 }
637 637
638 }); 638 });
639 639
640 scotchApp.controller('registrationController', function($q, $scope, $http, $location, $rootScope,$route,BASE_URL,Analytics) { 640 scotchApp.controller('registrationController', function($q, $scope, $http, $location, $rootScope,$route,BASE_URL,Analytics) {
641 $scope.data = {}; 641 $scope.data = {};
642 $scope.check = false; 642 $scope.check = false;
643 $scope.numberCheck = false; 643 $scope.numberCheck = false;
644 $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ 644 $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/
645 $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ 645 $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/
646 $scope.max = 100; 646 $scope.max = 100;
647 $scope.formPage = false; 647 $scope.formPage = false;
648 $scope.current = 0; 648 $scope.current = 0;
649 $scope.payingAmnt = 0; 649 $scope.payingAmnt = 0;
650 $scope.discountAmount = 0; 650 $scope.discountAmount = 0;
651 $scope.approvedMsg = false; 651 $scope.approvedMsg = false;
652 $scope.disApprovedMsg = false; 652 $scope.disApprovedMsg = false;
653 653
654 // $scope.data.quantity = "1"; 654 // $scope.data.quantity = "1";
655 $scope.check = false; 655 $scope.check = false;
656 $scope.numberCheck = false; 656 $scope.numberCheck = false;
657 $scope.paymentResult = {}; 657 $scope.paymentResult = {};
658 // var myParam = window.location.href.split('status=').splice(1).join('').split('&')[0] 658 // var myParam = window.location.href.split('status=').splice(1).join('').split('&')[0]
659 // if(myParam){ 659 // if(myParam){
660 // if(myParam == "approved"){ 660 // if(myParam == "approved"){
661 // $scope.showResponse = true; 661 // $scope.showResponse = true;
662 // }else{ 662 // }else{
663 // $scope.disApprovedMsg = true; 663 // $scope.disApprovedMsg = true;
664 // } 664 // }
665 // }else{ 665 // }else{
666 // $scope.disApprovedMsg = true; 666 // $scope.disApprovedMsg = true;
667 // } 667 // }
668 668
669 $scope.click=function(){
670 Analytics.trackEvent('register', 'click', 'Registration');
671 let redirectUrl = "https://wa.me/918283056881";
672 window.open(redirectUrl,"_blank")
673 }
674
669 $scope.removeError = function() { 675 $scope.removeError = function() {
670 $('#invalidEmail').css('display', 'none'); 676 $('#invalidEmail').css('display', 'none');
671 $('#alreadyExist').css('display', 'none'); 677 $('#alreadyExist').css('display', 'none');
672 }; 678 };
673 679
674 $scope.emailcheck = function(val) { 680 $scope.emailcheck = function(val) {
675 if (val == undefined) { 681 if (val == undefined) {
676 $('#invalidEmail').css('display', 'block'); 682 $('#invalidEmail').css('display', 'block');
677 } else { 683 } else {
678 $('#alreadyExist').css('display', 'block'); 684 $('#alreadyExist').css('display', 'block');
679 } 685 }
680 }; 686 };
681 687
682 $scope.removeNoError = function() { 688 $scope.removeNoError = function() {
683 $('#invalidNumber').css('display', 'none'); 689 $('#invalidNumber').css('display', 'none');
684 $('#alreadyExist').css('display', 'none'); 690 $('#alreadyExist').css('display', 'none');
685 }; 691 };
686 692
687 $scope.numbercheck = function(val) { 693 $scope.numbercheck = function(val) {
688 if (val == undefined) { 694 if (val == undefined) {
689 $('#invalidNumber').css('display', 'block'); 695 $('#invalidNumber').css('display', 'block');
690 } else { 696 } else {
691 $('#alreadyExist').css('display', 'block'); 697 $('#alreadyExist').css('display', 'block');
692 } 698 }
693 }; 699 };
694 700
695 // $scope.$on('city', function (event, value) { 701 // $scope.$on('city', function (event, value) {
696 $scope.data.city = localStorage.getItem("city"); 702 $scope.data.city = localStorage.getItem("city");
697 $scope.data.country = localStorage.getItem("country"); 703 $scope.data.country = localStorage.getItem("country");
698 // }); 704 // });
699 var data = { 705 var data = {
700 "amount": $scope.payingAmnt, 706 "amount": $scope.payingAmnt,
701 "currency": "INR", 707 "currency": "INR",
702 "status": "pending", 708 "status": "pending",
703 "paymentType": $scope.data.country 709 "paymentType": $scope.data.country
704 } 710 }
705 711
706 var handleFileSelect = function(evt) { 712 var handleFileSelect = function(evt) {
707 var files = evt.target.files; 713 var files = evt.target.files;
708 var file = files[0]; 714 var file = files[0];
709 715
710 if (files && file) { 716 if (files && file) {
711 var reader = new FileReader(); 717 var reader = new FileReader();
712 718
713 reader.onload = function(readerEvt) { 719 reader.onload = function(readerEvt) {
714 var binaryString = readerEvt.target.result; 720 var binaryString = readerEvt.target.result;
715 $scope.base64textString = btoa(binaryString); 721 $scope.base64textString = btoa(binaryString);
716 //console.log("base64textarea",$scope.base64textString) 722 //console.log("base64textarea",$scope.base64textString)
717 //$scope.data.uploadFile = file.name; 723 //$scope.data.uploadFile = file.name;
718 $scope.fileSelect = false; 724 $scope.fileSelect = false;
719 if($scope.data.uploadFile == null){ 725 if($scope.data.uploadFile == null){
720 $scope.fileSelect = true; 726 $scope.fileSelect = true;
721 }else{ 727 }else{
722 $scope.fileSelect = false; 728 $scope.fileSelect = false;
723 }; 729 };
724 } 730 }
725 731
726 reader.readAsBinaryString(file); 732 reader.readAsBinaryString(file);
727 } 733 }
728 }; 734 };
729 if (window.File && window.FileReader && window.FileList && window.Blob) { 735 if (window.File && window.FileReader && window.FileList && window.Blob) {
730 document.getElementById('filePicker').addEventListener('change', handleFileSelect, false); 736 document.getElementById('filePicker').addEventListener('change', handleFileSelect, false);
731 } 737 }
732 738
733 $scope.ngShowhide = false; 739 $scope.ngShowhide = false;
734 $scope.GetValue = function(){ 740 $scope.GetValue = function(){
735 if($scope.data.sector == "Other"){ 741 if($scope.data.sector == "Other"){
736 $scope.ngShowhide = true; 742 $scope.ngShowhide = true;
737 }else{ 743 }else{
738 $scope.ngShowhide = false; 744 $scope.ngShowhide = false;
739 } 745 }
740 } 746 }
741 747
742 $scope.ngShow = false; 748 $scope.ngShow = false;
743 $scope.getValue = function(){ 749 $scope.getValue = function(){
744 if($scope.data.hear == "Other"){ 750 if($scope.data.hear == "Other"){
745 $scope.ngShow = true; 751 $scope.ngShow = true;
746 }else{ 752 }else{
747 $scope.ngShow = false; 753 $scope.ngShow = false;
748 } 754 }
749 } 755 }
750 756
751 $rootScope.tokenCall = function(val) { 757 $rootScope.tokenCall = function(val) {
752 if (val == undefined) { 758 if (val == undefined) {
753 $('#invalidToken').css('display', 'block'); 759 $('#invalidToken').css('display', 'block');
754 } else { 760 } else {
755 val = val.toUpperCase(); 761 val = val.toUpperCase();
756 if((val == "IITH99" && $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")){ 762 if((val == "IITH99" && $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")){
757 $scope.tokencheck = false; 763 $scope.tokencheck = false;
758 return; 764 return;
759 } 765 }
760 $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": "' + val + '"}}') 766 $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": "' + val + '"}}')
761 .then(function(searchResult) { 767 .then(function(searchResult) {
762 if (searchResult.data.length == 0) { 768 if (searchResult.data.length == 0) {
763 $scope.tokencheck = false; 769 $scope.tokencheck = false;
764 $scope.discountAmount = 0; 770 $scope.discountAmount = 0;
765 } else { 771 } else {
766 $scope.discountpercentage = searchResult.data[0].discount; 772 $scope.discountpercentage = searchResult.data[0].discount;
767 $scope.tokencheck = true; 773 $scope.tokencheck = true;
768 } 774 }
769 },function(err){ 775 },function(err){
770 console.log(err) 776 console.log(err)
771 }); 777 });
772 778
773 } 779 }
774 }; 780 };
775 // if($scope.data.country == "INDIA"){ 781 // if($scope.data.country == "INDIA"){
776 // $scope.submit = function() { 782 // $scope.submit = function() {
777 // Analytics.trackEvent('register', 'click', 'Registration'); 783 // Analytics.trackEvent('register', 'click', 'Registration');
778 // $scope.loading = true; 784 // $scope.loading = true;
779 // $scope.data.uploadFile = $scope.base64textString; 785 // $scope.data.uploadFile = $scope.base64textString;
780 // console.log($scope.data.uploadFile) 786 // console.log($scope.data.uploadFile)
781 // // if($scope.tokencheck == false){ 787 // // if($scope.tokencheck == false){
782 // // $scope.data.referalToken = null; 788 // // $scope.data.referalToken = null;
783 // // } 789 // // }
784 // // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { 790 // // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) {
785 // // var x = document.getElementById("snackbar") 791 // // var x = document.getElementById("snackbar")
786 // // setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); 792 // // setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
787 // // }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { 793 // // }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) {
788 // $scope.infoForm = true; 794 // $scope.infoForm = true;
789 // $scope.ticketAmnt = 1180; 795 // $scope.ticketAmnt = 1180;
790 // $scope.detail = {}; 796 // $scope.detail = {};
791 // $scope.data.phone = "+91"+$scope.data.number; 797 // $scope.data.phone = "+91"+$scope.data.number;
792 // if($scope.data.referalToken == null){ 798 // if($scope.data.referalToken == null){
793 // $scope.data.referalToken = "NA" 799 // $scope.data.referalToken = "NA"
794 // } 800 // }
795 // var file =document.getElementById('filePicker').files[0]; 801 // var file =document.getElementById('filePicker').files[0];
796 // var image = BASE_URL+'/containers/images/download/' 802 // var image = BASE_URL+'/containers/images/download/'
797 // var imagePath = file.name; 803 // var imagePath = file.name;
798 // $scope.data.uploadFile = image + imagePath; 804 // $scope.data.uploadFile = image + imagePath;
799 // var fd = new FormData() 805 // var fd = new FormData()
800 // fd.append('filePicker',file); 806 // fd.append('filePicker',file);
801 // var deferred = $q.defer(); 807 // var deferred = $q.defer();
802 // $http({ 808 // $http({
803 // method:'POST', 809 // method:'POST',
804 // url: BASE_URL+'/containers/images/upload', 810 // url: BASE_URL+'/containers/images/upload',
805 // data:fd, 811 // data:fd,
806 // transformRequest:angular.identity, 812 // transformRequest:angular.identity,
807 // headers:{'Content-Type':undefined} 813 // headers:{'Content-Type':undefined}
808 // }) 814 // })
809 // .success(function(result){ 815 // .success(function(result){
810 // deferred.resolve(result); 816 // deferred.resolve(result);
811 // $http({ 817 // $http({
812 // method: 'POST', 818 // method: 'POST',
813 // url: BASE_URL+'/applicants', 819 // url: BASE_URL+'/applicants',
814 // data: $scope.data, 820 // data: $scope.data,
815 // headers: {} 821 // headers: {}
816 // }).then(function mySuccess(result) { 822 // }).then(function mySuccess(result) {
817 // $scope.detail = result; 823 // $scope.detail = result;
818 // data.applicantId = result.data.id; 824 // data.applicantId = result.data.id;
819 // $scope.userId = result.data.id; 825 // $scope.userId = result.data.id;
820 // var amount = $scope.ticketAmnt * 100 826 // var amount = $scope.ticketAmnt * 100
821 // if($scope.tokencheck == true){ 827 // if($scope.tokencheck == true){
822 // var amount = $scope.ticketAmnt 828 // var amount = $scope.ticketAmnt
823 // console.log("resultcity===",$scope.data.city) 829 // console.log("resultcity===",$scope.data.city)
824 // if($scope.discountpercentage == "100") { 830 // if($scope.discountpercentage == "100") {
825 // $scope.discountpercentage = "99.9"; 831 // $scope.discountpercentage = "99.9";
826 // } 832 // }
827 // $scope.percDiscount = $scope.discountpercentage/100; 833 // $scope.percDiscount = $scope.discountpercentage/100;
828 // $scope.discountAmount = amount * $scope.percDiscount; 834 // $scope.discountAmount = amount * $scope.percDiscount;
829 // } 835 // }
830 // var taxAmount = $scope.ticketAmnt - $scope.discountAmount 836 // var taxAmount = $scope.ticketAmnt - $scope.discountAmount
831 // $scope.payingAmnt = taxAmount; 837 // $scope.payingAmnt = taxAmount;
832 // $scope.payingAmnt = $scope.payingAmnt.toFixed() 838 // $scope.payingAmnt = $scope.payingAmnt.toFixed()
833 // data.amount = $scope.payingAmnt; 839 // data.amount = $scope.payingAmnt;
834 // if($scope.detail != null){ 840 // if($scope.detail != null){
835 // $http({ 841 // $http({
836 // method: 'POST', 842 // method: 'POST',
837 // url: BASE_URL+'/payments', 843 // url: BASE_URL+'/payments',
838 // data: data, 844 // data: data,
839 // headers: {} 845 // headers: {}
840 // }).then(function mySuccess(paymentResult) { 846 // }).then(function mySuccess(paymentResult) {
841 // $scope.loading = false; 847 // $scope.loading = false;
842 // //$("p").html(paymentResult.data.data) 848 // //$("p").html(paymentResult.data.data)
843 // }, function myError(error) { 849 // }, function myError(error) {
844 // }); 850 // });
845 // } 851 // }
846 // var i = 0; 852 // var i = 0;
847 // $scope.payingAmnt = $scope.payingAmnt * 100; 853 // $scope.payingAmnt = $scope.payingAmnt * 100;
848 // var options = { 854 // var options = {
849 // "key": "rzp_test_YwHsVFiDIQ2WUQ", 855 // "key": "rzp_test_YwHsVFiDIQ2WUQ",
850 // //"key": "rzp_live_mkmCb4FkstuWaS", 856 // //"key": "rzp_live_mkmCb4FkstuWaS",
851 // "amount": $scope.payingAmnt, 857 // "amount": $scope.payingAmnt,
852 858
853 // "name": "Startup Jalsa", 859 // "name": "Startup Jalsa",
854 // "description":"amount", 860 // "description":"amount",
855 // "currency": "INR", 861 // "currency": "INR",
856 // "status": "done", 862 // "status": "done",
857 863
858 // "prefill": { 864 // "prefill": {
859 // "email": $scope.detail.email, 865 // "email": $scope.detail.email,
860 // "contact": $scope.detail.phone 866 // "contact": $scope.detail.phone
861 // }, 867 // },
862 868
863 // "theme": { 869 // "theme": {
864 // "color": "#2196f3 ", 870 // "color": "#2196f3 ",
865 // "image_padding":"NO" 871 // "image_padding":"NO"
866 // }, 872 // },
867 // "modal": { 873 // "modal": {
868 // "ondismiss": function(){ 874 // "ondismiss": function(){
869 // } 875 // }
870 // }, 876 // },
871 // "handler": function (response){ 877 // "handler": function (response){
872 // createPayment(response); 878 // createPayment(response);
873 // } 879 // }
874 // }; 880 // };
875 // var rzp1 = new Razorpay(options); 881 // var rzp1 = new Razorpay(options);
876 // rzp1.open(); 882 // rzp1.open();
877 // $scope.paymentResponse = {}; 883 // $scope.paymentResponse = {};
878 // function createPayment(response){ 884 // function createPayment(response){
879 // $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; 885 // $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id;
880 // $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; 886 // $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId;
881 // $scope.paymentResponse.amount = data.amount; 887 // $scope.paymentResponse.amount = data.amount;
882 // $scope.paymentResponse.currency = "INR"; 888 // $scope.paymentResponse.currency = "INR";
883 // $scope.paymentResponse.status = $scope.paymentResult.data.status; 889 // $scope.paymentResponse.status = $scope.paymentResult.data.status;
884 // $http({ 890 // $http({
885 // method: 'PUT', 891 // method: 'PUT',
886 // url: BASE_URL+'/payments/'+$scope.paymentResult.data.id, 892 // url: BASE_URL+'/payments/'+$scope.paymentResult.data.id,
887 // data: $scope.paymentResponse, 893 // data: $scope.paymentResponse,
888 // headers: {} 894 // headers: {}
889 // }).then(function mySuccess(searchResult) { 895 // }).then(function mySuccess(searchResult) {
890 // Analytics.trackEvent('register', 'click', 'Registration'); 896 // Analytics.trackEvent('register', 'click', 'Registration');
891 // $location.path("/confirm") 897 // $location.path("/confirm")
892 // }, function myError(error) { 898 // }, function myError(error) {
893 // }); 899 // });
894 // } 900 // }
895 // //} 901 // //}
896 902
897 // }, function myError(error) { 903 // }, function myError(error) {
898 904
899 // }); 905 // });
900 906
901 // }) 907 // })
902 908
903 // // }) 909 // // })
904 910
905 // //} 911 // //}
906 912
907 // } 913 // }
908 // }else{ 914 // }else{
909 $scope.submit = function() { 915 $scope.submit = function() {
910 Analytics.trackEvent('register', 'click', 'Registration'); 916 Analytics.trackEvent('register', 'click', 'Registration');
911 $scope.loading = true; 917 $scope.loading = true;
912 $scope.data.uploadFile = $scope.base64textString; 918 $scope.data.uploadFile = $scope.base64textString;
913 // if($scope.tokencheck == false){ 919 // if($scope.tokencheck == false){
914 // $scope.data.referalToken = null; 920 // $scope.data.referalToken = null;
915 // } 921 // }
916 // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { 922 // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) {
917 // var x = document.getElementById("snackbar") 923 // var x = document.getElementById("snackbar")
918 // setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); 924 // setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
919 // }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { 925 // }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) {
920 $scope.infoForm = true; 926 $scope.infoForm = true;
921 $scope.ticketAmnt = 1180; 927 $scope.ticketAmnt = 1180;
922 $scope.detail = {}; 928 $scope.detail = {};
923 $scope.data.phone = "+91"+$scope.data.number; 929 $scope.data.phone = "+91"+$scope.data.number;
924 if($scope.data.referalToken == null){ 930 if($scope.data.referalToken == null){
925 $scope.data.referalToken = "NA" 931 $scope.data.referalToken = "NA"
926 } 932 }
927 var file =document.getElementById('filePicker').files[0]; 933 var file =document.getElementById('filePicker').files[0];
928 //console.log("file",filePicker) 934 //console.log("file",filePicker)
929 var image = BASE_URL+'/containers/images/download/' 935 var image = BASE_URL+'/containers/images/download/'
930 var imagePath = file.name; 936 var imagePath = file.name;
931 $scope.data.uploadFile = image + imagePath; 937 $scope.data.uploadFile = image + imagePath;
932 //console.log($scope.data.uploadFile) 938 //console.log($scope.data.uploadFile)
933 var fd = new FormData() 939 var fd = new FormData()
934 fd.append('filePicker',file); 940 fd.append('filePicker',file);
935 var deferred = $q.defer(); 941 var deferred = $q.defer();
936 $http({ 942 $http({
937 method:'POST', 943 method:'POST',
938 url: BASE_URL+'/containers/images/upload', 944 url: BASE_URL+'/containers/images/upload',
939 data:fd, 945 data:fd,
940 transformRequest:angular.identity, 946 transformRequest:angular.identity,
941 headers:{'Content-Type':undefined} 947 headers:{'Content-Type':undefined}
942 }) 948 })
943 .success(function(result){ 949 .success(function(result){
944 deferred.resolve(result); 950 deferred.resolve(result);
945 $http({ 951 $http({
946 method: 'POST', 952 method: 'POST',
947 url: BASE_URL+'/applicants', 953 url: BASE_URL+'/applicants',
948 data: $scope.data, 954 data: $scope.data,
949 headers: {} 955 headers: {}
950 }).then(function mySuccess(result) { 956 }).then(function mySuccess(result) {
951 $scope.detail = result; 957 $scope.detail = result;
952 data.applicantId = result.data.id; 958 data.applicantId = result.data.id;
953 $scope.userId = result.data.id; 959 $scope.userId = result.data.id;
954 var amount = $scope.ticketAmnt * 100 960 var amount = $scope.ticketAmnt * 100
955 if($scope.tokencheck == true){ 961 if($scope.tokencheck == true){
956 var amount = $scope.ticketAmnt 962 var amount = $scope.ticketAmnt
957 if($scope.discountpercentage == "100") { 963 if($scope.discountpercentage == "100") {
958 $scope.discountpercentage = "99.9"; 964 $scope.discountpercentage = "99.9";
959 } 965 }
960 $scope.percDiscount = $scope.discountpercentage/100; 966 $scope.percDiscount = $scope.discountpercentage/100;
961 $scope.discountAmount = amount * $scope.percDiscount; 967 $scope.discountAmount = amount * $scope.percDiscount;
962 } 968 }
963 var taxAmount = $scope.ticketAmnt - $scope.discountAmount 969 var taxAmount = $scope.ticketAmnt - $scope.discountAmount
964 $scope.payingAmnt = taxAmount; 970 $scope.payingAmnt = taxAmount;
965 $scope.payingAmnt = $scope.payingAmnt.toFixed() 971 $scope.payingAmnt = $scope.payingAmnt.toFixed()
966 data.amount = $scope.payingAmnt; 972 data.amount = $scope.payingAmnt;
967 if($scope.detail != null){ 973 if($scope.detail != null){
968 $http({ 974 $http({
969 method: 'POST', 975 method: 'POST',
970 url: BASE_URL+'/payments', 976 url: BASE_URL+'/payments',
971 data: data, 977 data: data,
972 headers: {} 978 headers: {}
973 }).then(function mySuccess(paymentResult) { 979 }).then(function mySuccess(paymentResult) {
974 $scope.loading = false; 980 $scope.loading = false;
975 $scope.paymentResult = paymentResult; 981 $scope.paymentResult = paymentResult;
976 //$("p").html(paymentResult.data.data) 982 //$("p").html(paymentResult.data.data)
977 }, function myError(error) { 983 }, function myError(error) {
978 }); 984 });
979 } 985 }
980 var i = 0; 986 var i = 0;
981 $scope.payingAmnt = $scope.payingAmnt * 100; 987 $scope.payingAmnt = $scope.payingAmnt * 100;
982 var options = { 988 var options = {
983 //"key": "rzp_test_YwHsVFiDIQ2WUQ", 989 //"key": "rzp_test_YwHsVFiDIQ2WUQ",
984 "key": "rzp_live_mkmCb4FkstuWaS", 990 "key": "rzp_live_mkmCb4FkstuWaS",
985 "amount": $scope.payingAmnt, 991 "amount": $scope.payingAmnt,
986 992
987 "name": "Startup Jalsa", 993 "name": "Startup Jalsa",
988 "description":"amount", 994 "description":"amount",
989 "currency": "INR", 995 "currency": "INR",
990 "status": "done", 996 "status": "done",
991 997
992 "prefill": { 998 "prefill": {
993 "email": $scope.detail.email, 999 "email": $scope.detail.email,
994 "contact": $scope.detail.phone 1000 "contact": $scope.detail.phone
995 }, 1001 },
996 1002
997 "theme": { 1003 "theme": {
998 "color": "#2196f3 ", 1004 "color": "#2196f3 ",
999 "image_padding":"NO" 1005 "image_padding":"NO"
1000 }, 1006 },
1001 "modal": { 1007 "modal": {
1002 "ondismiss": function(){ 1008 "ondismiss": function(){
1003 } 1009 }
1004 }, 1010 },
1005 "handler": function (response){ 1011 "handler": function (response){
1006 createPayment(response); 1012 createPayment(response);
1007 } 1013 }
1008 }; 1014 };
1009 var rzp1 = new Razorpay(options); 1015 var rzp1 = new Razorpay(options);
1010 rzp1.open(); 1016 rzp1.open();
1011 $scope.paymentResponse = {}; 1017 $scope.paymentResponse = {};
1012 function createPayment(response){ 1018 function createPayment(response){
1013 $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; 1019 $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id;
1014 $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; 1020 $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId;
1015 $scope.paymentResponse.amount = data.amount; 1021 $scope.paymentResponse.amount = data.amount;
1016 $scope.paymentResponse.currency = "INR"; 1022 $scope.paymentResponse.currency = "INR";
1017 $scope.paymentResponse.status = $scope.paymentResult.data.status; 1023 $scope.paymentResponse.status = $scope.paymentResult.data.status;
1018 $http({ 1024 $http({
1019 method: 'PUT', 1025 method: 'PUT',
1020 url: BASE_URL+'/payments/'+$scope.paymentResult.data.id, 1026 url: BASE_URL+'/payments/'+$scope.paymentResult.data.id,
1021 data: $scope.paymentResponse, 1027 data: $scope.paymentResponse,
1022 headers: {} 1028 headers: {}
1023 }).then(function mySuccess(searchResult) { 1029 }).then(function mySuccess(searchResult) {
1024 Analytics.trackEvent('register', 'click', 'Registration'); 1030 Analytics.trackEvent('register', 'click', 'Registration');
1025 $location.path("/confirm") 1031 $location.path("/confirm")
1026 }, function myError(error) { 1032 }, function myError(error) {
1027 }); 1033 });
1028 } 1034 }
1029 //} 1035 //}
1030 1036
1031 }, function myError(error) { 1037 }, function myError(error) {
1032 1038
1033 }); 1039 });
1034 1040
1035 }) 1041 })
1036 1042
1037 // }) 1043 // })
1038 1044
1039 //} 1045 //}
1040 1046
1041 } 1047 }
1042 //} 1048 //}
1043 1049
1044 }); 1050 });
1045 1051
1046 scotchApp.controller('confirmationController', function($scope, $http, $location, $route, BASE_URL) { 1052 scotchApp.controller('confirmationController', function($scope, $http, $location, $route, BASE_URL) {
1047 $scope.approvedMsg = false; 1053 $scope.approvedMsg = false;
1048 $scope.disApprovedMsg = false; 1054 $scope.disApprovedMsg = false;
1049 1055
1050 var myParam = window.location.href.split('status=').splice(1).join('').split('&')[0] 1056 var myParam = window.location.href.split('status=').splice(1).join('').split('&')[0]
1051 // if(myParam){ 1057 // if(myParam){
1052 if(myParam == "approved"){ 1058 if(myParam == "approved"){
1053 $scope.approvedMsg = true; 1059 $scope.approvedMsg = true;
1054 $scope.disApprovedMsg = false; 1060 $scope.disApprovedMsg = false;
1055 }else{ 1061 }else{
1056 $scope.approvedMsg = false; 1062 $scope.approvedMsg = false;
1057 $scope.disApprovedMsg = true; 1063 $scope.disApprovedMsg = true;
1058 } 1064 }
1059 // }else{ 1065 // }else{
1060 // $scope.disApprovedMsg = true; 1066 // $scope.disApprovedMsg = true;
1061 // } 1067 // }
1062 1068
1063 }); 1069 });
1064 1070
1065 scotchApp.controller('paytmController', function($q, $scope, $http, $location, $rootScope,$route,BASE_URL) { 1071 scotchApp.controller('paytmController', function($q, $scope, $http, $location, $rootScope,$route,BASE_URL) {
1066 $scope.data = {}; 1072 $scope.data = {};
1067 $scope.data.city = localStorage.getItem("city"); 1073 $scope.data.city = localStorage.getItem("city");
1068 $scope.data.country = localStorage.getItem("country");; 1074 $scope.data.country = localStorage.getItem("country");;
1069 var data = { 1075 var data = {
1070 "amount": $scope.payingAmnt, 1076 "amount": $scope.payingAmnt,
1071 "currency": "INR", 1077 "currency": "INR",
1072 "status": "pending", 1078 "status": "pending",
1073 "paymentType": "Manual_Paytm" 1079 "paymentType": "Manual_Paytm"
1074 } 1080 }
1075 var handleFileSelect = function(evt) { 1081 var handleFileSelect = function(evt) {
1076 var files = evt.target.files; 1082 var files = evt.target.files;
1077 var file = files[0]; 1083 var file = files[0];
1078 1084
1079 if (files && file) { 1085 if (files && file) {
1080 var reader = new FileReader(); 1086 var reader = new FileReader();
1081 1087
1082 reader.onload = function(readerEvt) { 1088 reader.onload = function(readerEvt) {
1083 var binaryString = readerEvt.target.result; 1089 var binaryString = readerEvt.target.result;
1084 $scope.base64textString = btoa(binaryString); 1090 $scope.base64textString = btoa(binaryString);
1085 //console.log("base64textarea",$scope.base64textString) 1091 //console.log("base64textarea",$scope.base64textString)
1086 //$scope.data.uploadFile = file.name; 1092 //$scope.data.uploadFile = file.name;
1087 $scope.fileSelect = false; 1093 $scope.fileSelect = false;
1088 if($scope.data.uploadFile == null){ 1094 if($scope.data.uploadFile == null){
1089 $scope.fileSelect = true; 1095 $scope.fileSelect = true;
1090 }else{ 1096 }else{
1091 $scope.fileSelect = false; 1097 $scope.fileSelect = false;
1092 }; 1098 };
1093 } 1099 }
1094 1100
1095 reader.readAsBinaryString(file); 1101 reader.readAsBinaryString(file);
1096 } 1102 }
1097 }; 1103 };
1098 if (window.File && window.FileReader && window.FileList && window.Blob) { 1104 if (window.File && window.FileReader && window.FileList && window.Blob) {
1099 document.getElementById('filePicker').addEventListener('change', handleFileSelect, false); 1105 document.getElementById('filePicker').addEventListener('change', handleFileSelect, false);
1100 } 1106 }
1101 1107
1102 $scope.ngShowhide = false; 1108 $scope.ngShowhide = false;
1103 $scope.GetValue = function(){ 1109 $scope.GetValue = function(){
1104 if($scope.data.sector == "Other"){ 1110 if($scope.data.sector == "Other"){
1105 $scope.ngShowhide = true; 1111 $scope.ngShowhide = true;
1106 }else{ 1112 }else{
1107 $scope.ngShowhide = false; 1113 $scope.ngShowhide = false;
1108 } 1114 }
1109 } 1115 }
1110 1116
1111 $rootScope.tokenCall = function(val) { 1117 $rootScope.tokenCall = function(val) {
1112 if (val == undefined) { 1118 if (val == undefined) {
1113 $('#invalidToken').css('display', 'block'); 1119 $('#invalidToken').css('display', 'block');
1114 } else { 1120 } else {
1115 val = val.toUpperCase(); 1121 val = val.toUpperCase();
1116 if((val == "IITH99" && $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")){ 1122 if((val == "IITH99" && $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")){
1117 $scope.tokencheck = false; 1123 $scope.tokencheck = false;
1118 return; 1124 return;
1119 } 1125 }
1120 $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": "' + val + '"}}') 1126 $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": "' + val + '"}}')
1121 .then(function(searchResult) { 1127 .then(function(searchResult) {
1122 if (searchResult.data.length == 0) { 1128 if (searchResult.data.length == 0) {
1123 $scope.tokencheck = false; 1129 $scope.tokencheck = false;
1124 $scope.discountAmount = 0; 1130 $scope.discountAmount = 0;
1125 } else { 1131 } else {
1126 $scope.discountpercentage = searchResult.data[0].discount; 1132 $scope.discountpercentage = searchResult.data[0].discount;
1127 $scope.tokencheck = true; 1133 $scope.tokencheck = true;
1128 } 1134 }
1129 },function(err){ 1135 },function(err){
1130 console.log(err) 1136 console.log(err)
1131 }); 1137 });
1132 1138
1133 } 1139 }
1134 }; 1140 };
1135 1141
1136 $scope.submit = function() { 1142 $scope.submit = function() {
1137 // Analytics.trackEvent('register', 'click', 'Registration'); 1143 // Analytics.trackEvent('register', 'click', 'Registration');
1138 $scope.loading = true; 1144 $scope.loading = true;
1139 $scope.data.uploadFile = $scope.base64textString; 1145 $scope.data.uploadFile = $scope.base64textString;
1140 $scope.infoForm = true; 1146 $scope.infoForm = true;
1141 $scope.ticketAmnt = 1180; 1147 $scope.ticketAmnt = 1180;
1142 $scope.detail = {}; 1148 $scope.detail = {};
1143 $scope.data.phone = "+91"+$scope.data.number; 1149 $scope.data.phone = "+91"+$scope.data.number;
1144 if($scope.data.referalToken == null){ 1150 if($scope.data.referalToken == null){
1145 $scope.data.referalToken = "NA" 1151 $scope.data.referalToken = "NA"
1146 } 1152 }
1147 var file =document.getElementById('filePicker').files[0]; 1153 var file =document.getElementById('filePicker').files[0];
1148 var image = BASE_URL+'/containers/images/download/' 1154 var image = BASE_URL+'/containers/images/download/'
1149 var imagePath = file.name; 1155 var imagePath = file.name;
1150 $scope.data.uploadFile = image + imagePath; 1156 $scope.data.uploadFile = image + imagePath;
1151 var fd = new FormData() 1157 var fd = new FormData()
1152 fd.append('filePicker',file); 1158 fd.append('filePicker',file);
1153 var deferred = $q.defer(); 1159 var deferred = $q.defer();
1154 $http({ 1160 $http({
1155 method:'POST', 1161 method:'POST',
1156 url: BASE_URL+'/containers/images/upload', 1162 url: BASE_URL+'/containers/images/upload',
1157 data:fd, 1163 data:fd,
1158 transformRequest:angular.identity, 1164 transformRequest:angular.identity,
1159 headers:{'Content-Type':undefined} 1165 headers:{'Content-Type':undefined}
1160 }) 1166 })
1161 .success(function(result){ 1167 .success(function(result){
1162 deferred.resolve(result); 1168 deferred.resolve(result);
1163 $http({ 1169 $http({
1164 method: 'POST', 1170 method: 'POST',
1165 url: BASE_URL+'/applicants', 1171 url: BASE_URL+'/applicants',
1166 data: $scope.data, 1172 data: $scope.data,
1167 headers: {} 1173 headers: {}
1168 }).then(function mySuccess(result) { 1174 }).then(function mySuccess(result) {
1169 $scope.detail = result; 1175 $scope.detail = result;
1170 data.applicantId = result.data.id; 1176 data.applicantId = result.data.id;
1171 $scope.userId = result.data.id; 1177 $scope.userId = result.data.id;
1172 var amount = $scope.ticketAmnt * 100 1178 var amount = $scope.ticketAmnt * 100
1173 if($scope.tokencheck == true){ 1179 if($scope.tokencheck == true){
1174 var amount = $scope.ticketAmnt 1180 var amount = $scope.ticketAmnt
1175 console.log("resultcity===",$scope.data.city) 1181 console.log("resultcity===",$scope.data.city)
1176 if($scope.discountpercentage == "100") { 1182 if($scope.discountpercentage == "100") {
1177 $scope.discountpercentage = "99.9"; 1183 $scope.discountpercentage = "99.9";
1178 } 1184 }
1179 $scope.percDiscount = $scope.discountpercentage/100; 1185 $scope.percDiscount = $scope.discountpercentage/100;
1180 $scope.discountAmount = amount * $scope.percDiscount; 1186 $scope.discountAmount = amount * $scope.percDiscount;
1181 } 1187 }
1182 var taxAmount = $scope.ticketAmnt - $scope.discountAmount 1188 var taxAmount = $scope.ticketAmnt - $scope.discountAmount
1183 $scope.payingAmnt = taxAmount; 1189 $scope.payingAmnt = taxAmount;
1184 $scope.payingAmnt = $scope.payingAmnt.toFixed() 1190 $scope.payingAmnt = $scope.payingAmnt.toFixed()
1185 data.amount = $scope.payingAmnt; 1191 data.amount = $scope.payingAmnt;
1186 if($scope.detail != null){ 1192 if($scope.detail != null){
1187 $http({ 1193 $http({
1188 method: 'POST', 1194 method: 'POST',
1189 url: BASE_URL+'/payments', 1195 url: BASE_URL+'/payments',
1190 data: data, 1196 data: data,
1191 headers: {} 1197 headers: {}
1192 }).then(function mySuccess(paymentResult) { 1198 }).then(function mySuccess(paymentResult) {
1193 $scope.loading = false; 1199 $scope.loading = false;
1194 $scope.paymentResult = paymentResult; 1200 $scope.paymentResult = paymentResult;
1195 }, function myError(error) { 1201 }, function myError(error) {
1196 }); 1202 });
1197 } 1203 }
1198 1204
1199 }, function myError(error) { 1205 }, function myError(error) {
1200 1206
1201 }); 1207 });
1202 1208
1203 }) 1209 })
1204 1210
1205 } 1211 }
1206 1212
1207 }); 1213 });
1208 1214
1209 1215
1210 scotchApp.controller('ambassadorController', function($scope, $http, $location, $route, BASE_URL) { 1216 scotchApp.controller('ambassadorController', function($scope, $http, $location, $route, BASE_URL) {
1211 $scope.data = {}; 1217 $scope.data = {};
1212 $scope.check = false; 1218 $scope.check = false;
1213 $scope.numberCheck = false; 1219 $scope.numberCheck = false;
1214 1220
1215 $scope.submit = function() { 1221 $scope.submit = function() {
1216 //var randomNumber = ""+Math.random(); 1222 //var randomNumber = ""+Math.random();
1217 var nameSpliced = $scope.data.name.slice(0,5); 1223 var nameSpliced = $scope.data.name.slice(0,5);
1218 //var numberSpliced = randomNumber.slice(2,4); 1224 //var numberSpliced = randomNumber.slice(2,4);
1219 //var numberSpliced = "99"; 1225 //var numberSpliced = "99";
1220 $scope.data.referalToken = nameSpliced; 1226 $scope.data.referalToken = nameSpliced;
1221 $scope.data.referalToken = $scope.data.referalToken.toUpperCase(); 1227 $scope.data.referalToken = $scope.data.referalToken.toUpperCase();
1222 $http({ 1228 $http({
1223 method: 'POST', 1229 method: 'POST',
1224 url: BASE_URL + '/ambassadors', 1230 url: BASE_URL + '/ambassadors',
1225 data: $scope.data, 1231 data: $scope.data,
1226 headers: {} 1232 headers: {}
1227 }).then(function mySuccess(result) { 1233 }).then(function mySuccess(result) {
1228 $scope.detail = result; 1234 $scope.detail = result;
1229 $('#myModal').modal('show'); 1235 $('#myModal').modal('show');
1230 $scope.data.name = ''; 1236 $scope.data.name = '';
1231 $scope.data.email = ''; 1237 $scope.data.email = '';
1232 $scope.data.mobile = ''; 1238 $scope.data.mobile = '';
1233 //$scope.data.discount = ''; 1239 //$scope.data.discount = '';
1234 1240
1235 }, function myError(error) { 1241 }, function myError(error) {
1236 console.log(error) 1242 console.log(error)
1237 console.log(error.data.error.message) 1243 console.log(error.data.error.message)
1238 }); 1244 });
1239 } 1245 }
1240 }); 1246 });
1241 1247
1242 1248
1243 1249
1244 1250
1245 1251