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
128a3390
Commit
128a3390
authored
Jul 21, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed add resource response message
parent
0ef7ffad
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
DashboardService.java
.../java/com/nisum/myteam/service/impl/DashboardService.java
+1
-1
ResourceService.java
...n/java/com/nisum/myteam/service/impl/ResourceService.java
+2
-1
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+4
-6
No files found.
src/main/java/com/nisum/myteam/service/impl/DashboardService.java
View file @
128a3390
...
...
@@ -166,7 +166,7 @@ public class DashboardService implements IDashboardService {
if
(!
resourceProject
.
getStatus
().
equals
(
"Completed"
)){
emp
.
setProjectId
(
resourceProject
.
getProjectId
());
emp
.
setBillableStatus
(
resource
.
getBillableStatus
());
emp
.
setOnBehalfOf
(
resource
.
getOnBehalfOf
()!=
null
?
resource
.
getOnBehalfOf
():
""
);
emp
.
setOnBehalfOf
(
resource
.
getOnBehalfOf
()!=
null
?
employeeService
.
getEmployeeById
(
resource
.
getOnBehalfOf
()).
getEmployeeName
():
""
);
emp
.
setProjectName
(
resourceProject
.
getProjectName
());
emp
.
setBillingStartDate
(
resource
.
getBillingStartDate
());
emp
.
setBillingEndDate
(
resource
.
getBillingEndDate
());
...
...
src/main/java/com/nisum/myteam/service/impl/ResourceService.java
View file @
128a3390
...
...
@@ -86,6 +86,7 @@ public class ResourceService implements IResourceService {
currentAllocation
.
setBillingEndDate
(
MyTeamDateUtils
.
getDayLessThanDate
(
resourceReq
.
getBillingStartDate
()));
this
.
updateExistedResource
(
currentAllocation
);
//updateLatestProjectAllocationToEnd
resourcePers
=
resourceRepo
.
save
(
resourceReq
);
//createNewProjectAllocationtoStart
respMap
.
put
(
"message"
,
"Resource has been created"
);
// added on 21-7 2019
}
else
if
(
isAllocationActiveToday
(
resourceReq
)){
Project
project
=
projectService
.
getProjectByProjectId
(
latestAllocation
.
getProjectId
());
respMap
.
put
(
"statusCode"
,
811
);
...
...
@@ -601,7 +602,7 @@ public class ResourceService implements IResourceService {
resourceVO
.
setBillableStatus
(
resource
.
getBillableStatus
());
resourceVO
.
setEmployeeId
(
resource
.
getEmployeeId
());
resourceVO
.
setStatus
(
resource
.
getStatus
());
resourceVO
.
setOnBehalfOf
(
resource
.
getOnBehalfOf
()!=
null
?
resource
.
getOnBehalfOf
():
""
);
resourceVO
.
setOnBehalfOf
(
resource
.
getOnBehalfOf
()!=
null
?
employeeService
.
getEmployeeById
(
resource
.
getOnBehalfOf
()).
getEmployeeName
():
""
);
Employee
employee
=
employeeService
.
getEmployeeById
(
resource
.
getEmployeeId
());
resourceVO
.
setEmailId
(
employee
.
getEmailId
());
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
128a3390
...
...
@@ -1517,9 +1517,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
var
managerId
=
$scope
.
managerId
;
var
managerName
=
$scope
.
managerName
;
var
employeeModel
=
$scope
.
employeeModel
;
var
aliasModel
=
$scope
.
aliasModel
;
var
aliasResourceName
=
$scope
.
aliasResourceName
;
var
alias
=
action
==
"Add"
?
alias
=
aliasModel
.
employeeId
:
alias
=
aliasResourceName
;
var
aliasFor
=
action
==
"Add"
?
aliasFor
=
$scope
.
aliasModel
.
employeeId
:
aliasFor
=
$scope
.
aliasResourceName
;
var
projectModel
=
$scope
.
projectModel
;
var
newBillingStartDate
=
$scope
.
newBillingStartDate
;
var
empAllocationStatus
=
$scope
.
empAllocationStatus
;
...
...
@@ -1534,11 +1532,11 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$scope
.
alertMsg
=
"Please select a employee role"
;
angular
.
element
(
document
.
getElementById
(
'empRole'
)).
focus
();
}
else
if
(
action
===
"Add"
&&
$scope
.
toggleAlias
==
true
&&
aliasModel
.
employeeName
==
undefined
||
aliasModel
==
{}){
else
if
(
action
===
"Add"
&&
$scope
.
toggleAlias
==
true
&&
$scope
.
aliasModel
.
employeeName
==
undefined
||
$scope
.
aliasModel
==
{}){
$scope
.
alertMsg
=
"Please select a Alias Resource"
;
angular
.
element
(
document
.
getElementById
(
'selectAlias'
)).
focus
();
}
else
if
(
action
===
"Add"
&&
employeeModel
!=
undefined
&&
employeeModel
.
employeeName
!=
undefined
&&
employeeModel
.
employeeName
==
aliasModel
.
employeeName
){
else
if
(
action
===
"Add"
&&
employeeModel
!=
undefined
&&
employeeModel
.
employeeName
!=
undefined
&&
employeeModel
.
employeeName
==
$scope
.
aliasModel
.
employeeName
){
$scope
.
alertMsg
=
"Selected Employee and Alias Resource could not be same"
;
angular
.
element
(
document
.
getElementById
(
'selectAlias'
)).
focus
();
}
...
...
@@ -1581,7 +1579,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
else
{
$scope
.
id
=
$scope
.
id
?
$scope
.
id
:
$scope
.
objectId
;
$scope
.
alertMsg
=
""
;
var
record
=
{
"id"
:
$scope
.
id
,
"employeeId"
:
employeeModel
.
employeeId
,
"onBehalfOf"
:
alias
,
"projectId"
:
project
,
"billableStatus"
:
$scope
.
empBillableStatus
,
"billingEndDate"
:
$scope
.
endDate
,
"resourceRole"
:
$scope
.
employeeRole
,
"billingStartDate"
:
newBillingStartDate
,
"status"
:
empAllocationStatus
};
var
record
=
{
"id"
:
$scope
.
id
,
"employeeId"
:
employeeModel
.
employeeId
,
"onBehalfOf"
:
alias
For
,
"projectId"
:
project
,
"billableStatus"
:
$scope
.
empBillableStatus
,
"billingEndDate"
:
$scope
.
endDate
,
"resourceRole"
:
$scope
.
employeeRole
,
"billingStartDate"
:
newBillingStartDate
,
"status"
:
empAllocationStatus
};
if
(
action
==
"Add"
){
addRecord
(
record
,
action
);
$scope
.
myForm
.
$setPristine
();
...
...
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