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
2865de91
Commit
2865de91
authored
Jan 04, 2019
by
Nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S13012792 # Client - Incoming Issues (raised by Client) #No message = bad UX
parent
8992bf9b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
17 deletions
+61
-17
HiringTeam.java
cmsWebApp/src/performa/orm/HiringTeam.java
+18
-4
Utils.java
cmsWebApp/src/performa/utils/Utils.java
+0
-7
htmlheader.jsp
cmsWebApp/webroot/extensions/adminportal/inc/htmlheader.jsp
+40
-4
page_admin_home.jsp
cmsWebApp/webroot/extensions/adminportal/page_admin_home.jsp
+3
-2
No files found.
cmsWebApp/src/performa/orm/HiringTeam.java
View file @
2865de91
...
...
@@ -263,9 +263,22 @@ public class HiringTeam extends BaseHiringTeam
public
boolean
hasBillingSetup
()
{
HiringTeam
billingTeam
=
getManageOwnBilling
()
?
this
:
getBilledByTeam
();
return
billingTeam
.
getCardID
()
!=
null
&&
billingTeam
.
getIsPPJ
()
!=
null
&&
(
billingTeam
.
getIsPPJ
()
||
(!
billingTeam
.
getIsPPJ
()
&&
billingTeam
.
getPaymentPlan
()
!=
null
));
if
(
getManageOwnBilling
())
{
return
getCardID
()
!=
null
&&
getIsPPJ
()
!=
null
&&
(
getIsPPJ
()
||
(!
getIsPPJ
()
&&
getPaymentPlan
()
!=
null
));
}
return
getBilledByTeam
().
hasBillingSetup
();
}
// if has plan, checking whether cap is reached
public
boolean
allowJobCreation
()
{
if
(
getManageOwnBilling
())
{
return
isTrue
(
isPPJ
())
||
(
isFalse
(
isPPJ
())
&&
getPaymentPlan
()
!=
null
&&
(
getAvailableCredits
()
>
getUsedCredits
()
||
!
getHasCap
()
||
(
getHasCap
()
&&
getMaxCap
()
>
getUsedCredits
())));
}
return
getBilledByTeam
().
allowJobCreation
();
}
}
\ No newline at end of file
cmsWebApp/src/performa/utils/Utils.java
View file @
2865de91
...
...
@@ -685,13 +685,6 @@ public class Utils
return
colorCode
==
ColorCode
.
RED
?
RingChart
.
RED
:
(
colorCode
==
ColorCode
.
AMBER
?
RingChart
.
AMBER
:
RingChart
.
GREEN
);
}
public
static
boolean
allowJobCreation
(
HiringTeam
hiringTeam
)
{
HiringTeam
billingTeam
=
hiringTeam
.
getManageOwnBilling
()
?
hiringTeam
:
hiringTeam
.
getBilledByTeam
();
return
billingTeam
.
getCardID
()
!=
null
&&
(
billingTeam
.
isTrue
(
billingTeam
.
getIsPPJ
())
||
billingTeam
.
canCreateJob
());
}
public
static
String
getCurrencyFormat
(
HiringTeam
hiringTeam
)
{
CurrencyType
currency
=
hiringTeam
.
getCountry
().
getCurrency
();
...
...
cmsWebApp/webroot/extensions/adminportal/inc/htmlheader.jsp
View file @
2865de91
...
...
@@ -142,6 +142,10 @@
pointer
:
'left:5'
});
});
function
showReachedCap
(){
$
(
'#reachedCap'
).
modal
(
'show'
);
}
</script>
<div
class=
"container-fluid"
>
...
...
@@ -210,13 +214,14 @@
</div>
<div
class=
"create-job-btn"
>
<
%
if
(
selectedTeam
!=
null
)
if
(
selectedTeam
!=
null
&&
companyUser
!=
null
)
{
Article
jobsArticle =
WebUtils.getArticleByShortCut(objTran,
WebUtils
.
JOBS
);
Article
jobsArticle
=
WebUtils.getArticleByShortCut(objTran,
WebUtils
.
JOBS
);
boolean
onJob =
WebUtils.onJobPages(renderMode);
boolean
canCreateJob =
Utils.allowJobCreation(selectedTeam);
boolean
hasBillingSetup =
selectedTeam.hasBillingSetup();
boolean
canCreateJob =
selectedTeam.allowJobCreation();
%
>
<a
href=
"<%= onJob || !canCreateJob ?
"
#"
:
jobsArticle
.
getLink
(
request
,
CollectionUtils
.
mapEntry
("
cms
.
rm
",
WebUtils
.
START_JOB
).
toMap
())
%
>
" class="
<
%=
onJob
||
!
canCreateJob
?
"
disabled
"
:
""%
>
"
>Create Job
</a>
<a
href=
"<%= onJob || !canCreateJob ?
"
javascript:void
(
0
);"
:
jobsArticle
.
getLink
(
request
,
CollectionUtils
.
mapEntry
("
cms
.
rm
",
WebUtils
.
START_JOB
).
toMap
())
%
>
" class="
<
%=
onJob
||
!
hasBillingSetup
?
"
disabled
"
:
""%
>
" onclick="
<
%=
canCreateJob
?
""
:
"
showReachedCap
()"%
>
"
>Create Job
</a>
<
%
}
%
>
...
...
@@ -226,6 +231,37 @@
</div>
</oneit:form>
</header>
<
%
if
(
selectedTeam
!=
null
&&
companyUser
!=
null
)
{
%
>
<div
class=
"modal fade"
id=
"reachedCap"
role=
"dialog"
>
<div
class=
"modal-dialog welcome-pop-top"
>
<div
class=
"modal-body main-welcome-popup"
>
<h2>
Your account reached monthly cap!
</h2>
<
%
if
(
companyUser
.
getRoleForHiringTeam
(
selectedTeam
)
==
RoleType
.
STANDARD
)
{
%
>
<p>
Your account has reached the monthly cap for number of jobs, contact your Administrator to have the Cap increased.
</p>
<
%
}
else
{
%
>
<p>
Your account has reached the monthly cap for number of jobs. Please make a request by contacting us to make changes.
</p>
<div
class=
"create-y-f-job"
>
<a
href=
" https://www.talentology.com/support/"
target=
"_blank"
>
Make a Request
</a>
</div>
<
%
}
%
>
</div>
</div>
</div>
<
%
}
%
>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
...
...
cmsWebApp/webroot/extensions/adminportal/page_admin_home.jsp
View file @
2865de91
...
...
@@ -75,7 +75,8 @@
String homePage = WebUtils.getSamePageInRenderMode(request, "Page");
String jobsPage = jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "Page").toMap());
boolean firstTime = request.getParameter("firstTime") != null ? Boolean.parseBoolean(request.getParameter("firstTime")) : false;
boolean canCreateJob = Utils.allowJobCreation(hiringTeam);
boolean hasBillingSetup = hiringTeam.hasBillingSetup();
boolean canCreateJob = hiringTeam.allowJobCreation();
%>
...
...
@@ -117,7 +118,7 @@
<div class="welcome-box">
<div class="dashboard-welcome">
<div class="welcome-text"> Welcome <br/> <%= firstTime ? "" : "back"%> <oneit:toString value="<%= secUser.getFirstName()!=null ? secUser.getFirstName() : secUser.getUserName()%>" mode="EscapeHTML"/>!</div>
<a class="d-create-job-btn <%=
canCreateJob ? "" : "disabled"%>" href="<%= canCreateJob ? jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) : "#"
%>">Create a Job</a>
<a class="d-create-job-btn <%=
hasBillingSetup ? "" : "disabled"%>" href="<%= canCreateJob ? jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) : "javascript:void(0);" %>" onclick="<%= canCreateJob ? "" : "showReachedCap()"
%>">Create a Job</a>
</div>
<div class="col-sm-3 col-xs-12 d-three-box green-light">
<div class="d-fl-left eq-height">
...
...
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