Commit b678502c9c0a242fa33b97738e8d38194cd810ca
1 parent
7e3bb10184
Exists in
master
and in
1 other branch
update
Showing
2 changed files
with
52 additions
and
52 deletions
Show diff stats
pages/ambassador.html
1 | <div class="header"> | 1 | <div class="header"> |
2 | <div style="float: left;"> | 2 | <div style="float: left;"> |
3 | <img src="images/white.png" class="logo" > | 3 | <img src="images/white.png" class="logo" > |
4 | </div> | 4 | </div> |
5 | <div style="float: right;" class="right-side-links"> | 5 | <div style="float: right;" class="right-side-links"> |
6 | <a class="hyperColor" ng-click="openyoutube16()">Glipmses of 2016</a> | 6 | <a class="hyperColor" ng-click="openyoutube16()">Glipmses of 2016</a> |
7 | <a class="hyperColor" ng-click="openyoutube17()">Concept for 2017</a> | 7 | <a class="hyperColor" ng-click="openyoutube17()">Concept for 2017</a> |
8 | </div> | 8 | </div> |
9 | <div class="clearfix"></div> | 9 | <div class="clearfix"></div> |
10 | </div> | 10 | </div> |
11 | <!-- CLOSE HEADER --> | 11 | <!-- CLOSE HEADER --> |
12 | <form name="applicantForm" id="signupForm"> | 12 | <form name="applicantForm" id="signupForm"> |
13 | <div style="text-align:center;"> | 13 | <div style="text-align:center;"> |
14 | <h4>Startup Ambassador</h4> | 14 | <h4>Startup Ambassador</h4> |
15 | </div> | 15 | </div> |
16 | <div class="col-xs-12 col-md-4 col-md-offset-4"> | 16 | <div class="col-xs-12 col-md-4 col-md-offset-4"> |
17 | <div class="form-all"> | 17 | <div class="form-all"> |
18 | <table style="width: 100%;"> | 18 | <table style="width: 100%;"> |
19 | <tr> | 19 | <tr> |
20 | <td> | 20 | <td> |
21 | <div class="step-one-form" > | 21 | <div class="step-one-form" > |
22 | <!-- form step 1 --> | 22 | <!-- form step 1 --> |
23 | <div class="col-xs-12 input-wrapper" > | 23 | <div class="col-xs-12 input-wrapper" > |
24 | <div id="snackbar">Error ! Please fill in all fields.</div> | 24 | <div id="snackbar">Error ! Please fill in all fields.</div> |
25 | <div class="icon-circle-c"> | 25 | <div class="icon-circle-c"> |
26 | <i class="material-icons" style="line-height: 31px;">person</i> | 26 | <i class="material-icons" style="line-height: 31px;">person</i> |
27 | </div> | 27 | </div> |
28 | <input type="text" class="text-input" required ng-model="data.name" placeholder="Name" id="myBtn" name="name" ng-change="entername(data.name); firstNamekeyPress(data.name)"> | 28 | <input type="text" class="text-input" required ng-model="data.name" placeholder="Name" id="myBtn" name="name" ng-change="entername(data.name); firstNamekeyPress(data.name)"> |
29 | </div> | 29 | </div> |
30 | <div class="clearfix"></div> | 30 | <div class="clearfix"></div> |
31 | <div class="col-xs-12 input-wrapper" > | 31 | <div class="col-xs-12 input-wrapper" > |
32 | <div id="snackbar">Error ! Please fill in all fields.</div> | 32 | <div id="snackbar">Error ! Please fill in all fields.</div> |
33 | <div class="icon-circle-d"> | 33 | <div class="icon-circle-d"> |
34 | <i class="material-icons" style="line-height: 30px;">email</i> | 34 | <i class="material-icons" style="line-height: 30px;">email</i> |
35 | </div> | 35 | </div> |
36 | <input type="email" name="email" ng-pattern="/^[^\s@]+@[^\s@]+\.[^\s@]+$/" class="text-input" required class="" ng-model="data.email" placeholder="Email Address" ng-blur="emailcheck(data.email)" ng-focus="removeError()" ng-change="enteremail(data.email); emailkeyPress(data.email)"> | 36 | <input type="email" name="email" ng-pattern="/^[^\s@]+@[^\s@]+\.[^\s@]+$/" class="text-input" required class="" ng-model="data.email" placeholder="Email Address" ng-change="enteremail(data.email); emailkeyPress(data.email)"> |
37 | <label class="error-message f-family" id="invalidEmail">Please enter a valid email address.</label> | 37 | <label class="error-message f-family" id="invalidEmail">Please enter a valid email address.</label> |
38 | <label ng-if="check">Email already exist.</label> | 38 | <label ng-if="check">Email already exist.</label> |
39 | </div> | 39 | </div> |
40 | <div class="clearfix"></div> | 40 | <div class="clearfix"></div> |
41 | <div class="col-xs-12 input-wrapper" > | 41 | <div class="col-xs-12 input-wrapper" > |
42 | <div class="icon-circle-e"> | 42 | <div class="icon-circle-e"> |
43 | <i class="material-icons" style="line-height: 30px;">phone</i> | 43 | <i class="material-icons" style="line-height: 30px;">phone</i> |
44 | </div> | 44 | </div> |
45 | <input type="text" ng-pattern="/^\d*(?:\.\d{1,2})?$/" title="Please enter only numberic numbers" maxlength="10" required class="text-input" ng-model="data.mobile" placeholder="Mobile No." ng-blur="numbercheck(data.mobile)" ng-focus="removeNoError()" ng-change="enternumber(data.mobile); phonekeyPress(data.mobile)"> | 45 | <input type="text" ng-pattern="/^\d*(?:\.\d{1,2})?$/" title="Please enter only numberic numbers" maxlength="10" required class="text-input" ng-model="data.mobile" placeholder="Mobile No." ng-change="enternumber(data.mobile); phonekeyPress(data.mobile)"> |
46 | <!-- <label class="error-message f-family" id="invalidNumber">Please enter only numeric value in mobile number field.</label> --> | 46 | <!-- <label class="error-message f-family" id="invalidNumber">Please enter only numeric value in mobile number field.</label> --> |
47 | <label ng-if="numberCheck">Contact Number already exist.</label> | 47 | <label ng-if="numberCheck">Contact Number already exist.</label> |
48 | </div> | 48 | </div> |
49 | <div class="clearfix"></div> | 49 | <div class="clearfix"></div> |
50 | <div class="col-xs-12 input-wrapper" > | 50 | <div class="col-xs-12 input-wrapper" > |
51 | <div class="icon-circle-o"> | 51 | <div class="icon-circle-o"> |
52 | <i class="material-icons" style="line-height: 30px;">confirmation_number</i> | 52 | <i class="material-icons" style="line-height: 30px;">confirmation_number</i> |
53 | </div> | 53 | </div> |
54 | <input type="number" ng-pattern="/^\d*(?:\.\d{1,2})?$/" title="Please enter only numberic numbers" maxlength="10" required class="text-input" ng-model="data.discount" placeholder="Percentage Discount" ng-change="enternumber(data.discount); discountkeyPress(data.discount)"> | 54 | <input type="number" ng-pattern="/^\d*(?:\.\d{1,2})?$/" title="Please enter only numberic numbers" maxlength="10" required class="text-input" ng-model="data.discount" placeholder="Percentage Discount" ng-change="enternumber(data.discount); discountkeyPress(data.discount)"> |
55 | </div> | 55 | </div> |
56 | </div> | 56 | </div> |
57 | <!-- close step-one-form --> | 57 | <!-- close step-one-form --> |
58 | </td> | 58 | </td> |
59 | </tr> | 59 | </tr> |
60 | </table> | 60 | </table> |
61 | </div> | 61 | </div> |
62 | <!-- CLOSE form-all --> | 62 | <!-- CLOSE form-all --> |
63 | </div> | 63 | </div> |
64 | <div class="clearfix"></div> | 64 | <div class="clearfix"></div> |
65 | <div style="margin-bottom: 12%;" class="text-center"> | 65 | <div style="margin-bottom: 12%;" class="text-center"> |
66 | <input type="submit" class="btn submit-button" ng-disabled="applicantForm.$invalid|| check|| numberCheck" value="Submit" ng-click="submit()"> | 66 | <input type="submit" class="btn submit-button" ng-disabled="applicantForm.$invalid|| check|| numberCheck" value="Submit" ng-click="submit()"> |
67 | </div> | 67 | </div> |
68 | <!-- col-xs-12 col-md-8 col-md-offset-2 --> | 68 | <!-- col-xs-12 col-md-8 col-md-offset-2 --> |
69 | </form> | 69 | </form> |
70 | <!-- CLOSE FORM --> | 70 | <!-- CLOSE FORM --> |
71 | <footer> | 71 | <footer> |
72 | <img id="footer" class="img-responsive banner"> | 72 | <img id="footer" class="img-responsive banner"> |
73 | <center class="footer"> Powered By <a class="footer-link" href="http://www.viithiisys.com/" target="_blank">Viithiisys Technologies.</a> | 73 | <center class="footer"> Powered By <a class="footer-link" href="http://www.viithiisys.com/" target="_blank">Viithiisys Technologies.</a> |
74 | </center> | 74 | </center> |
75 | </footer> | 75 | </footer> |
76 | <!-- </div> CLOSE CHECK VIEW --> | 76 | <!-- </div> CLOSE CHECK VIEW --> |
77 | <div ng-if="verifyView"> | 77 | <div ng-if="verifyView"> |
78 | <div class="text-center"> | 78 | <div class="text-center"> |
79 | <input type="button" class="btn submit-button" ng-disabled="applicantForm.$invalid" value="check the status" ng-click="update()"> | 79 | <input type="button" class="btn submit-button" ng-disabled="applicantForm.$invalid" value="check the status" ng-click="update()"> |
80 | </div> | 80 | </div> |
81 | </div> | 81 | </div> |
82 | </div> <!-- CLOSE NEW-CONTROLLER --> | 82 | </div> <!-- CLOSE NEW-CONTROLLER --> |
83 | <div class="modal fade" id="myModal" role="dialog"> | 83 | <div class="modal fade" id="myModal" role="dialog"> |
84 | <div class="modal-dialog" style="left: auto;"> | 84 | <div class="modal-dialog" style="left: auto;"> |
85 | <div class="modal-content"> | 85 | <div class="modal-content"> |
86 | <div class="modal-body" style="text-align:center;margin-top:5%"> | 86 | <div class="modal-body" style="text-align:center;margin-top:5%"> |
87 | <p style="font-size:22px">Your Refral Code for {{data.discount}}% discount is</p><p style="font-size:24px"><b>{{data.referalToken}}</b></p> | 87 | <p style="font-size:22px">Your Refral Code for {{data.discount}}% discount is</p><p style="font-size:24px"><b>{{data.referalToken}}</b></p> |
88 | </div> | 88 | </div> |
89 | <div style="text-align:center;margin-bottom:5%"> | 89 | <div style="text-align:center;margin-bottom:5%"> |
90 | <button style="color: #fff;background-color: #4CAF50;" type="button" class="btn btn-default1" data-dismiss="modal">Close</button> | 90 | <button style="color: #fff;background-color: #4CAF50;" type="button" class="btn btn-default1" data-dismiss="modal">Close</button> |
91 | </div> | 91 | </div> |
92 | </div> | 92 | </div> |
93 | </div> | 93 | </div> |
94 | </div> | 94 | </div> |
95 | 95 | ||
96 | <div class="modal fade" id="videoModel" role="dialog" ng-click="closeModal()"> | 96 | <div class="modal fade" id="videoModel" role="dialog" ng-click="closeModal()"> |
97 | <div class="modal-dialog" style="left: auto;"> | 97 | <div class="modal-dialog" style="left: auto;"> |
98 | <div class="modal-content"> | 98 | <div class="modal-content"> |
99 | <div class="modal-body"> | 99 | <div class="modal-body"> |
100 | <iframe width="560" id="youtubePlayer" height="315" src="https://www.youtube.com/embed/8i1bLQ7jS0I" frameborder="0" allowfullscreen></iframe> | 100 | <iframe width="560" id="youtubePlayer" height="315" src="https://www.youtube.com/embed/8i1bLQ7jS0I" frameborder="0" allowfullscreen></iframe> |
101 | </div> | 101 | </div> |
102 | <!-- <div class="modal-footers" style="text-align: center;margin-bottom: 5px;"> | 102 | <!-- <div class="modal-footers" style="text-align: center;margin-bottom: 5px;"> |
103 | <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="closeModal()">Close</button> | 103 | <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="closeModal()">Close</button> |
104 | </div> --> | 104 | </div> --> |
105 | </div> | 105 | </div> |
106 | </div> | 106 | </div> |
107 | </div> | 107 | </div> |
108 | 108 | ||
109 | 109 | ||
110 | <div class="modal fade" id="videoModels" role="dialog" ng-click="closeModal()"> | 110 | <div class="modal fade" id="videoModels" role="dialog" ng-click="closeModal()"> |
111 | <div class="modal-dialog" style="left: auto;"> | 111 | <div class="modal-dialog" style="left: auto;"> |
112 | <div class="modal-content"> | 112 | <div class="modal-content"> |
113 | <div class="modal-body"> | 113 | <div class="modal-body"> |
114 | <iframe width="560" id="youtubePlayer" height="315" src="https://www.youtube.com/embed/oBqdz-p3R6Y" frameborder="0" allowfullscreen></iframe> | 114 | <iframe width="560" id="youtubePlayer" height="315" src="https://www.youtube.com/embed/oBqdz-p3R6Y" frameborder="0" allowfullscreen></iframe> |
115 | </div> | 115 | </div> |
116 | <!-- <div class="modal-footers" style="text-align: center;margin-bottom: 5px;"> | 116 | <!-- <div class="modal-footers" style="text-align: center;margin-bottom: 5px;"> |
117 | <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="closeModal()">Close</button> | 117 | <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="closeModal()">Close</button> |
118 | </div> --> | 118 | </div> --> |
119 | </div> | 119 | </div> |
120 | </div> | 120 | </div> |
121 | </div> | 121 | </div> |
122 | 122 |
script.js
1 | // create the module and name it scotchApp | 1 | // create the module and name it scotchApp |
2 | var scotchApp = angular.module('scotchApp', ['ngRoute','angular-google-analytics']); | 2 | var scotchApp = angular.module('scotchApp', ['ngRoute','angular-google-analytics']); |
3 | 3 | ||
4 | // configure our routes | 4 | // configure our routes |
5 | scotchApp.config(function($routeProvider) { | 5 | scotchApp.config(function($routeProvider) { |
6 | $routeProvider | 6 | $routeProvider |
7 | 7 | ||
8 | // route for the Home page | 8 | // route for the Home page |
9 | .when('/', { | 9 | .when('/', { |
10 | templateUrl: 'pages/Home.html', | 10 | templateUrl: 'pages/Home.html', |
11 | controller: 'mainController' | 11 | controller: 'mainController' |
12 | }) | 12 | }) |
13 | 13 | ||
14 | // route for the registration page | 14 | // route for the registration page |
15 | .when('/registration', { | 15 | .when('/registration', { |
16 | templateUrl: 'pages/registration.html', | 16 | templateUrl: 'pages/registration.html', |
17 | controller: 'mainController' | 17 | controller: 'mainController' |
18 | }) | 18 | }) |
19 | 19 | ||
20 | // route for the paymentVerify page | 20 | // route for the paymentVerify page |
21 | .when('/pendingPayment/:id', { | 21 | .when('/pendingPayment/:id', { |
22 | templateUrl: 'pages/verify.html', | 22 | templateUrl: 'pages/verify.html', |
23 | controller: 'verifyController' | 23 | controller: 'verifyController' |
24 | }) | 24 | }) |
25 | 25 | ||
26 | // route for the ambassador page | 26 | // route for the ambassador page |
27 | .when('/ambassador', { | 27 | .when('/startupJalsaPromocode', { |
28 | templateUrl: 'pages/ambassador.html', | 28 | templateUrl: 'pages/ambassador.html', |
29 | controller: 'ambassadorController' | 29 | controller: 'ambassadorController' |
30 | }) | 30 | }) |
31 | 31 | ||
32 | // route for the confirmation page | 32 | // route for the confirmation page |
33 | .when('/confirmation', { | 33 | .when('/confirmation', { |
34 | templateUrl: 'pages/confirmation.html', | 34 | templateUrl: 'pages/confirmation.html', |
35 | controller: 'mainController' | 35 | controller: 'mainController' |
36 | }) | 36 | }) |
37 | 37 | ||
38 | }); | 38 | }); |
39 | 39 | ||
40 | scotchApp.config(['AnalyticsProvider', function (AnalyticsProvider) { | 40 | scotchApp.config(['AnalyticsProvider', function (AnalyticsProvider) { |
41 | // Add configuration code as desired | 41 | // Add configuration code as desired |
42 | AnalyticsProvider.setAccount('UA-106416759-1'); //UU-XXXXXXX-X should be your tracking code | 42 | AnalyticsProvider.setAccount('UA-106416759-1'); //UU-XXXXXXX-X should be your tracking code |
43 | 43 | ||
44 | // Track all routes (default is true). | 44 | // Track all routes (default is true). |
45 | AnalyticsProvider.trackPages(true); | 45 | AnalyticsProvider.trackPages(true); |
46 | 46 | ||
47 | // Track all URL query params (default is false). | 47 | // Track all URL query params (default is false). |
48 | AnalyticsProvider.trackUrlParams(true); | 48 | AnalyticsProvider.trackUrlParams(true); |
49 | 49 | ||
50 | }]).run(['Analytics', function(Analytics) { }]); | 50 | }]).run(['Analytics', function(Analytics) { }]); |
51 | 51 | ||
52 | scotchApp.constant("BASE_URL", "http://139.59.68.74:4001/api") | 52 | scotchApp.constant("BASE_URL", "http://139.59.68.74:4001/api") |
53 | //scotchApp.constant("BASE_URL", "http://0.0.0.0:4001/api") | 53 | //scotchApp.constant("BASE_URL", "http://0.0.0.0:4001/api") |
54 | 54 | ||
55 | // create the controller and inject Angular's $scope | 55 | // create the controller and inject Angular's $scope |
56 | scotchApp.controller('mainController', function($scope, $http, $location, $route, $rootScope, BASE_URL, Analytics) { | 56 | scotchApp.controller('mainController', function($scope, $http, $location, $route, $rootScope, BASE_URL, Analytics) { |
57 | $scope.data = { | 57 | $scope.data = { |
58 | show: true, | 58 | show: true, |
59 | hide: false | 59 | hide: false |
60 | }; | 60 | }; |
61 | 61 | ||
62 | var chennai = new Date("Nov 7, 2017 00:00:00").getTime(); | 62 | var chennai = new Date("Nov 7, 2017 00:00:00").getTime(); |
63 | // Update the count down every 1 second | 63 | // Update the count down every 1 second |
64 | var x = setInterval(function() { | 64 | var x = setInterval(function() { |
65 | // Get todays date and time | 65 | // Get todays date and time |
66 | var now = new Date().getTime(); | 66 | var now = new Date().getTime(); |
67 | // Find the distance between now an the count down date | 67 | // Find the distance between now an the count down date |
68 | var distance = chennai - now; | 68 | var distance = chennai - now; |
69 | // Time calculations for days, hours, minutes and seconds | 69 | // Time calculations for days, hours, minutes and seconds |
70 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 70 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
71 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 71 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
72 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 72 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
73 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 73 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
74 | $scope.timer = days + "d " + hours + "h " | 74 | $scope.timer = days + "d " + hours + "h " |
75 | + minutes + "m " + seconds + "s " | 75 | + minutes + "m " + seconds + "s " |
76 | // Output the result in an element with id="demo" | 76 | // Output the result in an element with id="demo" |
77 | document.getElementById("chennai").innerHTML = days + "d " + hours + "h " | 77 | document.getElementById("chennai").innerHTML = days + "d " + hours + "h " |
78 | + minutes + "m " + seconds + "s "; | 78 | + minutes + "m " + seconds + "s "; |
79 | // If the count down is over, write some text | 79 | // If the count down is over, write some text |
80 | if (distance < 0) { | 80 | if (distance < 0) { |
81 | clearInterval(x); | 81 | clearInterval(x); |
82 | document.getElementById("chennai").innerHTML = "EXPIRED"; | 82 | document.getElementById("chennai").innerHTML = "EXPIRED"; |
83 | } | 83 | } |
84 | }, 1000); | 84 | }, 1000); |
85 | 85 | ||
86 | var pune = new Date("Nov 9, 2017 00:00:00").getTime(); | 86 | var pune = new Date("Nov 9, 2017 00:00:00").getTime(); |
87 | // Update the count down every 1 second | 87 | // Update the count down every 1 second |
88 | var x = setInterval(function() { | 88 | var x = setInterval(function() { |
89 | // Get todays date and time | 89 | // Get todays date and time |
90 | var now = new Date().getTime(); | 90 | var now = new Date().getTime(); |
91 | // Find the distance between now an the count down date | 91 | // Find the distance between now an the count down date |
92 | var distance = pune - now; | 92 | var distance = pune - now; |
93 | // Time calculations for days, hours, minutes and seconds | 93 | // Time calculations for days, hours, minutes and seconds |
94 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 94 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
95 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 95 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
96 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 96 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
97 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 97 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
98 | $scope.timer = days + "d " + hours + "h " | 98 | $scope.timer = days + "d " + hours + "h " |
99 | + minutes + "m " + seconds + "s " | 99 | + minutes + "m " + seconds + "s " |
100 | // Output the result in an element with id="demo" | 100 | // Output the result in an element with id="demo" |
101 | document.getElementById("pune").innerHTML = days + "d " + hours + "h " | 101 | document.getElementById("pune").innerHTML = days + "d " + hours + "h " |
102 | + minutes + "m " + seconds + "s "; | 102 | + minutes + "m " + seconds + "s "; |
103 | // If the count down is over, write some text | 103 | // If the count down is over, write some text |
104 | if (distance < 0) { | 104 | if (distance < 0) { |
105 | clearInterval(x); | 105 | clearInterval(x); |
106 | document.getElementById("pune").innerHTML = "EXPIRED"; | 106 | document.getElementById("pune").innerHTML = "EXPIRED"; |
107 | } | 107 | } |
108 | }, 1000); | 108 | }, 1000); |
109 | 109 | ||
110 | var mumbai = new Date("Nov 11, 2017 00:00:00").getTime(); | 110 | var mumbai = new Date("Nov 11, 2017 00:00:00").getTime(); |
111 | // Update the count down every 1 second | 111 | // Update the count down every 1 second |
112 | var x = setInterval(function() { | 112 | var x = setInterval(function() { |
113 | // Get todays date and time | 113 | // Get todays date and time |
114 | var now = new Date().getTime(); | 114 | var now = new Date().getTime(); |
115 | // Find the distance between now an the count down date | 115 | // Find the distance between now an the count down date |
116 | var distance = mumbai - now; | 116 | var distance = mumbai - now; |
117 | // Time calculations for days, hours, minutes and seconds | 117 | // Time calculations for days, hours, minutes and seconds |
118 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 118 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
119 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 119 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
120 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 120 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
121 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 121 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
122 | $scope.timer = days + "d " + hours + "h " | 122 | $scope.timer = days + "d " + hours + "h " |
123 | + minutes + "m " + seconds + "s " | 123 | + minutes + "m " + seconds + "s " |
124 | // Output the result in an element with id="demo" | 124 | // Output the result in an element with id="demo" |
125 | document.getElementById("mumbai").innerHTML = days + "d " + hours + "h " | 125 | document.getElementById("mumbai").innerHTML = days + "d " + hours + "h " |
126 | + minutes + "m " + seconds + "s "; | 126 | + minutes + "m " + seconds + "s "; |
127 | // If the count down is over, write some text | 127 | // If the count down is over, write some text |
128 | if (distance < 0) { | 128 | if (distance < 0) { |
129 | clearInterval(x); | 129 | clearInterval(x); |
130 | document.getElementById("mumbai").innerHTML = "EXPIRED"; | 130 | document.getElementById("mumbai").innerHTML = "EXPIRED"; |
131 | } | 131 | } |
132 | }, 1000); | 132 | }, 1000); |
133 | 133 | ||
134 | var ahmedabad = new Date("Nov 13, 2017 00:00:00").getTime(); | 134 | var ahmedabad = new Date("Nov 13, 2017 00:00:00").getTime(); |
135 | // Update the count down every 1 second | 135 | // Update the count down every 1 second |
136 | var x = setInterval(function() { | 136 | var x = setInterval(function() { |
137 | // Get todays date and time | 137 | // Get todays date and time |
138 | var now = new Date().getTime(); | 138 | var now = new Date().getTime(); |
139 | // Find the distance between now an the count down date | 139 | // Find the distance between now an the count down date |
140 | var distance = ahmedabad - now; | 140 | var distance = ahmedabad - now; |
141 | // Time calculations for days, hours, minutes and seconds | 141 | // Time calculations for days, hours, minutes and seconds |
142 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 142 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
143 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 143 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
144 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 144 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
145 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 145 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
146 | $scope.timer = days + "d " + hours + "h " | 146 | $scope.timer = days + "d " + hours + "h " |
147 | + minutes + "m " + seconds + "s " | 147 | + minutes + "m " + seconds + "s " |
148 | // Output the result in an element with id="demo" | 148 | // Output the result in an element with id="demo" |
149 | document.getElementById("ahmedabad").innerHTML = days + "d " + hours + "h " | 149 | document.getElementById("ahmedabad").innerHTML = days + "d " + hours + "h " |
150 | + minutes + "m " + seconds + "s "; | 150 | + minutes + "m " + seconds + "s "; |
151 | // If the count down is over, write some text | 151 | // If the count down is over, write some text |
152 | if (distance < 0) { | 152 | if (distance < 0) { |
153 | clearInterval(x); | 153 | clearInterval(x); |
154 | document.getElementById("ahmedabad").innerHTML = "EXPIRED"; | 154 | document.getElementById("ahmedabad").innerHTML = "EXPIRED"; |
155 | } | 155 | } |
156 | }, 1000); | 156 | }, 1000); |
157 | 157 | ||
158 | var jaipur = new Date("Nov 15, 2017 00:00:00").getTime(); | 158 | var jaipur = new Date("Nov 15, 2017 00:00:00").getTime(); |
159 | // Update the count down every 1 second | 159 | // Update the count down every 1 second |
160 | var x = setInterval(function() { | 160 | var x = setInterval(function() { |
161 | // Get todays date and time | 161 | // Get todays date and time |
162 | var now = new Date().getTime(); | 162 | var now = new Date().getTime(); |
163 | // Find the distance between now an the count down date | 163 | // Find the distance between now an the count down date |
164 | var distance = jaipur - now; | 164 | var distance = jaipur - now; |
165 | // Time calculations for days, hours, minutes and seconds | 165 | // Time calculations for days, hours, minutes and seconds |
166 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 166 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
167 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 167 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
168 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 168 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
169 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 169 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
170 | $scope.timer = days + "d " + hours + "h " | 170 | $scope.timer = days + "d " + hours + "h " |
171 | + minutes + "m " + seconds + "s " | 171 | + minutes + "m " + seconds + "s " |
172 | // Output the result in an element with id="demo" | 172 | // Output the result in an element with id="demo" |
173 | document.getElementById("jaipur").innerHTML = days + "d " + hours + "h " | 173 | document.getElementById("jaipur").innerHTML = days + "d " + hours + "h " |
174 | + minutes + "m " + seconds + "s "; | 174 | + minutes + "m " + seconds + "s "; |
175 | // If the count down is over, write some text | 175 | // If the count down is over, write some text |
176 | if (distance < 0) { | 176 | if (distance < 0) { |
177 | clearInterval(x); | 177 | clearInterval(x); |
178 | document.getElementById("jaipur").innerHTML = "EXPIRED"; | 178 | document.getElementById("jaipur").innerHTML = "EXPIRED"; |
179 | } | 179 | } |
180 | }, 1000); | 180 | }, 1000); |
181 | 181 | ||
182 | var bangalore = new Date("Nov 21, 2017 00:00:00").getTime(); | 182 | var bangalore = new Date("Nov 21, 2017 00:00:00").getTime(); |
183 | // Update the count down every 1 second | 183 | // Update the count down every 1 second |
184 | var x = setInterval(function() { | 184 | var x = setInterval(function() { |
185 | // Get todays date and time | 185 | // Get todays date and time |
186 | var now = new Date().getTime(); | 186 | var now = new Date().getTime(); |
187 | // Find the distance between now an the count down date | 187 | // Find the distance between now an the count down date |
188 | var distance = bangalore - now; | 188 | var distance = bangalore - now; |
189 | // Time calculations for days, hours, minutes and seconds | 189 | // Time calculations for days, hours, minutes and seconds |
190 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 190 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
191 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 191 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
192 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 192 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
193 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 193 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
194 | $scope.timer = days + "d " + hours + "h " | 194 | $scope.timer = days + "d " + hours + "h " |
195 | + minutes + "m " + seconds + "s " | 195 | + minutes + "m " + seconds + "s " |
196 | // Output the result in an element with id="demo" | 196 | // Output the result in an element with id="demo" |
197 | document.getElementById("bangalore").innerHTML = days + "d " + hours + "h " | 197 | document.getElementById("bangalore").innerHTML = days + "d " + hours + "h " |
198 | + minutes + "m " + seconds + "s "; | 198 | + minutes + "m " + seconds + "s "; |
199 | // If the count down is over, write some text | 199 | // If the count down is over, write some text |
200 | if (distance < 0) { | 200 | if (distance < 0) { |
201 | clearInterval(x); | 201 | clearInterval(x); |
202 | document.getElementById("bangalore").innerHTML = "EXPIRED"; | 202 | document.getElementById("bangalore").innerHTML = "EXPIRED"; |
203 | } | 203 | } |
204 | }, 1000); | 204 | }, 1000); |
205 | 205 | ||
206 | var hyderabad = new Date("Nov 19, 2017 00:00:00").getTime(); | 206 | var hyderabad = new Date("Nov 19, 2017 00:00:00").getTime(); |
207 | // Update the count down every 1 second | 207 | // Update the count down every 1 second |
208 | var x = setInterval(function() { | 208 | var x = setInterval(function() { |
209 | // Get todays date and time | 209 | // Get todays date and time |
210 | var now = new Date().getTime(); | 210 | var now = new Date().getTime(); |
211 | // Find the distance between now an the count down date | 211 | // Find the distance between now an the count down date |
212 | var distance = hyderabad - now; | 212 | var distance = hyderabad - now; |
213 | // Time calculations for days, hours, minutes and seconds | 213 | // Time calculations for days, hours, minutes and seconds |
214 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 214 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
215 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 215 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
216 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 216 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
217 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 217 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
218 | $scope.timer = days + "d " + hours + "h " | 218 | $scope.timer = days + "d " + hours + "h " |
219 | + minutes + "m " + seconds + "s " | 219 | + minutes + "m " + seconds + "s " |
220 | // Output the result in an element with id="demo" | 220 | // Output the result in an element with id="demo" |
221 | document.getElementById("hyderabad").innerHTML = days + "d " + hours + "h " | 221 | document.getElementById("hyderabad").innerHTML = days + "d " + hours + "h " |
222 | + minutes + "m " + seconds + "s "; | 222 | + minutes + "m " + seconds + "s "; |
223 | // If the count down is over, write some text | 223 | // If the count down is over, write some text |
224 | if (distance < 0) { | 224 | if (distance < 0) { |
225 | clearInterval(x); | 225 | clearInterval(x); |
226 | document.getElementById("hyderabad").innerHTML = "EXPIRED"; | 226 | document.getElementById("hyderabad").innerHTML = "EXPIRED"; |
227 | } | 227 | } |
228 | }, 1000); | 228 | }, 1000); |
229 | 229 | ||
230 | var delhi = new Date("Nov 26, 2017 00:00:00").getTime(); | 230 | var delhi = new Date("Nov 26, 2017 00:00:00").getTime(); |
231 | // Update the count down every 1 second | 231 | // Update the count down every 1 second |
232 | var x = setInterval(function() { | 232 | var x = setInterval(function() { |
233 | // Get todays date and time | 233 | // Get todays date and time |
234 | var now = new Date().getTime(); | 234 | var now = new Date().getTime(); |
235 | // Find the distance between now an the count down date | 235 | // Find the distance between now an the count down date |
236 | var distance = delhi - now; | 236 | var distance = delhi - now; |
237 | // Time calculations for days, hours, minutes and seconds | 237 | // Time calculations for days, hours, minutes and seconds |
238 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 238 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
239 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 239 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
240 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 240 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
241 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 241 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
242 | $scope.timer = days + "d " + hours + "h " | 242 | $scope.timer = days + "d " + hours + "h " |
243 | + minutes + "m " + seconds + "s " | 243 | + minutes + "m " + seconds + "s " |
244 | // Output the result in an element with id="demo" | 244 | // Output the result in an element with id="demo" |
245 | document.getElementById("delhi").innerHTML = days + "d " + hours + "h " | 245 | document.getElementById("delhi").innerHTML = days + "d " + hours + "h " |
246 | + minutes + "m " + seconds + "s "; | 246 | + minutes + "m " + seconds + "s "; |
247 | // If the count down is over, write some text | 247 | // If the count down is over, write some text |
248 | if (distance < 0) { | 248 | if (distance < 0) { |
249 | clearInterval(x); | 249 | clearInterval(x); |
250 | document.getElementById("delhi").innerHTML = "EXPIRED"; | 250 | document.getElementById("delhi").innerHTML = "EXPIRED"; |
251 | } | 251 | } |
252 | }, 1000); | 252 | }, 1000); |
253 | 253 | ||
254 | var chandigarh = new Date("Nov 30, 2017 00:00:00").getTime(); | 254 | var chandigarh = new Date("Nov 30, 2017 00:00:00").getTime(); |
255 | // Update the count down every 1 second | 255 | // Update the count down every 1 second |
256 | var x = setInterval(function() { | 256 | var x = setInterval(function() { |
257 | // Get todays date and time | 257 | // Get todays date and time |
258 | var now = new Date().getTime(); | 258 | var now = new Date().getTime(); |
259 | // Find the distance between now an the count down date | 259 | // Find the distance between now an the count down date |
260 | var distance = chandigarh - now; | 260 | var distance = chandigarh - now; |
261 | // Time calculations for days, hours, minutes and seconds | 261 | // Time calculations for days, hours, minutes and seconds |
262 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); | 262 | var days = Math.floor(distance / (1000 * 60 * 60 * 24)); |
263 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | 263 | var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
264 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | 264 | var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); |
265 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); | 265 | var seconds = Math.floor((distance % (1000 * 60)) / 1000); |
266 | $scope.timer = days + "d " + hours + "h " | 266 | $scope.timer = days + "d " + hours + "h " |
267 | + minutes + "m " + seconds + "s " | 267 | + minutes + "m " + seconds + "s " |
268 | // Output the result in an element with id="demo" | 268 | // Output the result in an element with id="demo" |
269 | document.getElementById("chandigarh").innerHTML = days + "d " + hours + "h " | 269 | document.getElementById("chandigarh").innerHTML = days + "d " + hours + "h " |
270 | + minutes + "m " + seconds + "s "; | 270 | + minutes + "m " + seconds + "s "; |
271 | // If the count down is over, write some text | 271 | // If the count down is over, write some text |
272 | if (distance < 0) { | 272 | if (distance < 0) { |
273 | clearInterval(x); | 273 | clearInterval(x); |
274 | document.getElementById("chandigarh").innerHTML = "EXPIRED"; | 274 | document.getElementById("chandigarh").innerHTML = "EXPIRED"; |
275 | } | 275 | } |
276 | }, 1000); | 276 | }, 1000); |
277 | 277 | ||
278 | $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ | 278 | $scope.infoForm = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ |
279 | $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ | 279 | $scope.space = false; /*THIS CODE FOR HIDE STEP 2 FORM*/ |
280 | // $scope.Textshow = "yes" | 280 | // $scope.Textshow = "yes" |
281 | $scope.max = 100; | 281 | $scope.max = 100; |
282 | $scope.formPage = false; | 282 | $scope.formPage = false; |
283 | $scope.current = 0; | 283 | $scope.current = 0; |
284 | $scope.payingAmnt = 0; | 284 | $scope.payingAmnt = 0; |
285 | if ($scope.data.stage == 'select') { | 285 | if ($scope.data.stage == 'select') { |
286 | 286 | ||
287 | } | 287 | } |
288 | 288 | ||
289 | //$scope.author = 'Swarn Singh'; | 289 | //$scope.author = 'Swarn Singh'; |
290 | $scope.data = {}; | 290 | $scope.data = {}; |
291 | $scope.data.stage = 'Idea'; | 291 | $scope.data.stage = 'Idea'; |
292 | $scope.discountAmount = 0; | 292 | $scope.discountAmount = 0; |
293 | $scope.check = false; | 293 | $scope.check = false; |
294 | $scope.numberCheck = false; | 294 | $scope.numberCheck = false; |
295 | $scope.paymentResult = {}; | 295 | $scope.paymentResult = {}; |
296 | var data = { | 296 | var data = { |
297 | "amount": $scope.payingAmnt, | 297 | "amount": $scope.payingAmnt, |
298 | "currency": "INR", | 298 | "currency": "INR", |
299 | "status": "pending" | 299 | "status": "pending" |
300 | } | 300 | } |
301 | 301 | ||
302 | /*open videos in modal*/ | 302 | /*open videos in modal*/ |
303 | // $scope.openyoutube16 = function(){ | 303 | // $scope.openyoutube16 = function(){ |
304 | // $('#videoModel').modal('show'); | 304 | // $('#videoModel').modal('show'); |
305 | // } | 305 | // } |
306 | 306 | ||
307 | // $scope.openyoutube17 = function(){ | 307 | // $scope.openyoutube17 = function(){ |
308 | // $('#videoModels').modal('show'); | 308 | // $('#videoModels').modal('show'); |
309 | // } | 309 | // } |
310 | 310 | ||
311 | // $scope.closeModal = function(){ | 311 | // $scope.closeModal = function(){ |
312 | // var url = $('#youtubePlayer').attr('src'); | 312 | // var url = $('#youtubePlayer').attr('src'); |
313 | // $('#youtubePlayer').attr('src', ''); | 313 | // $('#youtubePlayer').attr('src', ''); |
314 | // $('#youtubePlayer').attr('src', url); | 314 | // $('#youtubePlayer').attr('src', url); |
315 | // } | 315 | // } |
316 | 316 | ||
317 | 317 | ||
318 | // $scope.closed = function(){ | 318 | // $scope.closed = function(){ |
319 | // var url = $('#youtubePlayersss').attr('src'); | 319 | // var url = $('#youtubePlayersss').attr('src'); |
320 | // $('#youtubePlayersss').attr('src', ''); | 320 | // $('#youtubePlayersss').attr('src', ''); |
321 | // $('#youtubePlayersss').attr('src', url); | 321 | // $('#youtubePlayersss').attr('src', url); |
322 | // } | 322 | // } |
323 | /*open videos ends here*/ | 323 | /*open videos ends here*/ |
324 | $scope.apply = function() { | 324 | $scope.apply = function() { |
325 | Analytics.trackEvent('register', 'click', 'django.mp4'); | 325 | Analytics.trackEvent('register', 'click', 'django.mp4'); |
326 | $location.path("/registration") | 326 | $location.path("/registration") |
327 | } | 327 | } |
328 | $scope.data.citymeetup = ''; | 328 | $scope.data.citymeetup = ''; |
329 | $scope.register = function(value){ | 329 | $scope.register = function(value){ |
330 | $scope.data.citymeetup = value; | 330 | $scope.data.citymeetup = value; |
331 | $('.hiddenForm').slideDown(); | 331 | $('.hiddenForm').slideDown(); |
332 | $('html, body').animate({ | 332 | $('html, body').animate({ |
333 | scrollTop: $('.hiddenForm').offset().top | 333 | scrollTop: $('.hiddenForm').offset().top |
334 | }, 1000); | 334 | }, 1000); |
335 | console.log('gdggsg', value); | 335 | console.log('gdggsg', value); |
336 | } | 336 | } |
337 | 337 | ||
338 | $scope.removeError = function() { | 338 | $scope.removeError = function() { |
339 | $('#invalidEmail').css('display', 'none'); | 339 | $('#invalidEmail').css('display', 'none'); |
340 | $('#alreadyExist').css('display', 'none'); | 340 | $('#alreadyExist').css('display', 'none'); |
341 | }; | 341 | }; |
342 | 342 | ||
343 | $scope.emailcheck = function(val) { | 343 | $scope.emailcheck = function(val) { |
344 | console.log(val) | 344 | console.log(val) |
345 | $scope.space = /\s/g.test(val); | 345 | $scope.space = /\s/g.test(val); |
346 | console.log("space",$scope.space) | 346 | console.log("space",$scope.space) |
347 | if (val == undefined) { | 347 | if (val == undefined) { |
348 | $('#invalidEmail').css('display', 'block'); | 348 | $('#invalidEmail').css('display', 'block'); |
349 | } else { | 349 | } else { |
350 | $http({ | 350 | $http({ |
351 | method: 'GET', | 351 | method: 'GET', |
352 | url: BASE_URL + '/applicants?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}', | 352 | url: BASE_URL + '/applicants?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}', |
353 | headers: {} | 353 | headers: {} |
354 | }).then(function mySuccess(searchResult) { | 354 | }).then(function mySuccess(searchResult) { |
355 | console.log("searchResult1===>", searchResult) | 355 | console.log("searchResult1===>", searchResult) |
356 | if (searchResult.data.length == 0) { | 356 | if (searchResult.data.length == 0) { |
357 | $scope.check = false; | 357 | $scope.check = false; |
358 | } else { | 358 | } else { |
359 | $scope.check = true; | 359 | $scope.check = true; |
360 | $('#alreadyExist').css('display', 'block'); | 360 | $('#alreadyExist').css('display', 'block'); |
361 | } | 361 | } |
362 | }, function myError(error) {}); | 362 | }, function myError(error) {}); |
363 | } | 363 | } |
364 | }; | 364 | }; |
365 | 365 | ||
366 | $scope.removeNoError = function() { | 366 | $scope.removeNoError = function() { |
367 | $('#noExist').css('display', 'none'); | 367 | $('#noExist').css('display', 'none'); |
368 | }; | 368 | }; |
369 | 369 | ||
370 | $scope.numbercheck = function(number) { | 370 | $scope.numbercheck = function(number) { |
371 | $http({ | 371 | $http({ |
372 | method: 'GET', | 372 | method: 'GET', |
373 | url: BASE_URL + '/applicants?filter={"where": {"phone": {"like":"%25' + number + '%25"}}}', | 373 | url: BASE_URL + '/applicants?filter={"where": {"phone": {"like":"%25' + number + '%25"}}}', |
374 | data: $scope.data, | 374 | data: $scope.data, |
375 | headers: {} | 375 | headers: {} |
376 | }).then(function mySuccess(searchResult) { | 376 | }).then(function mySuccess(searchResult) { |
377 | console.log("searchResult===>", searchResult) | 377 | console.log("searchResult===>", searchResult) |
378 | if (searchResult.data.length == 0) { | 378 | if (searchResult.data.length == 0) { |
379 | $scope.numberCheck = false; | 379 | $scope.numberCheck = false; |
380 | 380 | ||
381 | } else { | 381 | } else { |
382 | $scope.numberCheck = true; | 382 | $scope.numberCheck = true; |
383 | $('#noExist').css('display', 'block'); | 383 | $('#noExist').css('display', 'block'); |
384 | } | 384 | } |
385 | }, function myError(error) {}); | 385 | }, function myError(error) {}); |
386 | }; | 386 | }; |
387 | 387 | ||
388 | $rootScope.tokenCall = function(val) { | 388 | $rootScope.tokenCall = function(val) { |
389 | console.log('val-------->', val); | 389 | console.log('val-------->', val); |
390 | if (val == undefined) { | 390 | if (val == undefined) { |
391 | $('#invalidEmail').css('display', 'block'); | 391 | $('#invalidEmail').css('display', 'block'); |
392 | } else { | 392 | } else { |
393 | val = val.toUpperCase(); | 393 | val = val.toUpperCase(); |
394 | $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": {"like":"%25' + val + '%25"}}}') | 394 | $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": {"like":"%25' + val + '%25"}}}') |
395 | .then(function(searchResult) { | 395 | .then(function(searchResult) { |
396 | console.log("searchResult",searchResult) | 396 | console.log("searchResult",searchResult) |
397 | if (searchResult.data.length == 0) { | 397 | if (searchResult.data.length == 0) { |
398 | $scope.tokencheck = false; | 398 | $scope.tokencheck = false; |
399 | $scope.discountAmount = 0; | 399 | $scope.discountAmount = 0; |
400 | } else { | 400 | } else { |
401 | $scope.discountpercentage = searchResult.data[0].discount; | 401 | $scope.discountpercentage = searchResult.data[0].discount; |
402 | $scope.tokencheck = true; | 402 | $scope.tokencheck = true; |
403 | } | 403 | } |
404 | },function(err){ | 404 | },function(err){ |
405 | console.log(err) | 405 | console.log(err) |
406 | }); | 406 | }); |
407 | 407 | ||
408 | } | 408 | } |
409 | }; | 409 | }; |
410 | 410 | ||
411 | 411 | ||
412 | 412 | ||
413 | 413 | ||
414 | /*THIS CODE FOR ENABLED SUBMIT BUTTON AFTER UPLOAD IMAGE*/ | 414 | /*THIS CODE FOR ENABLED SUBMIT BUTTON AFTER UPLOAD IMAGE*/ |
415 | $(document).ready( | 415 | $(document).ready( |
416 | function() { | 416 | function() { |
417 | $('input:submit').attr('disabled', true); | 417 | $('input:submit').attr('disabled', true); |
418 | $('input:file').change( | 418 | $('input:file').change( |
419 | function() { | 419 | function() { |
420 | if ($("#picture").val()) { | 420 | if ($("#picture").val()) { |
421 | $('input:submit').removeAttr('disabled'); | 421 | $('input:submit').removeAttr('disabled'); |
422 | } else { | 422 | } else { |
423 | $('input:submit').attr('disabled', true); | 423 | $('input:submit').attr('disabled', true); |
424 | } | 424 | } |
425 | }); | 425 | }); |
426 | }); | 426 | }); |
427 | 427 | ||
428 | /*****THIS IS FOR STEP ONE FORM ******/ | 428 | /*****THIS IS FOR STEP ONE FORM ******/ |
429 | // $scope.next = function() { | 429 | // $scope.next = function() { |
430 | // $scope.data.status = null | 430 | // $scope.data.status = null |
431 | // if ($scope.data.stage == undefined || $scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined || $scope.data.city == undefined) { | 431 | // if ($scope.data.stage == undefined || $scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined || $scope.data.city == undefined) { |
432 | // var x = document.getElementById("snackbar") | 432 | // var x = document.getElementById("snackbar") |
433 | // x.className = "show"; | 433 | // x.className = "show"; |
434 | // setTimeout(function() { | 434 | // setTimeout(function() { |
435 | // x.className = x.className.replace("show", ""); | 435 | // x.className = x.className.replace("show", ""); |
436 | // }, 3000); | 436 | // }, 3000); |
437 | // } else if ($scope.data.stage != undefined && $scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined && $scope.data.city != undefined) { | 437 | // } else if ($scope.data.stage != undefined && $scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined && $scope.data.city != undefined) { |
438 | // $scope.infoForm = true; | 438 | // $scope.infoForm = true; |
439 | // console.log("sdasdasdsa"); | 439 | // console.log("sdasdasdsa"); |
440 | // $scope.data.stage = $scope.data.stage; | 440 | // $scope.data.stage = $scope.data.stage; |
441 | // $scope.detail = {}; | 441 | // $scope.detail = {}; |
442 | // $scope.data.phone = "+91" + $scope.data.number; | 442 | // $scope.data.phone = "+91" + $scope.data.number; |
443 | // $http({ | 443 | // $http({ |
444 | // method: 'POST', | 444 | // method: 'POST', |
445 | // url: BASE_URL + '/information', | 445 | // url: BASE_URL + '/information', |
446 | // data: $scope.data, | 446 | // data: $scope.data, |
447 | // headers: {} | 447 | // headers: {} |
448 | // }).then(function mySuccess(result) { | 448 | // }).then(function mySuccess(result) { |
449 | // Analytics.trackEvent('information', 'click', 'django.mp4'); | 449 | // Analytics.trackEvent('information', 'click', 'django.mp4'); |
450 | // console.log("result", result) | 450 | // console.log("result", result) |
451 | // $scope.detail = result; | 451 | // $scope.detail = result; |
452 | // data.applicantId = result.data.id; | 452 | // data.applicantId = result.data.id; |
453 | // $scope.userId = result.data.id; | 453 | // $scope.userId = result.data.id; |
454 | 454 | ||
455 | // }, function myError(error) {}); | 455 | // }, function myError(error) {}); |
456 | 456 | ||
457 | // } | 457 | // } |
458 | 458 | ||
459 | // } | 459 | // } |
460 | 460 | ||
461 | $scope.calculateAmount = function(){ | 461 | $scope.calculateAmount = function(){ |
462 | if ($scope.data.stage == undefined || $scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { | 462 | if ($scope.data.stage == undefined || $scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { |
463 | var x = document.getElementById("snackbar") | 463 | var x = document.getElementById("snackbar") |
464 | x.className = "show"; | 464 | x.className = "show"; |
465 | setTimeout(function() { | 465 | setTimeout(function() { |
466 | x.className = x.className.replace("show", ""); | 466 | x.className = x.className.replace("show", ""); |
467 | }, 3000); | 467 | }, 3000); |
468 | } else if ($scope.data.stage != undefined && $scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { | 468 | } else if ($scope.data.stage != undefined && $scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { |
469 | $scope.infoForm = true; | 469 | $scope.infoForm = true; |
470 | console.log("sdasdasdsa"); | 470 | console.log("sdasdasdsa"); |
471 | $scope.data.stage = $scope.data.stage; | 471 | $scope.data.stage = $scope.data.stage; |
472 | $scope.detail = {}; | 472 | $scope.detail = {}; |
473 | $scope.data.phone = "+91" + $scope.data.number; | 473 | $scope.data.phone = "+91" + $scope.data.number; |
474 | $http({ | 474 | $http({ |
475 | method: 'POST', | 475 | method: 'POST', |
476 | url: BASE_URL + '/applicants', | 476 | url: BASE_URL + '/applicants', |
477 | data: $scope.data, | 477 | data: $scope.data, |
478 | headers: {} | 478 | headers: {} |
479 | }).then(function mySuccess(result) { | 479 | }).then(function mySuccess(result) { |
480 | Analytics.trackEvent('applicants', 'click', 'django.mp4'); | 480 | Analytics.trackEvent('applicants', 'click', 'django.mp4'); |
481 | console.log("result", result) | 481 | console.log("result", result) |
482 | $scope.detail = result; | 482 | $scope.detail = result; |
483 | data.applicantId = result.data.id; | 483 | data.applicantId = result.data.id; |
484 | //$scope.userId = result.data.id; | 484 | //$scope.userId = result.data.id; |
485 | 485 | ||
486 | if ($scope.data.stage == "Idea") { | 486 | if ($scope.data.stage == "Idea") { |
487 | console.log("$scope.data", $scope.data) | 487 | console.log("$scope.data", $scope.data) |
488 | $scope.ticketAmnt = 500; | 488 | $scope.ticketAmnt = 500; |
489 | } | 489 | } |
490 | 490 | ||
491 | if ($scope.data.stage == "Product") { | 491 | if ($scope.data.stage == "Product") { |
492 | $scope.ticketAmnt = 1000; | 492 | $scope.ticketAmnt = 1000; |
493 | } | 493 | } |
494 | 494 | ||
495 | if ($scope.data.stage == "Growth") { | 495 | if ($scope.data.stage == "Growth") { |
496 | $scope.ticketAmnt = 1000; | 496 | $scope.ticketAmnt = 1000; |
497 | } | 497 | } |
498 | 498 | ||
499 | // if ($scope.data.stage == "Visitor") { | 499 | // if ($scope.data.stage == "Visitor") { |
500 | // $scope.ticketAmnt = 500; | 500 | // $scope.ticketAmnt = 500; |
501 | // } | 501 | // } |
502 | var amount = $scope.ticketAmnt * 100 | 502 | var amount = $scope.ticketAmnt * 100 |
503 | if($scope.tokencheck == true){ | 503 | if($scope.tokencheck == true){ |
504 | var amount = $scope.ticketAmnt | 504 | var amount = $scope.ticketAmnt |
505 | $scope.discountAmount = (amount * $scope.discountpercentage)/100 | 505 | $scope.discountAmount = (amount * $scope.discountpercentage)/100 |
506 | console.log("finalAmount====>",$scope.discountAmount) | 506 | console.log("finalAmount====>",$scope.discountAmount) |
507 | } | 507 | } |
508 | 508 | ||
509 | var taxAmount = $scope.ticketAmnt - $scope.discountAmount | 509 | var taxAmount = $scope.ticketAmnt - $scope.discountAmount |
510 | $scope.taxTotal = (taxAmount * 18)/100 | 510 | $scope.taxTotal = (taxAmount * 18)/100 |
511 | $scope.payingAmnt = taxAmount + $scope.taxTotal | 511 | $scope.payingAmnt = taxAmount + $scope.taxTotal |
512 | console.log("taxincludedamount----", $scope.payingAmnt) | 512 | console.log("taxincludedamount----", $scope.payingAmnt) |
513 | console.log("$scope.taxTotal----", $scope.taxTotal) | 513 | console.log("$scope.taxTotal----", $scope.taxTotal) |
514 | // } | 514 | // } |
515 | 515 | ||
516 | /*****THIS IS FOR STEP THREE FORM ******/ | 516 | /*****THIS IS FOR STEP THREE FORM ******/ |
517 | // $scope.create = function() { | 517 | // $scope.create = function() { |
518 | // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { | 518 | // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { |
519 | // var x = document.getElementById("snackbar") | 519 | // var x = document.getElementById("snackbar") |
520 | // x.className = "show"; | 520 | // x.className = "show"; |
521 | // setTimeout(function() { | 521 | // setTimeout(function() { |
522 | // x.className = x.className.replace("show", ""); | 522 | // x.className = x.className.replace("show", ""); |
523 | // }, 3000); | 523 | // }, 3000); |
524 | // } else if ($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { | 524 | // } else if ($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { |
525 | // $scope.infoForm = true; | 525 | // $scope.infoForm = true; |
526 | // console.log("sdasdasdsa"); | 526 | // console.log("sdasdasdsa"); |
527 | // $scope.data.stage = $scope.data.stage; | 527 | // $scope.data.stage = $scope.data.stage; |
528 | // $scope.detail = {}; | 528 | // $scope.detail = {}; |
529 | // $scope.data.phone = "+91" + $scope.data.number; | 529 | // $scope.data.phone = "+91" + $scope.data.number; |
530 | // $http({ | 530 | // $http({ |
531 | // method: 'POST', | 531 | // method: 'POST', |
532 | // url: BASE_URL + '/applicants', | 532 | // url: BASE_URL + '/applicants', |
533 | // data: $scope.data, | 533 | // data: $scope.data, |
534 | // headers: {} | 534 | // headers: {} |
535 | // }).then(function mySuccess(result) { | 535 | // }).then(function mySuccess(result) { |
536 | 536 | ||
537 | // console.log("=====result=====", result) | 537 | // console.log("=====result=====", result) |
538 | // $scope.detail = result; | 538 | // $scope.detail = result; |
539 | // data.applicantId = result.data.id; | 539 | // data.applicantId = result.data.id; |
540 | // $scope.userId = result.data.id; | 540 | // $scope.userId = result.data.id; |
541 | // console.log("=====data=====", data) | 541 | // console.log("=====data=====", data) |
542 | // data.amount = $scope.payingAmnt + $scope.taxTotal; | 542 | // data.amount = $scope.payingAmnt + $scope.taxTotal; |
543 | data.amount = $scope.payingAmnt; | 543 | data.amount = $scope.payingAmnt; |
544 | console.log("$scope.taxTotal",data.amount) | 544 | console.log("$scope.taxTotal",data.amount) |
545 | if ($scope.detail != null) { | 545 | if ($scope.detail != null) { |
546 | $http({ | 546 | $http({ |
547 | method: 'POST', | 547 | method: 'POST', |
548 | url: BASE_URL + '/payments', | 548 | url: BASE_URL + '/payments', |
549 | data: data, | 549 | data: data, |
550 | headers: {} | 550 | headers: {} |
551 | }).then(function mySuccess(paymentResult) { | 551 | }).then(function mySuccess(paymentResult) { |
552 | Analytics.trackEvent('payments', 'click', 'django.mp4'); | 552 | Analytics.trackEvent('payments', 'click', 'django.mp4'); |
553 | console.log("paymentResult",paymentResult) | 553 | console.log("paymentResult",paymentResult) |
554 | $scope.paymentResult = paymentResult; | 554 | $scope.paymentResult = paymentResult; |
555 | }, function myError(error) {}); | 555 | }, function myError(error) {}); |
556 | } | 556 | } |
557 | var i = 0; | 557 | var i = 0; |
558 | //$scope.payingAmnt = ($scope.payingAmnt + $scope.taxTotal) * 100; | 558 | //$scope.payingAmnt = ($scope.payingAmnt + $scope.taxTotal) * 100; |
559 | 559 | ||
560 | $scope.payingAmnt = $scope.payingAmnt * 100; | 560 | $scope.payingAmnt = $scope.payingAmnt * 100; |
561 | var options = { | 561 | var options = { |
562 | "key": "rzp_live_mhSE1uOBlXvFyJ", | 562 | "key": "rzp_live_mhSE1uOBlXvFyJ", |
563 | "amount": $scope.payingAmnt , | 563 | "amount": $scope.payingAmnt , |
564 | 564 | ||
565 | "name": "Startup Jalsa", | 565 | "name": "Startup Jalsa", |
566 | "description": "amount", | 566 | "description": "amount", |
567 | "currency": "INR", | 567 | "currency": "INR", |
568 | "status": "done", | 568 | "status": "done", |
569 | 569 | ||
570 | "theme": { | 570 | "theme": { |
571 | "color": "#2196f3 ", | 571 | "color": "#2196f3 ", |
572 | "image_padding": "NO" | 572 | "image_padding": "NO" |
573 | }, | 573 | }, |
574 | "modal": { | 574 | "modal": { |
575 | "ondismiss": function() {} | 575 | "ondismiss": function() {} |
576 | }, | 576 | }, |
577 | "handler": function(response) { | 577 | "handler": function(response) { |
578 | createPayment(response); | 578 | createPayment(response); |
579 | } | 579 | } |
580 | }; | 580 | }; |
581 | var rzp1 = new Razorpay(options); | 581 | var rzp1 = new Razorpay(options); |
582 | rzp1.open(); | 582 | rzp1.open(); |
583 | $scope.paymentResponse = {}; | 583 | $scope.paymentResponse = {}; |
584 | 584 | ||
585 | function createPayment(response) { | 585 | function createPayment(response) { |
586 | console.log("response====from===razorpay",response) | 586 | console.log("response====from===razorpay",response) |
587 | $route.reload(); | 587 | $route.reload(); |
588 | $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; | 588 | $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; |
589 | $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; | 589 | $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; |
590 | $scope.paymentResponse.amount = data.amount; | 590 | $scope.paymentResponse.amount = data.amount; |
591 | $scope.paymentResponse.currency = "INR"; | 591 | $scope.paymentResponse.currency = "INR"; |
592 | $scope.paymentResponse.status = $scope.paymentResult.data.status; | 592 | $scope.paymentResponse.status = $scope.paymentResult.data.status; |
593 | $http({ | 593 | $http({ |
594 | method: 'PUT', | 594 | method: 'PUT', |
595 | url: BASE_URL + '/payments/' + $scope.paymentResult.data.id, | 595 | url: BASE_URL + '/payments/' + $scope.paymentResult.data.id, |
596 | data: $scope.paymentResponse, | 596 | data: $scope.paymentResponse, |
597 | headers: {} | 597 | headers: {} |
598 | }).then(function mySuccess(searchResult) { | 598 | }).then(function mySuccess(searchResult) { |
599 | // if(paymentResult.data.status == "created"){ | 599 | // if(paymentResult.data.status == "created"){ |
600 | Analytics.trackEvent('payments', 'click', 'Thankyou'); | 600 | Analytics.trackEvent('payments', 'click', 'Thankyou'); |
601 | console.log("trackEvent", trackEvent) | 601 | console.log("trackEvent", trackEvent) |
602 | // } | 602 | // } |
603 | console.log("searchResult", searchResult) | 603 | console.log("searchResult", searchResult) |
604 | $location.path("/confirmation") | 604 | $location.path("/confirmation") |
605 | //$scope.showToastr() | 605 | //$scope.showToastr() |
606 | //toaster.success("Registration done successfully"); | 606 | //toaster.success("Registration done successfully"); |
607 | 607 | ||
608 | }, function myError(error) {}); | 608 | }, function myError(error) {}); |
609 | } | 609 | } |
610 | }, function myError(error) {}); | 610 | }, function myError(error) {}); |
611 | } | 611 | } |
612 | 612 | ||
613 | } | 613 | } |
614 | 614 | ||
615 | //}, function myError(error) {}); | 615 | //}, function myError(error) {}); |
616 | //} | 616 | //} |
617 | 617 | ||
618 | //} | 618 | //} |
619 | 619 | ||
620 | // $scope.showToastr = function() { | 620 | // $scope.showToastr = function() { |
621 | // console.log("called toast") | 621 | // console.log("called toast") |
622 | // var x = document.getElementById("snacsskbar") | 622 | // var x = document.getElementById("snacsskbar") |
623 | // x.className = "show"; | 623 | // x.className = "show"; |
624 | // setTimeout(function() { | 624 | // setTimeout(function() { |
625 | // x.className = x.className.replace("show", ""); | 625 | // x.className = x.className.replace("show", ""); |
626 | // }, 3000); | 626 | // }, 3000); |
627 | // } | 627 | // } |
628 | 628 | ||
629 | /*kk***This code for change data when click to chooses stages***/ | 629 | /*kk***This code for change data when click to chooses stages***/ |
630 | $scope.proto = true; | 630 | $scope.proto = true; |
631 | $scope.businessmodel = true; | 631 | $scope.businessmodel = true; |
632 | $scope.Idea = true; | 632 | $scope.Idea = true; |
633 | $scope.current = true; | 633 | $scope.current = true; |
634 | 634 | ||
635 | $scope.stage = function(stage) { | 635 | $scope.stage = function(stage) { |
636 | $scope.stagekeyPress(); | 636 | $scope.stagekeyPress(); |
637 | console.log("stage--2",stage) | 637 | console.log("stage--2",stage) |
638 | 638 | ||
639 | if (stage == 'Idea') { | 639 | if (stage == 'Idea') { |
640 | $scope.Productshow = "no"; | 640 | $scope.Productshow = "no"; |
641 | $scope.current = 10; | 641 | $scope.current = 10; |
642 | $scope.proto = true; | 642 | $scope.proto = true; |
643 | // $scope.visitType = true; | 643 | // $scope.visitType = true; |
644 | $scope.prototyp = false; | 644 | $scope.prototyp = false; |
645 | $scope.protyp = false; | 645 | $scope.protyp = false; |
646 | $scope.market = false; | 646 | $scope.market = false; |
647 | $scope.risks = false; | 647 | $scope.risks = false; |
648 | $scope.team = false; | 648 | $scope.team = false; |
649 | $scope.pitch = false; | 649 | $scope.pitch = false; |
650 | $scope.financials = false; | 650 | $scope.financials = false; |
651 | $scope.businessmodel = true; | 651 | $scope.businessmodel = true; |
652 | $scope.data.stage = stage; | 652 | $scope.data.stage = stage; |
653 | // for right content | 653 | // for right content |
654 | $scope.Idea = true; | 654 | $scope.Idea = true; |
655 | $scope.Product = false; | 655 | $scope.Product = false; |
656 | $scope.Growth = false; | 656 | $scope.Growth = false; |
657 | // $scope.Visitor = false; | 657 | // $scope.Visitor = false; |
658 | } else if (stage == 'Product') { | 658 | } else if (stage == 'Product') { |
659 | $scope.Productshow = "no"; | 659 | $scope.Productshow = "no"; |
660 | $scope.current = 10; | 660 | $scope.current = 10; |
661 | $scope.proto = true; | 661 | $scope.proto = true; |
662 | // $scope.visitType = true; | 662 | // $scope.visitType = true; |
663 | $scope.prototyp = true; | 663 | $scope.prototyp = true; |
664 | $scope.protyp = true; | 664 | $scope.protyp = true; |
665 | $scope.market = true; | 665 | $scope.market = true; |
666 | $scope.risks = true; | 666 | $scope.risks = true; |
667 | $scope.team = true; | 667 | $scope.team = true; |
668 | $scope.pitch = true; | 668 | $scope.pitch = true; |
669 | $scope.financials = true; | 669 | $scope.financials = true; |
670 | $scope.businessmodel = false; | 670 | $scope.businessmodel = false; |
671 | $scope.data.stage = stage; | 671 | $scope.data.stage = stage; |
672 | // for right content | 672 | // for right content |
673 | $scope.Idea = false; | 673 | $scope.Idea = false; |
674 | $scope.Product = true; | 674 | $scope.Product = true; |
675 | $scope.Growth = false; | 675 | $scope.Growth = false; |
676 | // $scope.Visitor = false; | 676 | // $scope.Visitor = false; |
677 | } else if (stage == 'Growth') { | 677 | } else if (stage == 'Growth') { |
678 | $scope.Productshow = "yes"; | 678 | $scope.Productshow = "yes"; |
679 | $scope.current = 10; | 679 | $scope.current = 10; |
680 | $scope.proto = false; | 680 | $scope.proto = false; |
681 | // $scope.visitType = true; | 681 | // $scope.visitType = true; |
682 | $scope.prototyp = true; | 682 | $scope.prototyp = true; |
683 | $scope.protyp = false; | 683 | $scope.protyp = false; |
684 | $scope.market = true; | 684 | $scope.market = true; |
685 | $scope.risks = true; | 685 | $scope.risks = true; |
686 | $scope.team = true; | 686 | $scope.team = true; |
687 | $scope.pitch = true; | 687 | $scope.pitch = true; |
688 | $scope.financials = true; | 688 | $scope.financials = true; |
689 | $scope.businessmodel = false; | 689 | $scope.businessmodel = false; |
690 | // for right content | 690 | // for right content |
691 | $scope.Idea = false; | 691 | $scope.Idea = false; |
692 | $scope.Product = false; | 692 | $scope.Product = false; |
693 | $scope.Growth = true; | 693 | $scope.Growth = true; |
694 | // $scope.Visitor = false; | 694 | // $scope.Visitor = false; |
695 | // } else if (stage == 'Visitor') { | 695 | // } else if (stage == 'Visitor') { |
696 | // $scope.Productshow = "no"; | 696 | // $scope.Productshow = "no"; |
697 | // $scope.current = 10; | 697 | // $scope.current = 10; |
698 | // $scope.proto = false; | 698 | // $scope.proto = false; |
699 | // $scope.visitType = false; | 699 | // $scope.visitType = false; |
700 | // $scope.prototyp = false; | 700 | // $scope.prototyp = false; |
701 | // $scope.protyp = false; | 701 | // $scope.protyp = false; |
702 | // $scope.market = false; | 702 | // $scope.market = false; |
703 | // $scope.risks = false; | 703 | // $scope.risks = false; |
704 | // $scope.team = false; | 704 | // $scope.team = false; |
705 | // $scope.pitch = false; | 705 | // $scope.pitch = false; |
706 | // $scope.financials = false; | 706 | // $scope.financials = false; |
707 | // $scope.businessmodel = false; | 707 | // $scope.businessmodel = false; |
708 | // $scope.data.stage = stage; | 708 | // $scope.data.stage = stage; |
709 | // // for right content | 709 | // // for right content |
710 | // $scope.Idea = false; | 710 | // $scope.Idea = false; |
711 | // $scope.Product = false; | 711 | // $scope.Product = false; |
712 | // $scope.Growth = false; | 712 | // $scope.Growth = false; |
713 | // $scope.Visitor = true; | 713 | // $scope.Visitor = true; |
714 | $scope.data.stage = stage; | 714 | $scope.data.stage = stage; |
715 | } | 715 | } |
716 | 716 | ||
717 | } | 717 | } |
718 | 718 | ||
719 | $scope.emailTest = function(s){ | 719 | $scope.emailTest = function(s){ |
720 | $scope.space = /\s/g.test(s.delegateTarget.value); | 720 | $scope.space = /\s/g.test(s.delegateTarget.value); |
721 | console.log("space",$scope.space) | 721 | console.log("space",$scope.space) |
722 | 722 | ||
723 | } | 723 | } |
724 | // $scope.enterbusiness = function(business) { | 724 | // $scope.enterbusiness = function(business) { |
725 | // console.log("business", business); | 725 | // console.log("business", business); |
726 | // if (name == undefined) { | 726 | // if (name == undefined) { |
727 | // $scope.current = false; | 727 | // $scope.current = false; |
728 | 728 | ||
729 | // } else if (name != undefined) { | 729 | // } else if (name != undefined) { |
730 | // $scope.current = true; | 730 | // $scope.current = true; |
731 | // } | 731 | // } |
732 | // } | 732 | // } |
733 | /*******FOR FILL THE DATA AND SHOWS ICON GREEN*/ | 733 | /*******FOR FILL THE DATA AND SHOWS ICON GREEN*/ |
734 | $scope.stagekeyPress = function() { | 734 | $scope.stagekeyPress = function() { |
735 | $('.icon-circle-a').css('background-color', 'rgb(66, 181, 73)'); | 735 | $('.icon-circle-a').css('background-color', 'rgb(66, 181, 73)'); |
736 | } | 736 | } |
737 | $scope.sectorkeyPress = function() { | 737 | $scope.sectorkeyPress = function() { |
738 | $('.icon-circle-b').css('background-color', 'rgb(66, 181, 73)'); | 738 | $('.icon-circle-b').css('background-color', 'rgb(66, 181, 73)'); |
739 | } | 739 | } |
740 | 740 | ||
741 | $scope.productLaunchkeyPress = function() { | 741 | $scope.productLaunchkeyPress = function() { |
742 | $('.icon-circle-ab').css('background-color', 'rgb(66, 181, 73)'); | 742 | $('.icon-circle-ab').css('background-color', 'rgb(66, 181, 73)'); |
743 | } | 743 | } |
744 | 744 | ||
745 | $scope.launchPeriodkeyPress = function() { | 745 | $scope.launchPeriodkeyPress = function() { |
746 | $('.icon-circle-abc').css('background-color', 'rgb(66, 181, 73)'); | 746 | $('.icon-circle-abc').css('background-color', 'rgb(66, 181, 73)'); |
747 | } | 747 | } |
748 | 748 | ||
749 | $scope.industrykeyPress = function() { | 749 | $scope.industrykeyPress = function() { |
750 | $scope.addOther = false; | 750 | $scope.addOther = false; |
751 | $scope.hideSelectBox = true; | 751 | $scope.hideSelectBox = true; |
752 | $('.icon-circle-abcdefg').css('background-color', 'rgb(66, 181, 73)'); | 752 | $('.icon-circle-abcdefg').css('background-color', 'rgb(66, 181, 73)'); |
753 | var e = document.getElementById("dataIndustry"); | 753 | var e = document.getElementById("dataIndustry"); |
754 | var dataIndustry = e.options[e.selectedIndex].value; | 754 | var dataIndustry = e.options[e.selectedIndex].value; |
755 | if(dataIndustry == "others") { | 755 | if(dataIndustry == "others") { |
756 | $scope.addOther = true; | 756 | $scope.addOther = true; |
757 | $scope.hideSelectBox = false; | 757 | $scope.hideSelectBox = false; |
758 | } | 758 | } |
759 | } | 759 | } |
760 | 760 | ||
761 | $scope.industryNamekeyPress = function(firstName) { | 761 | $scope.industryNamekeyPress = function(firstName) { |
762 | console.log("lastName==", firstName); | 762 | console.log("lastName==", firstName); |
763 | if (firstName == undefined) { | 763 | if (firstName == undefined) { |
764 | $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)'); | 764 | $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)'); |
765 | } else { | 765 | } else { |
766 | $('.icon-circle-o').css('background-color', 'rgb(66, 181, 73)'); | 766 | $('.icon-circle-o').css('background-color', 'rgb(66, 181, 73)'); |
767 | } | 767 | } |
768 | } | 768 | } |
769 | 769 | ||
770 | $scope.amountkeyPress = function() { | 770 | $scope.amountkeyPress = function() { |
771 | $('.icon-circle-bc').css('background-color', 'rgb(66, 181, 73)'); | 771 | $('.icon-circle-bc').css('background-color', 'rgb(66, 181, 73)'); |
772 | } | 772 | } |
773 | 773 | ||
774 | $scope.firstNamekeyPress = function(name) { | 774 | $scope.firstNamekeyPress = function(name) { |
775 | console.log("lastName==", name); | 775 | console.log("lastName==", name); |
776 | if (name == undefined) { | 776 | if (name == undefined) { |
777 | $('.icon-circle-c').css('background-color', 'rgb(102, 102, 102)'); | 777 | $('.icon-circle-c').css('background-color', 'rgb(102, 102, 102)'); |
778 | } else { | 778 | } else { |
779 | $('.icon-circle-c').css('background-color', 'rgb(66, 181, 73)'); | 779 | $('.icon-circle-c').css('background-color', 'rgb(66, 181, 73)'); |
780 | } | 780 | } |
781 | } | 781 | } |
782 | 782 | ||
783 | $scope.emailkeyPress = function(email) { | 783 | $scope.emailkeyPress = function(email) { |
784 | console.log("email", email); | 784 | console.log("email", email); |
785 | if (email == undefined) { | 785 | if (email == undefined) { |
786 | $('.icon-circle-d').css('background-color', 'rgb(102, 102, 102)'); | 786 | $('.icon-circle-d').css('background-color', 'rgb(102, 102, 102)'); |
787 | } else { | 787 | } else { |
788 | $('.icon-circle-d').css('background-color', 'rgb(66, 181, 73)'); | 788 | $('.icon-circle-d').css('background-color', 'rgb(66, 181, 73)'); |
789 | } | 789 | } |
790 | } | 790 | } |
791 | 791 | ||
792 | $scope.textCheck = function(){ | 792 | $scope.textCheck = function(){ |
793 | console.log("Val1:::", $scope.textCheck); | 793 | console.log("Val1:::", $scope.textCheck); |
794 | var e = document.getElementById("fundingDiv"); | 794 | var e = document.getElementById("fundingDiv"); |
795 | var funding = e.options[e.selectedIndex].value; | 795 | var funding = e.options[e.selectedIndex].value; |
796 | $scope.Textshow = "no"; | 796 | $scope.Textshow = "no"; |
797 | if(funding == "yes") { | 797 | if(funding == "yes") { |
798 | $scope.Textshow = "yes"; | 798 | $scope.Textshow = "yes"; |
799 | console.log("Val:::", $scope.Textshow); | 799 | console.log("Val:::", $scope.Textshow); |
800 | } | 800 | } |
801 | 801 | ||
802 | } | 802 | } |
803 | 803 | ||
804 | $scope.productCheck = function(){ | 804 | $scope.productCheck = function(){ |
805 | console.log("Val2:::", $scope.productCheck); | 805 | console.log("Val2:::", $scope.productCheck); |
806 | var e = document.getElementById("productDiv"); | 806 | var e = document.getElementById("productDiv"); |
807 | var product = e.options[e.selectedIndex].value; | 807 | var product = e.options[e.selectedIndex].value; |
808 | $scope.Productshow = "no"; | 808 | $scope.Productshow = "no"; |
809 | if(product == "yes") { | 809 | if(product == "yes") { |
810 | $scope.Productshow = "yes"; | 810 | $scope.Productshow = "yes"; |
811 | console.log("Val1:::", $scope.Productshow); | 811 | console.log("Val1:::", $scope.Productshow); |
812 | } | 812 | } |
813 | 813 | ||
814 | } | 814 | } |
815 | 815 | ||
816 | $scope.phonekeyPress = function(number) { | 816 | $scope.phonekeyPress = function(number) { |
817 | console.log("number", number); | 817 | console.log("number", number); |
818 | if (number == undefined || number == '') { | 818 | if (number == undefined || number == '') { |
819 | $('.icon-circle-e').css('background-color', 'rgb(102, 102, 102)'); | 819 | $('.icon-circle-e').css('background-color', 'rgb(102, 102, 102)'); |
820 | } else { | 820 | } else { |
821 | $('.icon-circle-e').css('background-color', 'rgb(66, 181, 73)'); | 821 | $('.icon-circle-e').css('background-color', 'rgb(66, 181, 73)'); |
822 | } | 822 | } |
823 | } | 823 | } |
824 | 824 | ||
825 | $scope.citykeyPress = function(city) { | 825 | $scope.citykeyPress = function(city) { |
826 | console.log("city", city); | 826 | console.log("city", city); |
827 | if (city == undefined) { | 827 | if (city == undefined) { |
828 | $('.icon-circle-f').css('background-color', 'rgb(102, 102, 102)'); | 828 | $('.icon-circle-f').css('background-color', 'rgb(102, 102, 102)'); |
829 | } else { | 829 | } else { |
830 | $('.icon-circle-f').css('background-color', 'rgb(66, 181, 73)'); | 830 | $('.icon-circle-f').css('background-color', 'rgb(66, 181, 73)'); |
831 | } | 831 | } |
832 | } | 832 | } |
833 | 833 | ||
834 | $scope.startupNamekeyPress = function(q) { | 834 | $scope.startupNamekeyPress = function(q) { |
835 | if (q == undefined) { | 835 | if (q == undefined) { |
836 | $('.icon-circle-x').css('background-color', 'rgb(102, 102, 102)'); | 836 | $('.icon-circle-x').css('background-color', 'rgb(102, 102, 102)'); |
837 | } else { | 837 | } else { |
838 | $('.icon-circle-x').css('background-color', 'rgb(66, 181, 73)'); | 838 | $('.icon-circle-x').css('background-color', 'rgb(66, 181, 73)'); |
839 | } | 839 | } |
840 | } | 840 | } |
841 | 841 | ||
842 | $scope.linkedInkeyPress = function(technology) { | 842 | $scope.linkedInkeyPress = function(technology) { |
843 | if (technology == undefined || technology == '') { | 843 | if (technology == undefined || technology == '') { |
844 | $('.icon-circle-h').css('background-color', 'rgb(102, 102, 102)'); | 844 | $('.icon-circle-h').css('background-color', 'rgb(102, 102, 102)'); |
845 | } else { | 845 | } else { |
846 | $('.icon-circle-h').css('background-color', 'rgb(66, 181, 73)'); | 846 | $('.icon-circle-h').css('background-color', 'rgb(66, 181, 73)'); |
847 | } | 847 | } |
848 | } | 848 | } |
849 | $scope.companykeyPress = function(problem) { | 849 | $scope.companykeyPress = function(problem) { |
850 | if (problem == undefined) { | 850 | if (problem == undefined) { |
851 | $('.icon-circle-i').css('background-color', 'rgb(102, 102, 102)'); | 851 | $('.icon-circle-i').css('background-color', 'rgb(102, 102, 102)'); |
852 | } else { | 852 | } else { |
853 | $('.icon-circle-i').css('background-color', 'rgb(66, 181, 73)'); | 853 | $('.icon-circle-i').css('background-color', 'rgb(66, 181, 73)'); |
854 | } | 854 | } |
855 | } | 855 | } |
856 | $scope.productNamekeyPress = function(solution) { | 856 | $scope.productNamekeyPress = function(solution) { |
857 | if (solution == undefined) { | 857 | if (solution == undefined) { |
858 | $('.icon-circle-j').css('background-color', 'rgb(102, 102, 102)'); | 858 | $('.icon-circle-j').css('background-color', 'rgb(102, 102, 102)'); |
859 | } else { | 859 | } else { |
860 | $('.icon-circle-j').css('background-color', 'rgb(66, 181, 73)'); | 860 | $('.icon-circle-j').css('background-color', 'rgb(66, 181, 73)'); |
861 | } | 861 | } |
862 | } | 862 | } |
863 | $scope.businesskeyPress = function(business) { | 863 | $scope.businesskeyPress = function(business) { |
864 | $('.icon-circle-p').css('background-color', 'rgb(66, 181, 73)'); | 864 | $('.icon-circle-p').css('background-color', 'rgb(66, 181, 73)'); |
865 | } | 865 | } |
866 | 866 | ||
867 | $scope.websitekeyPress = function(prototype) { | 867 | $scope.websitekeyPress = function(prototype) { |
868 | if (prototype == undefined || prototype == '') { | 868 | if (prototype == undefined || prototype == '') { |
869 | $('.icon-circle-k').css('background-color', 'rgb(102, 102, 102)'); | 869 | $('.icon-circle-k').css('background-color', 'rgb(102, 102, 102)'); |
870 | } else { | 870 | } else { |
871 | $('.icon-circle-k').css('background-color', 'rgb(66, 181, 73)'); | 871 | $('.icon-circle-k').css('background-color', 'rgb(66, 181, 73)'); |
872 | } | 872 | } |
873 | } | 873 | } |
874 | 874 | ||
875 | $scope.employeekeyPress = function(market) { | 875 | $scope.employeekeyPress = function(market) { |
876 | if (market == undefined || market == '') { | 876 | if (market == undefined || market == '') { |
877 | $('.icon-circle-l').css('background-color', 'rgb(102, 102, 102)'); | 877 | $('.icon-circle-l').css('background-color', 'rgb(102, 102, 102)'); |
878 | } else { | 878 | } else { |
879 | $('.icon-circle-l').css('background-color', 'rgb(66, 181, 73)'); | 879 | $('.icon-circle-l').css('background-color', 'rgb(66, 181, 73)'); |
880 | } | 880 | } |
881 | } | 881 | } |
882 | 882 | ||
883 | $scope.annualkeyPress = function(risk) { | 883 | $scope.annualkeyPress = function(risk) { |
884 | if (risk == undefined || risk == '') { | 884 | if (risk == undefined || risk == '') { |
885 | $('.icon-circle-m').css('background-color', 'rgb(102, 102, 102)'); | 885 | $('.icon-circle-m').css('background-color', 'rgb(102, 102, 102)'); |
886 | } else { | 886 | } else { |
887 | $('.icon-circle-m').css('background-color', 'rgb(66, 181, 73)'); | 887 | $('.icon-circle-m').css('background-color', 'rgb(66, 181, 73)'); |
888 | } | 888 | } |
889 | } | 889 | } |
890 | 890 | ||
891 | $scope.revenuekeyPress = function(team) { | 891 | $scope.revenuekeyPress = function(team) { |
892 | if (team == undefined || team == '') { | 892 | if (team == undefined || team == '') { |
893 | $('.icon-circle-n').css('background-color', 'rgb(102, 102, 102)'); | 893 | $('.icon-circle-n').css('background-color', 'rgb(102, 102, 102)'); |
894 | } else { | 894 | } else { |
895 | $('.icon-circle-n').css('background-color', 'rgb(66, 181, 73)'); | 895 | $('.icon-circle-n').css('background-color', 'rgb(66, 181, 73)'); |
896 | } | 896 | } |
897 | } | 897 | } |
898 | 898 | ||
899 | $scope.descriptionkeyPress = function(pitch) { | 899 | $scope.descriptionkeyPress = function(pitch) { |
900 | if (pitch == undefined) { | 900 | if (pitch == undefined) { |
901 | $('.icon-circle-z').css('background-color', 'rgb(102, 102, 102)'); | 901 | $('.icon-circle-z').css('background-color', 'rgb(102, 102, 102)'); |
902 | } else { | 902 | } else { |
903 | $('.icon-circle-z').css('background-color', 'rgb(66, 181, 73)'); | 903 | $('.icon-circle-z').css('background-color', 'rgb(66, 181, 73)'); |
904 | } | 904 | } |
905 | } | 905 | } |
906 | 906 | ||
907 | $scope.discountkeyPress = function(discount) { | 907 | $scope.discountkeyPress = function(discount) { |
908 | console.log("lastName==", name); | 908 | console.log("lastName==", name); |
909 | if (discount == undefined) { | 909 | if (discount == undefined) { |
910 | $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)'); | 910 | $('.icon-circle-o').css('background-color', 'rgb(102, 102, 102)'); |
911 | } else { | 911 | } else { |
912 | $('.icon-circle-o').css('background-color', 'rgb(66, 181, 73)'); | 912 | $('.icon-circle-o').css('background-color', 'rgb(66, 181, 73)'); |
913 | } | 913 | } |
914 | } | 914 | } |
915 | 915 | ||
916 | $scope.removeNooError = function() { | 916 | $scope.removeNooError = function() { |
917 | $('#invalidIdea').css('display', 'block'); | 917 | $('#invalidIdea').css('display', 'block'); |
918 | $('#noExist').css('display', 'none'); | 918 | $('#noExist').css('display', 'none'); |
919 | }; | 919 | }; |
920 | 920 | ||
921 | $scope.ideakeyPress = function(financial) { | 921 | $scope.ideakeyPress = function(financial) { |
922 | console.log("financial", financial); | 922 | console.log("financial", financial); |
923 | if (financial == undefined) { | 923 | if (financial == undefined) { |
924 | $('#invalidIdea').css('display', 'block'); | 924 | $('#invalidIdea').css('display', 'block'); |
925 | $('.icon-circle-q').css('background-color', 'rgb(102, 102, 102)'); | 925 | $('.icon-circle-q').css('background-color', 'rgb(102, 102, 102)'); |
926 | } else { | 926 | } else { |
927 | $('#invalidIdea').css('display', 'none'); | 927 | $('#invalidIdea').css('display', 'none'); |
928 | $('.icon-circle-q').css('background-color', 'rgb(66, 181, 73)'); | 928 | $('.icon-circle-q').css('background-color', 'rgb(66, 181, 73)'); |
929 | } | 929 | } |
930 | } | 930 | } |
931 | 931 | ||
932 | $scope.fundkeyPress = function(financial) { | 932 | $scope.fundkeyPress = function(financial) { |
933 | console.log("financial", financial); | 933 | console.log("financial", financial); |
934 | if (financial == undefined) { | 934 | if (financial == undefined) { |
935 | $('.icon-circle-y').css('background-color', 'rgb(102, 102, 102)'); | 935 | $('.icon-circle-y').css('background-color', 'rgb(102, 102, 102)'); |
936 | } else { | 936 | } else { |
937 | $('.icon-circle-y').css('background-color', 'rgb(66, 181, 73)'); | 937 | $('.icon-circle-y').css('background-color', 'rgb(66, 181, 73)'); |
938 | } | 938 | } |
939 | } | 939 | } |
940 | 940 | ||
941 | $scope.changeReferalIconColor = function(referalToken){ | 941 | $scope.changeReferalIconColor = function(referalToken){ |
942 | if (referalToken == undefined || referalToken == '') { | 942 | if (referalToken == undefined || referalToken == '') { |
943 | $('.referel-icon').css('background-color', 'rgb(102, 102, 102)'); | 943 | $('.referel-icon').css('background-color', 'rgb(102, 102, 102)'); |
944 | }else { | 944 | }else { |
945 | $('.referel-icon').css('background-color', 'rgb(66, 181, 73)'); | 945 | $('.referel-icon').css('background-color', 'rgb(66, 181, 73)'); |
946 | } | 946 | } |
947 | } | 947 | } |
948 | 948 | ||
949 | }); | 949 | }); |
950 | 950 | ||
951 | scotchApp.controller('verifyController', function($scope, $http, $location, $route,BASE_URL) { | 951 | scotchApp.controller('verifyController', function($scope, $http, $location, $route,BASE_URL) { |
952 | $scope.pendingPaymentId = $route.current.params.id | 952 | $scope.pendingPaymentId = $route.current.params.id |
953 | $http({ | 953 | $http({ |
954 | method: "GET", | 954 | method: "GET", |
955 | url: BASE_URL + '/applicants/' + $scope.pendingPaymentId, | 955 | url: BASE_URL + '/applicants/' + $scope.pendingPaymentId, |
956 | }).then(function mySuccess(response) { | 956 | }).then(function mySuccess(response) { |
957 | $scope.data = response.data; | 957 | $scope.data = response.data; |
958 | console.log("response-1", response); | 958 | console.log("response-1", response); |
959 | $scope.pendingPaymentId = $route.current.params.id; | 959 | $scope.pendingPaymentId = $route.current.params.id; |
960 | 960 | ||
961 | $http({ | 961 | $http({ |
962 | method: "GET", | 962 | method: "GET", |
963 | url: BASE_URL + '/payments?filter={"where":{"applicantId":' + $scope.pendingPaymentId + '}}', | 963 | url: BASE_URL + '/payments?filter={"where":{"applicantId":' + $scope.pendingPaymentId + '}}', |
964 | }).then(function mySuccess(response) { | 964 | }).then(function mySuccess(response) { |
965 | $scope.paymentRecord = response.data; | 965 | $scope.paymentRecord = response.data; |
966 | }, function myError(response) { | 966 | }, function myError(response) { |
967 | }); | 967 | }); |
968 | }, function myError(response) { | 968 | }, function myError(response) { |
969 | $scope.myWelcome = response.statusText; | 969 | $scope.myWelcome = response.statusText; |
970 | }); | 970 | }); |
971 | 971 | ||
972 | $scope.checkView = false; | 972 | $scope.checkView = false; |
973 | $scope.verifyView = false; | 973 | $scope.verifyView = false; |
974 | 974 | ||
975 | $scope.pendingPaymentId = ''; | 975 | $scope.pendingPaymentId = ''; |
976 | 976 | ||
977 | $scope.update = function() { | 977 | $scope.update = function() { |
978 | 978 | ||
979 | $http({ | 979 | $http({ |
980 | method: 'GET', | 980 | method: 'GET', |
981 | url: BASE_URL + '/payments?filter={"where":{"applicantId": ' + $scope.pendingPaymentId + '}}', | 981 | url: BASE_URL + '/payments?filter={"where":{"applicantId": ' + $scope.pendingPaymentId + '}}', |
982 | headers: {} | 982 | headers: {} |
983 | }).then(function mySuccess(searchResult) { | 983 | }).then(function mySuccess(searchResult) { |
984 | if (searchResult.data[0].status == "created") { | 984 | if (searchResult.data[0].status == "created") { |
985 | //if (searchResult.data[0].status == "cancelled") { | 985 | //if (searchResult.data[0].status == "cancelled") { |
986 | $scope.checkView = true; | 986 | $scope.checkView = true; |
987 | $scope.verifyView = false; | 987 | $scope.verifyView = false; |
988 | $scope.amount = searchResult.data[0].amount; | 988 | $scope.amount = searchResult.data[0].amount; |
989 | $scope.searchResult = searchResult.data[0]; | 989 | $scope.searchResult = searchResult.data[0]; |
990 | console.log('====searchResult===', searchResult); | 990 | console.log('====searchResult===', searchResult); |
991 | console.log("searchResult=====",searchResult.data[0].razorOrderId) | 991 | console.log("searchResult=====",searchResult.data[0].razorOrderId) |
992 | var i = 0; | 992 | var i = 0; |
993 | $scope.amount = $scope.amount * 100; | 993 | $scope.amount = $scope.amount * 100; |
994 | var options = { | 994 | var options = { |
995 | "key": "rzp_live_mhSE1uOBlXvFyJ", | 995 | "key": "rzp_live_mhSE1uOBlXvFyJ", |
996 | //"key" : "rzp_test_YwHsVFiDIQ2WUQ", | 996 | //"key" : "rzp_test_YwHsVFiDIQ2WUQ", |
997 | "amount": $scope.amount, | 997 | "amount": $scope.amount, |
998 | 998 | ||
999 | "name": "Startup Jalsa", | 999 | "name": "Startup Jalsa", |
1000 | "description": "amount", | 1000 | "description": "amount", |
1001 | "currency": "INR", | 1001 | "currency": "INR", |
1002 | "status": "done", | 1002 | "status": "done", |
1003 | 1003 | ||
1004 | "theme": { | 1004 | "theme": { |
1005 | "color": "#2196f3 ", | 1005 | "color": "#2196f3 ", |
1006 | "image_padding": "NO" | 1006 | "image_padding": "NO" |
1007 | }, | 1007 | }, |
1008 | "modal": { | 1008 | "modal": { |
1009 | "ondismiss": function() {} | 1009 | "ondismiss": function() {} |
1010 | }, | 1010 | }, |
1011 | "handler": function(response) { | 1011 | "handler": function(response) { |
1012 | createPayment(response); | 1012 | createPayment(response); |
1013 | } | 1013 | } |
1014 | }; | 1014 | }; |
1015 | var rzp1 = new Razorpay(options); | 1015 | var rzp1 = new Razorpay(options); |
1016 | rzp1.open(); | 1016 | rzp1.open(); |
1017 | $scope.paymentResponse = {}; | 1017 | $scope.paymentResponse = {}; |
1018 | function createPayment(response) { | 1018 | function createPayment(response) { |
1019 | $scope.amount = $scope.amount / 100; | 1019 | $scope.amount = $scope.amount / 100; |
1020 | console.log("response======retepaymen",response); | 1020 | console.log("response======retepaymen",response); |
1021 | $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; | 1021 | $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; |
1022 | $scope.paymentResponse.razorOrderId = $scope.searchResult.razorOrderId; | 1022 | $scope.paymentResponse.razorOrderId = $scope.searchResult.razorOrderId; |
1023 | $scope.paymentResponse.amount = $scope.amount; | 1023 | $scope.paymentResponse.amount = $scope.amount; |
1024 | $scope.paymentResponse.currency = $scope.searchResult.currency; | 1024 | $scope.paymentResponse.currency = $scope.searchResult.currency; |
1025 | $scope.paymentResponse.status = $scope.searchResult.status; | 1025 | $scope.paymentResponse.status = $scope.searchResult.status; |
1026 | $scope.paymentResponse.applicantId = $scope.searchResult.applicantId; | 1026 | $scope.paymentResponse.applicantId = $scope.searchResult.applicantId; |
1027 | console.log("$scope.paymentResponse", $scope.paymentResponse) | 1027 | console.log("$scope.paymentResponse", $scope.paymentResponse) |
1028 | $http({ | 1028 | $http({ |
1029 | method: 'PUT', | 1029 | method: 'PUT', |
1030 | url: BASE_URL + '/payments/' + $scope.searchResult.id, | 1030 | url: BASE_URL + '/payments/' + $scope.searchResult.id, |
1031 | data: $scope.paymentResponse, | 1031 | data: $scope.paymentResponse, |
1032 | headers: {} | 1032 | headers: {} |
1033 | }).then(function mySuccess(searchResult) { | 1033 | }).then(function mySuccess(searchResult) { |
1034 | // if(paymentResult.data.status == "created"){ | 1034 | // if(paymentResult.data.status == "created"){ |
1035 | Analytics.trackEvent('payments', 'click', 'Thankyou'); | 1035 | Analytics.trackEvent('payments', 'click', 'Thankyou'); |
1036 | // } | 1036 | // } |
1037 | console.log("finalsearchResult",searchResult) | 1037 | console.log("finalsearchResult",searchResult) |
1038 | $location.path("/confirmation") | 1038 | $location.path("/confirmation") |
1039 | }, function myError(error) { | 1039 | }, function myError(error) { |
1040 | 1040 | ||
1041 | }); | 1041 | }); |
1042 | } | 1042 | } |
1043 | } else { | 1043 | } else { |
1044 | 1044 | ||
1045 | } | 1045 | } |
1046 | 1046 | ||
1047 | }, function myError(error) {}); | 1047 | }, function myError(error) {}); |
1048 | } | 1048 | } |
1049 | }); | 1049 | }); |
1050 | 1050 | ||
1051 | scotchApp.controller('ambassadorController', function($scope, $http, $location, $route,BASE_URL) { | 1051 | scotchApp.controller('ambassadorController', function($scope, $http, $location, $route,BASE_URL) { |
1052 | $scope.data = {}; | 1052 | $scope.data = {}; |
1053 | $scope.check = false; | 1053 | $scope.check = false; |
1054 | $scope.numberCheck = false; | 1054 | $scope.numberCheck = false; |
1055 | 1055 | ||
1056 | /*open videos in modal*/ | 1056 | /*open videos in modal*/ |
1057 | $scope.openyoutube16 = function(){ | 1057 | $scope.openyoutube16 = function(){ |
1058 | $('#videoModel').modal('show'); | 1058 | $('#videoModel').modal('show'); |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | $scope.openyoutube17 = function(){ | 1061 | $scope.openyoutube17 = function(){ |
1062 | $('#videoModels').modal('show'); | 1062 | $('#videoModels').modal('show'); |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | $scope.closeModal = function(){ | 1065 | $scope.closeModal = function(){ |
1066 | var url = $('#youtubePlayer').attr('src'); | 1066 | var url = $('#youtubePlayer').attr('src'); |
1067 | $('#youtubePlayer').attr('src', ''); | 1067 | $('#youtubePlayer').attr('src', ''); |
1068 | $('#youtubePlayer').attr('src', url); | 1068 | $('#youtubePlayer').attr('src', url); |
1069 | } | 1069 | } |
1070 | /*open videos ends here*/ | 1070 | /*open videos ends here*/ |
1071 | 1071 | ||
1072 | $scope.removeError = function() { | 1072 | $scope.removeError = function() { |
1073 | console.log("doooo") | 1073 | console.log("doooo") |
1074 | $('#invalidEmail').css('display', 'none'); | 1074 | $('#invalidEmail').css('display', 'none'); |
1075 | $('#alreadyExist').css('display', 'none'); | 1075 | $('#alreadyExist').css('display', 'none'); |
1076 | }; | 1076 | }; |
1077 | 1077 | ||
1078 | $scope.emailcheck = function(val) { | 1078 | // $scope.emailcheck = function(val) { |
1079 | consol.log("kdsbd") | 1079 | // consol.log("kdsbd") |
1080 | $scope.space = /\s/g.test(val); | 1080 | // $scope.space = /\s/g.test(val); |
1081 | console.log("space",$scope.space) | 1081 | // console.log("space",$scope.space) |
1082 | if (val == undefined) { | 1082 | // if (val == undefined) { |
1083 | $('#invalidEmail').css('display', 'block'); | 1083 | // $('#invalidEmail').css('display', 'block'); |
1084 | } else { | 1084 | // } else { |
1085 | $http({ | 1085 | // $http({ |
1086 | method: 'GET', | 1086 | // method: 'GET', |
1087 | url: BASE_URL + '/ambassadors?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}', | 1087 | // url: BASE_URL + '/ambassadors?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}', |
1088 | headers: {} | 1088 | // headers: {} |
1089 | }).then(function mySuccess(searchResult) { | 1089 | // }).then(function mySuccess(searchResult) { |
1090 | console.log("searchResult1===>", searchResult) | 1090 | // console.log("searchResult1===>", searchResult) |
1091 | if (searchResult.data.length == 0) { | 1091 | // if (searchResult.data.length == 0) { |
1092 | $scope.check = false; | 1092 | // $scope.check = false; |
1093 | } else { | 1093 | // } else { |
1094 | $scope.check = true; | 1094 | // $scope.check = true; |
1095 | $('#alreadyExist').css('display', 'block'); | 1095 | // $('#alreadyExist').css('display', 'block'); |
1096 | } | 1096 | // } |
1097 | }, function myError(error) {}); | 1097 | // }, function myError(error) {}); |
1098 | } | 1098 | // } |
1099 | }; | 1099 | // }; |
1100 | 1100 | ||
1101 | $scope.removeNoError = function() { | 1101 | // $scope.removeNoError = function() { |
1102 | $('#invalidNumber').css('display', 'none'); | 1102 | // $('#invalidNumber').css('display', 'none'); |
1103 | $('#noExist').css('display', 'none'); | 1103 | // $('#noExist').css('display', 'none'); |
1104 | }; | 1104 | // }; |
1105 | 1105 | ||
1106 | $scope.numbercheck = function(number) { | 1106 | // $scope.numbercheck = function(number) { |
1107 | // if (val == undefined) { | 1107 | // // if (val == undefined) { |
1108 | // $('#invalidNumber').css('display', 'block'); | 1108 | // // $('#invalidNumber').css('display', 'block'); |
1109 | // } else { | 1109 | // // } else { |
1110 | $http({ | 1110 | // $http({ |
1111 | method: 'GET', | 1111 | // method: 'GET', |
1112 | url: BASE_URL + '/ambassadors?filter={"where": {"mobile": {"like":"%25' + number + '%25"}}}', | 1112 | // url: BASE_URL + '/ambassadors?filter={"where": {"mobile": {"like":"%25' + number + '%25"}}}', |
1113 | data: $scope.data, | 1113 | // data: $scope.data, |
1114 | headers: {} | 1114 | // headers: {} |
1115 | }).then(function mySuccess(searchResult) { | 1115 | // }).then(function mySuccess(searchResult) { |
1116 | console.log("searchResult===>", searchResult) | 1116 | // console.log("searchResult===>", searchResult) |
1117 | if (searchResult.data.length == 0) { | 1117 | // if (searchResult.data.length == 0) { |
1118 | $scope.numberCheck = false; | 1118 | // $scope.numberCheck = false; |
1119 | } else { | 1119 | // } else { |
1120 | $scope.numberCheck = true; | 1120 | // $scope.numberCheck = true; |
1121 | $('#noExist').css('display', 'block'); | 1121 | // $('#noExist').css('display', 'block'); |
1122 | } | 1122 | // } |
1123 | }, function myError(error) {}); | 1123 | // }, function myError(error) {}); |
1124 | //} | 1124 | // //} |
1125 | 1125 | ||
1126 | }; | 1126 | // }; |
1127 | 1127 | ||
1128 | $scope.submit = function() { | 1128 | $scope.submit = function() { |
1129 | console.log($scope.data.name) | 1129 | console.log($scope.data.name) |
1130 | var randomNumber = ""+Math.random(); | 1130 | var randomNumber = ""+Math.random(); |
1131 | var nameSpliced = $scope.data.name.slice(0,3); | 1131 | var nameSpliced = $scope.data.name.slice(0,3); |
1132 | var numberSpliced = randomNumber.slice(2,5); | 1132 | var numberSpliced = randomNumber.slice(2,5); |
1133 | $scope.data.referalToken = nameSpliced+numberSpliced; | 1133 | $scope.data.referalToken = nameSpliced+numberSpliced; |
1134 | $scope.data.referalToken = $scope.data.referalToken.toUpperCase(); | 1134 | $scope.data.referalToken = $scope.data.referalToken.toUpperCase(); |
1135 | 1135 | ||
1136 | $http({ | 1136 | $http({ |
1137 | method: 'POST', | 1137 | method: 'POST', |
1138 | url: BASE_URL + '/ambassadors', | 1138 | url: BASE_URL + '/ambassadors', |
1139 | data: $scope.data, | 1139 | data: $scope.data, |
1140 | headers: {} | 1140 | headers: {} |
1141 | }).then(function mySuccess(result) { | 1141 | }).then(function mySuccess(result) { |
1142 | console.log("result", result) | 1142 | console.log("result", result) |
1143 | $scope.detail = result; | 1143 | $scope.detail = result; |
1144 | $('#myModal').modal('show'); | 1144 | $('#myModal').modal('show'); |
1145 | $scope.data.name = ''; | 1145 | $scope.data.name = ''; |
1146 | $scope.data.email = ''; | 1146 | $scope.data.email = ''; |
1147 | $scope.data.mobile = ''; | 1147 | $scope.data.mobile = ''; |
1148 | // $scope.data.discount = ''; | 1148 | // $scope.data.discount = ''; |
1149 | 1149 | ||
1150 | }, function myError(error) { | 1150 | }, function myError(error) { |
1151 | console.log(error) | 1151 | console.log(error) |
1152 | console.log(error.data.error.message) | 1152 | console.log(error.data.error.message) |
1153 | }); | 1153 | }); |
1154 | console.log($scope.data) | 1154 | console.log($scope.data) |
1155 | } | 1155 | } |
1156 | }); | 1156 | }); |
1157 | 1157 | ||
1158 | 1158 | ||
1159 | 1159 | ||
1160 | 1160 |