Skip to content

Commit

Permalink
updated struts lib to the latest
Browse files Browse the repository at this point in the history
  • Loading branch information
sibow committed Dec 6, 2023
1 parent bc5f6bd commit 67b8152
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>6.1.2.1</version>
<version>6.1.2.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public List<Employee> getEmployees(){
empl.setActiveOnly();
empl.setNotTerminated();
//
// managers can not manage their group
// managers can not manage the group they are in
//
empl.setExclude_group_id(group_id);
String back = empl.find();
Expand Down
11 changes: 10 additions & 1 deletion src/main/java/in/bloomington/timer/bean/Address.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

//
// an object to hold address, no database saving
//
public class Address{

static final long serialVersionUID = 3700L;
Expand Down Expand Up @@ -151,6 +154,12 @@ public String toString(){
return ret;
}
//
// if you want to save the address info uncomment the following
// three functions
// FYI: Not tested
/**
*
*
public String doSelect(){
String back = "";
Connection con = null;
Expand Down Expand Up @@ -304,5 +313,5 @@ public String doUpdate(){
}
return msg;
}

*/
}
12 changes: 10 additions & 2 deletions src/main/java/in/bloomington/timer/bean/PayPeriod.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ public String getMonthNames(){
}
return allMonths[startMonth-1]+"/"+allMonths[endMonth-1];
}
//
// Note: to test end of year timewarp, data input must be done first
//
// if we have two different years, means we are
// at the end of the year pay period, this is handled
// by special case
Expand All @@ -194,13 +197,18 @@ public boolean hasTwoDifferentYears(){
return startYear < endYear;
// return true; // test for new year
}
//
// Note: to test end of year timewarp, data input must be done first
//
// this is needed in December (31 days) only
// to find the split day for the end of the year
// pay period
public int getDaysToYearEnd(){
return 31 - startDay + 1;
// return 13;
// return 7;
}
//
// Note: to test end of year timewarp, data input must be done first
/*
* for the end of the year, the pay period is divided
* into two ranges from (start_date, to 12/31/first year)
Expand All @@ -209,7 +217,7 @@ public int getDaysToYearEnd(){
public String getFirstPayEndDate(){
String ret = "";
if(hasTwoDifferentYears()){
// ret = "11/26/2022"; // test
// ret = "12/03/2023"; // test
ret = "12/31/"+startYear;
}
else{
Expand Down

0 comments on commit 67b8152

Please sign in to comment.