Commit 63f32ea64bade0fb83a16df0dcff9fa1c900479c

Authored by Shilpi Saini
1 parent 4433aa74dd
Exists in master

new campus ambassador form integrate

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