Commit 5139fa05b6f1db05c88e7ede41cc280dc39b7ffc

Authored by Anchit Jindal
1 parent f306c78733
Exists in master

new filed added

app/views/fbo-admin/dashboard.controller.js
... ... @@ -18,6 +18,7 @@
18 18 $scope.user.companyName = '';
19 19 $scope.user.email = '';
20 20 $scope.user.password = '';
  21 + $scope.user.icao = '';
21 22 $scope.feature = {};
22 23 $scope.feature.level = 'silver';
23 24 $scope.feature.essintaPosSystem = false;
... ... @@ -41,6 +42,7 @@
41 42 $scope.comnayNameInvalid = false;
42 43 $scope.emailInvalid = false;
43 44 $scope.passwordInvalid = false;
  45 + $scope.icaoInvalid = false;
44 46  
45 47 $scope.companyNameValid = function(){
46 48 $scope.comnayNameInvalid = false;
... ... @@ -54,12 +56,19 @@
54 56 $scope.passwordInvalid = false;
55 57 $('.invalidPassword').removeClass('customErrorInput');
56 58 }
  59 + $scope.icaoValid = function(){
  60 + $scope.icaoInvalid = false;
  61 + $('.icaoNameError').removeClass('customErrorInput');
  62 + }
57 63  
58 64 $scope.userData = function(){
59 65 console.log('$scope.user', $scope.user);
60 66 if ($scope.user.companyName == '') {
61 67 $scope.comnayNameInvalid = true;
62 68 $('.companyNameError').addClass('customErrorInput');
  69 + }else if ($scope.user.icao == '') {
  70 + $scope.icaoInvalid = true;
  71 + $('.icaoNameError').addClass('customErrorInput');
63 72 }else if ($scope.user.email == '') {
64 73 $scope.emailInvalid = true;
65 74 $('.emailIdError').addClass('customErrorInput');
... ... @@ -75,7 +84,7 @@
75 84 $scope.user.username = $scope.user.email;
76 85 $scope.user.userType = 'fbo';
77 86 console.log($scope.user)
78   - var formdata = "companyName=" + $scope.user.companyName + "&email=" + $scope.user.email + "&username=" + $scope.user.username + "&firstName=" + $scope.user.firstName + "&lastName=" + $scope.user.lastName + "&password=" + $scope.user.password + "&phone=" + $scope.user.phone + "&mobile=" + $scope.user.mobile + "&status=" + $scope.user.status + "&userType=" + $scope.user.userType + "&clientNote=" + $scope.user.clientNote;
  87 + var formdata = "companyName=" + $scope.user.companyName + "&icao=" + $scope.user.icao + "&email=" + $scope.user.email + "&username=" + $scope.user.username + "&firstName=" + $scope.user.firstName + "&lastName=" + $scope.user.lastName + "&password=" + $scope.user.password + "&phone=" + $scope.user.phone + "&mobile=" + $scope.user.mobile + "&status=" + $scope.user.status + "&userType=" + $scope.user.userType + "&clientNote=" + $scope.user.clientNote;
79 88 FBOAdmin.registerUser(formdata).then(function(result) {
80 89 toastr.success('Created Successfully', {
81 90 closeButton: true
... ...
app/views/fbo-admin/dashboard.html
... ... @@ -17,16 +17,24 @@
17 17  
18 18 </div>
19 19 <div class="row wrapper border-bottom white-bg page-heading">
20   - <div class="col-lg-8">
  20 + <div class="col-lg-4">
21 21 <!-- <h2 ng-click="editName()" ng-show="showCompany" style="cursor: pointer;">Tellus Institute</h2> -->
22   - <div style="margin-top: 20px;">
23   - <input type="text" style="width:50%; float: left;" placeholder="Enter Company Name" ng-model="user.companyName" class="form-control companyNameError" ng-keyup="companyNameValid()">
  22 + <div style="margin: 5px;" class="form-group">
  23 + <label>Company Name</label>
  24 + <input type="text" style="width:80%; float: left;" placeholder="Enter Company Name" ng-model="user.companyName" class="form-control companyNameError" ng-keyup="companyNameValid()">
24 25 <span class="redAstrick" style="margin: 0 5px;">*</span>
25   - <label class="customErrorMessage" ng-show="comnayNameInvalid" style="margin-top: 7px;">This field is required.</label>
  26 + <label class="customErrorMessage" ng-show="comnayNameInvalid">This field is required.</label>
26 27 <div class="clearfix"></div>
27 28 </div>
28 29 </div>
29   - <div class="col-lg-4" style="margin-top: 20px; text-align: right;">
  30 + <div class="col-lg-4" >
  31 + <div style="margin: 5px;" class="form-group">
  32 + <label>ICAO Code <span class="redAstrick" style="margin: 0 5px;">*</span></label> <label class="customErrorMessage" ng-show="icaoInvalid">This field is required.</label>
  33 + <input type="text" style="width:50%" placeholder="Enter ICAO" ng-model="user.icao" class="form-control icaoNameError" ng-keyup="icaoValid()">
  34 + <div class="clearfix"></div>
  35 + </div>
  36 + </div>
  37 + <div class="col-lg-4" style="margin-top: 25px; text-align: right;">
30 38 <button type="button" class="btn btn-default btn-sm" ui-sref="index.fboAdmin">Cancel</button>
31 39 <button type="button" class="btn btn-primary btn-sm" ng-click="userData()">Save Changes</button>
32 40 </div>
... ...