Commit 2d6a9fbea906d4c1b32f627ebe7cfc7eb4ef75a6

Authored by Palak Handa
1 parent dbf2eb810b
Exists in master and in 1 other branch paytm

complete bugs

... ... @@ -745,20 +745,7 @@ stroke-dashoffset:0
745 745 text-align: center;
746 746 }
747 747  
748   -
749   -/*.icon-circle-a {
750   - background: rgba(89, 89, 89, 0.92);
751   - border-radius: 50%;
752   - width: 30px;
753   - height: 30px;
754   - position: absolute;
755   - left: 0px;
756   - margin-top: 4px;
757   - color: #fff;
758   - text-align: center;
759   -}
760   -
761   -.icon-circle-select {
  748 +.referel-icon {
762 749 background: rgba(89, 89, 89, 0.92);
763 750 border-radius: 50%;
764 751 width: 30px;
... ... @@ -770,17 +757,6 @@ stroke-dashoffset:0
770 757 text-align: center;
771 758 }
772 759  
773   -.icon-circle-textarea {
774   - background: rgba(89, 89, 89, 0.92);
775   - border-radius: 50%;
776   - width: 30px;
777   - height: 30px;
778   - position: absolute;
779   - left: 0px;
780   - margin-top: 30px;
781   - color: #fff;
782   - text-align: center;
783   -}*/
784 760  
785 761 /*quiz*/
786 762 .q-card-align div{
... ...
... ... @@ -32,34 +32,10 @@
32 32 <!-- define angular controller -->
33 33 <body ng-controller="mainController">
34 34  
35   - <!-- <nav class="navbar navbar-default">
36   - <div class="container">
37   - <div class="navbar-header">
38   - <a class="navbar-brand" href="/">Angular Routing Example</a>
39   - </div>
40   -
41   - <ul class="nav navbar-nav navbar-right">
42   - <li><a href="#"><i class="fa fa-home"></i> Home</a></li>
43   - <li><a href="#about"><i class="fa fa-shield"></i> About</a></li>
44   - <li><a href="#contact"><i class="fa fa-comment"></i> Contact</a></li>
45   - </ul>
46   - </div>
47   - </nav> -->
48   -
49 35 <div id="main">
50   -
51   - <!-- angular templating -->
52   - <!-- this is where content will be injected -->
53   - <div ng-view></div>
54   -
  36 + <div ng-view></div>
55 37 </div>
56 38  
57   - <!-- <footer class="text-center">
58   - <p>View the tutorial on <a href="http://scotch.io/tutorials/javascript/single-page-apps-with-angularjs-routing-and-templating">Scotch.io</a></p>
59   -
60   - <p>View a tutorial on <a href="http://scotch.io/tutorials/javascript/animating-angularjs-apps-ngview">Animating Your Angular Single Page App</a></p>
61   - </footer> -->
62   -
63 39 </body>
64 40  
65 41 </html>
... ...
pages/ambassador.html
... ... @@ -26,7 +26,6 @@
26 26 <input type="email" name="email" 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)">
27 27 <label class="error-message f-family" id="invalidEmail">Please enter a valid email address.</label>
28 28 <label ng-if="check">Email already exist.</label>
29   - <!-- <label class="error-message f-family control-label" id="alreadyExist" ng-if="check">Email already exist.</label> -->
30 29 </div>
31 30 <div class="clearfix"></div>
32 31 <div class="col-xs-12 input-wrapper" >
... ... @@ -47,8 +46,8 @@
47 46 <!-- CLOSE form-all -->
48 47 </div>
49 48 <div class="clearfix"></div>
50   - <div style="margin-bottom: 5%;" class="text-center">
51   - <input type="submit" class="btn submit-button" data-toggle="modal" data-target="#myModal" ng-disabled="applicantForm.$invalid|| check|| numberCheck" value="Submit" ng-click="submit()">
  49 + <div style="margin-bottom: 6%;" class="text-center">
  50 + <input type="submit" class="btn submit-button" ng-disabled="applicantForm.$invalid|| check|| numberCheck" value="Submit" ng-click="submit()">
52 51 </div>
53 52 <!-- col-xs-12 col-md-8 col-md-offset-2 -->
54 53 </form>
... ...
1   -<!-- <div class="jumbotron text-center">
2   - <h1>Home Page</h1>
3   -
4   - <p>{{ message }}</p>
5   - </div> -->
6   -<!-- <div ng-if="checkView"> -->
7 1 <div class="header">
8 2 <img src="images/white.png" class="logo">
9 3 </div>
... ... @@ -15,7 +9,7 @@
15 9 <div class="stages card-align">
16 10 <div class="col-xs-4 no-padding">
17 11 <div class="card stages-card">
18   - <input type="radio" ng-model="data.stage" class="stageRadio" value="Idea" name="Idea" id="ideation" ng-required="Idea" ng-checked="true" checked="true" ng-click="stage(data.stage); stagekeyPress()">
  12 + <input type="radio" ng-model="data.stage" class="stageRadio" value="Idea" name="Idea" id="ideation" ng-required="Idea" ng-checked="true" checked="true" ng-click="stage('Idea')">
19 13 <label style="cursor:pointer" class="thumbnail radius-border stage-thumbnail" for="ideation">
20 14 <img class="stage-img stage-idea" src="images/idea-stage.png" alt="Lights">
21 15 <div class="card-content f-family">
... ... @@ -34,7 +28,7 @@
34 28 </div>
35 29 <div class="col-xs-4 no-padding-mobile">
36 30 <div class="card stages-card margin-auto-mobile">
37   - <input type="radio" ng-model="data.stage" class="stageRadio" value="Product" name="Idea" id="Proof" ng-required="Product" ng-click="stage(data.stage); stagekeyPress()">
  31 + <input type="radio" ng-model="data.stage" class="stageRadio" value="Product" name="Idea" id="Proof" ng-required="Product" ng-click="stage('Product')">
38 32 <label style="cursor:pointer" class="thumbnail radius-border stage-thumbnail" for="Proof">
39 33 <img class="stage-img stage-product" src="images/production-stage.png" alt="Lights">
40 34 <div class="card-content f-family">
... ... @@ -53,7 +47,7 @@
53 47 </div>
54 48 <div class="col-xs-4 no-padding">
55 49 <div class="card stages-card right-stage-card">
56   - <input type="radio" ng-model="data.stage" class="stageRadio" value="Growth" name="Idea" id="Beta" ng-required="Growth" ng-click="stage(data.stage); stagekeyPress()">
  50 + <input type="radio" ng-model="data.stage" class="stageRadio" value="Growth" name="Idea" id="Beta" ng-required="Growth" ng-click="stage('Growth')">
57 51 <label style="cursor:pointer" class="thumbnail radius-border stage-thumbnail" for="Beta">
58 52 <img class="stage-img stage-growth" src="images/growth-stage.png" alt="Lights">
59 53 <div class="card-content f-family">
... ... @@ -109,7 +103,7 @@
109 103 <div class="icon-circle-c">
110 104 <i class="material-icons" style="line-height: 31px;">assignment_ind</i>
111 105 </div>
112   - <input type="text" class="text-input" required ng-model="data.name" placeholder="Startup Name" id="myBtn" name="name" ng-change="entername(data.name); namekeyPress(data.name)">
  106 + <input type="text" class="text-input" required ng-model="data.name" placeholder="Name" id="myBtn" name="name" ng-change="entername(data.name); namekeyPress(data.name)">
