Skip to content

Commit

Permalink
updated a class
Browse files Browse the repository at this point in the history
  • Loading branch information
sibow committed Jan 30, 2025
1 parent 9980c44 commit 6050d4f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
17 changes: 11 additions & 6 deletions src/main/java/in/bloomington/timer/action/LeaveReportAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,21 @@ public String execute(){
if(employee.isAdmin()){
allDepts = true;
}
if(dept_id.isEmpty()){
dept_id = employee.getDepartment_id();
}
if(!action.isEmpty()){
if(employee.isAdmin()){
allDepts = true;
}
if(dept_id.isEmpty()){
dept_id = employee.getDepartment_id();
}
else{
if(dept_id.isEmpty()){
dept_id = employee.getDepartment_id();
}
}
findLeaveRequests();
}
else{
if(dept_id.isEmpty()){
dept_id = employee.getDepartment_id();
}
getCurrentPayPeriod();
findLeaveRequests();
}
Expand Down Expand Up @@ -193,6 +195,9 @@ public void setDept_id(String val){
if(val != null && !val.equals("-1")){
dept_id = val;
}
else{
dept_id = "";
}
}
public void setEmp_id(String val){
if(val != null && !val.equals("-1")){
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/jsp/leave_request.jsp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%@ include file="header.jsp" %>
<div class="internal-page">
<h1>LEAVE REQUESTS <small><b>Requester:&nbsp;</b><s:property value="user"/>&nbsp;<b> Reviewer:&nbsp;</b><s:property value="leave.managerName" /> </small></h1><br />
<b>(check '<a href="<s:property value='#application.url' />leave_report.action"> Departmental Leave Report </a>' for conflicts)</b><br />

<s:if test="hasErrors()">
<s:set var="errors" value="errors" />
<%@ include file="errors.jsp" %>
Expand Down Expand Up @@ -106,7 +106,7 @@
<li>Your Supervisor may then Approve or Deny the request. TimeTrack will email you a notification of your supervisor's decision.</li>
<li>Once a leave request is approved, you may add your anticipated Time Off to your timesheet in Time Track. You will still need to ensure your Timesheet reflects the actual Leave Hours taken when your timesheet is submitted.</li>
<li>All fields on this form are required, including a description of your proposed Leave.</li>

<li>To check for leave conflicts, review the '<a href="<s:property value='#application.url' />leave_report.action"> Departmental Leave Report </a>' </li>
</ul>
</fieldset>
</div>
Expand Down
3 changes: 1 addition & 2 deletions src/main/webapp/WEB-INF/jsp/leave_review.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<%@ include file="messages.jsp" %>
</s:elseif>
<br />
<b>(check '<a href="<s:property value='#application.url' />leave_report.action"> Departmental Leave Report </a>' for conflicts)</b><br />
<s:if test="hasLeaves()">
<br />
<h1 style="border-bottom:0">Current Leave Requests (<s:property value="leavesTotalNumber" /> Pending Reviews)</h1>
Expand Down Expand Up @@ -105,7 +104,7 @@
<li>If you Deny a request, please provide the reason in the 'Review Notes' field.</li>
<li>If you take No Action, then the request will remain in your queue for later consideration.</li>
<li>The employee will be notified by Time Track of your decision.</li>

<li>To check for leave conflicts, review the '<a href="<s:property value='#application.url' />leave_report.action"> Departmental Leave Report </a>' </li>
</ul>
</fieldset>

Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/jsp/reports/leave_report.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="background-color:gainsboro;border:none;spacing:none;">
<td style="border:none;padding-bottom:none;">
<s:if test="showAllDepts()">
<s:select name="dept_id" value="%{dept_id}" list="departments" listKey="id" listValue="name" headerKey="-1" headerValue="Pick Department" id="department_id_change" />
<s:select name="dept_id" value="%{dept_id}" list="departments" listKey="id" listValue="name" headerKey="-1" headerValue="All" id="department_id_change" />
</s:if>
<s:else>
<s:property value="department" />
Expand Down
6 changes: 4 additions & 2 deletions src/main/webapp/WEB-INF/jsp/settings.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@
<li><a href="<s:property value='#application.url'/>reportReason.action">Police Code Reasons</a></li>
<li><a href="<s:property value='#application.url'/>reportPublicWorks.action">Asset Management (Public Works)</a></li>
<li><a href="<s:property value='#application.url'/>reportUnscheduled.action">Unscheduled Times</a></li>
<li><a href="<s:property value='#application.url'/>leave_history.action">Departmental Leave</a></li>
<li><a href="<s:property value='#application.url'/>leave_report.action">Departmental Leave</a></li>

</ul>
<h2>Schedulers & Updates</h2>
<ul>
<li><a href="<s:property value='#application.url'/>accrualSchedule.action">Employees' accruals</a></li>
<li><a href="<s:property value='#application.url'/>excess_accruals.action">Excess accrual email warnings</a></li>
<!--
<li><a href="<s:property value='#application.url'/>excess_accruals.action">Excess accrual email warnings</a></li>
-->
<li><a href="<s:property value='#application.url'/>profileSchedule.action">Employees Profile Update</a></li>
<li><a href="<s:property value='#application.url'/>emp_jobs_update.action">Employees Job Update</a></li>
<li><a href="<s:property value='#application.url'/>empsUpdateSchedule.action">Employees' Update from AD (LDAP)</a></li>
Expand Down

0 comments on commit 6050d4f

Please sign in to comment.