Commit 64d6469d by Nilu

HT019.5 - HT Owner account is also the 'billing user' and the only team member…

HT019.5 - HT Owner account is also the 'billing user' and the only team member who's authorized to see navigation links for Billing, Plan, Invoices
parent 5c013a57
......@@ -175,4 +175,9 @@ public class CompanyUser extends BaseCompanyUser
}
}
public boolean hasRole(RoleType role)
{
return getRoles() != null && getRoles().contains(role);
}
}
\ No newline at end of file
......@@ -10,6 +10,9 @@
String secondPage = WebUtils.getSamePageInRenderMode(request, "ManagePlan");
String thirdPage = WebUtils.getSamePageInRenderMode(request, "Billing");
String forthPage = WebUtils.getSamePageInRenderMode(request, "Invoices");
SecUser loggedInUser = SecUser.getTXUser(transaction);
CompanyUser companyUser = loggedInUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
%>
<oneit:dynIncluded>
......@@ -22,27 +25,34 @@
Hiring Team Details
</oneit:button>
</li>
<li class="<%= tabNumber == "2" ? "active" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", secondPage)
.toMap() %>">
Manage Plan
</oneit:button>
</li>
<li class="<%= tabNumber == "3" ? "active" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", thirdPage)
.toMap() %>">
Billing
</oneit:button>
</li>
<li class="<%= tabNumber == "4" ? "active" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", forthPage)
.toMap() %>">
Invoices
</oneit:button>
</li>
<%
if(companyUser.hasRole(RoleType.BILLING))
{
%>
<li class="<%= tabNumber == "2" ? "active" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", secondPage)
.toMap() %>">
Manage Plan
</oneit:button>
</li>
<li class="<%= tabNumber == "3" ? "active" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", thirdPage)
.toMap() %>">
Billing
</oneit:button>
</li>
<li class="<%= tabNumber == "4" ? "active" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", forthPage)
.toMap() %>">
Invoices
</oneit:button>
</li>
<%
}
%>
</ul>
</div>
</oneit:dynIncluded>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment