Skip to content

Commit

Permalink
Merge pull request #145 from consiglionazionaledellericerche/144-inse…
Browse files Browse the repository at this point in the history
…rire-nuovo-piano-ferie-15+2

Aggiunto piano ferie 15+2
  • Loading branch information
criluc authored Mar 1, 2024
2 parents cf323e3 + 89b1b6f commit 7f8a43b
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.14.0] - UNRELEASED
### Added
- Aggiunto piano ferie 15+2

### Changed
- Corretta lista persone in Straordinario mensili gruppo, filtrando le persone non più affiliate


## [2.13.0] - 2024-02-13
### Added
Expand Down
15 changes: 15 additions & 0 deletions app/manager/services/absences/model/YearProgression.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,21 @@ public enum YearProgression {
new YearPortion(320, 349, 1),
new YearPortion(350, 366, 2))),

vacation15(15, ImmutableList.of(
new YearPortion(1, 15, 0),
new YearPortion(16, 45, 1),
new YearPortion(46, 75, 1),
new YearPortion(76, 106, 2),
new YearPortion(107, 136, 1),
new YearPortion(137, 167, 1),
new YearPortion(168, 197, 2),
new YearPortion(198, 227, 1),
new YearPortion(228, 258, 1),
new YearPortion(259, 288, 1),
new YearPortion(289, 319, 1),
new YearPortion(320, 349, 1),
new YearPortion(350, 366, 2))),

vacation11(11, ImmutableList.of(
new YearPortion(1, 15, 0),
new YearPortion(16, 45, 1),
Expand Down
51 changes: 51 additions & 0 deletions app/models/enumerate/VacationCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public enum VacationCode {
// Part-time verticali 3 giorni
CODE_16_2("16+2", 16, 2),
CODE_17_2("17+2", 17, 2),
CODE_15_2("15+2", 15, 2),

// Part time verticali 50% o periodici 50%
CODE_13_2("13+2", 13, 2),
Expand Down Expand Up @@ -88,6 +89,9 @@ public int accruedVacations(int days) {
if (this.vacations == 14) {
return accruedProgression14(days);
}
if (this.vacations == 15) {
return accruedProgression15(days);
}
if (this.vacations == 16) {
return accruedProgression16(days);
}
Expand Down Expand Up @@ -548,6 +552,53 @@ private int accruedProgression16(int days) {
}
return 16;
}

/**
* Progressione su 15 giorni.
*
* @param days giorni passati
* @return giorni maturati
*/
private int accruedProgression15(int days) {

if (days <= 15) {
return 0;
}
if (days >= 16 && days <= 45) {
return 1;
}
if (days >= 46 && days <= 75) {
return 2;
}
if (days >= 76 && days <= 106) {
return 4;
}
if (days >= 107 && days <= 136) {
return 5;
}
if (days >= 137 && days <= 167) {
return 6;
}
if (days >= 168 && days <= 197) {
return 8;
}
if (days >= 198 && days <= 227) {
return 9;
}
if (days >= 228 && days <= 258) {
return 10;
}
if (days >= 259 && days <= 288) {
return 11;
}
if (days >= 289 && days <= 319) {
return 13;
}
if (days >= 320 && days <= 349) {
return 14;
}
return 15;
}

/**
* Progressione su 17 giorni.
Expand Down
1 change: 1 addition & 0 deletions conf/messages.it
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ VacationCode.CODE_9_1= 9+1
VacationCode.CODE_13_2= 13+2
VacationCode.CODE_14_2= 14+2
VacationCode.CODE_23_3= 23+3
VacationCode.CODE_15_2= 15+2

date= Data

Expand Down

0 comments on commit 7f8a43b

Please sign in to comment.