113 107 </div>
114 108 <div class="col-xs-12 col-md-6 input-wrapper">
115 109 <div id="snackbar">Error ! Please fill in all fields.</div>
... ... @@ -118,15 +112,13 @@
118 112 </div>
119 113 <input type="email" name="email" 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)">
120 114 <label class="error-message f-family" id="invalidEmail">Please enter a valid email address.</label>
121   - <label ng-if="check">Email already exist.</label>
122   - <!-- <label class="error-message f-family control-label" id="alreadyExist" ng-if="check">Email already exist.</label> -->
  115 + <label ng-if="check">Email already exist.</label>
123 116 </div>
124 117 <div class="col-xs-12 col-md-6 input-wrapper">
125 118 <div class="icon-circle-e">
126 119 <i class="material-icons" style="line-height: 30px;">phone</i>
127 120 </div>
128 121 <input type="number" required class="text-input" ng-model="data.number" placeholder="Mobile No." ng-blur="numbercheck(data.number)" ng-focus="removeNoError()" ng-change="enternumber(data.number); phonekeyPress(data.number)">
129   - <!-- <label class="error-message f-family control-label" id="noExist" " ng-if="numberCheck">Contact Number already exist.</label> -->
130 122 <label ng-if="numberCheck">Contact Number already exist.</label>
131 123 </div>
132 124 <div class="col-xs-12 col-md-6 input-wrapper f-family">
... ... @@ -144,7 +136,7 @@
144 136 <option value="Pune">Pune</option>
145 137 <option value="Indore">Indore</option>
146 138 <option value="Chandigarh">Chandigarh</option>
147   - <option value="anyOther">Any other</option>
  139 + <option>Any other</option>
148 140 </select>
149 141 </div>
150 142 <div class="clearfix"></div>
... ... @@ -456,13 +448,6 @@
456 448 </div>
457 449 <div class="clearfix"></div>
458 450 </div>
459   - <!-- <div class="clearfix"></div> -->
460   - <!-- THIS CODE FOR WHO ARE YOU FORM -->
461   - <!-- <div class="row">
462   - <div class="col-md-3"></div>
463   - <div class="col-md-3"></div>
464   - <div class="col-md-3"></div>
465   - </div> -->
466 451 <div class="identity-shadow">
467 452 <div class="icon-circle-ab">
468 453 <i class="material-icons" style="line-height: 30px;">perm_identity</i>
... ... @@ -487,23 +472,16 @@
487 472 <label class="f-family pull-left width-auto" for="othersRadio">Others</label>
488 473 </label>
489 474 </div>
490   - <!--
491   - <div class="col-xs-6" ng-show="show=='a'">
492   - <label class="card-small">
493   -
494   - <input type="file" file-model="data.pic" required id="picture" name="pic" accept="image/*">
495   - </label>
496   - </div> -->
497 475 </div>
498 476 <!-- CLOSE stages identity-align -->
499 477 <div class="clearfix"></div>
500 478 </div>
501 479 <!-- CLOSE identity-shadow -->
502 480 <div class="col-xs-12 input-wrapper">
503   - <div class="icon-circle-h" style="z-index: 999;">
  481 + <div class="referel-icon" style="z-index: 999;">
504 482 <i class="material-icons" style="line-height: 30px;">phone_android</i>
505 483 </div>
506   - <input class="text-input" ng-model="data.referalToken" placeholder="Enter Coupon code" style="position: relative;">
  484 + <input class="text-input" ng-model="data.referalToken" placeholder="Enter Coupon code" style="position: relative;" ng-required="referalToken" ng-change="changeReferalIconColor(data.referalToken)">
