diff --git a/src/app/components/authentication/authentication.controller.js b/src/app/components/authentication/authentication.controller.js
index 45fd1f2..42f8b7c 100644
--- a/src/app/components/authentication/authentication.controller.js
+++ b/src/app/components/authentication/authentication.controller.js
@@ -6,19 +6,82 @@
function loginCtrl($scope, $rootScope, $state, $mdDialog,$log, AUTH_EVENTS, LoginService ,toaster) {
$scope.data={}
+ var checkData=0;
$scope.create = function() {
LoginService.createForm().save($scope.data).$promise.then(function(result) {
if(result != null){
- toaster.success("form successfully created");
- // $state.go('app.awards');
+ toaster.success("Registration done successfully");
}
- }, function error(error) {
- if(error){
- toaster.error("Server error");
- }
- });
- }
+ if(checkData != 0){
+ $mdToast.show(
+ $mdToast.simple()
+ .textContent('Please verify your form again')
+ .position($scope.getToastPosition())
+ .hideDelay(3000)
+ );
+ checkData++;
+ }else{
+
+ var i = 0;
+ var applicationFees = 100;
+ $scope.applicationFees = applicationFees*100;
+ var options = {
+ "key": "rzp_test_TxoEstU3hr7Ltw",
+ "amount": $scope.applicationFees,
+ "currency": "INR",
+ "status": "done",
+
+
+ "theme": {
+ "color": "#2196f3 ",
+ "image_padding":"NO"
+ },
+ "modal": {
+ "ondismiss": function(){
+ console.log("===ondismiss====");
+ }
+ },
+ "handler": function (response){
+ console.log("response===",response)
+ createPayment(response)
+ }
+ };
+ var rzp1 = new Razorpay(options);
+ rzp1.open();
+
+ function createPayment(response){
+ // var date= new Date();
+ // $scope.registration.paymentId = response.razorpay_payment_id;
+ // $scope.registration.paymentDate = date.toISOString();
+ // $scope.registration.amount = $scope.registrationFees/100;
+ // $scope.registration.paymentType = "registration fees";
+ // var setDate = $scope.registrationDate.setMonth($scope.registrationDate.getMonth());
+ // var registrationDate = new Date(setDate).getMonth() + 1;
+ // $scope.registration.dob = $scope.registrationDate.getFullYear() +"-"+ registrationDate +"-"+$scope.registrationDate.getDate();
+
+ console.log("$scope.registration",$scope.registration);
+
+
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ // }
+ })
+ }
}
diff --git a/src/app/components/authentication/authentication.service.js b/src/app/components/authentication/authentication.service.js
index 3a2c958..809074b 100644
--- a/src/app/components/authentication/authentication.service.js
+++ b/src/app/components/authentication/authentication.service.js
@@ -7,11 +7,16 @@
function LoginService($q, $http, $rootScope, $resource, BASE_URL, USER_ROLES) {
this.createForm = function(){
- return $resource(BASE_URL+'/userProfiles',
+ return $resource(BASE_URL+'/applicants',
{});
}
+
+ // this.createForm = function(){
+ // return $resource(BASE_URL+'/applicants',
+ // {});
+
+ // }
}
-
})();
\ No newline at end of file
diff --git a/src/app/components/authentication/template/login.html b/src/app/components/authentication/template/login.html
index 3126fb8..2ca8fe0 100644
--- a/src/app/components/authentication/template/login.html
+++ b/src/app/components/authentication/template/login.html
@@ -1,3 +1,5 @@
+
+
@@ -13,8 +15,8 @@
-
-
+
+
@@ -22,14 +24,9 @@
-
+
place
-
-
-
-
- payment
-
+
submit