Blame view

script.js 44.1 KB
53b83aa9e   Palak Handa   first commit
1
  	// create the module and name it scotchApp
f263889f0   Palak Handa   analytics work
2
  	var scotchApp = angular.module('scotchApp', ['ngRoute','angular-google-analytics']);
53b83aa9e   Palak Handa   first commit
3
4
5
  
  	// configure our routes
  	scotchApp.config(function($routeProvider) {
6ae8d3cdd   Palak Handa   add new module
6
  	    $routeProvider
dcb703070   Palak Handa   updated new form ...
7
  	    	// route for the Home page
6ae8d3cdd   Palak Handa   add new module
8
  	        .when('/', {
dcb703070   Palak Handa   updated new form ...
9
10
11
12
13
14
15
  	            templateUrl: 'pages/Home.html',
  	            controller: 'mainController'
  	        })
  
  	        // route for the registration page
  	        .when('/registration', {
  	            templateUrl: 'pages/registration.html',
6ae8d3cdd   Palak Handa   add new module
16
17
  	            controller: 'mainController'
  	        })
2d6a9fbea   Palak Handa   complete bugs
18
  	        // route for the paymentVerify page
4de569579   Palak Handa   design update
19
  	        .when('/pendingPayment/:id', {
6ae8d3cdd   Palak Handa   add new module
20
21
22
23
24
  	            templateUrl: 'pages/verify.html',
  	            controller: 'verifyController'
  	        })
  
  	        // route for the ambassador page
b678502c9   Palak Handa   update
25
  	        .when('/startupJalsaPromocode', {
6ae8d3cdd   Palak Handa   add new module
26
27
28
  	            templateUrl: 'pages/ambassador.html',
  	            controller: 'ambassadorController'
  	        })
5348de778   Palak Handa   design updated
29
30
31
32
33
34
  
  	        // route for the confirmation page
  	        .when('/confirmation', {
  	            templateUrl: 'pages/confirmation.html',
  	            controller: 'mainController'
  	        })
6ae8d3cdd   Palak Handa   add new module
35
  	});
53b83aa9e   Palak Handa   first commit
36

f263889f0   Palak Handa   analytics work
37
38
  	scotchApp.config(['AnalyticsProvider', function (AnalyticsProvider) {
  	   	// Add configuration code as desired
61b69ada0   Palak Handa   design updated
39
  	   	 AnalyticsProvider.setAccount('UA-106416759-1');  //UU-XXXXXXX-X should be your tracking code
f263889f0   Palak Handa   analytics work
40
41
42
43
44
45
46
47
  
  	   	// Track all routes (default is true).
  	  	AnalyticsProvider.trackPages(true);
  
  	  	// Track all URL query params (default is false).
  	  	AnalyticsProvider.trackUrlParams(true);
  
  	}]).run(['Analytics', function(Analytics) { }]);
f37435b93   Palak Handa   analytics apply
48
49
  	scotchApp.constant("BASE_URL", "http://139.59.68.74:4001/api")
  	//scotchApp.constant("BASE_URL", "http://0.0.0.0:4001/api")
6ae8d3cdd   Palak Handa   add new module
50

2d6a9fbea   Palak Handa   complete bugs
51
  	// create the controller and inject Angular's $scope
