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
e8fb3db6
Commit
e8fb3db6
authored
May 04, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored Manage Projects
parent
c4eda0cf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
44 deletions
+51
-44
DashboardController.js
src/main/webapp/WEB-INF/controllers/DashboardController.js
+3
-3
MyProjectAllocations.js
src/main/webapp/WEB-INF/controllers/MyProjectAllocations.js
+2
-2
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+16
-15
ProjectMyTeamController.js
...ain/webapp/WEB-INF/controllers/ProjectMyTeamController.js
+1
-1
ResourceController.js
src/main/webapp/WEB-INF/controllers/ResourceController.js
+24
-18
ShiftDetailsController.js
...main/webapp/WEB-INF/controllers/ShiftDetailsController.js
+3
-3
ViewProjectController.js
src/main/webapp/WEB-INF/controllers/ViewProjectController.js
+2
-2
No files found.
src/main/webapp/WEB-INF/controllers/DashboardController.js
View file @
e8fb3db6
...
...
@@ -123,18 +123,18 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
$scope
.
getEmployeesDashBoardData
=
function
(){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/
getEmployeesDashBoard"
url
:
appConfig
.
appUri
+
"getEmployeesDashBoard"
}).
then
(
function
mySuccess
(
response
)
{
//alert("response"+response);
// alert("response"+response.data);
if
(
response
.
data
.
length
>
10
){
if
(
response
.
data
.
records
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
});
...
...
src/main/webapp/WEB-INF/controllers/MyProjectAllocations.js
View file @
e8fb3db6
...
...
@@ -130,13 +130,13 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"resources/project/"
+
$scope
.
projectId
}).
then
(
function
mySuccess
(
response
)
{
if
(
response
.
data
.
length
>
10
){
if
(
response
.
data
.
records
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
e8fb3db6
...
...
@@ -104,7 +104,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"projects/employeeId/"
+
empId
}).
then
(
function
mySuccess
(
response
)
{
if
(
response
.
data
.
length
>
10
){
if
(
response
.
data
.
records
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
...
...
@@ -555,15 +555,15 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"resources/project/"
+
$scope
.
projectId
+
"?status="
+
$scope
.
status
}).
then
(
function
mySuccess
(
response
)
{
if
(
response
.
data
.
length
>
10
){
if
(
response
.
data
.
records
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
$scope
.
gridOptions
.
data
=
response
.
data
;
for
(
i
=
0
;
i
<
response
.
data
.
length
;
i
++
){
if
(
response
.
data
[
i
].
role
==
'Lead'
){
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
for
(
i
=
0
;
i
<
response
.
data
.
records
.
length
;
i
++
){
if
(
response
.
data
.
records
[
i
].
role
==
'Lead'
){
$scope
.
gridOptions
.
data
[
i
].
role
=
"Lead"
;
}
else
{
$scope
.
gridOptions
.
data
[
i
].
role
=
"Individual Contributor"
;
...
...
@@ -750,9 +750,9 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
isDisabled
=
true
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"resources/
getU
nAssignedEmployees"
url
:
appConfig
.
appUri
+
"resources/
u
nAssignedEmployees"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
...
...
@@ -823,7 +823,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"resources/projects"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
...
...
@@ -1143,6 +1143,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
alertMsg
=
"End date should not exceed project end date"
;
}
else
{
$scope
.
id
=
$scope
.
id
?
$scope
.
id
:
$scope
.
objectId
;
$scope
.
alertMsg
=
""
;
var
record
=
{
"id"
:
$scope
.
id
,
"employeeId"
:
employeeModel
.
employeeId
,
"employeeName"
:
employeeModel
.
employeeName
,
"emailId"
:
employeeModel
.
emailId
,
"designation"
:
employeeModel
.
designation
,
"projectId"
:
project
,
"projectName"
:
projectName
,
"managerId"
:
managerId
,
"managerName"
:
managerName
,
"mobileNumber"
:
employeeModel
.
mobileNumber
,
"active"
:
true
,
"billableStatus"
:
$scope
.
empBillableStatus
,
"startDate"
:
$scope
.
startDate
,
"endDate"
:
$scope
.
endDate
,
"account"
:
account
,
"role"
:
$scope
.
employeeRole
,
"newBillingStartDate"
:
newBillingStartDate
,
"accountId"
:
$scope
.
accountId
,
"domainId"
:
$scope
.
domainId
,
"shift"
:
$scope
.
employeeShift
,
"projectStartDate"
:
$scope
.
startDate
,
"projectEndDate"
:
$scope
.
endDate
};
if
(
action
==
"Add"
){
...
...
@@ -1449,8 +1450,9 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$scope
.
result
=
"Success"
;
var
titleOfModel
=
"Attention"
;
// $scope.objectId = response.data.id;
if
(
response
.
data
==
"TeamMate added successfuly"
){
$scope
.
objectId
=
response
.
data
.
records
.
id
;
console
.
log
(
$scope
.
id
,
response
.
data
.
records
.
id
,
"$scope.id "
);
if
(
response
.
data
.
message
==
"TeamMate added successfuly"
){
titleOfModel
=
""
;
$timeout
(
function
(){
updateGrid
(
action
,
record
);
...
...
@@ -1460,7 +1462,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$mdDialog
.
show
(
$mdDialog
.
alert
({
skipHide
:
true
,
title
:
titleOfModel
,
textContent
:
response
.
data
,
textContent
:
response
.
data
.
message
,
ok
:
'ok'
}));
...
...
@@ -1473,7 +1475,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"resources/project/"
+
$scope
.
projectId
+
"?status="
+
$scope
.
status
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
if
(
status
==
"InActive"
||
status
==
"Both"
||
dataToPass
.
status
==
"InActive"
){
$scope
.
gridOptions
.
columnDefs
[
5
].
visible
=
false
;
}
...
...
@@ -1505,9 +1507,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
data
:
record
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
console
.
log
(
"Hi I am Here"
);
$scope
.
result
=
"Success"
;
if
(
response
.
data
==
"TeamMate updated successfuly"
||
response
.
data
.
includes
(
"Resource Successfully moved from"
)
){
if
(
response
.
data
.
message
==
"TeamMate updated successfuly"
){
$timeout
(
function
()
{
getProjectDetails
(
$scope
.
projectId
,
$scope
.
status
);
removeTab
(
'Add'
);
...
...
@@ -1515,7 +1516,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
$mdDialog
.
show
(
$mdDialog
.
alert
({
skipHide
:
true
,
textContent
:
response
.
data
,
textContent
:
response
.
data
.
message
,
ok
:
'ok'
})).
then
(
function
()
{
$scope
.
myForm
.
$setPristine
();
...
...
src/main/webapp/WEB-INF/controllers/ProjectMyTeamController.js
View file @
e8fb3db6
...
...
@@ -67,7 +67,7 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"resources/active?employeeId="
+
myFactory
.
getEmpId
()
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
...
...
src/main/webapp/WEB-INF/controllers/ResourceController.js
View file @
e8fb3db6
...
...
@@ -121,9 +121,9 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$scope
.
getUserRoles
=
function
(){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getTeamDetails?employeeId
="
+
myFactory
.
getEmpId
()
url
:
appConfig
.
appUri
+
"
resources/deliverylead/
="
+
myFactory
.
getEmpId
()
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
...
...
@@ -132,7 +132,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$scope
.
getEmployeesToTeam
=
function
(){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getEmployeesToTeam
"
url
:
appConfig
.
appUri
+
"
employees/active/sortByName
"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
employees
=
response
.
data
;
},
function
myError
(
response
)
{
...
...
@@ -258,7 +258,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
var
loginEmpId
=
myFactory
.
getEmpId
();
var
req
=
{
method
:
'POST'
,
url
:
appConfig
.
appUri
+
"
projectTeam/deleteTeammate
?loginEmpId="
+
loginEmpId
,
url
:
appConfig
.
appUri
+
"
resources
?loginEmpId="
+
loginEmpId
,
headers
:
{
"Content-type"
:
"application/json"
},
...
...
@@ -327,7 +327,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$scope
.
getProjects
=
function
(){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getProjects?employeeId=
"
+
myFactory
.
getEmpId
()
url
:
appConfig
.
appUri
+
"
projects/employeeId/
"
+
myFactory
.
getEmpId
()
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
projectList
=
response
.
data
;
},
function
myError
(
response
)
{
...
...
@@ -400,7 +400,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getTeamDetails?employeeId=
"
+
dataToPass
.
employeeId
url
:
appConfig
.
appUri
+
"
resources/deliverylead/
"
+
dataToPass
.
employeeId
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
},
function
myError
(
response
)
{
...
...
@@ -446,19 +446,22 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
};
function
addOrUpdateBilling
(
record
,
action
){
var
requestMethod
=
""
;
var
urlRequest
=
""
;
var
loginEmpId
=
myFactory
.
getEmpId
();
if
(
action
==
"Add"
){
urlRequest
=
appConfig
.
appUri
+
"projectTeam/addEmployeeBilling?loginEmpId="
+
loginEmpId
;
urlRequest
=
appConfig
.
appUri
+
"billing?loginEmpId="
+
loginEmpId
;
requestMethod
=
'POST'
;
}
else
if
(
action
==
"Update"
){
urlRequest
=
appConfig
.
appUri
+
"projectTeam/updateEmployeeBilling?loginEmpId="
+
loginEmpId
;
urlRequest
=
appConfig
.
appUri
+
"billing?loginEmpId="
+
loginEmpId
;
requestMethod
=
'PUT'
;
}
else
if
(
action
==
"Delete"
){
urlRequest
=
appConfig
.
appUri
+
"projectTeam/deleteEmployeeBilling"
;
urlRequest
=
appConfig
.
appUri
+
"billing"
;
requestMethod
=
'DELETE'
;
}
var
req
=
{
method
:
'POST'
,
method
:
requestMethod
,
url
:
urlRequest
,
headers
:
{
"Content-type"
:
"application/json"
...
...
@@ -470,7 +473,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$scope
.
objectId
=
response
.
data
.
id
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getEmployeeBillingDetails?employeeId="
+
record
.
employeeId
+
"&projectId="
+
record
.
project
Id
url
:
appConfig
.
appUri
+
"
billing/project/"
+
record
.
projectId
+
"? employeeId="
+
record
.
employee
Id
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
...
...
@@ -595,14 +598,14 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
};
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getEmployeeBillingDetails?employeeId="
+
dataToPass
.
employeeId
+
"&projectId="
+
dataToPass
.
project
Id
url
:
appConfig
.
appUri
+
"
billing/project/"
+
dataToPass
.
projectId
+
"? employeeId="
+
dataToPass
.
employee
Id
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
});
}
$scope
.
designations
=
myFactory
.
getDesignations
();
...
...
@@ -620,7 +623,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
//MT-72
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getEmployeeProjectInfo?empId=
"
+
$scope
.
employeeModel
.
employeeId
url
:
appConfig
.
appUri
+
"
resources/employeeId/
"
+
$scope
.
employeeModel
.
employeeId
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
projectInfoList
=
response
.
data
;
},
function
myError
(
response
)
{
...
...
@@ -832,14 +835,17 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
function
addOrUpdateRole
(
record
,
action
){
var
urlRequest
=
""
;
var
requestMethod
=
""
;
var
loginEmpId
=
myFactory
.
getEmpId
();
if
(
action
==
"Add"
){
urlRequest
=
appConfig
.
appUri
+
"projectTeam/addEmployeeToTeam?loginEmpId="
+
loginEmpId
;
urlRequest
=
appConfig
.
appUri
+
"resources?loginEmpId="
+
loginEmpId
;
requestMethod
=
'POST'
;
}
else
if
(
action
==
"Update"
){
urlRequest
=
appConfig
.
appUri
+
"projectTeam/updateTeammate?loginEmpId="
+
loginEmpId
;
urlRequest
=
appConfig
.
appUri
+
"resources?loginEmpId="
+
loginEmpId
;
requestMethod
=
'PUT'
;
}
var
req
=
{
method
:
'POST'
,
method
:
requestMethod
,
url
:
urlRequest
,
headers
:
{
"Content-type"
:
"application/json"
...
...
src/main/webapp/WEB-INF/controllers/ShiftDetailsController.js
View file @
e8fb3db6
...
...
@@ -84,9 +84,9 @@ myApp.controller("shiftDetailsController",function($scope, myFactory,exportUiGri
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"resources/shifts/"
+
shiftV
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
shiftCount
=
response
.
data
.
length
;
if
(
response
.
data
.
length
>
10
){
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
$scope
.
shiftCount
=
response
.
data
.
records
.
length
;
if
(
response
.
data
.
records
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
...
...
src/main/webapp/WEB-INF/controllers/ViewProjectController.js
View file @
e8fb3db6
...
...
@@ -296,7 +296,7 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
}).
then
(
function
mySuccess
(
response
)
{
//$scope.teamdetails=response.data;
//$scope.gridOptions.data.push(response.data);
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
...
...
@@ -406,7 +406,7 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
}).
then
(
function
mySuccess
(
response
)
{
//$scope.teamdetails=response.data;
//$scope.gridOptions.data.push(response.data);
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
...
...
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