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
9075e91b
Unverified
Commit
9075e91b
authored
Jul 31, 2018
by
mduppanapudi-nisum-com
Committed by
GitHub
Jul 31, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #94 from nisum-inc/feature/MT-92_Error_message_or_Warning_message_in_Update
MT-92-Error/Warning message in update screen
parents
b705b829
6872a4e5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
300 additions
and
16 deletions
+300
-16
AssignRolesController.js
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
+56
-1
DomainController.js
src/main/webapp/WEB-INF/controllers/DomainController.js
+58
-4
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+59
-0
ProjectTeamController.js
src/main/webapp/WEB-INF/controllers/ProjectTeamController.js
+59
-3
assignAccountsController.js
...in/webapp/WEB-INF/controllers/assignAccountsController.js
+61
-1
UpdateTeamMate.html
src/main/webapp/WEB-INF/templates/UpdateTeamMate.html
+7
-7
No files found.
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
View file @
9075e91b
...
...
@@ -406,6 +406,60 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
cancel
=
function
()
{
var
showConfirmDialog
=
false
;
if
(
dataToPass
.
action
==
"Update"
){
console
.
log
(
dataToPass
);
$scope
.
previousData
=
{
EmpId
:
dataToPass
.
employeeId
,
EmpName
:
dataToPass
.
employeeName
,
Gender
:
dataToPass
.
gender
,
Email
:
dataToPass
.
emailId
,
EmploymentStatus
:
dataToPass
.
empStatus
,
Role
:
dataToPass
.
role
,
Designation
:
dataToPass
.
designation
,
WorkLocation
:
dataToPass
.
empLocation
,
EmploymentType
:
dataToPass
.
employmentType
,
FunctionalGroup
:
dataToPass
.
functionalGroup
,
HasPassport
:
dataToPass
.
hasPassort
,
HasB1Visa
:
dataToPass
.
hasB1
,
Dateofjoining
:
new
Date
(
dataToPass
.
dateOfJoining
),
//DateofBirth:dataToPass.dateOfBirth ? new Date(dataToPass.dateOfBirth) : ''
DateofBirth
:
new
Date
(
dataToPass
.
dateOfBirth
)
}
$scope
.
currentData
=
{
EmpId
:
$scope
.
empId
,
EmpName
:
$scope
.
empName
,
Gender
:
$scope
.
gender
,
Email
:
$scope
.
empEmail
,
EmploymentStatus
:
$scope
.
empStatus
,
Role
:
$scope
.
empRole
,
Designation
:
$scope
.
designation
,
WorkLocation
:
$scope
.
empLocation
,
EmploymentType
:
$scope
.
employmentType
,
FunctionalGroup
:
$scope
.
functionalGroup
,
HasPassport
:
$scope
.
hasPassort
,
HasB1Visa
:
$scope
.
hasB1
,
Dateofjoining
:
$scope
.
dateOfJoining
,
DateofBirth
:
$scope
.
dateOfBirth
}
var
predata
=
JSON
.
stringify
(
$scope
.
previousData
);
var
curdata
=
JSON
.
stringify
(
$scope
.
currentData
);
if
(
predata
===
curdata
){
$mdDialog
.
hide
(
'Cancelled'
);
}
else
{
$mdDialog
.
show
(
$mdDialog
.
confirm
({
skipHide
:
true
,
textContent
:
'Are you sure you want to cancel this?'
,
ok
:
'ok'
,
cancel
:
'cancel'
})).
then
(
function
(){
$mdDialog
.
hide
(
'Cancelled'
);
})
}
}
if
(
dataToPass
.
action
==
"Add"
){
var
totalFields
=
$scope
.
myForm
.
$$controls
;
for
(
key
in
totalFields
)
{
console
.
log
(
"Model value of"
+
key
+
" ==>"
+
totalFields
[
key
].
$modelValue
)
...
...
@@ -427,7 +481,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
else
{
$mdDialog
.
hide
(
'Cancelled'
);
}
};
}
};
function
updateGrid
(
action
,
record
){
if
(
$scope
.
alertMsg
==
""
){
if
(
$scope
.
result
==
"Success"
){
...
...
src/main/webapp/WEB-INF/controllers/DomainController.js
View file @
9075e91b
...
...
@@ -205,7 +205,6 @@ myApp.controller("domainController",
}
function
AddDomainController
(
$scope
,
$mdDialog
,
dataToPass
,
gridOptionsData
,
employees
)
{
console
.
log
(
"employees"
,
employees
);
$scope
.
searchTerm
=
""
;
$scope
.
updateSearch
=
function
(
e
)
{
...
...
@@ -231,7 +230,6 @@ myApp.controller("domainController",
$scope
.
employeeModel
;
$scope
.
selectedEmployeeNames
=
[];
$scope
.
templateTitle
=
dataToPass
.
action
;
var
allAccounts
=
myFactory
.
getAccounts
();
function
getActiveAccounts
(){
var
activeAccounts
=
[];
...
...
@@ -264,8 +262,63 @@ myApp.controller("domainController",
$scope
.
cancel
=
function
()
{
var
showConfirmDialog
=
false
;
var
totalFields
=
$scope
.
myForm
.
$$controls
;
for
(
key
in
totalFields
)
{
if
(
dataToPass
.
action
==
"Update"
){
console
.
log
(
dataToPass
.
deliveryManagers
+
' response'
)
console
.
log
(
$scope
.
employeeModel
)
$scope
.
previousData
=
{
domainId
:
dataToPass
.
domainId
,
accountinfo
:
dataToPass
.
AccountName
,
domainname
:
dataToPass
.
domainName
}
$scope
.
currentdata
=
{
domainId
:
$scope
.
domainId
,
accountinfo
:
$scope
.
AccountInfo
.
accountName
,
domainname
:
$scope
.
domainName
}
var
predata
=
JSON
.
stringify
(
$scope
.
previousData
);
var
curdata
=
JSON
.
stringify
(
$scope
.
currentdata
);
var
exsistingMangersList
=
dataToPass
.
deliveryManagers
;
var
currentMangersList
=
$scope
.
employeeModel
;
var
managerCheck
=
false
;
if
(
exsistingMangersList
.
length
===
currentMangersList
.
length
){
var
temp1
=
[];
var
temp2
=
[];
for
(
var
i
in
exsistingMangersList
){
temp1
.
push
(
exsistingMangersList
[
i
].
employeeId
);
}
for
(
var
j
in
currentMangersList
){
temp2
.
push
(
currentMangersList
[
j
].
employeeId
);
}
for
(
var
k
=
0
;
k
<
exsistingMangersList
.
length
;
k
++
){
if
(
temp2
.
indexOf
(
temp1
[
k
])
>
-
1
){
managerCheck
=
true
;
}
else
{
managerCheck
=
false
;
}
}
}
else
{
managerCheck
=
false
;
}
if
(
predata
===
curdata
&&
managerCheck
){
$mdDialog
.
hide
(
'Cancelled'
);
}
else
{
$mdDialog
.
show
(
$mdDialog
.
confirm
({
skipHide
:
true
,
textContent
:
'Are you sure you want to cancel this?'
,
ok
:
'ok'
,
cancel
:
'cancel'
})).
then
(
function
(){
$mdDialog
.
hide
(
'Cancelled'
);
})
}
}
if
(
dataToPass
.
action
==
"Add"
){
var
totalFields
=
$scope
.
myForm
.
$$controls
;
for
(
key
in
totalFields
)
{
console
.
log
(
"Model value of"
+
key
+
" ==>"
+
totalFields
[
key
].
$modelValue
)
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
&&
totalFields
[
key
].
$modelValue
.
length
!==
0
)
{
console
.
log
(
"Came here!"
);
...
...
@@ -285,6 +338,7 @@ myApp.controller("domainController",
else
{
$mdDialog
.
hide
(
'Cancelled'
);
}
}
};
$scope
.
deliveryHeads
=
function
()
{
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
9075e91b
...
...
@@ -1052,6 +1052,64 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
cancel
=
function
()
{
var
showConfirmDialog
=
false
;
console
.
log
(
dataToPass
);
if
(
dataToPass
.
action
==
"Update"
){
$scope
.
previousData
=
{
ProjectID
:
dataToPass
.
projectId
,
ProjectName
:
dataToPass
.
projectName
,
Account
:
dataToPass
.
account
,
Domain
:
dataToPass
.
domain
,
ProjectStatus
:
dataToPass
.
status
}
$scope
.
currentData
=
{
ProjectID
:
$scope
.
projectId
,
ProjectName
:
$scope
.
projectName
,
Account
:
$scope
.
account
.
accountName
,
Domain
:
$scope
.
domain
.
domainName
,
ProjectStatus
:
$scope
.
projectStatus
,
}
var
predata
=
JSON
.
stringify
(
$scope
.
previousData
);
var
curdata
=
JSON
.
stringify
(
$scope
.
currentData
);
var
exsistingMangersList
=
dataToPass
.
deliveryLeadIds
;
var
temp
=
[];
temp
.
push
(
$scope
.
deliveryLeadsSelectedList
);
var
currentMangersList
=
temp
;
var
managerCheck
=
false
;
if
(
exsistingMangersList
.
length
===
currentMangersList
.
length
){
var
temp1
=
[];
var
temp2
=
[];
for
(
var
i
in
exsistingMangersList
){
temp1
.
push
(
exsistingMangersList
[
i
].
employeeId
);
}
for
(
var
j
in
currentMangersList
){
temp2
.
push
(
currentMangersList
[
j
].
employeeId
);
}
for
(
var
k
=
0
;
k
<
exsistingMangersList
.
length
;
k
++
){
if
(
temp2
.
indexOf
(
temp1
[
k
])
>
-
1
){
managerCheck
=
true
;
}
else
{
managerCheck
=
false
;
}
}
}
else
{
managerCheck
=
false
;
}
if
(
predata
===
curdata
&&
managerCheck
){
$mdDialog
.
hide
(
'Cancelled'
);
}
else
{
$mdDialog
.
show
(
$mdDialog
.
confirm
({
skipHide
:
true
,
textContent
:
'Are you sure you want to cancel this?'
,
ok
:
'ok'
,
cancel
:
'cancel'
})).
then
(
function
(){
$mdDialog
.
hide
(
'Cancelled'
);
})
}
}
if
(
dataToPass
.
action
==
"Assign"
){
var
totalFields
=
$scope
.
myForm
.
$$controls
;
for
(
key
in
totalFields
)
{
console
.
log
(
"Model value of"
+
key
+
" ==>"
+
totalFields
[
key
].
$modelValue
)
...
...
@@ -1073,6 +1131,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
else
{
$mdDialog
.
hide
(
'Cancelled'
);
}
}
};
$scope
.
cancelDialog
=
function
()
{
$mdDialog
.
hide
(
'Cancelled'
);
...
...
src/main/webapp/WEB-INF/controllers/ProjectTeamController.js
View file @
9075e91b
...
...
@@ -356,7 +356,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$scope
.
employeeName
=
dataToPass
.
employeeName
;
$scope
.
role
=
dataToPass
.
role
;
$scope
.
emailId
=
dataToPass
.
emailId
;
$scope
.
shift
=
(
dataToPass
.
shift
==
null
?
undefined
:
dataToPass
.
shift
);
$scope
.
shift
=
(
dataToPass
.
shift
==
null
?
null
:
dataToPass
.
shift
);
$scope
.
projectId
=
dataToPass
.
projectId
;
$scope
.
projectName
=
dataToPass
.
projectName
;
$scope
.
managerId
=
dataToPass
.
managerId
;
...
...
@@ -717,7 +717,62 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$scope
.
cancel
=
function
()
{
var
showConfirmDialog
=
false
;
var
totalFields
=
$scope
.
myForm
.
$$controls
;
// console.log(dataToPass);
// console.log( "nb"+new Date(dataToPass.newBillingStartDate));
// console.log("end"+new Date(dataToPass.endDate));
// console.log("start"+new Date(dataToPass.startDate));
if
(
dataToPass
.
action
==
"Update"
){
$scope
.
previousData
=
{
EmployeeName
:
dataToPass
.
employeeName
,
EmployeeId
:
dataToPass
.
employeeId
,
EmailId
:
dataToPass
.
emailId
,
Role
:
dataToPass
.
role
,
Designation
:
dataToPass
.
designation
,
Experience
:
dataToPass
.
experience
,
MobileNumber
:
dataToPass
.
mobileNumber
,
ProjectName
:
dataToPass
.
projectName
,
Shift
:
dataToPass
.
shift
,
BillableStatus
:
dataToPass
.
billableStatus
,
StartDate
:
new
Date
(
dataToPass
.
startDate
),
Enddate
:
new
Date
(
dataToPass
.
endDate
),
NewBillingStartDate
:
new
Date
(
dataToPass
.
newBillingStartDate
)
}
// console.log("nb"+$scope.newBillingStartDate);
// console.log("end"+$scope.endDate);
console
.
log
(
$scope
.
shift
);
$scope
.
currentData
=
{
EmployeeName
:
$scope
.
employeeName
,
EmployeeId
:
$scope
.
employeeId
,
EmailId
:
$scope
.
emailId
,
Role
:
$scope
.
role
,
Designation
:
$scope
.
designation
,
Experience
:
$scope
.
experience
,
MobileNumber
:
$scope
.
mobileNumber
,
ProjectName
:
$scope
.
projectModel
.
projectName
,
Shift
:
$scope
.
shift
,
BillableStatus
:
$scope
.
empBillableStatus
,
StartDate
:
$scope
.
startDate
,
Enddate
:
$scope
.
endDate
,
NewBillingStartDate
:
$scope
.
newBillingStartDate
}
var
predata
=
JSON
.
stringify
(
$scope
.
previousData
);
var
curdata
=
JSON
.
stringify
(
$scope
.
currentData
);
if
(
predata
===
curdata
){
$mdDialog
.
hide
(
'Cancelled'
);
}
else
{
$mdDialog
.
show
(
$mdDialog
.
confirm
({
skipHide
:
true
,
textContent
:
'Are you sure you want to cancel this?'
,
ok
:
'ok'
,
cancel
:
'cancel'
})).
then
(
function
(){
$mdDialog
.
hide
(
'Cancelled'
);
})
}
}
if
(
dataToPass
.
action
==
"Add"
){
var
totalFields
=
$scope
.
myForm
.
$$controls
;
for
(
key
in
totalFields
)
{
console
.
log
(
"Model value of"
+
key
+
" ==>"
+
totalFields
[
key
].
$modelValue
)
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
)
{
...
...
@@ -738,7 +793,8 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
else
{
$mdDialog
.
hide
(
'Cancelled'
);
}
};
}
}
function
updateGrid
(
action
,
record
){
if
(
$scope
.
alertMsg
==
""
){
...
...
src/main/webapp/WEB-INF/controllers/assignAccountsController.js
View file @
9075e91b
...
...
@@ -177,7 +177,66 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
}
$scope
.
cancel
=
function
(){
var
showConfirmDialog
=
false
;
var
totalFields
=
$scope
.
myForm
.
$$controls
;
if
(
dataToPass
.
action
==
"Update"
){
console
.
log
(
dataToPass
);
$scope
.
previousData
=
{
AccountID
:
dataToPass
.
accountId
,
AccountName
:
dataToPass
.
accountName
,
IndustryType
:
dataToPass
.
industryType
,
ClientAddress
:
dataToPass
.
clientAddress
,
}
$scope
.
currentData
=
{
AccountID
:
$scope
.
accountId
,
AccountName
:
$scope
.
accountName
,
IndustryType
:
$scope
.
industryType
,
ClientAddress
:
$scope
.
clientAddress
}
var
predata
=
JSON
.
stringify
(
$scope
.
previousData
);
var
curdata
=
JSON
.
stringify
(
$scope
.
currentData
);
var
exsistingMangersList
=
dataToPass
.
deliveryManagers
;
var
currentMangersList
=
$scope
.
managersSelectedList
;
console
.
log
(
$scope
.
managersSelectedList
);
var
managerCheck
=
false
;
if
(
exsistingMangersList
.
length
===
currentMangersList
.
length
){
var
temp1
=
[];
var
temp2
=
[];
for
(
var
i
in
exsistingMangersList
){
temp1
.
push
(
exsistingMangersList
[
i
].
employeeId
);
}
for
(
var
j
in
currentMangersList
){
temp2
.
push
(
currentMangersList
[
j
].
employeeId
);
}
for
(
var
k
=
0
;
k
<
exsistingMangersList
.
length
;
k
++
){
if
(
temp2
.
indexOf
(
temp1
[
k
])
>
-
1
){
managerCheck
=
true
;
}
else
{
managerCheck
=
false
;
}
}
}
else
{
managerCheck
=
false
;
}
if
(
predata
===
curdata
&&
managerCheck
){
$mdDialog
.
hide
(
'Cancelled'
);
}
else
{
$mdDialog
.
show
(
$mdDialog
.
confirm
({
skipHide
:
true
,
textContent
:
'Are you sure you want to cancel this?'
,
ok
:
'ok'
,
cancel
:
'cancel'
})).
then
(
function
(){
$mdDialog
.
hide
(
'Cancelled'
);
})
}
}
if
(
dataToPass
.
action
==
"Add"
){
var
totalFields
=
$scope
.
myForm
.
$$controls
;
for
(
key
in
totalFields
)
{
console
.
log
(
"Model value of"
+
key
+
" ==>"
+
totalFields
[
key
].
$modelValue
)
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
&&
totalFields
[
key
].
$modelValue
.
length
!==
0
)
{
...
...
@@ -198,6 +257,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
else
{
$mdDialog
.
hide
(
'Cancelled'
);
}
}
}
$scope
.
updateSearch
=
function
(
e
)
{
e
.
stopPropagation
();
...
...
src/main/webapp/WEB-INF/templates/UpdateTeamMate.html
View file @
9075e91b
...
...
@@ -13,14 +13,14 @@
<md-dialog-content>
<div
class=
"md-dialog-content"
>
<div
class=
"form-group"
>
<output
id=
"employeeName"
name=
"employeeName"
>
Employee Name
<output
id=
"employeeName"
name=
"employeeName"
ng-model=
"employeeName"
>
Employee Name
: {{employeeName}}
</output>
<output>
Employee Id : {{employeeId}}
</output>
<output>
Email Id : {{emailId}}
</output>
<output>
Role : {{role}}
</output>
<output>
Designation : {{designation}}
</output>
<output>
Experience : {{experience}}
</output>
<output>
Mobile Number : {{mobileNumber}}
</output>
<output
ng-model=
"employeeId"
>
Employee Id : {{employeeId}}
</output>
<output
ng-model=
"emailId"
>
Email Id : {{emailId}}
</output>
<output
ng-model=
"role"
>
Role : {{role}}
</output>
<output
ng-model=
"designation"
>
Designation : {{designation}}
</output>
<output
ng-model=
"experience"
>
Experience : {{experience}}
</output>
<output
ng-model=
"mobileNumber"
>
Mobile Number : {{mobileNumber}}
</output>
<md-select
ng-model=
"projectModel"
md-selected-text=
"getProjectSelected()"
id=
"selectProject"
>
<md-optgroup
label=
"Project"
>
<md-option
...
...
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