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
0db1189f
Commit
0db1189f
authored
Jul 30, 2018
by
vsunke-nisum-com
Committed by
rbonthala-nisum-com
Jul 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MT-116 added domaincontroller.js,assignaccountcontroller.js,newaccount.html (#90)
parent
9a7a6a5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
9 deletions
+26
-9
DomainController.js
src/main/webapp/WEB-INF/controllers/DomainController.js
+7
-0
assignAccountsController.js
...in/webapp/WEB-INF/controllers/assignAccountsController.js
+18
-8
newAccount.html
src/main/webapp/WEB-INF/templates/newAccount.html
+1
-1
No files found.
src/main/webapp/WEB-INF/controllers/DomainController.js
View file @
0db1189f
...
@@ -365,6 +365,8 @@ myApp.controller("domainController",
...
@@ -365,6 +365,8 @@ myApp.controller("domainController",
}
}
}
}
$scope
.
ifEmployeeNameExists
=
function
(
empName
)
{
$scope
.
ifEmployeeNameExists
=
function
(
empName
)
{
$scope
.
selectedEmployeeNames
.
push
(
manager
.
employeeName
);
removeDuplicates
(
$scope
.
selectedEmployeeNames
);
return
$scope
.
selectedEmployeeNames
.
includes
(
empName
);
return
$scope
.
selectedEmployeeNames
.
includes
(
empName
);
}
}
$scope
.
validateFields
=
function
(
action
){
$scope
.
validateFields
=
function
(
action
){
...
@@ -422,6 +424,11 @@ myApp.controller("domainController",
...
@@ -422,6 +424,11 @@ myApp.controller("domainController",
};
};
function
removeDuplicates
(
arr
){
return
arr
.
filter
(
function
(
item
,
pos
)
{
return
arr
.
indexOf
(
item
)
==
pos
;
})
}
}
}
});
});
\ No newline at end of file
src/main/webapp/WEB-INF/controllers/assignAccountsController.js
View file @
0db1189f
...
@@ -164,7 +164,8 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
...
@@ -164,7 +164,8 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
method
:
"GET"
,
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"/projectTeam/getEmployeesToTeam"
url
:
appConfig
.
appUri
+
"/projectTeam/getEmployeesToTeam"
}).
then
(
function
mySuccess
(
response
)
{
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
managerDetails
=
response
.
data
;
$scope
.
managerDetails
=
response
.
data
;
console
.
log
(
"response"
,
response
)
},
function
myError
(
response
)
{
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
$scope
.
gridOptions
.
data
=
[];
...
@@ -199,7 +200,8 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
...
@@ -199,7 +200,8 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
}
}
}
}
$scope
.
updateSearch
=
function
(
e
)
{
$scope
.
updateSearch
=
function
(
e
)
{
e
.
stopPropagation
();
e
.
stopPropagation
();
$scope
.
getSelectedLead
();
}
}
$scope
.
searchFilter
=
function
(
obj
)
{
$scope
.
searchFilter
=
function
(
obj
)
{
var
stringToGoIntoTheRegex
=
$scope
.
searchTerm
;
var
stringToGoIntoTheRegex
=
$scope
.
searchTerm
;
...
@@ -214,10 +216,13 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
...
@@ -214,10 +216,13 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
}
}
$scope
.
getSelectedLead
=
function
(){
$scope
.
getSelectedLead
=
function
(){
$scope
.
managersSelectedList
.
forEach
(
function
(
manager
){
$scope
.
managersSelectedList
.
forEach
(
function
(
manager
){
if
(
!
$scope
.
employeeInTeam
.
includes
(
manager
.
employeeId
))
$scope
.
selectedEmployeeNames
.
push
(
manager
.
employeeName
);
$scope
.
employeeInTeam
.
push
(
manager
.
employeeId
)
removeDuplicates
(
$scope
.
selectedEmployeeNames
);
})
if
(
!
$scope
.
employeeInTeam
.
includes
(
manager
.
employeeId
)){
console
.
log
(
$scope
.
employeeInTeam
);
$scope
.
employeeInTeam
.
push
(
manager
.
employeeId
)
;
}
})
}
}
$scope
.
getIndustryTypeSelected
=
function
(){
$scope
.
getIndustryTypeSelected
=
function
(){
if
(
$scope
.
industryType
!==
undefined
)
{
if
(
$scope
.
industryType
!==
undefined
)
{
...
@@ -228,7 +233,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
...
@@ -228,7 +233,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
}
}
};
};
$scope
.
clearSearchTerm
=
function
()
{
$scope
.
clearSearchTerm
=
function
()
{
$scope
.
searchTerm
=
''
;
$scope
.
searchTerm
=
''
;
};
};
$element
.
find
(
'input'
).
on
(
'keydown'
,
function
(
ev
)
{
$element
.
find
(
'input'
).
on
(
'keydown'
,
function
(
ev
)
{
ev
.
stopPropagation
();
ev
.
stopPropagation
();
...
@@ -330,7 +335,12 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
...
@@ -330,7 +335,12 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
}
}
}
}
}
}
function
removeDuplicates
(
arr
){
return
arr
.
filter
(
function
(
item
,
pos
)
{
return
arr
.
indexOf
(
item
)
==
pos
;
})
}
}
}
});
});
src/main/webapp/WEB-INF/templates/newAccount.html
View file @
0db1189f
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<td
id=
"lead"
colspan=
"8"
>
<td
id=
"lead"
colspan=
"8"
>
<div
class=
"leads-data"
ng-show=
"managersSelectedList.length > 0"
>
<div
class=
"leads-data"
ng-show=
"managersSelectedList.length > 0"
>
<div
ng-repeat=
"item in managersSelectedList"
>
<div
ng-repeat=
"item in managersSelectedList"
>
<p>
{{item.employeeName}}
<span
ng-click=
"removeSelectedLead(item)"
class=
"glyphicon glyphicon-remove"
></span>
</p>
<p>
{{item.employeeName}}
<span
ng-click=
"removeSelectedLead(item
,$event
)"
class=
"glyphicon glyphicon-remove"
></span>
</p>
</div>
</div>
</div>
</div>
<div
style=
"display: block; float: left; width: 100%;"
>
<div
style=
"display: block; float: left; width: 100%;"
>
...
...
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