Commit a6abbc45 authored by Vanavaraju's avatar Vanavaraju

Updated java changes based on backend team code refactoring

parent deb28aca
...@@ -2,7 +2,6 @@ package com.nisum.mytime.controller; ...@@ -2,7 +2,6 @@ package com.nisum.mytime.controller;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -24,7 +23,6 @@ import com.nisum.mytime.model.Account; ...@@ -24,7 +23,6 @@ import com.nisum.mytime.model.Account;
import com.nisum.mytime.model.AccountInfo; import com.nisum.mytime.model.AccountInfo;
import com.nisum.mytime.model.Domain; import com.nisum.mytime.model.Domain;
import com.nisum.mytime.model.Employee; import com.nisum.mytime.model.Employee;
import com.nisum.mytime.model.MasterData;
import com.nisum.mytime.service.IEmployeeService; import com.nisum.mytime.service.IEmployeeService;
import com.nisum.mytime.service.IRoleMappingService; import com.nisum.mytime.service.IRoleMappingService;
......
...@@ -15,13 +15,13 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -15,13 +15,13 @@ import org.springframework.web.bind.annotation.RestController;
import com.nisum.mytime.exception.handler.MyTimeException; import com.nisum.mytime.exception.handler.MyTimeException;
import com.nisum.mytime.model.MasterData; import com.nisum.mytime.model.MasterData;
import com.nisum.mytime.service.impl.MasterDataService; import com.nisum.mytime.service.IMasterDataService;
@RestController @RestController
public class MasterDataController { public class MasterDataController {
@Autowired @Autowired
MasterDataService masterDataService; IMasterDataService masterDataService;
@RequestMapping(value = "/getMasterData", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @RequestMapping(value = "/getMasterData", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Map<String, List<String>>> getMasterData() throws MyTimeException { public ResponseEntity<Map<String, List<String>>> getMasterData() throws MyTimeException {
......
...@@ -6,7 +6,6 @@ import java.util.List; ...@@ -6,7 +6,6 @@ import java.util.List;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.bson.types.ObjectId;
import org.hibernate.validator.constraints.NotBlank; import org.hibernate.validator.constraints.NotBlank;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.data.mongodb.core.mapping.Document;
......
...@@ -3,13 +3,14 @@ package com.nisum.mytime.service.impl; ...@@ -3,13 +3,14 @@ package com.nisum.mytime.service.impl;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nisum.mytime.exception.handler.MyTimeException; import com.nisum.mytime.exception.handler.MyTimeException;
import com.nisum.mytime.model.MasterData; import com.nisum.mytime.model.MasterData;
import com.nisum.mytime.repository.MasterDataRepo; import com.nisum.mytime.repository.MasterDataRepo;
import com.nisum.mytime.service.IMasterDataService; import com.nisum.mytime.service.IMasterDataService;
@Service("masterDataService")
public class MasterDataService implements IMasterDataService { public class MasterDataService implements IMasterDataService {
@Autowired @Autowired
......
...@@ -31,7 +31,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -31,7 +31,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
function getUserRole(profile){ function getUserRole(profile){
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "user/employee?emailId="+profile.getEmail() url : appConfig.appUri + "employees?emailId="+profile.getEmail()
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
var result = response.data; var result = response.data;
if(result == "" || result.length == 0){ if(result == "" || result.length == 0){
...@@ -50,7 +50,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -50,7 +50,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
function getAllUserRoles(){ function getAllUserRoles(){
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "user/getUserRoles" url : appConfig.appUri + "employees/active"
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
$scope.rolesData = response.data; $scope.rolesData = response.data;
}, function myError(response) { }, function myError(response) {
...@@ -61,7 +61,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -61,7 +61,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
function getMasterData(){ function getMasterData(){
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "user/getMasterData" url : appConfig.appUri + "getMasterData"
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
myFactory.setEmployementTypes(response.data['EmpType']); myFactory.setEmployementTypes(response.data['EmpType']);
myFactory.setFunctionalgroups(response.data['FunctionalGrp']) myFactory.setFunctionalgroups(response.data['FunctionalGrp'])
...@@ -78,7 +78,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -78,7 +78,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
function getAllLocations(){ function getAllLocations(){
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "user/getLocations" url : appConfig.appUri + "employees/locations/"
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
myFactory.setLocations(response.data); myFactory.setLocations(response.data);
}, function myError(response) { }, function myError(response) {
...@@ -88,7 +88,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -88,7 +88,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
function getAllAccounts(){ function getAllAccounts(){
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "user/getAccounts" url : appConfig.appUri + "accounts"
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
myFactory.setAccounts(response.data); myFactory.setAccounts(response.data);
}, function myError(response) { }, function myError(response) {
......
...@@ -120,7 +120,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -120,7 +120,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.getManagerDetails = function () { $scope.getManagerDetails = function () {
$http({ $http({
method: "GET", method: "GET",
url: appConfig.appUri + "/user/getManagers" url: appConfig.appUri + "/employees/managers/"
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
$scope.managers = response.data; $scope.managers = response.data;
}, function myError(response) { }, function myError(response) {
......
...@@ -255,9 +255,9 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog, ...@@ -255,9 +255,9 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
function deleteUserRole(empId, projectId,id){ function deleteUserRole(empId, projectId,id){
var record = {"id":id,"employeeId":empId,"projectId":projectId}; var record = {"id":id,"employeeId":empId,"projectId":projectId};
var loginEmpId = myFactory.getEmpId();
var req = { var req = {
method : 'POST', method : 'POST',
var loginEmpId = myFactory.getEmpId();
url : appConfig.appUri+ "projectTeam/deleteTeammate?loginEmpId="+loginEmpId, url : appConfig.appUri+ "projectTeam/deleteTeammate?loginEmpId="+loginEmpId,
headers : { headers : {
"Content-type" : "application/json" "Content-type" : "application/json"
......
...@@ -341,8 +341,14 @@ i.fa.fa-refresh:hover { ...@@ -341,8 +341,14 @@ i.fa.fa-refresh:hover {
} }
/* Grid Styles */ /* Grid Styles */
.grid-full-view {
height: calc(100vh - 195px) !important;
}
.grid-half-view {
height: calc(85vh - 215px) !important;
}
.ui-grid-contents-wrapper { .ui-grid-contents-wrapper {
/* height: 90% !important; */
} }
.ui-grid { .ui-grid {
border: none !important; border: none !important;
...@@ -382,7 +388,7 @@ i.fa.fa-refresh:hover { ...@@ -382,7 +388,7 @@ i.fa.fa-refresh:hover {
/* .ui-grid-contents-wrapper .ui-grid-header-cell div:empty { /* .ui-grid-contents-wrapper .ui-grid-header-cell div:empty {
background: #eeeef6; background: #eeeef6;
min-height: 30px; min-height: 30px;
} } */
.ui-grid-contents-wrapper .ui-grid-header-cell:last-child div:empty:last-child:after { .ui-grid-contents-wrapper .ui-grid-header-cell:last-child div:empty:last-child:after {
background: #eeeef6; background: #eeeef6;
content: ""; content: "";
...@@ -391,7 +397,7 @@ i.fa.fa-refresh:hover { ...@@ -391,7 +397,7 @@ i.fa.fa-refresh:hover {
height: 30px; height: 30px;
position: absolute; position: absolute;
right: -6px; right: -6px;
} */ }
.ui-grid-contents-wrapper .ui-grid-cell-contents { .ui-grid-contents-wrapper .ui-grid-cell-contents {
/* border-bottom: 1px solid #e5e5e5; */ /* border-bottom: 1px solid #e5e5e5; */
padding: 10px 8px; padding: 10px 8px;
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<div class="form-group"> <div class="form-group">
<div class="form-inline col-lg-12"> <div class="form-inline col-lg-12">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination <div id="gridTest" ui-grid="gridOptions" ui-grid-pagination
class="myGrid"> class="myGrid grid-half-view">
<div class="watermark" ng-show="!gridOptions.data.length">No <div class="watermark" ng-show="!gridOptions.data.length">No
data available</div> data available</div>
</div> </div>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div id="gridTest" ui-grid="gridOptionsOrgView" ui-grid-pagination <div id="gridTest" ui-grid="gridOptionsOrgView" ui-grid-pagination
class="myGrid"> class="myGrid grid-full-view">
<div class="watermark" ng-show="!gridOptionsOrgView.data.length">No <div class="watermark" ng-show="!gridOptionsOrgView.data.length">No
data available</div> data available</div>
</div> </div>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<div class="col-lg-12"> <div class="col-lg-12">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination <div id="gridTest" ui-grid="gridOptions" ui-grid-pagination
class="myGrid"> class="myGrid grid-full-view">
<div class="watermark" ng-show="!gridOptions.data.length">No <div class="watermark" ng-show="!gridOptions.data.length">No
data available</div> data available</div>
</div> </div>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination <div id="gridTest" ui-grid="gridOptions" ui-grid-pagination
class="myGrid"> class="myGrid grid-full-view">
<div class="watermark" ng-show="!gridOptions.data.length">No <div class="watermark" ng-show="!gridOptions.data.length">No
data available</div> data available</div>
</div> </div>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<div class="row col-lg-12"> <div class="row col-lg-12">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination <div id="gridTest" ui-grid="gridOptions" ui-grid-pagination
class="myGrid" style="width:99%;height:370px;margin-left:0px;"> class="myGrid grid-full-view">
<div class="watermark" ng-show="!gridOptions.data.length">No <div class="watermark" ng-show="!gridOptions.data.length">No
data available</div> data available</div>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
ng-init="getUserRoles()"> ng-init="getUserRoles()">
<div class="container-fluid mainDivHeaderClass"> <div class="container-fluid mainDivHeaderClass">
<div class="row"> <div class="row">
<div class="col-lg-6"> <div class="col-lg-6">
<h1 class="no-padding">Manage Employees</h1> <h1 class="no-padding">Manage Employees</h1>
</div> </div>
<div class="col-lg-6 add-emp no-padding"> <div class="col-lg-6 add-emp no-padding">
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div class="row col-lg-12"> <div class="row col-lg-12">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination <div id="gridTest" ui-grid="gridOptions" ui-grid-pagination
class="myGrid"> class="myGrid grid-full-view">
<div class="watermark" ng-show="!gridOptions.data.length">No <div class="watermark" ng-show="!gridOptions.data.length">No
data available</div> data available</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment