Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mytime
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Narendar Vakiti
mytime
Commits
9a8d3141
Commit
9a8d3141
authored
May 07, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ADDED FILTER IN MANAGE PROJECTS
parent
7847d4ec
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
16 deletions
+83
-16
EmployeeService.java
...n/java/com/nisum/myteam/service/impl/EmployeeService.java
+2
-0
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+51
-2
app.js
src/main/webapp/WEB-INF/js/app.js
+11
-2
profile.html
src/main/webapp/WEB-INF/templates/profile.html
+1
-1
projects.html
src/main/webapp/WEB-INF/templates/projects.html
+18
-11
No files found.
src/main/java/com/nisum/myteam/service/impl/EmployeeService.java
View file @
9a8d3141
...
...
@@ -94,6 +94,8 @@ public class EmployeeService implements IEmployeeService {
if
(
employeeReq
.
getEmpStatus
().
equalsIgnoreCase
(
MyTeamUtils
.
IN_ACTIVE_SPACE
))
{
update
.
set
(
"endDate"
,
employeeReq
.
getEndDate
());
update
.
set
(
"empSubStatus"
,
null
);
}
// update employee location
if
(
employeeReq
.
getEmpLocation
()
!=
null
&&
!
employeeReq
.
getEmpLocation
().
equals
(
""
))
{
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
9a8d3141
...
...
@@ -92,7 +92,12 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
$scope
.
getProjects
=
function
()
{
$scope
.
getProjects
=
function
(
type
)
{
$scope
.
status
=
"Active"
;
$mdDialog
.
hide
();
if
(
type
==
"onload"
){
showProgressDialog
(
"Fetching data please wait..."
);
}
var
role
=
myFactory
.
getEmpRole
();
var
empId
=
myFactory
.
getEmpId
();
//var deliveryLeadEmpId = ((role == "Delivery Lead") ? empId : undefined);
...
...
@@ -100,19 +105,63 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"projects/employeeId/"
+
empId
}).
then
(
function
mySuccess
(
response
)
{
$mdDialog
.
hide
();
$scope
.
status
=
"Active"
;
$scope
.
activeProjectsArray
=
[];
$scope
.
completedProjectsArray
=
[];
$scope
.
allProjectsArray
=
response
.
data
.
records
;
angular
.
forEach
(
response
.
data
.
records
,
function
(
project
)
{
if
(
project
.
status
==
'Active'
){
$scope
.
activeProjectsArray
.
push
(
project
);
}
else
if
(
project
.
status
==
'Completed'
){
$scope
.
completedProjectsArray
.
push
(
project
);
}
else
{
}
});
$scope
.
gridOptions
.
data
=
$scope
.
activeProjectsArray
;
if
(
response
.
data
.
records
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
});
};
$scope
.
getProjectDetails
=
function
(
projectStatus
){
if
(
projectStatus
==
'all'
){
$scope
.
status
=
projectStatus
;
$scope
.
gridOptions
.
data
=
$scope
.
allProjectsArray
;
}
else
if
(
projectStatus
==
'Completed'
){
$scope
.
status
=
projectStatus
;
$scope
.
gridOptions
.
data
=
$scope
.
completedProjectsArray
;
}
else
if
(
projectStatus
==
'Active'
){
$scope
.
status
=
projectStatus
;
$scope
.
gridOptions
.
data
=
$scope
.
activeProjectsArray
;
}
else
{
}
}
function
showProgressDialog
(
msg
){
$
(
'#home'
).
addClass
(
'md-scroll-mask'
);
$mdDialog
.
show
({
templateUrl
:
'templates/progressDialog.html'
,
controller
:
ProgressController
,
parent
:
angular
.
element
(
document
.
body
),
clickOutsideToClose
:
false
,
locals
:
{
dataToPass
:
msg
}
});
}
function
ProgressController
(
$scope
,
dataToPass
)
{
$scope
.
progressText
=
dataToPass
;
}
$scope
.
getManagerDetails
=
function
()
{
$http
({
method
:
"GET"
,
...
...
src/main/webapp/WEB-INF/js/app.js
View file @
9a8d3141
...
...
@@ -16,7 +16,7 @@ function($mdDateLocaleProvider) {
//TODO: Replace this appUri with the domain name created
myApp
.
constant
(
'appConfig'
,
{
appName
:
"MyTime"
,
appUri
:
"http://
10.3.45.11
:8080/myTeam/"
,
appUri
:
"http://
localhost
:8080/myTeam/"
,
version
:
"1.0"
,
empStartId
:
16001
,
empEndId
:
99999
,
...
...
@@ -41,8 +41,9 @@ myApp.factory('myFactory', function() {
var
accounts
=
""
;
var
functionalgroups
=
""
;
var
employeeStatus
=
""
;
var
employeeSubStatus
=
""
;
var
employementTypes
=
""
;
var
dom
ia
ns
=
""
;
var
dom
ai
ns
=
""
;
function
setEmpId
(
id
)
{
empId
=
id
;
}
...
...
@@ -134,6 +135,12 @@ myApp.factory('myFactory', function() {
function
getEmployeeStatus
()
{
return
employeeStatus
;
}
function
setEmployeeSubStatus
(
employeeSubStatus1
)
{
employeeSubStatus
=
employeeSubStatus1
;
}
function
getEmployeeSubStatus
()
{
return
employeeSubStatus
;
}
function
setEmployementTypes
(
employementTypes1
)
{
employementTypes
=
employementTypes1
;
}
...
...
@@ -252,6 +259,8 @@ myApp.factory('myFactory', function() {
getFunctionalgroups
:
getFunctionalgroups
,
setEmployeeStatus
:
setEmployeeStatus
,
getEmployeeStatus
:
getEmployeeStatus
,
setEmployeeSubStatus
:
setEmployeeSubStatus
,
getEmployeeSubStatus
:
getEmployeeSubStatus
,
setEmployementTypes
:
setEmployementTypes
,
getEmployementTypes
:
getEmployementTypes
,
setRoles
:
setRoles
,
...
...
src/main/webapp/WEB-INF/templates/profile.html
View file @
9a8d3141
...
...
@@ -201,7 +201,7 @@
</div>
<div
class=
"col-lg-7 col-xs-6"
>
<p>
{{profile.empStatus}}
{{profile.empStatus}}
{{profile.empSubStatus ? "(" : "" }} {{profile.empSubStatus ? profile.empSubStatus : "" }} {{profile.empSubStatus ? ")" : "" }}
</p>
</div>
</div>
...
...
src/main/webapp/WEB-INF/templates/projects.html
View file @
9a8d3141
<div
class=
"md-padding"
id=
"popupContainer"
ng-controller=
"projectController"
ng-init=
"getProjects();getManagerDetails();"
>
ng-init=
"getProjects(
'onload'
);getManagerDetails();"
>
<div
class=
"container-fluid mainDivHeaderClass"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<h1
class=
"no-padding"
>
Manage Projects
<span
class=
"right"
>
<md-button
class=
"add-btn md-raised md-primary"
<div
class=
"col-lg-6"
>
<h1
class=
"no-padding"
>
Manage Projects
</h1>
</div>
<div
class=
"col-lg-6 add-emp no-padding"
>
<span>
<input
type=
"radio"
ng-model=
"status"
value=
"Active"
ng-click=
"getProjectDetails(status)"
>
Active
<input
type=
"radio"
ng-model=
"status"
value=
"Completed"
ng-click=
"getProjectDetails(status)"
>
Completed
<input
type=
"radio"
ng-model=
"status"
value=
"all"
ng-click=
"getProjectDetails(status)"
>
All
</span>
<label
class=
""
for=
"submitBtn"
>
</label>
<md-button
class=
"md-raised md-primary"
ng-click=
"addProject('Assign', parentData)"
>
<i
class=
"fa fa-plus-circle fa-1x"
></i>
Add
Project
</md-button>
class=
"fa fa-plus-circle fa-2x"
></i>
Add Project
</md-button>
<i
class=
"fa fa-refresh"
aria-hidden=
"true"
ng-click=
"refreshPage()"
></i>
</span>
</h1>
</div>
<!-- <div class="col-lg-12">
<p align="center" class="col-xs-11"
...
...
@@ -25,6 +30,8 @@
<div
class=
"clearfix"
></div>
</div>
</div>
<div
class=
"row col-lg-12"
>
<div
id=
"gridTest"
ui-grid=
"gridOptions"
ui-grid-pagination
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment