Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
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
Muhammad Usman
PERFORMA_REPLICA
Commits
e708fd06
Commit
e708fd06
authored
Sep 26, 2017
by
chenith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added custom sort order for list Jobstatus.
parent
c00303f3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
7 deletions
+36
-7
JobStatus.java
cmsWebApp/src/performa/orm/types/JobStatus.java
+12
-0
JobStatus.xml
cmsWebApp/src/performa/orm/types/JobStatus.xml
+8
-5
Utils.java
cmsWebApp/src/performa/utils/Utils.java
+15
-1
list_clients.jsp
cmsWebApp/webroot/extensions/adminportal/list_clients.jsp
+1
-1
No files found.
cmsWebApp/src/performa/orm/types/JobStatus.java
View file @
e708fd06
...
...
@@ -37,10 +37,17 @@ public class JobStatus extends AbstractEnumerated
return
allJobStatuss
;
}
private
transient
Integer
ClientSortOrder
;
private
JobStatus
(
String
name
,
String
value
,
String
description
,
boolean
disabled
)
{
super
(
name
,
value
,
description
,
disabled
);
}
public
Integer
getClientSortOrder
()
{
return
ClientSortOrder
;
}
public
static
final
Comparator
COMPARE_BY_POSITION
=
new
CompareEnumByPosition
(
allJobStatuss
);
...
...
@@ -109,6 +116,10 @@ public class JobStatus extends AbstractEnumerated
public
static
void
defineAdditionalData
()
{
OPEN
.
ClientSortOrder
=
1
;
COMPLETE
.
ClientSortOrder
=
2
;
DRAFT
.
ClientSortOrder
=
4
;
FILLED
.
ClientSortOrder
=
3
;
}
...
...
@@ -136,6 +147,7 @@ public class JobStatus extends AbstractEnumerated
{
Map
attribs
=
new
HashMap
();
attribs
.
put
(
"ClientSortOrder"
,
ArrayFormatter
.
toObject
(
getClientSortOrder
()));
return
attribs
;
}
...
...
cmsWebApp/src/performa/orm/types/JobStatus.xml
View file @
e708fd06
...
...
@@ -2,11 +2,13 @@
<ROOT>
<CONSTANT
package=
"performa.orm.types"
name=
"JobStatus"
>
<VALUE
name=
"OPEN"
value=
"OPEN"
description=
"Open"
/>
<VALUE
name=
"COMPLETE"
value=
"COMPLETE"
description=
"Closed"
/>
<VALUE
name=
"DRAFT"
value=
"DRAFT"
description=
"Draft"
/>
<VALUE
name=
"FILLED"
value=
"FILLED"
description=
"Filled"
/>
<DATA
name=
"ClientSortOrder"
type=
"Integer"
/>
<VALUE
name=
"OPEN"
value=
"OPEN"
description=
"Open"
ClientSortOrder=
"1"
/>
<VALUE
name=
"COMPLETE"
value=
"COMPLETE"
description=
"Closed"
ClientSortOrder=
"2"
/>
<VALUE
name=
"DRAFT"
value=
"DRAFT"
description=
"Draft"
ClientSortOrder=
"4"
/>
<VALUE
name=
"FILLED"
value=
"FILLED"
description=
"Filled"
ClientSortOrder=
"3"
/>
</CONSTANT>
</ROOT>
\ No newline at end of file
cmsWebApp/src/performa/utils/Utils.java
View file @
e708fd06
...
...
@@ -495,7 +495,21 @@ public class Utils
{
return
ConfigMgr
.
getKeyfileString
(
GoogleOAuthLoginFP
.
GOOGLE_CLIENTID_ATTR_NAME
)
!=
null
&&
ConfigMgr
.
getKeyfileString
(
GoogleOAuthLoginFP
.
GOOGLE_CLIENTSECRET_ATTR_NAME
)
!=
null
;
}
}
//to get Job status list sorted for client
public
static
Collection
<
JobStatus
>
getJobStatusesForClient
()
{
return
CollectionUtils
.
sort
(
Arrays
.
asList
(
JobStatus
.
getJobStatusArray
()),
new
Comparator
<
JobStatus
>
()
{
@Override
public
int
compare
(
JobStatus
o1
,
JobStatus
o2
)
{
return
o1
.
getClientSortOrder
().
compareTo
(
o2
.
getClientSortOrder
());
}
});
}
private
static
class
CompanyUserTransform
implements
ObjectTransform
<
CompanyUser
,
String
>
{
...
...
cmsWebApp/webroot/extensions/adminportal/list_clients.jsp
View file @
e708fd06
...
...
@@ -73,7 +73,7 @@
</div>
</div>
<%
for (JobStatus jobStatus :
JobStatus.getJobStatusArray
())
for (JobStatus jobStatus :
Utils.getJobStatusesForClient
())
{
int jobCount = client.getApplicationCountByStatus(jobStatus);
%>
...
...
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