Fix bug
This commit is contained in:
@@ -374,7 +374,6 @@ public class GestioneFerie {
|
||||
System.out.println("1. Approvare");
|
||||
System.out.println("2. Ignorare");
|
||||
System.out.println("3. Rifiutare");
|
||||
System.out.print("Scelta: ");
|
||||
System.out.print("Opzione: ");
|
||||
|
||||
try {
|
||||
@@ -408,12 +407,14 @@ public class GestioneFerie {
|
||||
private static void mostraDipendentiInFerie(Date data, ArrayList<Dipendente> dipendenti,
|
||||
ArrayList<Richiesta_Ferie> richieste) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(FORMATO_DATA);
|
||||
Calendar dataInserita = Calendar.getInstance();
|
||||
dataInserita.setTime(data);
|
||||
System.out.println("Dipendeti in ferie in data " + sdf.format(data) + ": ");
|
||||
boolean dipendentiInFerieInData = false;
|
||||
|
||||
for (Richiesta_Ferie richiesta : richieste) {
|
||||
if (richiesta.getStato().equals(statiApprovazione.APPROVATA) && richiesta.getInizio().before(data)
|
||||
&& richiesta.getFine().after(data)) {
|
||||
if (richiesta.getStato().equals(statiApprovazione.APPROVATA) && richiesta.getInizio().before(dataInserita)
|
||||
&& richiesta.getFine().after(dataInserita)) {
|
||||
dipendentiInFerieInData = true;
|
||||
System.out.println(getDipendente(richiesta.getCodiceFiscale(), dipendenti));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user