|
@@ -2745,14 +2745,20 @@ open class DashboardService( |
|
|
if (thisTeam == null || thisTeam.team.id != teamId) { |
|
|
if (thisTeam == null || thisTeam.team.id != teamId) { |
|
|
continue |
|
|
continue |
|
|
} |
|
|
} |
|
|
|
|
|
System.out.println("-----------------------------------") |
|
|
|
|
|
System.out.println("Staff Name: ${curr.name}") |
|
|
|
|
|
var dateListSize = dateList.size |
|
|
|
|
|
var publicHolidayListSize = publicHolidayList.size |
|
|
|
|
|
var companyHolidaySize = companyHoliday.size |
|
|
if (curr.departDate != null) { |
|
|
if (curr.departDate != null) { |
|
|
dateList.filter { it.isBefore(curr.departDate) } |
|
|
|
|
|
publicHolidayList.filter { it.isBefore(curr.departDate) } |
|
|
|
|
|
companyHoliday.filter { it.date.isBefore(curr.departDate) } |
|
|
|
|
|
|
|
|
System.out.println("Depart Date: ${curr.departDate}") |
|
|
|
|
|
dateListSize = dateList.filter { it.isBefore(curr.departDate) || it.isEqual(curr.departDate) }.toMutableList().size |
|
|
|
|
|
publicHolidayListSize = publicHolidayList.filter { it.isBefore(curr.departDate) || it.isEqual(curr.departDate) }.size |
|
|
|
|
|
companyHolidaySize = companyHoliday.filter { it.date.isBefore(curr.departDate) || it.date.isEqual(curr.departDate) }.size |
|
|
} |
|
|
} |
|
|
thisArgs["staffId"] = curr.id!! |
|
|
thisArgs["staffId"] = curr.id!! |
|
|
val submittedWeek = weeklySubmittedTimesheet(thisArgs) |
|
|
val submittedWeek = weeklySubmittedTimesheet(thisArgs) |
|
|
val unsubmittedCount = dateList.size - publicHolidayList.size - companyHoliday.size - submittedWeek.size |
|
|
|
|
|
|
|
|
val unsubmittedCount = dateListSize - publicHolidayListSize - companyHolidaySize - submittedWeek.size |
|
|
if (unsubmittedCount <= 0) continue |
|
|
if (unsubmittedCount <= 0) continue |
|
|
result.add( |
|
|
result.add( |
|
|
mapOf( |
|
|
mapOf( |
|
@@ -2796,14 +2802,20 @@ open class DashboardService( |
|
|
if (thisTeam == null || thisTeam.team.id != teamId) { |
|
|
if (thisTeam == null || thisTeam.team.id != teamId) { |
|
|
continue |
|
|
continue |
|
|
} |
|
|
} |
|
|
|
|
|
System.out.println("-----------------------------------") |
|
|
|
|
|
System.out.println("Staff Name: ${curr.name}") |
|
|
|
|
|
var dateListSize = dateList.size |
|
|
|
|
|
var publicHolidayListSize = publicHolidayList.size |
|
|
|
|
|
var companyHolidaySize = companyHoliday.size |
|
|
if (curr.departDate != null) { |
|
|
if (curr.departDate != null) { |
|
|
dateList.filter { it.isBefore(curr.departDate) } |
|
|
|
|
|
publicHolidayList.filter { it.isBefore(curr.departDate) } |
|
|
|
|
|
companyHoliday.filter { it.date.isBefore(curr.departDate) } |
|
|
|
|
|
|
|
|
System.out.println("Depart Date: ${curr.departDate}") |
|
|
|
|
|
dateListSize = dateList.filter { it.isBefore(curr.departDate) || it.isEqual(curr.departDate) }.toMutableList().size |
|
|
|
|
|
publicHolidayListSize = publicHolidayList.filter { it.isBefore(curr.departDate) || it.isEqual(curr.departDate) }.size |
|
|
|
|
|
companyHolidaySize = companyHoliday.filter { it.date.isBefore(curr.departDate) || it.date.isEqual(curr.departDate) }.size |
|
|
} |
|
|
} |
|
|
thisArgs["staffId"] = curr.id!! |
|
|
thisArgs["staffId"] = curr.id!! |
|
|
val submittedMonth = monthlySubmittedTimesheet(thisArgs) |
|
|
val submittedMonth = monthlySubmittedTimesheet(thisArgs) |
|
|
val unsubmittedCount = dateList.size - publicHolidayList.size - companyHoliday.size - submittedMonth.size |
|
|
|
|
|
|
|
|
val unsubmittedCount = dateListSize - publicHolidayListSize - companyHolidaySize - submittedMonth.size |
|
|
if (unsubmittedCount <= 0) continue |
|
|
if (unsubmittedCount <= 0) continue |
|
|
result.add( |
|
|
result.add( |
|
|
mapOf( |
|
|
mapOf( |
|
|