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
4a9f9aa5
Commit
4a9f9aa5
authored
Jul 25, 2018
by
rammula-nisum-com
Committed by
tdutta-nisum-com
Jul 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes for MT-78 (#55)
parent
d22018b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
19 deletions
+27
-19
DomainController.js
src/main/webapp/WEB-INF/controllers/DomainController.js
+23
-15
LoginController.js
src/main/webapp/WEB-INF/controllers/LoginController.js
+1
-1
newDomain.html
src/main/webapp/WEB-INF/templates/newDomain.html
+3
-3
No files found.
src/main/webapp/WEB-INF/controllers/DomainController.js
View file @
4a9f9aa5
...
...
@@ -40,7 +40,7 @@ myApp.controller("domainController",
},
{
field
:
'accountName'
,
displayName
:
'Account
'
,
displayName
:
'Account'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
...
...
@@ -72,10 +72,11 @@ myApp.controller("domainController",
};
$scope
.
getRowData
=
function
(
row
,
action
)
{
$scope
.
parentData
.
id
=
row
.
entity
.
_
id
;
$scope
.
parentData
.
id
=
row
.
entity
.
id
;
$scope
.
parentData
.
domainId
=
row
.
entity
.
domainId
;
$scope
.
parentData
.
domainName
=
row
.
entity
.
domainName
;
$scope
.
parentData
.
account
=
row
.
entity
.
accountName
;
$scope
.
parentData
.
AccountName
=
row
.
entity
.
accountName
;
$scope
.
parentData
.
AccountId
=
row
.
entity
.
accountId
;
$scope
.
parentData
.
deliveryManagers
=
row
.
entity
.
deliveryManagers
;
if
(
action
==
"Update"
)
...
...
@@ -247,8 +248,8 @@ myApp.controller("domainController",
$scope
.
getAccountText
=
function
()
{
if
(
$scope
.
account
!==
undefined
)
{
return
$scope
.
account
.
accountName
;
if
(
$scope
.
AccountInfo
!==
undefined
)
{
return
$scope
.
AccountInfo
.
accountName
;
}
else
{
...
...
@@ -329,28 +330,34 @@ myApp.controller("domainController",
}
if
(
dataToPass
.
action
==
"Add"
)
{
$scope
.
domainName
=
""
;
$scope
.
a
ccountName
=
""
;
$scope
.
A
ccountName
=
""
;
$scope
.
deliveryManagers
=
""
;
}
else
if
(
dataToPass
.
action
==
"Update"
)
{
$scope
.
isDisabled
=
true
;
$scope
.
id
=
dataToPass
.
id
;
$scope
.
domainId
=
dataToPass
.
domainId
;
$scope
.
domainName
=
dataToPass
.
domainName
;
$scope
.
account
=
{}
;
$scope
.
account
.
accountName
=
dataToPass
.
account
;
$scope
.
AccountInfo
=
dataToPass
.
AccountName
;
$scope
.
AccountId
=
dataToPass
.
AccountId
;
$scope
.
employeeModel
=
dataToPass
.
deliveryManagers
;
var
accounts1
=
myFactory
.
getAccounts
();
for
(
var
i
=
0
;
i
<
accounts1
.
length
;
i
++
)
{
if
(
accounts1
[
i
].
accountName
==
dataToPass
.
AccountName
)
{
$scope
.
AccountInfo
=
accounts1
[
i
];
}
}
}
$scope
.
validateFields
=
function
(
action
){
var
domainId
=
$scope
.
domainId
;
var
AccountName
=
$scope
.
account
;
var
AccountName
=
$scope
.
AccountInfo
;
var
domainName
=
$scope
.
domainName
;
var
deliveryManagers
=
$scope
.
employeeModel
;
if
(
action
==
"Add"
){
if
(
AccountName
==
undefined
){
$scope
.
alertMsg
=
"Please select a Account"
;
document
.
getElementById
(
'
account
'
).
focus
();
}
else
if
(
domainName
==
undefined
){
document
.
getElementById
(
'
AccountInfo
'
).
focus
();
}
else
if
(
domainName
==
""
||
undefined
){
$scope
.
alertMsg
=
"Please enter a Domain Name"
;
document
.
getElementById
(
'domainName'
).
focus
();
}
else
if
(
deliveryManagers
==
undefined
){
...
...
@@ -360,19 +367,19 @@ myApp.controller("domainController",
$scope
.
alertMsg
=
""
;
var
record
=
{
"domainName"
:
$scope
.
domainName
,
"account
Name"
:
$scope
.
account
.
accountName
,
"account
Id"
:
$scope
.
AccountInfo
.
accountId
,
"deliveryManagers"
:
$scope
.
deliveryHeads
()
};
$scope
.
addOrUpdateDomain
(
record
,
action
);
}
}
else
{
$scope
.
alertMsg
=
""
;
var
AccountName
=
$scope
.
account
.
accountName
;
var
AccountName
=
$scope
.
AccountInfo
;
var
domainName
=
$scope
.
domainName
;
var
deliveryManagers1
=
$scope
.
deliveryHeads
();
if
(
AccountName
==
undefined
){
$scope
.
alertMsg
=
"Please select a Account"
;
document
.
getElementById
(
'
account
'
).
focus
();
document
.
getElementById
(
'
AccountInfo
'
).
focus
();
}
else
if
(
domainName
==
""
||
undefined
)
{
$scope
.
alertMsg
=
"Please enter a Domain Name"
;
document
.
getElementById
(
'domainName'
).
focus
();
...
...
@@ -383,7 +390,8 @@ myApp.controller("domainController",
$scope
.
alertMsg
=
""
;
var
record
=
{
"domainName"
:
$scope
.
domainName
,
"accountName"
:
$scope
.
account
.
accountName
,
"accountName"
:
$scope
.
AccountInfo
,
"accountId"
:
$scope
.
AccountId
,
"deliveryManagers"
:
$scope
.
deliveryHeads
(),
"id"
:
$scope
.
id
,
"domainId"
:
dataToPass
.
domainId
...
...
src/main/webapp/WEB-INF/controllers/LoginController.js
View file @
4a9f9aa5
...
...
@@ -88,7 +88,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
function
getAllAccounts
(){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"user/getAccounts"
url
:
appConfig
.
appUri
+
"user/getAccounts
Info
"
}).
then
(
function
mySuccess
(
response
)
{
myFactory
.
setAccounts
(
response
.
data
);
},
function
myError
(
response
)
{
...
...
src/main/webapp/WEB-INF/templates/newDomain.html
View file @
4a9f9aa5
...
...
@@ -26,9 +26,9 @@
</tr>
<tr>
<td
colspan=
"4"
><b>
Account
</b></td>
<td
colspan=
"8"
><md-select
ng-model=
"
account
"
ng-disabled=
"isDisabled"
md-selected-text=
"getAccountText()"
id=
"
account
"
>
<md-optgroup
label=
"
account
"
>
<md-option
ng-value=
"account1"
<td
colspan=
"8"
><md-select
ng-model=
"
AccountInfo
"
ng-disabled=
"isDisabled"
md-selected-text=
"getAccountText()"
id=
"
AccountInfo
"
>
<md-optgroup
label=
"
AccountInfo
"
>
<md-option
ng-value=
"account1"
ng-repeat=
"account1 in accounts"
>
{{account1.accountName}}
</md-option>
</md-optgroup>
</md-select></td>
</tr>
...
...
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