Commit e9ea6fde8e27f9fa3105f2977ed062d78f70f82d

Authored by Shilpi Saini
1 parent b13934fca2
Exists in master

changes in leh city

Showing 2 changed files with 122 additions and 124 deletions   Show diff stats
pages/registrationForm.html
... ... @@ -70,14 +70,14 @@
70 70 </div>
71 71 </div>
72 72 </div>
73   - <div class="form-group">
74   - <label>Coupon Code:</label>
  73 + <!-- <div class="form-group">
  74 + <label>Coupon Code:</label> -->
75 75 <!-- <input type="text" class="form-control" placeholder="If you have a coupon code then apply here"ng-model="data.referalToken"> -->
76   - <input type="text" class="form-control" ng-model="data.referalToken" style="position: relative;" placeholder="If you have a coupon code then apply here" ng-required="referalToken" ng-change="changeReferalIconColor(data.referalToken)">
  76 + <!-- <input type="text" class="form-control" ng-model="data.referalToken" style="position: relative;" placeholder="If you have a coupon code then apply here" ng-required="referalToken" ng-change="changeReferalIconColor(data.referalToken)">
77 77 <i class="material-icons coupon-approved" ng-if="tokencheck == true">check</i>
78 78 <i class="material-icons coupon-approved" style="color:red;" ng-if="tokencheck == false">close</i>
79 79 <button type="button" ng-click="tokenCall(data.referalToken)" class="pull-right apply-coupon-btn">Apply</button>
80   - </div>
  80 + </div> -->
