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
7a8ddf80
Commit
7a8ddf80
authored
May 02, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored Accounts_Shifts_MyProfile
parent
8f8e6b01
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
31 deletions
+42
-31
AccountsController.js
src/main/webapp/WEB-INF/controllers/AccountsController.js
+8
-3
AssignRolesController.js
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
+5
-2
DashboardController.js
src/main/webapp/WEB-INF/controllers/DashboardController.js
+3
-3
MyProfileController.js
src/main/webapp/WEB-INF/controllers/MyProfileController.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
+19
-16
ShiftDetailsController.js
...main/webapp/WEB-INF/controllers/ShiftDetailsController.js
+1
-1
ViewProjectController.js
src/main/webapp/WEB-INF/controllers/ViewProjectController.js
+1
-1
No files found.
src/main/webapp/WEB-INF/controllers/AccountsController.js
View file @
7a8ddf80
...
...
@@ -358,11 +358,16 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
};
addOrUpdateAccount
=
function
(
record
,
action
,
flag
){
var
urlRequest
=
""
;
if
(
action
==
"Add"
||
action
==
"Update"
){
urlRequest
=
appConfig
.
appUri
+
"accounts?action="
+
flag
;
var
requestMethod
=
""
;
if
(
action
==
"Add"
){
urlRequest
=
appConfig
.
appUri
+
"accounts"
;
requestMethod
=
'POST'
;
}
else
if
(
action
==
"Update"
){
urlRequest
=
appConfig
.
appUri
+
"accounts/"
+
record
.
accountId
;
requestMethod
=
'PUT'
;
}
var
req
=
{
method
:
'POST'
,
method
:
requestMethod
,
url
:
urlRequest
,
headers
:
{
"Content-type"
:
"application/json"
...
...
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
View file @
7a8ddf80
...
...
@@ -624,15 +624,18 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
function
addOrUpdateRole
(
record
,
action
){
var
requestMethod
=
""
;
var
empId
=
myFactory
.
getEmpId
();
var
urlRequest
=
""
;
if
(
action
==
"
"
){
if
(
action
==
"
Add
"
){
urlRequest
=
appConfig
.
appUri
+
"employees/"
+
empId
;
requestMethod
=
'POST'
;
}
else
if
(
action
==
"Update"
){
urlRequest
=
appConfig
.
appUri
+
"employees/"
+
empId
;
requestMethod
=
'PUT'
;
}
var
req
=
{
method
:
'POST'
,
method
:
requestMethod
,
url
:
urlRequest
,
headers
:
{
"Content-type"
:
"application/json"
...
...
src/main/webapp/WEB-INF/controllers/DashboardController.js
View file @
7a8ddf80
...
...
@@ -254,7 +254,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
};
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
projectTeam/getEmployeeBillingDetailsAll
?employeeId="
+
$scope
.
profile
.
employeeId
url
:
appConfig
.
appUri
+
"
billing
?employeeId="
+
$scope
.
profile
.
employeeId
}).
then
(
function
mySuccess
(
response
)
{
//alert("response"+response);
// alert("response"+response.data);
...
...
@@ -264,7 +264,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
});
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
projectTeam/
getMyProjectAllocations?employeeId="
+
$scope
.
profile
.
employeeId
url
:
appConfig
.
appUri
+
"getMyProjectAllocations?employeeId="
+
$scope
.
profile
.
employeeId
}).
then
(
function
mySuccess
(
response
)
{
//alert("response"+response);
// alert("response"+response.data);
...
...
@@ -274,7 +274,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
});
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
user/getEmployeeLocations?employeeId=
"
+
$scope
.
profile
.
employeeId
url
:
appConfig
.
appUri
+
"
employees/locations/
"
+
$scope
.
profile
.
employeeId
}).
then
(
function
mySuccess
(
response
)
{
//alert("response"+response);
// alert("response"+response.data);
...
...
src/main/webapp/WEB-INF/controllers/MyProfileController.js
View file @
7a8ddf80
...
...
@@ -8,9 +8,9 @@ myApp.controller("profileController", function($scope, $http, myFactory, $mdDial
var
empId
=
$scope
.
empId
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
user/getEmployeeRoleData?empId=
"
+
empId
url
:
appConfig
.
appUri
+
"
/employees/employeeId/
"
+
empId
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
profile
=
response
.
data
;
$scope
.
profile
=
response
.
data
.
records
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
});
...
...
@@ -68,7 +68,7 @@ myApp.controller("profileController", function($scope, $http, myFactory, $mdDial
$scope
.
alertMsg
=
""
;
var
record
=
{
"employeeId"
:
myFactory
.
getEmpId
(),
"mobileNumber"
:
mobileNumber
,
"alternateMobileNumber"
:
$scope
.
alternateMobileNumber
,
"personalEmailId"
:
$scope
.
personalEmailId
,
"baseTechnology"
:
$scope
.
baseTechnology
,
"technologyKnown"
:
$scope
.
technologyKnown
};
var
urlRequest
=
""
;
urlRequest
=
appConfig
.
appUri
+
"
user
/updateProfile"
;
urlRequest
=
appConfig
.
appUri
+
"
/employees
/updateProfile"
;
var
req
=
{
method
:
'POST'
,
...
...
src/main/webapp/WEB-INF/controllers/MyProjectAllocations.js
View file @
7a8ddf80
...
...
@@ -64,7 +64,7 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
$scope
.
getMyProjectAllocations
=
function
(){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/
getMyProjectAllocations?employeeId="
+
myFactory
.
getEmpId
()
url
:
appConfig
.
appUri
+
"getMyProjectAllocations?employeeId="
+
myFactory
.
getEmpId
()
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
if
(
response
.
data
.
length
>
10
){
...
...
@@ -128,7 +128,7 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
$scope
.
isDisabled
=
true
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getProjectDetails?projectId=
"
+
$scope
.
projectId
url
:
appConfig
.
appUri
+
"
resources/project/
"
+
$scope
.
projectId
}).
then
(
function
mySuccess
(
response
)
{
if
(
response
.
data
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
7a8ddf80
...
...
@@ -102,7 +102,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
var
deliveryLeadEmpId
=
((
role
==
"Delivery Lead"
)
?
empId
:
undefined
);
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"project
/getProjects
?empId="
+
deliveryLeadEmpId
url
:
appConfig
.
appUri
+
"project
s/
?empId="
+
deliveryLeadEmpId
}).
then
(
function
mySuccess
(
response
)
{
if
(
response
.
data
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
...
...
@@ -168,7 +168,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
function
getEmployeeRoleData
(
empId
)
{
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
user/getEmployeeRoleData?empId=
"
+
empId
url
:
appConfig
.
appUri
+
"
employees/employeeId/
"
+
empId
}).
then
(
function
mySuccess
(
response
)
{
if
(
response
.
data
!=
""
&&
response
.
data
.
length
!=
0
)
{
$scope
.
gridOptions
.
data
.
push
(
response
.
data
);
...
...
@@ -276,7 +276,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
function
deleteUserRole
(
projectId
)
{
var
req
=
{
method
:
'DELETE'
,
url
:
appConfig
.
appUri
+
"
project/
deleteProject?projectId="
+
projectId
url
:
appConfig
.
appUri
+
"deleteProject?projectId="
+
projectId
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$scope
.
result
=
response
.
data
;
...
...
@@ -289,7 +289,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
function
deleteTeam
(
record
){
var
urlRequest
=
""
;
var
loginEmpId
=
myFactory
.
getEmpId
();
urlRequest
=
appConfig
.
appUri
+
"/projectTeam/
deleteTeammate
?loginEmpId="
+
loginEmpId
;
urlRequest
=
appConfig
.
appUri
+
"/projectTeam/
resources
?loginEmpId="
+
loginEmpId
;
var
req
=
{
method
:
'POST'
,
url
:
urlRequest
,
...
...
@@ -456,7 +456,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
getEmployeeDetails
=
function
(){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
projectTeam/getEmployeesToTeam
"
url
:
appConfig
.
appUri
+
"
/employees/active/sortByName
"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
employeeList
=
response
.
data
;
},
function
myError
(
response
)
{
...
...
@@ -553,7 +553,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getProjectDetails?projectId="
+
$scope
.
projectId
+
"&
status="
+
$scope
.
status
url
:
appConfig
.
appUri
+
"
projectTeam/resources/project/"
+
$scope
.
projectId
+
"?
status="
+
$scope
.
status
}).
then
(
function
mySuccess
(
response
)
{
if
(
response
.
data
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
...
...
@@ -750,7 +750,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
isDisabled
=
true
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/
projectTeam/getUnAssignedEmployees"
url
:
appConfig
.
appUri
+
"projectTeam/getUnAssignedEmployees"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
},
function
myError
(
response
)
{
...
...
@@ -821,7 +821,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
isDisabled
=
true
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getProjectAllocations
"
url
:
appConfig
.
appUri
+
"
projectTeam/resources/projects/
"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
},
function
myError
(
response
)
{
...
...
@@ -865,7 +865,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
function
getDomainsAssoicatedToAccount
(
id
,
action
){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/user/getDomains?accountId=
"
+
id
url
:
appConfig
.
appUri
+
"
domains/
"
+
id
}).
then
(
function
mySuccess
(
response
)
{
var
result
=
response
.
data
;
if
(
result
!=
""
||
result
.
length
!=
0
){
...
...
@@ -960,7 +960,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
function
getManagersAssociatedToDomain
(
id
,
action
){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"/
user/getDeliveryLeads?domainId=
"
+
id
url
:
appConfig
.
appUri
+
"/
employees/deliveryLeads/
"
+
id
}).
then
(
function
mySuccess
(
response
)
{
var
result
=
response
.
data
;
if
(
result
!=
""
||
result
.
length
!=
0
){
...
...
@@ -1471,7 +1471,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
function
getProjectDetails
(
projectId
,
status
){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getProjectDetails?projectId="
+
projectId
+
"&status="
+
status
url
:
appConfig
.
appUri
+
"
projectTeam/resources/project/"
+
$scope
.
projectId
+
"?status="
+
$scope
.
status
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
if
(
status
==
"InActive"
||
status
==
"Both"
||
dataToPass
.
status
==
"InActive"
){
...
...
@@ -1495,9 +1495,9 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
function
updateTeamRecord
(
record
,
action
){
var
urlRequest
=
""
;
var
loginEmpId
=
myFactory
.
getEmpId
();
urlRequest
=
appConfig
.
appUri
+
"
/projectTeam/updateTeammate
?loginEmpId="
+
loginEmpId
;
urlRequest
=
appConfig
.
appUri
+
"
projectTeam/resources
?loginEmpId="
+
loginEmpId
;
var
req
=
{
method
:
'P
OS
T'
,
method
:
'P
U
T'
,
url
:
urlRequest
,
headers
:
{
"Content-type"
:
"application/json"
...
...
@@ -1529,14 +1529,17 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
function
addOrUpdateProject
(
record
,
action
)
{
var
urlRequest
=
""
;
var
requestMethod
=
""
;
var
loginEmpId
=
myFactory
.
getEmpId
();
if
(
action
==
"Assign"
)
{
urlRequest
=
appConfig
.
appUri
+
"project/addProject?loginEmpId="
+
loginEmpId
;
urlRequest
=
appConfig
.
appUri
+
"/projects?loginEmpId="
+
loginEmpId
;
requestMethod
=
'POST'
;
}
else
if
(
action
==
"Update"
)
{
urlRequest
=
appConfig
.
appUri
+
"project/updateProject?loginEmpId="
+
loginEmpId
;
urlRequest
=
appConfig
.
appUri
+
"/projects?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 @
7a8ddf80
...
...
@@ -82,7 +82,7 @@ myApp.controller("shiftDetailsController",function($scope, myFactory,exportUiGri
$scope
.
selectedshiftValue
=
shiftV
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/projectTeam/getShiftDetails?shift=
"
+
shiftV
url
:
appConfig
.
appUri
+
"
projectTeam/resources/
"
+
shiftV
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
shiftCount
=
response
.
data
.
length
;
...
...
src/main/webapp/WEB-INF/controllers/ViewProjectController.js
View file @
7a8ddf80
...
...
@@ -62,7 +62,7 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
$scope
.
getManagerDetails
=
function
(){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/user/getManagers
"
url
:
appConfig
.
appUri
+
"
employees/managers/
"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
managers
=
response
.
data
;
},
function
myError
(
response
)
{
...
...
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