1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.lm.approval.web;
17
18 import java.util.ArrayList;
19 import java.util.Date;
20 import java.util.List;
21
22 import org.kuali.hr.time.approval.web.ApprovalLeaveSummaryRow;
23 import org.kuali.hr.time.base.web.ApprovalForm;
24
25 public class LeaveApprovalActionForm extends ApprovalForm {
26
27 private static final long serialVersionUID = 1L;
28
29 private List<ApprovalLeaveSummaryRow> leaveApprovalRows;
30 private List<Date> leaveCalendarDates = new ArrayList<Date>();
31
32 public List<ApprovalLeaveSummaryRow> getLeaveApprovalRows() {
33 return leaveApprovalRows;
34 }
35 public void setLeaveApprovalRows(List<ApprovalLeaveSummaryRow> leaveApprovalRows) {
36 this.leaveApprovalRows = leaveApprovalRows;
37 }
38 public List<Date> getLeaveCalendarDates() {
39 return leaveCalendarDates;
40 }
41 public void setLeaveCalendarDates(List<Date> leaveCalendarDates) {
42 this.leaveCalendarDates = leaveCalendarDates;
43 }
44
45 public boolean isAnyApprovalRowApprovable() {
46 boolean isAnyApprovalRowApprovable = false;
47
48 if (leaveApprovalRows != null) {
49 for (ApprovalLeaveSummaryRow approvalRow : leaveApprovalRows) {
50 if (approvalRow.isApprovable()) {
51 isAnyApprovalRowApprovable = true;
52 break;
53 }
54 }
55 }
56
57 return isAnyApprovalRowApprovable;
58 }
59
60
61 }