Commit ea3c311267fcde7bab35b6138bfd821e27499b54
1 parent
be08b6f5ed
Exists in
master
and in
1 other branch
complete
Showing
4 changed files
with
118 additions
and
84 deletions
Show diff stats
css/custom.css
pages/ambassador.html
1 | -<!-- <!DOCTYPE html> | |
2 | -<html> | |
3 | -<head> | |
4 | - <div style="text-align:center;margin-bottom:3%;"> | |
5 | - <h4>Startup Ambassador</h4> | |
6 | - </div> | |
7 | -</head> | |
8 | -<body> | |
9 | - <div style="text-align:center"> | |
10 | - <form> | |
11 | - Name: | |
12 | - <input type="text" name="name" ng-model="data.name"> | |
13 | - <br><br> | |
14 | - Mobile: | |
15 | - <input type="text" name="mobile" ng-model="data.mobile"> | |
16 | - <br><br> | |
17 | - Email: | |
18 | - <input type="text" name="email" ng-model="data.email"> | |
19 | - <br><br> | |
20 | - <div> | |
21 | - <button type="button" class="btn btn-secondary" value="Submit" ng-click="submit()">Submit</button> | |
22 | - </div> | |
23 | - </form> | |
24 | - </div> | |
25 | -</body> | |
26 | -</html> --> | |
27 | - | |
28 | - | |
29 | - | |
30 | - | |
31 | - | |
32 | - | |
33 | - | |
34 | - | |
35 | -<!-- <div class="jumbotron text-center"> | |
36 | - <h1>Home Page</h1> | |
37 | - | |
38 | - <p>{{ message }}</p> | |
39 | - </div> --> | |
40 | -<!-- <div ng-if="checkView"> --> | |
41 | 1 | <div class="header"> |
42 | 2 | <img src="images/white.png" class="logo"> |
43 | 3 | </div> |
... | ... | @@ -169,7 +129,7 @@ |
169 | 129 | <button type="button" ng-click="tokenCall(data.referalToken)" class="pull-right apply-coupen-btn">Apply</button> |
170 | 130 | </div> --> |
171 | 131 | <div class="clearfix"></div> |
172 | - <div class="text-center"> | |
132 | + <div style="margin-bottom: 10%;" class="text-center"> | |
173 | 133 | <input type="submit" class="btn submit-button" data-toggle="modal" data-target="#myModal" ng-disabled="applicantForm.$invalid|| check|| numberCheck" value="Submit" ng-click="submit()"> |
174 | 134 | </div> |
175 | 135 | </div> |
... | ... | @@ -184,7 +144,7 @@ |
184 | 144 | </footer> |
185 | 145 | <!-- </div> CLOSE CHECK VIEW --> |
186 | 146 | <div ng-if="verifyView"> |
187 | - <div style="margin-bottom: 0px;" class="text-center"> | |
147 | + <div class="text-center"> | |
188 | 148 | <input type="button" class="btn submit-button" ng-disabled="applicantForm.$invalid" value="check the status" ng-click="update()"> |
189 | 149 | <!-- <button ng-disabled="applicantForm.$invalid">Save</button> --> |
190 | 150 | </div> |
... | ... | @@ -194,21 +154,12 @@ |
194 | 154 | <div class="modal fade" id="myModal" role="dialog"> |
195 | 155 | <div class="modal-dialog" style="left: auto;"> |
196 | 156 | <div class="modal-content"> |
197 | - <div class="modal-header"> | |
198 | - <button type="button" class="close" data-dismiss="modal">×</button> | |
199 | - <h4 class="modal-title">Modal Header</h4> | |
157 | + <div class="modal-body" style="text-align:center;margin-top:5%"> | |
158 | + <p style="font-size:24px">Your Refral Token is <b>{{data.referalToken}}</b>.</p> | |
200 | 159 | </div> |
201 | - <div class="modal-body"> | |
202 | - <p>Some text in the modal.</p> | |
203 | - </div> | |
204 | - <div class="modal-footer"> | |
205 | - <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |
160 | + <div style="text-align:center;margin-bottom:5%"> | |
161 | + <button style="color: #fff;background-color: #4CAF50;" type="button" class="btn btn-default1" data-dismiss="modal">Close</button> | |
206 | 162 | </div> |
207 | 163 | </div> |
208 | 164 | </div> |
209 | 165 | </div> |
210 | - | |
211 | - | |
212 | - | |
213 | - | |
214 | - | ... | ... |
pages/home.html
... | ... | @@ -7,7 +7,6 @@ |
7 | 7 | <div class="header"> |
8 | 8 | <img src="images/white.png" class="logo"> |
9 | 9 | </div> |
10 | - | |
11 | 10 | <!-- CLOSE HEADER --> |
12 | 11 | <form name="applicantForm" id="signupForm"> |
13 | 12 | <div class="col-xs-12 col-md-10 col-md-offset-1"> |
... | ... | @@ -488,7 +487,7 @@ |
488 | 487 | </div> |
489 | 488 | <div class="clearfix"></div> |
490 | 489 | <div class="text-center"> |
491 | - <input type="submit" class="btn submit-button" data-toggle="modal" data-target="#myModal" ng-disabled="applicantForm.$invalid|| check|| numberCheck" value="Submit" ng-click="create()"> | |
490 | + <input type="submit" class="btn submit-button" data-toggle="modal" data-target="#myModal" ng-disabled="applicantForm.$invalid|| check|| numberCheck" value="Submit" ng-click="calculateAmount()"> | |
492 | 491 | </div> |
493 | 492 | </div> |
494 | 493 | <!-- CLOSE step-two-form --> |
... | ... | @@ -512,15 +511,91 @@ |
512 | 511 | <div class="modal fade" id="myModal" role="dialog"> |
513 | 512 | <div class="modal-dialog" style="left: auto;"> |
514 | 513 | <div class="modal-content"> |
515 | - <div class="modal-header"> | |
516 | - <button type="button" class="close" data-dismiss="modal">×</button> | |
517 | - <h4 class="modal-title">Modal Header</h4> | |
518 | - </div> | |
519 | - <div class="modal-body"> | |
520 | - <p>Some text in the modal.</p> | |
521 | - </div> | |
522 | - <div class="modal-footer"> | |
523 | - <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |
514 | + <table width="100%" border="0" align="right" cellpadding="0" cellspacing="0" style="border:1px solid #f6f6eb;margin-top:10px"> | |
515 | + <tbody style="background-color:#f9f9f9"> | |
516 | + <tr> | |
517 | + <td bgcolor="#efefeb" style="font-size:1px;line-height:1px"></td> | |
518 | + </tr> | |
519 | + <tr> | |
520 | + <td align="left" valign="top" style="padding:10px"> | |
521 | + <table width="100%" border="0" cellspacing="0" cellpadding="0"> | |
522 | + <tbody> | |
523 | + <tr> | |
524 | + <td align="left" valign="middle" style="color:#5e5e5e;font-size:20px;line-height:26px;font-family:Avenir-Heavy,arial,sans-serif">Ticket Summary</td> | |
525 | + </tr> | |
526 | + </tbody> | |
527 | + </table> | |
528 | + </td> | |
529 | + </tr> | |
530 | + </tbody> | |
531 | + <tbody> | |
532 | + <tr> | |
533 | + <td bgcolor="#efefeb" style="font-size:1px;line-height:1px"></td> | |
534 | + </tr> | |
535 | + <tr> | |
536 | + <td align="left" valign="top" style="padding:10px"> | |
537 | + <table width="100%" border="0" cellspacing="0" cellpadding="0"> | |
538 | + <tbody> | |
539 | + <tr> | |
540 | + <td align="left" valign="middle" style="color:#5e5e5e;font-size:16px;line-height:26px;font-family:Avenir-Heavy,arial,sans-serif">Ticket Amount</td> | |
541 | + <td align="right" valign="middle" style="color:#5e5e5e;font-size:18px;line-height:26px;font-family:Avenir-Heavy,arial,sans-serif">{{ticketAmnt}}</td> | |
542 | + </tr> | |
543 | + </tbody> | |
544 | + </table> | |
545 | + </td> | |
546 | + </tr> | |
547 | + <tr> | |
548 | + <td bgcolor="#efefeb" style="font-size:1px;line-height:1px"></td> | |
549 | + </tr> | |
550 | + <tr> | |
551 | + <td align="left" valign="top" style="padding:10px"> | |
552 | + <table width="100%" border="0" cellspacing="0" cellpadding="0"> | |
553 | + <tbody> | |
554 | + <tr> | |
555 | + <td align="left" valign="middle" style="color:#5e5e5e;font-size:16px;line-height:26px;font-family:Avenir-Heavy,arial,sans-serif">Discount</td> | |
556 | + <td align="right" valign="middle" style="color:#5e5e5e;font-size:18px;line-height:26px;font-family:Avenir-Heavy,arial,sans-serif">{{discountAmount}}</td> | |
557 | + </tr> | |
558 | + </tbody> | |
559 | + </table> | |
560 | + </td> | |
561 | + </tr> | |
562 | + <tr> | |
563 | + <td bgcolor="#efefeb" style="font-size:1px;line-height:1px"></td> | |
564 | + </tr> | |
565 | + <tr> | |
566 | + <td align="left" valign="top" style="padding:10px"> | |
567 | + <table width="100%" border="0" cellspacing="0" cellpadding="0"> | |
568 | + <tbody> | |
569 | + <tr> | |
570 | + <td align="left" valign="middle" style="color:#5e5e5e;font-size:14px;line-height:26px;font-family:Avenir-Medium,arial,sans-serif">GST</td> | |
571 | + <td align="right" valign="middle" style="color:#5e5e5e;font-size:16px;line-height:26px;font-family:Avenir-Heavy,arial,sans-serif">{{taxTotal}}</td> | |
572 | + </tr> | |
573 | + </tbody> | |
574 | + </table> | |
575 | + </td> | |
576 | + </tr> | |
577 | + <tr> | |
578 | + <td bgcolor="#efefeb" style="font-size:1px;line-height:1px"></td> | |
579 | + </tr> | |
580 | + <tr> | |
581 | + <td align="left" valign="top" bgcolor="#f9f9f9" style="padding:10px"> | |
582 | + <table width="100%" border="0" cellspacing="0" cellpadding="0"> | |
583 | + <tbody> | |
584 | + <tr> | |
585 | + <td align="left" valign="middle" style="color:#5e5e5e;font-size:22px;line-height:26px;font-family:Avenir-Heavy,arial,sans-serif">Total Amount</td> | |
586 | + <td align="right" valign="middle" style="color:#29bd9d;font-size:24px;line-height:26px;font-family:Avenir-Heavy,arial,sans-serif">{{payingAmnt}}</td> | |
587 | + </tr> | |
588 | + </tbody> | |
589 | + </table> | |
590 | + </td> | |
591 | + </tr> | |
592 | + <tr> | |
593 | + <td bgcolor="#efefeb" style="font-size:1px;line-height:1px"></td> | |
594 | + </tr> | |
595 | + </tbody> | |
596 | + </table> | |
597 | + <div style="text-align:center;margin-bottom:5%"> | |
598 | + <button type="button" style="color:#fff;background-color:#4CAF50;margin-top:5%" class="btn btn-default" data-dismiss="modal" ng-click="create()">Proceed to Pay</button> | |
524 | 599 | </div> |
525 | 600 | </div> |
526 | 601 | </div> | ... | ... |
script.js
... | ... | @@ -47,11 +47,11 @@ |
47 | 47 | $scope.author = 'Swarn Singh'; |
48 | 48 | $scope.data = {}; |
49 | 49 | $scope.data.stage = 'Idea'; |
50 | - | |
50 | + $scope.discountAmount = 0; | |
51 | 51 | //$scope.data.email = ''; |
52 | 52 | $scope.check = false; |
53 | 53 | $scope.numberCheck = false; |
54 | - $scope.tokencheck = false; | |
54 | + // $scope.tokencheck = false; | |
55 | 55 | $scope.paymentResult = {}; |
56 | 56 | var BASE_URL = "http://0.0.0.0:4001/api"; |
57 | 57 | var data = { |
... | ... | @@ -101,6 +101,7 @@ |
101 | 101 | console.log("searchResult===>", searchResult) |
102 | 102 | if (searchResult.data.length == 0) { |
103 | 103 | $scope.numberCheck = false; |
104 | + | |
104 | 105 | } else { |
105 | 106 | $scope.numberCheck = true; |
106 | 107 | $('#noExist').css('display', 'block'); |
... | ... | @@ -118,9 +119,8 @@ |
118 | 119 | .then(function(searchResult) { |
119 | 120 | if (searchResult.data.length == 0) { |
120 | 121 | $scope.tokencheck = false; |
121 | - console.log("kuch ni haiga") | |
122 | + $scope.discountAmount = 0; | |
122 | 123 | } else { |
123 | - console.log("haiga g haiga") | |
124 | 124 | $scope.tokencheck = true; |
125 | 125 | // $('#alreadyExist').css('display', 'block'); |
126 | 126 | } |
... | ... | @@ -177,30 +177,38 @@ |
177 | 177 | |
178 | 178 | } |
179 | 179 | |
180 | - /*****THIS IS FOR STEP THREE FORM ******/ | |
181 | - $scope.create = function() { | |
182 | - console.log("$scope.data.identity", $scope.data.identity) | |
183 | - /*****PAYMENT WITH 18% GST*****/ | |
184 | - if ($scope.data.stage == "Idea") { | |
180 | + | |
181 | + $scope.calculateAmount = function(){ | |
182 | + if ($scope.data.stage == "Idea") { | |
185 | 183 | console.log("$scope.data", $scope.data) |
186 | - $scope.payingAmnt = 59000; | |
184 | + $scope.ticketAmnt = 500; | |
187 | 185 | } |
188 | 186 | |
189 | 187 | if ($scope.data.stage == "Product") { |
190 | - $scope.payingAmnt = 118000; | |
188 | + $scope.ticketAmnt = 1000; | |
191 | 189 | } |
192 | 190 | |
193 | 191 | if ($scope.data.stage == "Growth") { |
194 | - $scope.payingAmnt = 236000; | |
192 | + $scope.ticketAmnt = 2000; | |
195 | 193 | } |
196 | 194 | |
197 | 195 | if($scope.tokencheck == true){ |
198 | - var amount = $scope.payingAmnt | |
199 | - var discountAmount = (amount * 10)/100 | |
200 | - $scope.payingAmnt = amount - discountAmount | |
196 | + var amount = $scope.ticketAmnt | |
197 | + $scope.discountAmount = (amount * 10)/100 | |
201 | 198 | console.log("finalAmount====>",$scope.payingAmnt) |
202 | 199 | } |
203 | 200 | |
201 | + var taxAmount = $scope.ticketAmnt - $scope.discountAmount | |
202 | + $scope.taxTotal = (taxAmount * 18)/100 | |
203 | + $scope.payingAmnt = taxAmount + $scope.taxTotal | |
204 | + console.log("taxincludedamount----", $scope.payingAmnt) | |
205 | + } | |
206 | + | |
207 | + /*****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 | + | |
204 | 212 | |
205 | 213 | if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { |
206 | 214 | var x = document.getElementById("snackbar") |
... | ... | @@ -210,7 +218,6 @@ |
210 | 218 | }, 3000); |
211 | 219 | } else if ($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { |
212 | 220 | |
213 | - var BASE_URL = "http://0.0.0.0:4001/api"; | |
214 | 221 | |
215 | 222 | // if($scope.data.identity == "student"){ |
216 | 223 | |
... | ... | @@ -254,7 +261,7 @@ |
254 | 261 | data.applicantId = result.data.id; |
255 | 262 | $scope.userId = result.data.id; |
256 | 263 | console.log("=====data=====", data) |
257 | - data.amount = $scope.payingAmnt / 100; | |
264 | + data.amount = $scope.payingAmnt; | |
258 | 265 | if ($scope.detail != null) { |
259 | 266 | $http({ |
260 | 267 | method: 'POST', |
... | ... | @@ -266,6 +273,7 @@ |
266 | 273 | }, function myError(error) {}); |
267 | 274 | } |
268 | 275 | var i = 0; |
276 | + $scope.payingAmnt = $scope.payingAmnt * 100; | |
269 | 277 | var options = { |
270 | 278 | "key": "rzp_test_YwHsVFiDIQ2WUQ", |
271 | 279 | "amount": $scope.payingAmnt, | ... | ... |