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
9d60bb96
Commit
9d60bb96
authored
May 02, 2019
by
NISUM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored Domain controller
parent
b6f5ec3d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
12 deletions
+16
-12
DomainRepo.java
src/main/java/com/nisum/myteam/repository/DomainRepo.java
+2
-0
DomainService.java
...ain/java/com/nisum/myteam/service/impl/DomainService.java
+1
-1
DomainController.js
src/main/webapp/WEB-INF/controllers/DomainController.js
+9
-9
custom-theme.css
src/main/webapp/WEB-INF/css/custom-theme.css
+4
-2
No files found.
src/main/java/com/nisum/myteam/repository/DomainRepo.java
View file @
9d60bb96
...
@@ -8,6 +8,8 @@ public interface DomainRepo extends MongoRepository<Domain, String> {
...
@@ -8,6 +8,8 @@ public interface DomainRepo extends MongoRepository<Domain, String> {
List
<
Domain
>
findByDomainNameAndAccountId
(
String
domianName
,
String
accountId
);
List
<
Domain
>
findByDomainNameAndAccountId
(
String
domianName
,
String
accountId
);
List
<
Domain
>
findByDomainIdAndAccountId
(
String
domianId
,
String
accountId
);
List
<
Domain
>
findByAccountId
(
String
accountId
);
List
<
Domain
>
findByAccountId
(
String
accountId
);
Domain
findByDomainId
(
String
domainId
);
Domain
findByDomainId
(
String
domainId
);
...
...
src/main/java/com/nisum/myteam/service/impl/DomainService.java
View file @
9d60bb96
...
@@ -54,7 +54,7 @@ public class DomainService implements IDomainService {
...
@@ -54,7 +54,7 @@ public class DomainService implements IDomainService {
public
boolean
isDomainExists
(
Domain
domainReq
)
{
public
boolean
isDomainExists
(
Domain
domainReq
)
{
boolean
isDomainExists
=
false
;
boolean
isDomainExists
=
false
;
int
count
=
0
;
int
count
=
0
;
List
<
Domain
>
domainListByName
=
domainRepo
.
findByDomain
NameAndAccountId
(
domainReq
.
getDomainName
(),
List
<
Domain
>
domainListByName
=
domainRepo
.
findByDomain
IdAndAccountId
(
domainReq
.
getDomainId
(),
domainReq
.
getAccountId
());
domainReq
.
getAccountId
());
List
<
Domain
>
domainListbyAccountId
=
domainRepo
.
findByAccountId
(
domainReq
.
getAccountId
());
List
<
Domain
>
domainListbyAccountId
=
domainRepo
.
findByAccountId
(
domainReq
.
getAccountId
());
...
...
src/main/webapp/WEB-INF/controllers/DomainController.js
View file @
9d60bb96
...
@@ -85,7 +85,7 @@ myApp.controller("domainController",
...
@@ -85,7 +85,7 @@ myApp.controller("domainController",
{
{
method
:
"GET"
,
method
:
"GET"
,
url
:
appConfig
.
appUri
url
:
appConfig
.
appUri
+
"/
projectTeam/getEmployeesToTeam
"
+
"/
employees/active/sortByName
"
})
})
.
then
(
.
then
(
function
mySuccess
(
response
)
{
function
mySuccess
(
response
)
{
...
@@ -121,7 +121,7 @@ myApp.controller("domainController",
...
@@ -121,7 +121,7 @@ myApp.controller("domainController",
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
}
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
},
},
function
myError
(
response
)
{
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
showAlert
(
"Something went wrong while fetching data!!!"
);
...
@@ -240,10 +240,10 @@ myApp.controller("domainController",
...
@@ -240,10 +240,10 @@ myApp.controller("domainController",
var
allAccounts
=
myFactory
.
getAccounts
();
var
allAccounts
=
myFactory
.
getAccounts
();
function
getActiveAccounts
(){
function
getActiveAccounts
(){
var
activeAccounts
=
[];
var
activeAccounts
=
[];
for
(
var
i
in
allAccounts
){
for
(
var
i
in
allAccounts
.
records
){
console
.
log
(
allAccounts
[
i
]);
console
.
log
(
allAccounts
.
records
[
i
]);
if
(
allAccounts
[
i
].
status
==
"Active"
||
allAccount
s
[
i
].
status
==
"Y"
){
if
(
allAccounts
.
records
[
i
].
status
==
"Active"
||
allAccounts
.
record
s
[
i
].
status
==
"Y"
){
activeAccounts
.
push
(
allAccounts
[
i
]);
activeAccounts
.
push
(
allAccounts
.
records
[
i
]);
}
}
}
}
return
activeAccounts
;
return
activeAccounts
;
...
@@ -383,11 +383,11 @@ myApp.controller("domainController",
...
@@ -383,11 +383,11 @@ myApp.controller("domainController",
}
}
function
updatingGridBasedOnStatus
(
status
,
response
,
result
)
{
function
updatingGridBasedOnStatus
(
status
,
response
,
result
)
{
if
(
response
==
"Domain saved successfully
"
)
{
if
(
response
.
message
==
"Domain has been created
"
)
{
updateGrid
(
"Add"
,
result
);
updateGrid
(
"Add"
,
result
);
}
else
if
(
response
==
"Domain updated successfully
"
)
{
}
else
if
(
response
.
message
==
"Domain has been updated
"
)
{
updateGrid
(
"Update"
,
result
);
updateGrid
(
"Update"
,
result
);
}
else
if
(
response
==
"Domain already exists
"
)
{
}
else
if
(
response
.
message
==
"Domain already existed
"
)
{
$scope
.
alertMsg
=
"Domain already exist,Please enter new matching"
;
$scope
.
alertMsg
=
"Domain already exist,Please enter new matching"
;
}
}
...
...
src/main/webapp/WEB-INF/css/custom-theme.css
View file @
9d60bb96
...
@@ -81,6 +81,7 @@ i.fa.fa-refresh:hover {
...
@@ -81,6 +81,7 @@ i.fa.fa-refresh:hover {
color
:
#34495e
;
color
:
#34495e
;
font-size
:
22px
;
font-size
:
22px
;
margin
:
14px
0
0
40px
;
margin
:
14px
0
0
40px
;
display
:
none
;
/* Need to enable once we check the functionality */
}
}
#header
.dropdown-toggle
{
#header
.dropdown-toggle
{
padding
:
12px
;
padding
:
12px
;
...
@@ -234,7 +235,7 @@ i.fa.fa-refresh:hover {
...
@@ -234,7 +235,7 @@ i.fa.fa-refresh:hover {
/* ===== Main Container ===== */
/* ===== Main Container ===== */
.main-container
{
.main-container
{
display
:
flex
;
display
:
flex
;
height
:
calc
(
100%
-
105px
);
/* height: calc(100% - 105px); need to test and enable*/
overflow
:
hidden
;
overflow
:
hidden
;
}
}
/* .main-container #sidebar-left, .main-container #main {
/* .main-container #sidebar-left, .main-container #main {
...
@@ -331,6 +332,7 @@ i.fa.fa-refresh:hover {
...
@@ -331,6 +332,7 @@ i.fa.fa-refresh:hover {
line-height
:
50px
;
line-height
:
50px
;
}
}
#footer
.footer
p
{
#footer
.footer
p
{
font-size
:
13px
;
margin
:
0
;
margin
:
0
;
}
}
#footer
.footer
.img
{
#footer
.footer
.img
{
...
...
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