507 485 <i class="material-icons coupen-approved" ng-if="tokencheck == true">check</i>
508 486 <i class="material-icons coupen-approved" style="color:red;" ng-if="tokencheck == false">close</i>
509 487 <button type="button" ng-click="tokenCall(data.referalToken)" class="pull-right apply-coupen-btn">Apply</button>
... ... @@ -526,7 +504,6 @@
526 504 <div ng-if="verifyView">
527 505 <div style="margin-bottom: 0px;" class="text-center">
528 506 <input type="button" class="btn submit-button" ng-disabled="applicantForm.$invalid" value="check the status" ng-click="update()">
529   - <!-- <button ng-disabled="applicantForm.$invalid">Save</button> -->
530 507 </div>
531 508 </div>
532 509 </div> <!-- CLOSE NEW-CONTROLLER -->
... ...
pages/verify.html
1   -<div class="panel-heading" style="background-color: #42b549;"><img src="images/white.png" style="width: 100px;"></div>
  1 +<div class="panel-heading" style="background-color: #42b549;padding:22px 20px"><img src="../images/white.png" style="width: 115px;"></div>
2 2 <div class="container container1">
3 3 <div class="row">
4 4 <div class="col-md-6 col-md-offset-3">
... ... @@ -31,26 +31,16 @@
31 31 </div>
32 32 </div>
33 33 <div style="text-align:center; margin-top:6%;margin-bottom:5%">
34   - <input type="button" class="btn submit-button" value="payment" ng-click="update()">
35   - </div>
  34 + <input type="button" class="btn submit-button" value="payment" ng-click="update()">
  35 + </div>
  36 + </div>
  37 + </div>
  38 + </div>
  39 + </div>
36 40 </div>
37   -</div>
38   -
39   - <script>
40   - $(function() {
41   - $('#profile-image1').on('click', function() {
42   - $('#profile-image-upload').click();
43   - });
44   - });
45   - </script>
46   - </div>
47   -</div>
48   -</div>
49   - <div class="clearfix"></div>
  41 +<div class="clearfix"></div>
