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