81 81 </div>
82 82 <div class="clearfix"></div>
83 83 <div class="text-center">
... ...
... ... @@ -1365,54 +1365,52 @@ scotchApp.controller(&#39;registrationFormController&#39;, function($q, $scope, $http, $
1365 1365 $scope.data = {};
1366 1366 $scope.data.city = localStorage.getItem("city");
1367 1367 var data = {
1368   - "amount": $scope.payingAmnt,
1369   - "currency": "INR",
1370   - "status": "pending"
  1368 + "status": "captured"
1371 1369 }
1372 1370 //$scope.payingAmnt = 590;
1373   - $rootScope.tokenCall = function(val) {
1374   - if (val == undefined) {
1375   - $('#invalidToken').css('display', 'block');
1376   - } else {
1377   - val = val.toUpperCase();
1378   - if(((val == "SMVDU") && $scope.data.city != "Katra") || ((val == "LEH") && $scope.data.city != "Leh")){
1379   - $scope.tokencheck = false;
1380   - return;
1381   - }
1382   - $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": "' + val + '"}}')
1383   - .then(function(searchResult) {
1384   - if (searchResult.data.length == 0) {
1385   - $scope.tokencheck = false;
1386   - $scope.discountAmount = 0;
  1371 + // $rootScope.tokenCall = function(val) {
  1372 + // if (val == undefined) {
  1373 + // $('#invalidToken').css('display', 'block');
  1374 + // } else {
  1375 + // val = val.toUpperCase();
  1376 + // if(((val == "SMVDU") && $scope.data.city != "Katra") || ((val == "LEH") && $scope.data.city != "Leh")){
  1377 + // $scope.tokencheck = false;
  1378 + // return;
  1379 + // }
  1380 + // $http.get(BASE_URL + '/ambassadors?filter={"where": {"referalToken": "' + val + '"}}')
  1381 + // .then(function(searchResult) {
  1382 + // if (searchResult.data.length == 0) {
  1383 + // $scope.tokencheck = false;
  1384 + // $scope.discountAmount = 0;
1387 1385  
1388   - } else {
1389   - $scope.discountpercentage = searchResult.data[0].discount;
1390   - $scope.tokencheck = true;
1391   - }
1392   - $scope.ticketAmnt = 590;
1393   - var amount = $scope.ticketAmnt * 100
1394   - if($scope.tokencheck == true){
1395   - var amount = $scope.ticketAmnt
1396   - if($scope.discountpercentage == "100") {
1397   - $scope.discountpercentage = "99.9";
1398   - }
1399   - //console.log($scope.ticketAmnt)
1400   - $scope.percDiscount = $scope.discountpercentage/100;
1401   - //console.log($scope.percDiscount)
1402   - $scope.discountAmount = amount * $scope.percDiscount;
1403   - //console.log($scope.discountAmount)
1404   - }
1405   - var taxAmount = $scope.ticketAmnt - $scope.discountAmount
1406   - //console.log(taxAmount)
1407   - $scope.payingAmnt = taxAmount;
1408   - $scope.payingAmnt = $scope.payingAmnt.toFixed()
1409   - //console.log($scope.payingAmnt)
1410   - },function(err){
1411   - console.log(err)
1412   - });
  1386 + // } else {
  1387 + // $scope.discountpercentage = searchResult.data[0].discount;
  1388 + // $scope.tokencheck = true;
  1389 + // }
  1390 + // $scope.ticketAmnt = 590;
  1391 + // var amount = $scope.ticketAmnt * 100
  1392 + // if($scope.tokencheck == true){
  1393 + // var amount = $scope.ticketAmnt
  1394 + // if($scope.discountpercentage == "100") {
  1395 + // $scope.discountpercentage = "99.9";
  1396 + // }
  1397 + // //console.log($scope.ticketAmnt)
  1398 + // $scope.percDiscount = $scope.discountpercentage/100;
  1399 + // //console.log($scope.percDiscount)
  1400 + // $scope.discountAmount = amount * $scope.percDiscount;
  1401 + // //console.log($scope.discountAmount)
  1402 + // }
  1403 + // var taxAmount = $scope.ticketAmnt - $scope.discountAmount
  1404 + // //console.log(taxAmount)
  1405 + // $scope.payingAmnt = taxAmount;
  1406 + // $scope.payingAmnt = $scope.payingAmnt.toFixed()
  1407 + // //console.log($scope.payingAmnt)
  1408 + // },function(err){
  1409 + // console.log(err)
  1410 + // });
1413 1411  
1414   - }
1415   - };
  1412 + // }
  1413 + // };
1416 1414  
1417 1415 $scope.formRegister = function() {
1418 1416 //Analytics.trackEvent('register', 'click', 'Registration');
... ... @@ -1420,13 +1418,13 @@ scotchApp.controller(&#39;registrationFormController&#39;, function($q, $scope, $http, $
1420 1418 $scope.detail = {};
1421 1419 $scope.data.phone = "+91"+$scope.data.number;
1422 1420 console.log($scope.data.register)
1423   - if($scope.data.referalToken == null){
1424   - $scope.data.referalToken = "NA"
1425   - }
  1421 + // if($scope.data.referalToken == null){
  1422 + // $scope.data.referalToken = "NA"
  1423 + // }
1426 1424 if($scope.data.register == "Pitch"){
1427   - $scope.ticketAmnt = 590;
  1425 + $scope.ticketAmnt = 0;
1428 1426 }else {
1429   - $scope.ticketAmnt = 118;
  1427 + $scope.ticketAmnt = 0;
1430 1428 }
1431 1429 $http({
1432 1430 method: 'POST',
... ... @@ -1436,24 +1434,24 @@ scotchApp.controller(&#39;registrationFormController&#39;, function($q, $scope, $http, $
1436 1434 }).then(function mySuccess(result) {
1437 1435 $scope.detail = result;
1438 1436 data.applicantIndiaId = result.data.id;
1439   - var amount = $scope.ticketAmnt * 100
1440   - if($scope.tokencheck == true){
1441   - //console.log("test")
1442   - var amount = $scope.ticketAmnt
1443   - //console.log("test",$scope.ticketAmnt)
1444   - if($scope.discountpercentage == "100") {
1445   - $scope.discountpercentage = "99.9";
1446   - }
1447   - $scope.percDiscount = $scope.discountpercentage/100;
1448   - //console.log($scope.percDiscount)
1449   - $scope.discountAmount = amount * $scope.percDiscount;
1450   - //console.log($scope.discountAmount)
1451   - }
1452   - var taxAmount = $scope.ticketAmnt - $scope.discountAmount
1453   - $scope.payingAmnt = taxAmount;
1454   - $scope.payingAmnt = $scope.payingAmnt.toFixed()
1455   - //console.log($scope.payingAmnt)
1456   - data.amount = $scope.payingAmnt;
  1437 + // var amount = $scope.ticketAmnt * 100
  1438 + // if($scope.tokencheck == true){
  1439 + // //console.log("test")
  1440 + // var amount = $scope.ticketAmnt
  1441 + // //console.log("test",$scope.ticketAmnt)
  1442 + // if($scope.discountpercentage == "100") {
  1443 + // $scope.discountpercentage = "99.9";
  1444 + // }
  1445 + // $scope.percDiscount = $scope.discountpercentage/100;
  1446 + // //console.log($scope.percDiscount)
  1447 + // $scope.discountAmount = amount * $scope.percDiscount;
  1448 + // //console.log($scope.discountAmount)
  1449 + // }
  1450 + // var taxAmount = $scope.ticketAmnt - $scope.discountAmount
  1451 + // $scope.payingAmnt = taxAmount;
  1452 + // $scope.payingAmnt = $scope.payingAmnt.toFixed()
  1453 + // //console.log($scope.payingAmnt)
  1454 + // data.amount = $scope.payingAmnt;
1457 1455 //var amount = $scope.ticketAmnt * 100
1458 1456 if($scope.detail != null){
1459 1457 $http({
... ... @@ -1466,63 +1464,63 @@ scotchApp.controller(&#39;registrationFormController&#39;, function($q, $scope, $http, $
1466 1464 $scope.loading = false;
1467 1465 //$scope.ambassadorId = paymentResult.data.ambassadorId
1468 1466 $scope.paymentResult = paymentResult;
1469   - //$location.path("/paytm/confirm")
  1467 + $location.path("/paytm/confirm")
1470 1468 }, function myError(error) {
1471 1469 });
1472 1470 }
1473 1471  
1474   - var i = 0;
1475   - $scope.payingAmntt = $scope.payingAmnt * 100;
1476   - //console.log($scope.payingAmntt)
1477   - var options = {
1478   - //"key": "rzp_test_YwHsVFiDIQ2WUQ",
1479   - "key": "rzp_live_mkmCb4FkstuWaS",
1480   - "amount": $scope.payingAmntt,
1481   -
1482   - "name": "Startup Jalsa",
1483   - "description":"amount",
1484   - "currency": "INR",
1485   - "status": "done",
1486   -
1487   - "prefill": {
1488   - "email": $scope.detail.email,
1489   - "contact": $scope.detail.phone
1490   - },
1491   -
1492   - "theme": {
1493   - "color": "#2196f3 ",
1494   - "image_padding":"NO"
1495   - },
1496   - "modal": {
1497   - "ondismiss": function(){
1498   - }
1499   - },
1500   - "handler": function (response){
1501   - createPayment(response);
1502   - }
1503   - };
1504   - var rzp1 = new Razorpay(options);
1505   - rzp1.open();
1506   - $scope.paymentResponse = {};
1507   - function createPayment(response){
1508   - console.log("response",response)
1509   - console.log($scope.paymentResult)
1510   - $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id;
1511   - $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId;
1512   - $scope.paymentResponse.amount = data.amount;
1513   - $scope.paymentResponse.currency = "INR";
1514   - $scope.paymentResponse.status = $scope.paymentResult.data.status;
1515   - $http({
1516   - method: 'PUT',
1517   - url: BASE_URL+'/paymentsIndia/'+$scope.paymentResult.data.id,
1518   - data: $scope.paymentResponse,
1519   - headers: {}
1520   - }).then(function mySuccess(searchResult) {
1521   - console.log("searchResult",searchResult)
1522   - $location.path("/confirm")
1523   - }, function myError(error) {
1524   - });
1525   - }
  1472 + // var i = 0;
  1473 + // $scope.payingAmntt = $scope.payingAmnt * 100;
  1474 + // //console.log($scope.payingAmntt)
  1475 + // var options = {
  1476 + // //"key": "rzp_test_YwHsVFiDIQ2WUQ",
  1477 + // "key": "rzp_live_mkmCb4FkstuWaS",
  1478 + // "amount": $scope.payingAmntt,
  1479 +
  1480 + // "name": "Startup Jalsa",
  1481 + // "description":"amount",
  1482 + // "currency": "INR",
  1483 + // "status": "done",
  1484 +
  1485 + // "prefill": {
  1486 + // "email": $scope.detail.email,
  1487 + // "contact": $scope.detail.phone
  1488 + // },
  1489 +
  1490 + // "theme": {
  1491 + // "color": "#2196f3 ",
  1492 + // "image_padding":"NO"
  1493 + // },
  1494 + // "modal": {
  1495 + // "ondismiss": function(){
  1496 + // }
  1497 + // },
  1498 + // "handler": function (response){
  1499 + // createPayment(response);
  1500 + // }
  1501 + // };
  1502 + // var rzp1 = new Razorpay(options);
  1503 + // rzp1.open();
  1504 + // $scope.paymentResponse = {};
  1505 + // function createPayment(response){
  1506 + // console.log("response",response)
  1507 + // console.log($scope.paymentResult)
  1508 + // $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id;
  1509 + // $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId;
  1510 + // $scope.paymentResponse.amount = data.amount;
  1511 + // $scope.paymentResponse.currency = "INR";
  1512 + // $scope.paymentResponse.status = $scope.paymentResult.data.status;
  1513 + // $http({
  1514 + // method: 'PUT',
  1515 + // url: BASE_URL+'/paymentsIndia/'+$scope.paymentResult.data.id,
  1516 + // data: $scope.paymentResponse,
  1517 + // headers: {}
  1518 + // }).then(function mySuccess(searchResult) {
  1519 + // console.log("searchResult",searchResult)
  1520 + // $location.path("/confirm")
  1521 + // }, function myError(error) {
  1522 + // });
  1523 + // }
1526 1524 //}
1527 1525  
1528 1526 }, function myError(error) {
... ...