f263889f0   Palak Handa   analytics work
52
  	scotchApp.controller('mainController', function($scope, $http, $location, $route, $rootScope, BASE_URL, Analytics) {
6ae8d3cdd   Palak Handa   add new module
53
54
55
56
  	    $scope.data = {
  	        show: true,
  	        hide: false
  	    };
edb834825   Palak Handa   update timer
57
  	    var chennai = new Date("Nov 7, 2017 00:00:00").getTime();
2f9a20645   Palak Handa   add timer
58
59
60
61
62
  		// Update the count down every 1 second
  		var x = setInterval(function() {
  		    // Get todays date and time
  		    var now = new Date().getTime();
  		    // Find the distance between now an the count down date
edb834825   Palak Handa   update timer
63
  		    var distance = chennai - now;
2f9a20645   Palak Handa   add timer
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
  		    // Time calculations for days, hours, minutes and seconds
  		    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  		    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  		    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  		    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  		    $scope.timer = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s "
  		    // Output the result in an element with id="demo"
  		    document.getElementById("chennai").innerHTML = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s ";
  		    // If the count down is over, write some text 
  		    if (distance < 0) {
  		        clearInterval(x);
  		        document.getElementById("chennai").innerHTML = "EXPIRED";
  		    }
  		}, 1000);
edb834825   Palak Handa   update timer
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
  		var pune = new Date("Nov 9, 2017 00:00:00").getTime();
  		// Update the count down every 1 second
  		var x = setInterval(function() {
  		    // Get todays date and time
  		    var now = new Date().getTime();
  		    // Find the distance between now an the count down date
  		    var distance = pune - now;
  		    // Time calculations for days, hours, minutes and seconds
  		    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  		    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  		    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  		    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  		    $scope.timer = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s "
  		    // Output the result in an element with id="demo"
  		    document.getElementById("pune").innerHTML = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s ";
  		    // If the count down is over, write some text 
  		    if (distance < 0) {
  		        clearInterval(x);
  		        document.getElementById("pune").innerHTML = "EXPIRED";
  		    }
  		}, 1000);
  
  		var mumbai = new Date("Nov 11, 2017 00:00:00").getTime();
  		// Update the count down every 1 second
  		var x = setInterval(function() {
  		    // Get todays date and time
  		    var now = new Date().getTime();
  		    // Find the distance between now an the count down date
  		    var distance = mumbai - now;
  		    // Time calculations for days, hours, minutes and seconds
  		    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  		    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  		    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  		    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  		    $scope.timer = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s "
  		    // Output the result in an element with id="demo"
  		    document.getElementById("mumbai").innerHTML = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s ";
  		    // If the count down is over, write some text 
  		    if (distance < 0) {
  		        clearInterval(x);
  		        document.getElementById("mumbai").innerHTML = "EXPIRED";
  		    }
  		}, 1000);
  
  		var ahmedabad = new Date("Nov 13, 2017 00:00:00").getTime();
  		// Update the count down every 1 second
  		var x = setInterval(function() {
  		    // Get todays date and time
  		    var now = new Date().getTime();
  		    // Find the distance between now an the count down date
  		    var distance = ahmedabad - now;
  		    // Time calculations for days, hours, minutes and seconds
  		    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  		    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  		    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  		    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  		    $scope.timer = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s "
  		    // Output the result in an element with id="demo"
  		    document.getElementById("ahmedabad").innerHTML = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s ";
  		    // If the count down is over, write some text 
  		    if (distance < 0) {
  		        clearInterval(x);
  		        document.getElementById("ahmedabad").innerHTML = "EXPIRED";
  		    }
  		}, 1000);
  
  		var jaipur = new Date("Nov 15, 2017 00:00:00").getTime();
  		// Update the count down every 1 second
  		var x = setInterval(function() {
  		    // Get todays date and time
  		    var now = new Date().getTime();
  		    // Find the distance between now an the count down date
  		    var distance = jaipur - now;
  		    // Time calculations for days, hours, minutes and seconds
  		    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  		    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  		    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  		    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  		    $scope.timer = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s "
  		    // Output the result in an element with id="demo"
  		    document.getElementById("jaipur").innerHTML = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s ";
  		    // If the count down is over, write some text 
  		    if (distance < 0) {
  		        clearInterval(x);
  		        document.getElementById("jaipur").innerHTML = "EXPIRED";
  		    }
  		}, 1000);
d3209b74d   Palak Handa   minor change
175
  		var bangalore = new Date("Nov 21, 2017 00:00:00").getTime();
edb834825   Palak Handa   update timer
176
177
178
179
180
  		// Update the count down every 1 second
  		var x = setInterval(function() {
  		    // Get todays date and time
  		    var now = new Date().getTime();
  		    // Find the distance between now an the count down date
f649c6b24   Palak Handa   updated timer
181
  		    var distance = bangalore - now;
edb834825   Palak Handa   update timer
182
183
184
185
186
187
188
189
  		    // Time calculations for days, hours, minutes and seconds
  		    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  		    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  		    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  		    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  		    $scope.timer = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s "
  		    // Output the result in an element with id="demo"
f649c6b24   Palak Handa   updated timer
190
  		    document.getElementById("bangalore").innerHTML = days + "d " + hours + "h "
edb834825   Palak Handa   update timer
191
192
193
194
  		    + minutes + "m " + seconds + "s ";
  		    // If the count down is over, write some text 
  		    if (distance < 0) {
  		        clearInterval(x);
f649c6b24   Palak Handa   updated timer
195
  		        document.getElementById("bangalore").innerHTML = "EXPIRED";
edb834825   Palak Handa   update timer
196
197
  		    }
  		}, 1000);
f649c6b24   Palak Handa   updated timer
198
  		var hyderabad = new Date("Nov 19, 2017 00:00:00").getTime();
edb834825   Palak Handa   update timer
199
200
201
202
203
  		// Update the count down every 1 second
  		var x = setInterval(function() {
  		    // Get todays date and time
  		    var now = new Date().getTime();
  		    // Find the distance between now an the count down date
f649c6b24   Palak Handa   updated timer
204
  		    var distance = hyderabad - now;
edb834825   Palak Handa   update timer
205
206
207
208
209
210
211
212
  		    // Time calculations for days, hours, minutes and seconds
  		    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  		    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  		    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  		    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  		    $scope.timer = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s "
  		    // Output the result in an element with id="demo"
f649c6b24   Palak Handa   updated timer
213
  		    document.getElementById("hyderabad").innerHTML = days + "d " + hours + "h "
edb834825   Palak Handa   update timer
214
215
216
217
  		    + minutes + "m " + seconds + "s ";
  		    // If the count down is over, write some text 
  		    if (distance < 0) {
  		        clearInterval(x);
f649c6b24   Palak Handa   updated timer
218
  		        document.getElementById("hyderabad").innerHTML = "EXPIRED";
edb834825   Palak Handa   update timer
219
220
  		    }
  		}, 1000);
629cc1f8f   Palak Handa   minor changes
221
  		var delhi = new Date("Nov 26, 2017 00:00:00").getTime();
edb834825   Palak Handa   update timer
222
223
224
225
226
  		// Update the count down every 1 second
  		var x = setInterval(function() {
  		    // Get todays date and time
  		    var now = new Date().getTime();
  		    // Find the distance between now an the count down date
f649c6b24   Palak Handa   updated timer
227
  		    var distance = delhi - now;
edb834825   Palak Handa   update timer
228
229
230
231
232
233
234
235
  		    // Time calculations for days, hours, minutes and seconds
  		    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  		    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  		    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  		    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  		    $scope.timer = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s "
  		    // Output the result in an element with id="demo"
f649c6b24   Palak Handa   updated timer
236
  		    document.getElementById("delhi").innerHTML = days + "d " + hours + "h "
edb834825   Palak Handa   update timer
237
238
239
240
  		    + minutes + "m " + seconds + "s ";
  		    // If the count down is over, write some text 
  		    if (distance < 0) {
  		        clearInterval(x);
f649c6b24   Palak Handa   updated timer
241
  		        document.getElementById("delhi").innerHTML = "EXPIRED";
edb834825   Palak Handa   update timer
242
243
  		    }
  		}, 1000);
f649c6b24   Palak Handa   updated timer
244
  		var chandigarh = new Date("Nov 30, 2017 00:00:00").getTime();
edb834825   Palak Handa   update timer
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
  		// Update the count down every 1 second
  		var x = setInterval(function() {
  		    // Get todays date and time
  		    var now = new Date().getTime();
  		    // Find the distance between now an the count down date
  		    var distance = chandigarh - now;
  		    // Time calculations for days, hours, minutes and seconds
  		    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  		    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  		    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  		    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  		    $scope.timer = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s "
  		    // Output the result in an element with id="demo"
  		    document.getElementById("chandigarh").innerHTML = days + "d " + hours + "h "
  		    + minutes + "m " + seconds + "s ";
  		    // If the count down is over, write some text 
  		    if (distance < 0) {
  		        clearInterval(x);
  		        document.getElementById("chandigarh").innerHTML = "EXPIRED";
  		    }
  		}, 1000);
6ae8d3cdd   Palak Handa   add new module
267
  	    $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/
e847b36f8   Palak Handa   minor changes
268
  	    $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/
c62079487   Palak Handa   updated design
269
  	    // $scope.Textshow = "yes"
6ae8d3cdd   Palak Handa   add new module
270
  	    $scope.max = 100;
88dd26b3d   Palak Handa   update
271
  	    $scope.formPage = false;
6ae8d3cdd   Palak Handa   add new module
272
273
274
  	    $scope.current = 0;
  	    $scope.payingAmnt = 0;
  	    if ($scope.data.stage == 'select') {
6ae8d3cdd   Palak Handa   add new module
275

53b83aa9e   Palak Handa   first commit
276
  	    }
439352ca6   Palak Handa   base url changes
277
  	    //$scope.author = 'Swarn Singh';
6ae8d3cdd   Palak Handa   add new module
278
279
  	    $scope.data = {};
  	    $scope.data.stage = 'Idea';
ea3c31126   Palak Handa   complete
280
  	    $scope.discountAmount = 0;
6ae8d3cdd   Palak Handa   add new module
281
282
  	    $scope.check = false;
  	    $scope.numberCheck = false;
6ae8d3cdd   Palak Handa   add new module
283
  	    $scope.paymentResult = {};
6ae8d3cdd   Palak Handa   add new module
284
285
286
287
288
  	    var data = {
  	        "amount": $scope.payingAmnt,
  	        "currency": "INR",
  	        "status": "pending"
  	    }
53b83aa9e   Palak Handa   first commit
289

5259a7d0e   Digvijay Singh   video links added
290
  	    /*open videos in modal*/
b8938eb77   Palak Handa   add content
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
  	  //   $scope.openyoutube16 = function(){
  			// $('#videoModel').modal('show');
  	  //   }
  
  	  //    $scope.openyoutube17 = function(){
  			// $('#videoModels').modal('show');
  	  //   }
  
  	  //      $scope.closeModal = function(){
  	  //   	var url = $('#youtubePlayer').attr('src');
  			// $('#youtubePlayer').attr('src', '');
  			// $('#youtubePlayer').attr('src', url);
  	  //   }
  
  
  	  //   $scope.closed = function(){
  	  //   	var url = $('#youtubePlayersss').attr('src');
  			// $('#youtubePlayersss').attr('src', '');
  			// $('#youtubePlayersss').attr('src', url);
  	  //   }
5259a7d0e   Digvijay Singh   video links added
311
  	    /*open videos ends here*/
dcb703070   Palak Handa   updated new form ...
312
  	    $scope.apply = function() {
ba3b9219e   Palak Handa   minor changes
313
  	    	Analytics.trackEvent('register', 'click', 'django.mp4');
dcb703070   Palak Handa   updated new form ...
314
315
  			$location.path("/registration")
  		}
88dd26b3d   Palak Handa   update
316
317
318
319
320
321
322
323
324
  		$scope.data.citymeetup = '';
  		$scope.register = function(value){
  			$scope.data.citymeetup = value;
  			$('.hiddenForm').slideDown();
  			$('html, body').animate({
  		        scrollTop: $('.hiddenForm').offset().top
  		    }, 1000);
  			console.log('gdggsg', value);
  		}
5259a7d0e   Digvijay Singh   video links added
325

5348de778   Palak Handa   design updated
326
327
328
329
  	    $scope.removeError = function() {
  	        $('#invalidEmail').css('display', 'none');
  	        $('#alreadyExist').css('display', 'none');
  	    };
6ae8d3cdd   Palak Handa   add new module
330
  	    $scope.emailcheck = function(val) {
e847b36f8   Palak Handa   minor changes
331
332
333
  	    	console.log(val)
  			$scope.space = /\s/g.test(val);
      		console.log("space",$scope.space)
6ae8d3cdd   Palak Handa   add new module
334
335
336
337
338
339
  	        if (val == undefined) {
  	            $('#invalidEmail').css('display', 'block');
  	        } else {
  	            $http({
  	                method: 'GET',
  	                url: BASE_URL + '/applicants?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}',
6ae8d3cdd   Palak Handa   add new module
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
  	                headers: {}
  	            }).then(function mySuccess(searchResult) {
  	                console.log("searchResult1===>", searchResult)
  	                if (searchResult.data.length == 0) {
  	                    $scope.check = false;
  	                } else {
  	                    $scope.check = true;
  	                    $('#alreadyExist').css('display', 'block');
  	                }
  	            }, function myError(error) {});
  	        }
  	    };
  
  	    $scope.removeNoError = function() {
  	        $('#noExist').css('display', 'none');
  	    };
  
  	    $scope.numbercheck = function(number) {
  	        $http({
  	            method: 'GET',
  	            url: BASE_URL + '/applicants?filter={"where": {"phone": {"like":"%25' + number + '%25"}}}',
  	            data: $scope.data,
  	            headers: {}
  	        }).then(function mySuccess(searchResult) {
  	            console.log("searchResult===>", searchResult)
  	            if (searchResult.data.length == 0) {
  	                $scope.numberCheck = false;
ea3c31126   Palak Handa   complete
367

6ae8d3cdd   Palak Handa   add new module
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
  	            } else {
  	                $scope.numberCheck = true;
  	                $('#noExist').css('display', 'block');
  	            }
  	        }, function myError(error) {});
  	    };
  
  	    $rootScope.tokenCall = function(val) {
  	        console.log('val-------->', val);
  	        if (val == undefined) {
  	            $('#invalidEmail').css('display', 'block');
  	        } else {
  	        	val = val.toUpperCase();
  	        	$http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": {"like":"%25' + val + '%25"}}}')
  				    .then(function(searchResult) {
e284785e4   Palak Handa   update new field
383
  				    	console.log("searchResult",searchResult)
6ae8d3cdd   Palak Handa   add new module
384
385
  				        if (searchResult.data.length == 0) {
  	                    	$scope.tokencheck = false;
ea3c31126   Palak Handa   complete
386
  	                    	 $scope.discountAmount = 0;
6ae8d3cdd   Palak Handa   add new module
387
  	                	} else {
e284785e4   Palak Handa   update new field
388
  	                    	 $scope.discountpercentage = searchResult.data[0].discount;
6ae8d3cdd   Palak Handa   add new module
389
  	                    	$scope.tokencheck = true;
6ae8d3cdd   Palak Handa   add new module
390
391
392
393
  	                	}
  				    },function(err){
  				    	console.log(err)
  				});
53b83aa9e   Palak Handa   first commit
394
  	           
6ae8d3cdd   Palak Handa   add new module
395
396
  	        }
  	    };
e847b36f8   Palak Handa   minor changes
397
  	    
c62079487   Palak Handa   updated design
398

6ae8d3cdd   Palak Handa   add new module
399
400
401
402
403
404
405
406
407
408
409
410
  	    /*THIS CODE FOR ENABLED SUBMIT BUTTON AFTER UPLOAD IMAGE*/
  	    $(document).ready(
  	        function() {
  	            $('input:submit').attr('disabled', true);
  	            $('input:file').change(
  	                function() {
  	                    if ($("#picture").val()) {
  	                        $('input:submit').removeAttr('disabled');
  	                    } else {
  	                        $('input:submit').attr('disabled', true);
  	                    }
  	                });
53b83aa9e   Palak Handa   first commit
411
  	        });
6ae8d3cdd   Palak Handa   add new module
412
413
  
  	    /*****THIS IS FOR STEP ONE FORM ******/
dcb703070   Palak Handa   updated new form ...
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
  	    // $scope.next = function() {	  
  	    //     $scope.data.status = null
  	    //     if ($scope.data.stage == undefined || $scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined || $scope.data.city == undefined) {
  	    //         var x = document.getElementById("snackbar")
  	    //         x.className = "show";
  	    //         setTimeout(function() {
  	    //             x.className = x.className.replace("show", "");
  	    //         }, 3000);
  	    //     } else if ($scope.data.stage != undefined && $scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined && $scope.data.city != undefined) {
  	    //         $scope.infoForm = true;
  	    //         console.log("sdasdasdsa");
  	    //         $scope.data.stage = $scope.data.stage;
  	    //         $scope.detail = {};
  	    //         $scope.data.phone = "+91" + $scope.data.number;
  	    //         $http({
  	    //             method: 'POST',
  	    //             url: BASE_URL + '/information',
  	    //             data: $scope.data,
  	    //             headers: {}
  	    //         }).then(function mySuccess(result) {
  					// Analytics.trackEvent('information', 'click', 'django.mp4');
  	    //             console.log("result", result)
  	    //             $scope.detail = result;
  	    //             data.applicantId = result.data.id;
  	    //             $scope.userId = result.data.id;
  
  	    //         }, function myError(error) {});
  
  	    //     }
f263889f0   Palak Handa   analytics work
443

dcb703070   Palak Handa   updated new form ...
444
  	    // }
6ae8d3cdd   Palak Handa   add new module
445

ea3c31126   Palak Handa   complete
446
  	    $scope.calculateAmount =  function(){
92f44af29   Palak Handa   update
447
  	        if ($scope.data.stage == undefined || $scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) {
9842ccd27   Palak Handa   changes api call
448
449
450
451
452
  	            var x = document.getElementById("snackbar")
  	            x.className = "show";
  	            setTimeout(function() {
  	                x.className = x.className.replace("show", "");
  	            }, 3000);
92f44af29   Palak Handa   update
453
  	        } else if ($scope.data.stage != undefined && $scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) {
9842ccd27   Palak Handa   changes api call
454
455
456
457
458
459
460
461
462
463
464
  	            $scope.infoForm = true;
  	            console.log("sdasdasdsa");
  	            $scope.data.stage = $scope.data.stage;
  	            $scope.detail = {};
  	            $scope.data.phone = "+91" + $scope.data.number;
  	            $http({
  	                method: 'POST',
  	                url: BASE_URL + '/applicants',
  	                data: $scope.data,
  	                headers: {}
  	            }).then(function mySuccess(result) {
9ad22ae22   Palak Handa   work on google an...
465
  	            	Analytics.trackEvent('applicants', 'click', 'django.mp4');
9842ccd27   Palak Handa   changes api call
466
467
468
  	                console.log("result", result)
  	                $scope.detail = result;
  	                data.applicantId = result.data.id;
d122fec29   Palak Handa   modify
469
470
471
472
473
474
475
476
477
478
479
480
481
482
  	                //$scope.userId = result.data.id;
  
  		    	if ($scope.data.stage == "Idea") {
  		            console.log("$scope.data", $scope.data)
  		            $scope.ticketAmnt = 500;
  		        }
  
  		        if ($scope.data.stage == "Product") {
  		            $scope.ticketAmnt = 1000;
  		        }
  
  		        if ($scope.data.stage == "Growth") {
  		            $scope.ticketAmnt = 1000;
  		        }
629cc1f8f   Palak Handa   minor changes
483
484
485
486
  
  		        // if ($scope.data.stage == "Visitor") {
  		        //     $scope.ticketAmnt = 500;
  		        // }
d122fec29   Palak Handa   modify
487
488
489
  		        var amount = $scope.ticketAmnt * 100
  		        if($scope.tokencheck == true){
  			        var amount = $scope.ticketAmnt
e284785e4   Palak Handa   update new field
490
491
  				    $scope.discountAmount = (amount * $scope.discountpercentage)/100
  				    console.log("finalAmount====>",$scope.discountAmount)
d122fec29   Palak Handa   modify
492
  		        }
e284785e4   Palak Handa   update new field
493
  		        var taxAmount = $scope.ticketAmnt - $scope.discountAmount
bcefa53b8   Palak Handa   gst add
494
  	            $scope.taxTotal = (taxAmount * 18)/100
e284785e4   Palak Handa   update new field
495
  	            $scope.payingAmnt = taxAmount + $scope.taxTotal 
d122fec29   Palak Handa   modify
496
  	            console.log("taxincludedamount----", $scope.payingAmnt)
bcefa53b8   Palak Handa   gst add
497
  	            console.log("$scope.taxTotal----", $scope.taxTotal)
d122fec29   Palak Handa   modify
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
  		    // }
  
  		    /*****THIS IS FOR STEP THREE FORM ******/
  		    // $scope.create = function() {
  		        // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) {
  		        //     var x = document.getElementById("snackbar")
  		        //     x.className = "show";
  		        //     setTimeout(function() {
  		        //         x.className = x.className.replace("show", "");
  		        //     }, 3000);
  		        // } else if ($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) {
  		        //     $scope.infoForm = true;
  		        //     console.log("sdasdasdsa");
  		        //     $scope.data.stage = $scope.data.stage;
  		        //     $scope.detail = {};
  		        //     $scope.data.phone = "+91" + $scope.data.number;
  		        //     $http({
  		        //         method: 'POST',
  		        //         url: BASE_URL + '/applicants',
  		        //         data: $scope.data,
  		        //         headers: {}
  		        //     }).then(function mySuccess(result) {
  
  		        //         console.log("=====result=====", result)
  		        //         $scope.detail = result;
  		        //         data.applicantId = result.data.id;
  		        //         $scope.userId = result.data.id;
  		        //         console.log("=====data=====", data)
e284785e4   Palak Handa   update new field
526
527
  		                // data.amount = $scope.payingAmnt + $scope.taxTotal;
  		                data.amount = $scope.payingAmnt;
bcefa53b8   Palak Handa   gst add
528
  		                console.log("$scope.taxTotal",data.amount)
d122fec29   Palak Handa   modify
529
530
531
532
533
534
535
536
537
538
539
540
541
  		                if ($scope.detail != null) {
  		                    $http({
  		                        method: 'POST',
  		                        url: BASE_URL + '/payments',
  		                        data: data,
  		                        headers: {}
  		                    }).then(function mySuccess(paymentResult) {
  		    					Analytics.trackEvent('payments', 'click', 'django.mp4');
  		                    	console.log("paymentResult",paymentResult)
  		                        $scope.paymentResult = paymentResult;
  		                    }, function myError(error) {});
  		                }
  		                var i = 0;
e284785e4   Palak Handa   update new field
542
543
544
  		                 //$scope.payingAmnt =  ($scope.payingAmnt + $scope.taxTotal) * 100;
  
   	                 $scope.payingAmnt =  $scope.payingAmnt * 100;
d122fec29   Palak Handa   modify
545
  		                var options = {
f57ff334e   Palak Handa   update the code
546
  		                    "key": "rzp_live_mhSE1uOBlXvFyJ",
bcefa53b8   Palak Handa   gst add
547
548
  		                    "amount": $scope.payingAmnt ,
   
d122fec29   Palak Handa   modify
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
  		                    "name": "Startup Jalsa",
  		                    "description": "amount",
  		                    "currency": "INR",
  		                    "status": "done",
  
  		                    "theme": {
  		                        "color": "#2196f3 ",
  		                        "image_padding": "NO"
  		                    },
  		                    "modal": {
  		                        "ondismiss": function() {}
  		                    },
  		                    "handler": function(response) {
  		                        createPayment(response);
  		                    }
  		                };
  		                var rzp1 = new Razorpay(options);
  		                rzp1.open();
  		                $scope.paymentResponse = {};
  
  		                function createPayment(response) {
d122fec29   Palak Handa   modify
570
571
572
573
574
575
576
577
578
579
580
581
582
  		                	console.log("response====from===razorpay",response)
  		                    $route.reload();
  		                    $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id;
  		                    $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId;
  		                    $scope.paymentResponse.amount = data.amount;
  		                    $scope.paymentResponse.currency = "INR";
  		                    $scope.paymentResponse.status = $scope.paymentResult.data.status;
  		                    $http({
  		                        method: 'PUT',
  		                        url: BASE_URL + '/payments/' + $scope.paymentResult.data.id,
  		                        data: $scope.paymentResponse,
  		                        headers: {}
  		                    }).then(function mySuccess(searchResult) {
f6d172552   Palak Handa   analytics apply
583
584
585
586
  		                    	// if(paymentResult.data.status == "created"){
  		                    	Analytics.trackEvent('payments', 'click', 'Thankyou');
  		                    	console.log("trackEvent", trackEvent)
  		                    	// }
d122fec29   Palak Handa   modify
587
588
589
590
591
592
593
594
595
596
597
  		                        console.log("searchResult", searchResult)
  		                        $location.path("/confirmation")
  		                        //$scope.showToastr()
  		                        //toaster.success("Registration done successfully");
  
  		                    }, function myError(error) {});
  		                }
  		            }, function myError(error) {});
  		        }
  
  	    	}
dcb703070   Palak Handa   updated new form ...
598

9842ccd27   Palak Handa   changes api call
599
600
  	            //}, function myError(error) {});
  	        //}
6ae8d3cdd   Palak Handa   add new module
601

dcb703070   Palak Handa   updated new form ...
602
  	    //}
6ae8d3cdd   Palak Handa   add new module
603

5348de778   Palak Handa   design updated
604
605
606
607
608
609
610
611
  	    // $scope.showToastr = function() {
  	    //     console.log("called toast")
  	    //     var x = document.getElementById("snacsskbar")
  	    //     x.className = "show";
  	    //     setTimeout(function() {
  	    //         x.className = x.className.replace("show", "");
  	    //     }, 3000);
  	    // }
6ae8d3cdd   Palak Handa   add new module
612

6ae8d3cdd   Palak Handa   add new module
613
  	    /*kk***This code for change data when click to chooses stages***/
163c5adae   Palak Handa   minor changes
614
615
616
617
618
619
620
621
  	    $scope.proto = true;
  	    $scope.businessmodel = true;
  	    $scope.Idea = true;
  	    $scope.current = true;
  
  	    $scope.stage = function(stage) {
  	    $scope.stagekeyPress();
  	    console.log("stage--2",stage)
e847b36f8   Palak Handa   minor changes
622

163c5adae   Palak Handa   minor changes
623
  	        if (stage == 'Idea') {
e847b36f8   Palak Handa   minor changes
624
  	        	$scope.Productshow = "no";
163c5adae   Palak Handa   minor changes
625
626
  	            $scope.current = 10;
  	            $scope.proto = true;
629cc1f8f   Palak Handa   minor changes
627
  	            // $scope.visitType = true;
163c5adae   Palak Handa   minor changes
628
  	            $scope.prototyp = false;
713fd1603   Palak Handa   minor changes
629
  	            $scope.protyp = false;
163c5adae   Palak Handa   minor changes
630
631
632
633
634
635
636
637
638
639
640
  	            $scope.market = false;
  	            $scope.risks = false;
  	            $scope.team = false;
  	            $scope.pitch = false;
  	            $scope.financials = false;
  	            $scope.businessmodel = true;
  	            $scope.data.stage = stage;
  	            // for right content
  	            $scope.Idea = true;
  	            $scope.Product = false;
  	            $scope.Growth = false;
629cc1f8f   Palak Handa   minor changes
641
  	            // $scope.Visitor = false;
163c5adae   Palak Handa   minor changes
642
  	        } else if (stage == 'Product') {
e847b36f8   Palak Handa   minor changes
643
  	        	$scope.Productshow = "no";
163c5adae   Palak Handa   minor changes
644
645
  	            $scope.current = 10;
  	            $scope.proto = true;
629cc1f8f   Palak Handa   minor changes
646
  	            // $scope.visitType = true;
163c5adae   Palak Handa   minor changes
647
  	            $scope.prototyp = true;
713fd1603   Palak Handa   minor changes
648
  	            $scope.protyp = true;
163c5adae   Palak Handa   minor changes
649
650
651
652
653
654
655
656
657
658
659
  	            $scope.market = true;
  	            $scope.risks = true;
  	            $scope.team = true;
  	            $scope.pitch = true;
  	            $scope.financials = true;
  	            $scope.businessmodel = false;
  	            $scope.data.stage = stage;
  	            // for right content
  	            $scope.Idea = false;
  	            $scope.Product = true;
  	            $scope.Growth = false;
629cc1f8f   Palak Handa   minor changes
660
  	            // $scope.Visitor = false;
163c5adae   Palak Handa   minor changes
661
  	        } else if (stage == 'Growth') {
e847b36f8   Palak Handa   minor changes
662
  	        	$scope.Productshow = "yes";
163c5adae   Palak Handa   minor changes
663
664
  	            $scope.current = 10;
  	            $scope.proto = false;
629cc1f8f   Palak Handa   minor changes
665
  	            // $scope.visitType = true;
e847b36f8   Palak Handa   minor changes
666
667
  	            $scope.prototyp = true;
  	            $scope.protyp = false;
163c5adae   Palak Handa   minor changes
668
669
670
671
672
673
674
675
676
677
  	            $scope.market = true;
  	            $scope.risks = true;
  	            $scope.team = true;
  	            $scope.pitch = true;
  	            $scope.financials = true;
  	            $scope.businessmodel = false;
  	            // for right content
  	            $scope.Idea = false;
  	            $scope.Product = false;
  	            $scope.Growth = true;
629cc1f8f   Palak Handa   minor changes
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
  	            // $scope.Visitor = false;
  	        // } else if (stage == 'Visitor') {
  	        // 	$scope.Productshow = "no";
  	        //     $scope.current = 10;
  	        //     $scope.proto = false;
  	        //     $scope.visitType = false;
  	        //     $scope.prototyp = false;
  	        //     $scope.protyp = false;
  	        //     $scope.market = false;
  	        //     $scope.risks = false;
  	        //     $scope.team = false;
  	        //     $scope.pitch = false;
  	        //     $scope.financials = false;
  	        //     $scope.businessmodel = false;
  	        //     $scope.data.stage = stage;
  	        //     // for right content
  	        //     $scope.Idea = false;
  	        //     $scope.Product = false;
  	        //     $scope.Growth = false;
  	        //     $scope.Visitor = true;
163c5adae   Palak Handa   minor changes
698
699
  	            $scope.data.stage = stage;
  	        }
629cc1f8f   Palak Handa   minor changes
700

163c5adae   Palak Handa   minor changes
701
  	    }
e847b36f8   Palak Handa   minor changes
702
703
704
705
706
707
  
  	    $scope.emailTest = function(s){
      		$scope.space = /\s/g.test(s.delegateTarget.value);
      		console.log("space",$scope.space)
  
  		}	
c62079487   Palak Handa   updated design
708
709
710
711
  	    // $scope.enterbusiness = function(business) {
  	    //     console.log("business", business);
  	    //     if (name == undefined) {
  	    //         $scope.current = false;
2d6a9fbea   Palak Handa   complete bugs
712

c62079487   Palak Handa   updated design
713
714
715
716
  	    //     } else if (name != undefined) {
  	    //         $scope.current = true;
  	    //     }
  	    // }
6ae8d3cdd   Palak Handa   add new module
717
718
719
720
721
722
723
  	    /*******FOR FILL THE DATA AND SHOWS ICON GREEN*/
  	    $scope.stagekeyPress = function() {
  	        $('.icon-circle-a').css('background-color', 'rgb(66, 181, 73)');
  	    }
  	    $scope.sectorkeyPress = function() {
  	        $('.icon-circle-b').css('background-color', 'rgb(66, 181, 73)');
  	    }
163c5adae   Palak Handa   minor changes
724
  	    $scope.productLaunchkeyPress = function() {
6ae8d3cdd   Palak Handa   add new module
725
726
  	        $('.icon-circle-ab').css('background-color', 'rgb(66, 181, 73)');
  	    }
163c5adae   Palak Handa   minor changes
727
  	    $scope.launchPeriodkeyPress = function() {
c62079487   Palak Handa   updated design
728
729
730
731
  	        $('.icon-circle-abc').css('background-color', 'rgb(66, 181, 73)');
  	    }
  
  	    $scope.industrykeyPress = function() {
204302c02   Palak Handa   minor changes
732
733
  	    	$scope.addOther = false;
  			$scope.hideSelectBox = true;
c62079487   Palak Handa   updated design
734
  	        $('.icon-circle-abcdefg').css('background-color', 'rgb(66, 181, 73)');
4697da41f   Palak Handa   updated code
735
736
737
738
739
740
  	        var e = document.getElementById("dataIndustry");
  			var dataIndustry = e.options[e.selectedIndex].value;
  			if(dataIndustry == "others") {
  				$scope.addOther = true;
  				$scope.hideSelectBox = false;
  			}
c62079487   Palak Handa   updated design
741
  	    }
204302c02   Palak Handa   minor changes
742
743
744
745
746
747
748
749
  	    $scope.industryNamekeyPress = function(firstName) {
  	        console.log("lastName==", firstName);
  	        if (firstName == undefined) {
  	            $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-o').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
c62079487   Palak Handa   updated design
750
751
752
  	    $scope.amountkeyPress = function() {
  	        $('.icon-circle-bc').css('background-color', 'rgb(66, 181, 73)');
  	    }
2321f803a   Palak Handa   updated changes
753
754
755
  	    $scope.firstNamekeyPress = function(name) {
  	        console.log("lastName==", name);
  	        if (name == undefined) {
6ae8d3cdd   Palak Handa   add new module
756
757
758
759
760
  	            $('.icon-circle-c').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-c').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
dcb703070   Palak Handa   updated new form ...
761

6ae8d3cdd   Palak Handa   add new module
762
763
764
765
766
767
768
769
  	    $scope.emailkeyPress = function(email) {
  	        console.log("email", email);
  	        if (email == undefined) {
  	            $('.icon-circle-d').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-d').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
163c5adae   Palak Handa   minor changes
770
  	    $scope.textCheck = function(){
4697da41f   Palak Handa   updated code
771
  	    	console.log("Val1:::", $scope.textCheck);
163c5adae   Palak Handa   minor changes
772
773
  	    	var e = document.getElementById("fundingDiv");
  			var funding = e.options[e.selectedIndex].value;
204302c02   Palak Handa   minor changes
774
  			$scope.Textshow = "no";
163c5adae   Palak Handa   minor changes
775
  			if(funding == "yes") {
204302c02   Palak Handa   minor changes
776
  				$scope.Textshow = "yes";
163c5adae   Palak Handa   minor changes
777
778
779
  	    	 	console.log("Val:::", $scope.Textshow);
  			}
  	    	
c62079487   Palak Handa   updated design
780
  	    }
4697da41f   Palak Handa   updated code
781
782
783
784
785
786
787
788
789
790
791
  	    $scope.productCheck = function(){
  	    	console.log("Val2:::", $scope.productCheck);
  	    	var e = document.getElementById("productDiv");
  			var product = e.options[e.selectedIndex].value;
  			$scope.Productshow = "no";
  			if(product == "yes") {
  				$scope.Productshow = "yes";
  	    	 	console.log("Val1:::", $scope.Productshow);
  			}
  	    	
  	    }
6ae8d3cdd   Palak Handa   add new module
792
793
794
  
  	    $scope.phonekeyPress = function(number) {
  	        console.log("number", number);
204302c02   Palak Handa   minor changes
795
  	        if (number == undefined || number == '') {
6ae8d3cdd   Palak Handa   add new module
796
797
798
799
800
801
802
803
804
805
806
807
808
809
  	            $('.icon-circle-e').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-e').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
  
  	    $scope.citykeyPress = function(city) {
  	        console.log("city", city);
  	        if (city == undefined) {
  	            $('.icon-circle-f').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-f').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
7e3bb1018   Palak Handa   field added
810
  	    $scope.startupNamekeyPress = function(q) {
6ae8d3cdd   Palak Handa   add new module
811
812
813
814
815
816
  	        if (q == undefined) {
  	            $('.icon-circle-x').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-x').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
dcb703070   Palak Handa   updated new form ...
817
  	    $scope.linkedInkeyPress = function(technology) {
204302c02   Palak Handa   minor changes
818
  	        if (technology == undefined || technology == '') {
6ae8d3cdd   Palak Handa   add new module
819
820
821
822
823
  	            $('.icon-circle-h').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-h').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
dcb703070   Palak Handa   updated new form ...
824
  	    $scope.companykeyPress = function(problem) {
6ae8d3cdd   Palak Handa   add new module
825
826
827
828
829
830
  	        if (problem == undefined) {
  	            $('.icon-circle-i').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-i').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
dcb703070   Palak Handa   updated new form ...
831
  	    $scope.productNamekeyPress = function(solution) {
6ae8d3cdd   Palak Handa   add new module
832
833
834
835
836
837
838
839
840
  	        if (solution == undefined) {
  	            $('.icon-circle-j').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-j').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
  	    $scope.businesskeyPress = function(business) {
  	        $('.icon-circle-p').css('background-color', 'rgb(66, 181, 73)');
  	    }
dcb703070   Palak Handa   updated new form ...
841
  	    $scope.websitekeyPress = function(prototype) {
204302c02   Palak Handa   minor changes
842
  	        if (prototype == undefined  || prototype == '') {
6ae8d3cdd   Palak Handa   add new module
843
844
845
846
847
  	            $('.icon-circle-k').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-k').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
dcb703070   Palak Handa   updated new form ...
848
  	    $scope.employeekeyPress = function(market) {
204302c02   Palak Handa   minor changes
849
  	        if (market == undefined || market == '') {
6ae8d3cdd   Palak Handa   add new module
850
851
852
853
854
  	            $('.icon-circle-l').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-l').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
dcb703070   Palak Handa   updated new form ...
855
  	    $scope.annualkeyPress = function(risk) {
204302c02   Palak Handa   minor changes
856
  	        if (risk == undefined || risk == '') {
6ae8d3cdd   Palak Handa   add new module
857
858
859
860
861
  	            $('.icon-circle-m').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-m').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
dcb703070   Palak Handa   updated new form ...
862
  	    $scope.revenuekeyPress = function(team) {
204302c02   Palak Handa   minor changes
863
  	        if (team == undefined || team == '') {
6ae8d3cdd   Palak Handa   add new module
864
865
866
867
868
  	            $('.icon-circle-n').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-n').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
dcb703070   Palak Handa   updated new form ...
869
  	    $scope.descriptionkeyPress = function(pitch) {
6ae8d3cdd   Palak Handa   add new module
870
871
872
873
874
875
  	        if (pitch == undefined) {
  	            $('.icon-circle-z').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-z').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
e284785e4   Palak Handa   update new field
876
877
878
879
880
881
882
883
  	    $scope.discountkeyPress = function(discount) {
  	        console.log("lastName==", name);
  	        if (discount == undefined) {
  	            $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-o').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
91eeb4455   Palak Handa   modify
884
885
886
887
  	    $scope.removeNooError = function() {
  	    	$('#invalidIdea').css('display', 'block');
  	        $('#noExist').css('display', 'none');
  	    };
c62079487   Palak Handa   updated design
888
  	    $scope.ideakeyPress = function(financial) {
6ae8d3cdd   Palak Handa   add new module
889
890
  	        console.log("financial", financial);
  	        if (financial == undefined) {
91eeb4455   Palak Handa   modify
891
  	        	$('#invalidIdea').css('display', 'block');
6ae8d3cdd   Palak Handa   add new module
892
893
  	            $('.icon-circle-q').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
91eeb4455   Palak Handa   modify
894
  	        	$('#invalidIdea').css('display', 'none');
6ae8d3cdd   Palak Handa   add new module
895
896
897
  	            $('.icon-circle-q').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
c62079487   Palak Handa   updated design
898
899
900
901
902
903
904
905
906
  
  	    $scope.fundkeyPress = function(financial) {
  	        console.log("financial", financial);
  	        if (financial == undefined) {
  	            $('.icon-circle-y').css('background-color', 'rgb(102, 102, 102)');
  	        } else {
  	            $('.icon-circle-y').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
2d6a9fbea   Palak Handa   complete bugs
907
908
909
910
911
912
913
  	    $scope.changeReferalIconColor = function(referalToken){
  	    	if (referalToken == undefined || referalToken == '') {
  	    		$('.referel-icon').css('background-color', 'rgb(102, 102, 102)');
  	    	}else {
  	            $('.referel-icon').css('background-color', 'rgb(66, 181, 73)');
  	        }
  	    }
6ae8d3cdd   Palak Handa   add new module
914

53b83aa9e   Palak Handa   first commit
915
  	});
2d6a9fbea   Palak Handa   complete bugs
916
  	scotchApp.controller('verifyController', function($scope, $http, $location, $route,BASE_URL) {
d8feb0ddb   Palak Handa   design updated
917
  	    $scope.pendingPaymentId = $route.current.params.id
6ae8d3cdd   Palak Handa   add new module
918
919
920
921
922
923
  	    $http({
  	        method: "GET",
  	        url: BASE_URL + '/applicants/' + $scope.pendingPaymentId,
  	    }).then(function mySuccess(response) {
  	        $scope.data = response.data;
  	        console.log("response-1", response);
d8feb0ddb   Palak Handa   design updated
924
925
  	        $scope.pendingPaymentId = $route.current.params.id;
  	        
6ae8d3cdd   Palak Handa   add new module
926
927
928
929
930
931
  	        $http({
  	            method: "GET",
  	            url: BASE_URL + '/payments?filter={"where":{"applicantId":' + $scope.pendingPaymentId + '}}',
  	        }).then(function mySuccess(response) {
  	            $scope.paymentRecord = response.data;
  	        }, function myError(response) {
6ae8d3cdd   Palak Handa   add new module
932
933
934
935
936
937
938
939
940
  	        });
  	    }, function myError(response) {
  	        $scope.myWelcome = response.statusText;
  	    });
  
  	    $scope.checkView = false;
  	    $scope.verifyView = false;
  
  	    $scope.pendingPaymentId = '';
6ae8d3cdd   Palak Handa   add new module
941
942
943
944
945
  	    $scope.update = function() {
  
  	        $http({
  	            method: 'GET',
  	            url: BASE_URL + '/payments?filter={"where":{"applicantId": ' + $scope.pendingPaymentId + '}}',
6ae8d3cdd   Palak Handa   add new module
946
947
  	            headers: {}
  	        }).then(function mySuccess(searchResult) {
c556cc81b   Palak Handa   minor changes
948
949
  	            if (searchResult.data[0].status == "created") {
  	            //if (searchResult.data[0].status == "cancelled") {
6ae8d3cdd   Palak Handa   add new module
950
951
  	                $scope.checkView = true;
  	                $scope.verifyView = false;
ced66f2dc   Palak Handa   minor changes
952
953
954
955
  	                $scope.amount = searchResult.data[0].amount;
  	                $scope.searchResult = searchResult.data[0];
  	                console.log('====searchResult===', searchResult);
  	        		console.log("searchResult=====",searchResult.data[0].razorOrderId)
6ae8d3cdd   Palak Handa   add new module
956
  	                var i = 0;
ced66f2dc   Palak Handa   minor changes
957
  	                $scope.amount =  $scope.amount * 100;
6ae8d3cdd   Palak Handa   add new module
958
  	                var options = {
f2142e490   Palak Handa   rajorpay key updated
959
960
  	                    "key": "rzp_live_mhSE1uOBlXvFyJ",
  	                    //"key" : "rzp_test_YwHsVFiDIQ2WUQ",
6ae8d3cdd   Palak Handa   add new module
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
  	                    "amount": $scope.amount,
  
  	                    "name": "Startup Jalsa",
  	                    "description": "amount",
  	                    "currency": "INR",
  	                    "status": "done",
  
  	                    "theme": {
  	                        "color": "#2196f3 ",
  	                        "image_padding": "NO"
  	                    },
  	                    "modal": {
  	                        "ondismiss": function() {}
  	                    },
  	                    "handler": function(response) {
  	                        createPayment(response);
  	                    }
  	                };
  	                var rzp1 = new Razorpay(options);
  	                rzp1.open();
  	                $scope.paymentResponse = {};
6ae8d3cdd   Palak Handa   add new module
982
  	                function createPayment(response) {
ced66f2dc   Palak Handa   minor changes
983
984
  	                	$scope.amount =  $scope.amount / 100;
  	                	console.log("response======retepaymen",response);
6ae8d3cdd   Palak Handa   add new module
985
  	                    $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id;
ced66f2dc   Palak Handa   minor changes
986
  	                    $scope.paymentResponse.razorOrderId = $scope.searchResult.razorOrderId;
6ae8d3cdd   Palak Handa   add new module
987
  	                    $scope.paymentResponse.amount = $scope.amount;
ced66f2dc   Palak Handa   minor changes
988
989
990
  	                    $scope.paymentResponse.currency = $scope.searchResult.currency;
  	                    $scope.paymentResponse.status = $scope.searchResult.status;
  	                    $scope.paymentResponse.applicantId = $scope.searchResult.applicantId;
6ae8d3cdd   Palak Handa   add new module
991
992
993
  	                    console.log("$scope.paymentResponse", $scope.paymentResponse)
  	                    $http({
  	                        method: 'PUT',
ced66f2dc   Palak Handa   minor changes
994
  	                        url: BASE_URL + '/payments/' + $scope.searchResult.id,
6ae8d3cdd   Palak Handa   add new module
995
996
997
  	                        data: $scope.paymentResponse,
  	                        headers: {}
  	                    }).then(function mySuccess(searchResult) {
f6d172552   Palak Handa   analytics apply
998
999
1000
  	                    	// if(paymentResult.data.status == "created"){
  		                    	Analytics.trackEvent('payments', 'click', 'Thankyou');
  		                    // }
8e25d825b   Palak Handa   changes the rajor...
1001
  	                    	console.log("finalsearchResult",searchResult)
ced66f2dc   Palak Handa   minor changes
1002
  	                    	$location.path("/confirmation")
6ae8d3cdd   Palak Handa   add new module
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
  	                    }, function myError(error) {
  
  	                    });
  	                }
  	            } else {
  
  	            }
  
  	        }, function myError(error) {});
  	    }
  	});
53b83aa9e   Palak Handa   first commit
1014

2d6a9fbea   Palak Handa   complete bugs
1015
  	scotchApp.controller('ambassadorController', function($scope, $http, $location, $route,BASE_URL) {
6ae8d3cdd   Palak Handa   add new module
1016
  		$scope.data = {};
8e25d825b   Palak Handa   changes the rajor...
1017
1018
  		$scope.check = false;
  	    $scope.numberCheck = false;
5348de778   Palak Handa   design updated
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
  	    /*open videos in modal*/
  	    $scope.openyoutube16 = function(){
  			$('#videoModel').modal('show');
  	    }
  
  	     $scope.openyoutube17 = function(){
  			$('#videoModels').modal('show');
  	    }
  
  	    $scope.closeModal = function(){
  	    	var url = $('#youtubePlayer').attr('src');
  			$('#youtubePlayer').attr('src', '');
  			$('#youtubePlayer').attr('src', url);
  	    }
  	    /*open videos ends here*/
  
  	    $scope.removeError = function() {
e847b36f8   Palak Handa   minor changes
1036
  	    	console.log("doooo")
5348de778   Palak Handa   design updated
1037
1038
1039
  	        $('#invalidEmail').css('display', 'none');
  	        $('#alreadyExist').css('display', 'none');
  	    };
b678502c9   Palak Handa   update
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
  		// $scope.emailcheck = function(val) {
  		// 	consol.log("kdsbd")
  		// 	$scope.space = /\s/g.test(val);
    //   		console.log("space",$scope.space)
  	 //        if (val == undefined) {
  	 //            $('#invalidEmail').css('display', 'block');
  	 //        } else {
  	 //            $http({
  	 //                method: 'GET',
  	 //                url: BASE_URL + '/ambassadors?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}',
  	 //                headers: {}
  	 //            }).then(function mySuccess(searchResult) {
  	 //                console.log("searchResult1===>", searchResult)
  	 //                if (searchResult.data.length == 0) {
  	 //                    $scope.check = false;
  	 //                } else {
  	 //                    $scope.check = true;
  	 //                    $('#alreadyExist').css('display', 'block');
  	 //                }
  	 //            }, function myError(error) {});
  	 //        }
  	 //    };
  
  	 //    $scope.removeNoError = function() {
  	 //    	$('#invalidNumber').css('display', 'none');
  	 //        $('#noExist').css('display', 'none');
  	 //    };
  
  	 //    $scope.numbercheck = function(number) {
  	 //    	// if (val == undefined) {
  	 //     //        $('#invalidNumber').css('display', 'block');
  	 //     //    } else {
  	 //        	$http({
  	 //            	method: 'GET',
  	 //            	url: BASE_URL + '/ambassadors?filter={"where": {"mobile": {"like":"%25' + number + '%25"}}}',
  	 //            	data: $scope.data,
  	 //            	headers: {}
  	 //        	}).then(function mySuccess(searchResult) {
  	 //            	console.log("searchResult===>", searchResult)
  	 //            	if (searchResult.data.length == 0) {
  	 //                	$scope.numberCheck = false;
  	 //            	} else {
  	 //                	$scope.numberCheck = true;
  	 //                	$('#noExist').css('display', 'block');
  	 //            	}
  	 //        	}, function myError(error) {});
  	 //       	//}
  
  	 //    };
8e25d825b   Palak Handa   changes the rajor...
1089

6ae8d3cdd   Palak Handa   add new module
1090
1091
1092
1093
1094
1095
1096
  		$scope.submit = function() {
  			console.log($scope.data.name)
  			var randomNumber = ""+Math.random();
  			var nameSpliced = $scope.data.name.slice(0,3);
  			var numberSpliced = randomNumber.slice(2,5);
  			$scope.data.referalToken = nameSpliced+numberSpliced;
  			$scope.data.referalToken = $scope.data.referalToken.toUpperCase();
2d6a9fbea   Palak Handa   complete bugs
1097

6ae8d3cdd   Palak Handa   add new module
1098
1099
1100
1101
1102
1103
1104
1105
  	         $http({
  	                method: 'POST',
  	                url: BASE_URL + '/ambassadors',
  	                data: $scope.data,
  	                headers: {}
  	            }).then(function mySuccess(result) {
  	                console.log("result", result)
  	                $scope.detail = result;
2d6a9fbea   Palak Handa   complete bugs
1106
1107
1108
1109
  	                $('#myModal').modal('show');
  	              	 $scope.data.name = '';
  	                $scope.data.email = '';
  	                $scope.data.mobile = '';
18f937f88   Palak Handa   update
1110
  	                // $scope.data.discount = '';
2d6a9fbea   Palak Handa   complete bugs
1111
  	            
6db0109b5   Palak Handa   minor changes
1112
1113
1114
1115
  	            }, function myError(error) {
  	            	console.log(error)
  	            	console.log(error.data.error.message)
  	            });
2d6a9fbea   Palak Handa   complete bugs
1116
  	        console.log($scope.data)
6ae8d3cdd   Palak Handa   add new module
1117
1118
  	        }
  	});
53b83aa9e   Palak Handa   first commit
1119

96991e0c1   Palak Handa   update
1120