50 42 <footer>
51 43 <img id="footer" class="img-responsive banner">
52 44 <center class="footer"> Powered By <a class="footer-link" href="http://www.viithiisys.com/" target="_blank">Viithiisys Technolgies.</a>
53 45 </center>
54 46 </footer>
55   -
56   -
... ...
... ... @@ -11,8 +11,8 @@
11 11 controller: 'mainController'
12 12 })
13 13  
14   - // route for the about page
15   - .when('/verification/:id', {
  14 + // route for the paymentVerify page
  15 + .when('/paymentVerification/:id', {
16 16 templateUrl: 'pages/verify.html',
17 17 controller: 'verifyController'
18 18 })
... ... @@ -24,11 +24,10 @@
24 24 })
25 25 });
26 26  
27   - // create the controller and inject Angular's $scope
28   - scotchApp.controller('mainController', function($scope, $http, $location, $route, $rootScope) {
29   -
30   -
  27 + scotchApp.constant("BASE_URL", "http://139.59.68.74:4001/api")
31 28  
  29 + // create the controller and inject Angular's $scope
  30 + scotchApp.controller('mainController', function($scope, $http, $location, $route, $rootScope, BASE_URL) {
32 31 $scope.data = {
33 32 show: true,
34 33 hide: false
... ... @@ -48,12 +47,9 @@
48 47 $scope.data = {};
49 48 $scope.data.stage = 'Idea';
50 49 $scope.discountAmount = 0;
51   - //$scope.data.email = '';
52 50 $scope.check = false;
53 51 $scope.numberCheck = false;
54   - // $scope.tokencheck = false;
55 52 $scope.paymentResult = {};
56   - var BASE_URL = "http://139.59.68.74:4001/api";
57 53 var data = {
58 54 "amount": $scope.payingAmnt,
59 55 "currency": "INR",
... ... @@ -66,14 +62,12 @@
66 62 };
67 63  
68 64 $scope.emailcheck = function(val) {
69   - //console.log('val', val);
70 65 if (val == undefined) {
71 66 $('#invalidEmail').css('display', 'block');
72 67 } else {
73 68 $http({
74 69 method: 'GET',
75 70 url: BASE_URL + '/applicants?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}',
76   - //data: email,
77 71 headers: {}
78 72 }).then(function mySuccess(searchResult) {
79 73 console.log("searchResult1===>", searchResult)
... ... @@ -122,7 +116,6 @@
122 116 $scope.discountAmount = 0;
123 117 } else {
124 118 $scope.tokencheck = true;
125   - // $('#alreadyExist').css('display', 'block');
126 119 }
127 120 },function(err){
128 121 console.log(err)
... ... @@ -147,7 +140,6 @@
147 140  
148 141 /*****THIS IS FOR STEP ONE FORM ******/
149 142 $scope.next = function() {
150   - var BASE_URL = "http://139.59.68.74:4001/api";
151 143 $scope.data.status = null
152 144 if ($scope.data.stage == undefined || $scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined || $scope.data.city == undefined) {
153 145 var x = document.getElementById("snackbar")
... ... @@ -177,7 +169,6 @@
177 169  
178 170 }
179 171  
180   -
181 172 $scope.calculateAmount = function(){
182 173 if ($scope.data.stage == "Idea") {
183 174 console.log("$scope.data", $scope.data)
... ... @@ -205,11 +196,7 @@
205 196 }
206 197  
207 198 /*****THIS IS FOR STEP THREE FORM ******/
208   - $scope.create = function() {
209   - console.log("$scope.data.identity", $scope.data.identity)
210   - /*****PAYMENT WITH 18% GST*****/
211   -
212   -
  199 + $scope.create = function() {
213 200 if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) {
214 201 var x = document.getElementById("snackbar")
215 202 x.className = "show";
... ... @@ -217,33 +204,6 @@
217 204 x.className = x.className.replace("show", "");
218 205 }, 3000);
219 206 } else if ($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) {
220   -
221   -
222   - // if($scope.data.identity == "student"){
223   -
224   - // var image = BASE_URL+'/container1s/proof/download/'
225   - // console.log("image",image)
226   - // var image = document.getElementById('picture').files[0];
227   - // var imagePath = image.name;
228   - // $scope.NewIamge = image + imagePath;
229   - // $scope.data.pic = $scope.NewIamge;
230   - // var fd = new FormData()
231   - // fd.append('file',image);
232   - // $http({
233   - // method:'POST',
234   - // url: BASE_URL+'/container1s/proof/upload',
235   - // data:fd,
236   - // transformRequest:angular.identity,
237   - // headers:{'Content-Type':undefined}
238   - // }).then(function mySuccess(sucessResponse) {
239   -
240   -
241   - // }, function myError(error) {
242   - // });
243   -
244   - // }
245   - var BASE_URL = "http://139.59.68.74:4001/api";
246   - console.log("BASE_URL", BASE_URL)
247 207 $scope.infoForm = true;
248 208 console.log("sdasdasdsa");
249 209 $scope.data.stage = $scope.data.stage;
... ... @@ -332,24 +292,14 @@
332 292 }, 3000);
333 293 }
334 294  
335   - // $scope.lastpage = function(){
336   - // console.log("sdasd");
337   - // $('.sectors-card').css('display', 'inherit');
338   - // $('.form-all').css('display', 'inherit');
339   - // $('.submit-button').css('display', 'inherit');
340   - // }
341 295 /*kk***This code for change data when click to chooses stages***/
342 296 $scope.businessmodel = true;
343 297 $scope.Idea = true;
344 298 $scope.current = true;
345 299  
346 300 $scope.stage = function(stage) {
347   - // $('.sectors-card').css('display', 'block');
348   - // $('.form-all').css('display', 'block');
349   - // $('.identity-shadow').css('display', 'block');
350   - // $('.step-two-form').css('display', 'block');
351   - // $('.step-three-form').css('display', 'block');
352   -
  301 + $scope.stagekeyPress();
  302 + console.log("stage--2",stage)
353 303 if (stage == 'Idea') {
354 304 $scope.current = 10;
355 305 $scope.prototyp = false;
... ... @@ -359,6 +309,7 @@
359 309 $scope.pitch = false;
360 310 $scope.financials = false;
361 311 $scope.businessmodel = true;
  312 + $scope.data.stage = stage;
362 313 // for right content
363 314 $scope.Idea = true;
364 315 $scope.Product = false;
... ... @@ -372,6 +323,7 @@
372 323 $scope.pitch = true;
373 324 $scope.financials = true;
374 325 $scope.businessmodel = false;
  326 + $scope.data.stage = stage;
375 327 // for right content
376 328 $scope.Idea = false;
377 329 $scope.Product = true;
... ... @@ -389,119 +341,14 @@
389 341 $scope.Idea = false;
390 342 $scope.Product = false;
391 343 $scope.Growth = true;
  344 + $scope.data.stage = stage;
392 345 }
393 346 }
394   -
395   - // $scope.sector = function(sector){
396   - // if (sector == 'retail') {
397   - // $scope.current = true;
398   -
399   - // }else if(sector == 'b2b commerce') {
400   - // $scope.current = true;
401   -
402   - // }else if(sector == 'agritech') {
403   - // $scope.current = true;
404   -
405   - // }else if(sector == 'travel') {
406   - // $scope.current = true;
407   -
408   - // }else if(sector == 'fintech') {
409   - // $scope.current = true;
410   -
411   - // }else if(sector == 'hyperlocal services') {
412   - // $scope.current = true;
413   -
414   - // }else if(sector == 'education') {
415   - // $scope.current = true;
416   -
417   - // }else if(sector == 'rural') {
418   - // $scope.current = true;
419   - // }
420   - // }
421   - // $scope.sector = function(sector){
422   - // if (sector == 'retail') {
423   - // $scope.current = true;
424   -
425   - // }else if(sector == 'b2b commerce') {
426   - // $scope.current = true;
427   -
428   - // }else if(sector == 'agritech') {
429   - // $scope.current = true;
430   -
431   - // }else if(sector == 'travel') {
432   - // $scope.current = true;
433   -
434   - // }else if(sector == 'fintech') {
435   - // $scope.current = true;
436   -
437   - // }else if(sector == 'hyperlocal services') {
438   - // $scope.current = true;
439   -
440   - // }else if(sector == 'education') {
441   - // $scope.current = true;
442   -
443   - // }else if(sector == 'rural') {
444   - // $scope.current = true;
445   - // }
446   - // }
447   -
448   - // $scope.entername = function(name){
449   - // if (name == undefined) {
450   - // $scope.current = false;
451   - // }else if (name != undefined){
452   - // $scope.current = true;
453   - // }
454   - // }
455   - // $scope.enteremail = function(email){
456   - // if (email == undefined) {
457   - // $scope.current = false;
458   - // }else if (email != undefined){
459   - // $scope.current = true;
460   - // }
461   - // }
462   - // $scope.enternumber = function(number){
463   - // if (name == undefined) {
464   - // $scope.current = false;
465   - // }else if (name != undefined){
466   - // $scope.current = true;
467   - // }
468   - // }
469   - // $scope.selectcity = function(city){
470   - // console.log("city",city);
471   - // if (name == undefined) {
472   - // $scope.current = false;
473   - // }else if (name != undefined){
474   - // $scope.current = true;
475   - // }
476   - // }
477   - // $scope.entertechnology = function(technology){
478   - // console.log("technology",technology);
479   - // if (name == undefined) {
480   - // $scope.current = false;
481   - // }else if (name != undefined){
482   - // $scope.current = true;
483   - // }
484   - // }
485   - // $scope.enterproblem = function(problem){
486   - // console.log("problem",problem);
487   - // if (name == undefined) {
488   - // $scope.current = false;
489   - // }else if (name != undefined){
490   - // $scope.current = true;
491   - // }
492   - // }
493   - // $scope.entersolution = function(solution){
494   - // console.log("solution",solution);
495   - // if (name == undefined) {
496   - // $scope.current = false;
497   - // }else if (name != undefined){
498   - // $scope.current = true;
499   - // }
500   - // }
501 347 $scope.enterbusiness = function(business) {
502 348 console.log("business", business);
503 349 if (name == undefined) {
504 350 $scope.current = false;
  351 +
505 352 } else if (name != undefined) {
506 353 $scope.current = true;
507 354 }
... ... @@ -635,14 +482,18 @@
635 482 $('.icon-circle-q').css('background-color', 'rgb(66, 181, 73)');
636 483 }
637 484 }
  485 + $scope.changeReferalIconColor = function(referalToken){
  486 + if (referalToken == undefined || referalToken == '') {
  487 + $('.referel-icon').css('background-color', 'rgb(102, 102, 102)');
  488 + }else {
  489 + $('.referel-icon').css('background-color', 'rgb(66, 181, 73)');
  490 + }
  491 + }
638 492  
639   - // create a message to display in our view
640   - // $scope.message = 'Everyone come and see how good I look!';
641 493 });
642 494  
643   - scotchApp.controller('verifyController', function($scope, $http, $location, $route) {
  495 + scotchApp.controller('verifyController', function($scope, $http, $location, $route,BASE_URL) {
644 496 $scope.pendingPaymentId = $route.current.params.id
645   - var BASE_URL = "http://139.59.68.74:4001/api";
646 497 $http({
647 498 method: "GET",
648 499 url: BASE_URL + '/applicants/' + $scope.pendingPaymentId,
... ... @@ -657,7 +508,6 @@
657 508 }).then(function mySuccess(response) {
658 509 $scope.paymentRecord = response.data;
659 510 }, function myError(response) {
660   - // $scope.paymentRecord = response.data;
661 511 });
662 512 }, function myError(response) {
663 513 $scope.myWelcome = response.statusText;
... ... @@ -668,14 +518,11 @@
668 518  
669 519 $scope.pendingPaymentId = '';
670 520  
671   - var BASE_URL = "http://139.59.68.74:4001/api";
672   -
673 521 $scope.update = function() {
674 522  
675 523 $http({
676 524 method: 'GET',
677 525 url: BASE_URL + '/payments?filter={"where":{"applicantId": ' + $scope.pendingPaymentId + '}}',
678   - //data: email,
679 526 headers: {}
680 527 }).then(function mySuccess(searchResult) {
681 528 if (searchResult.data[0].status == "pending") {
... ... @@ -735,8 +582,7 @@
735 582 }
736 583 });
737 584  
738   - scotchApp.controller('ambassadorController', function($scope, $http, $location, $route) {
739   -
  585 + scotchApp.controller('ambassadorController', function($scope, $http, $location, $route,BASE_URL) {
740 586 $scope.data = {};
741 587 $scope.submit = function() {
742 588 console.log($scope.data.name)
... ... @@ -745,7 +591,7 @@
745 591 var numberSpliced = randomNumber.slice(2,5);
746 592 $scope.data.referalToken = nameSpliced+numberSpliced;
747 593 $scope.data.referalToken = $scope.data.referalToken.toUpperCase();
748   - var BASE_URL = "http://139.59.68.74:4001/api";
  594 +
749 595 $http({
750 596 method: 'POST',
751 597 url: BASE_URL + '/ambassadors',
... ... @@ -754,8 +600,13 @@
754 600 }).then(function mySuccess(result) {
755 601 console.log("result", result)
756 602 $scope.detail = result;
757   -
  603 + $('#myModal').modal('show');
  604 + $scope.data.name = '';
  605 + $scope.data.email = '';
  606 + $scope.data.mobile = '';
  607 +
758 608 }, function myError(error) {});
  609 + console.log($scope.data)
759 610 }
760 611 });
761 612  
... ...