Compare commits
2
Commits
a8e94603bd
...
prod/v1.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7b62ddf15 | ||
|
|
a577e91e94 |
@@ -123,6 +123,26 @@ public class CategorieService {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String matchedTaille = "";
|
||||||
|
if (licence.getAdherent() != null) {
|
||||||
|
String taillesDispo = ce.getEquipement().getTaillesDisponibles();
|
||||||
|
if (taillesDispo != null && !taillesDispo.trim().isEmpty()) {
|
||||||
|
String[] dispos = taillesDispo.split(",");
|
||||||
|
String tv = licence.getAdherent().getTailleVetement();
|
||||||
|
String pt = licence.getAdherent().getPointure();
|
||||||
|
for (String t : dispos) {
|
||||||
|
String trimmed = t.trim();
|
||||||
|
if (tv != null && !tv.trim().isEmpty() && trimmed.equalsIgnoreCase(tv.trim())) {
|
||||||
|
matchedTaille = tv.trim();
|
||||||
|
break;
|
||||||
|
} else if (pt != null && !pt.trim().isEmpty() && trimmed.equalsIgnoreCase(pt.trim())) {
|
||||||
|
matchedTaille = pt.trim();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (Dotation d : currentDotations) {
|
for (Dotation d : currentDotations) {
|
||||||
if (ce.getEquipement().getId().equals(d.getEquipement().getId())) {
|
if (ce.getEquipement().getId().equals(d.getEquipement().getId())) {
|
||||||
@@ -130,6 +150,9 @@ public class CategorieService {
|
|||||||
if (Boolean.TRUE.equals(ce.getObligatoire()) && !Boolean.TRUE.equals(d.getChoisi())) {
|
if (Boolean.TRUE.equals(ce.getObligatoire()) && !Boolean.TRUE.equals(d.getChoisi())) {
|
||||||
d.setChoisi(true);
|
d.setChoisi(true);
|
||||||
}
|
}
|
||||||
|
if ((d.getTaille() == null || d.getTaille().trim().isEmpty()) && !matchedTaille.isEmpty()) {
|
||||||
|
d.setTaille(matchedTaille);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -146,7 +169,7 @@ public class CategorieService {
|
|||||||
}
|
}
|
||||||
newDotation.setChoisi(ce.getObligatoire() || (isMaillot && isNouvelle)); // Checked if obligatoire or if it's a new registration
|
newDotation.setChoisi(ce.getObligatoire() || (isMaillot && isNouvelle)); // Checked if obligatoire or if it's a new registration
|
||||||
newDotation.setFourni(false);
|
newDotation.setFourni(false);
|
||||||
newDotation.setTaille("");
|
newDotation.setTaille(matchedTaille);
|
||||||
newDotation.setNumero("");
|
newDotation.setNumero("");
|
||||||
if (licence.getAdherent() != null) {
|
if (licence.getAdherent() != null) {
|
||||||
String defaultFlocage = "";
|
String defaultFlocage = "";
|
||||||
|
|||||||
@@ -142,7 +142,7 @@
|
|||||||
hx-target="#paiements-table-container"
|
hx-target="#paiements-table-container"
|
||||||
hx-select="#paiements-table-container"
|
hx-select="#paiements-table-container"
|
||||||
hx-include="#filter-form"
|
hx-include="#filter-form"
|
||||||
th:attr="hx-vals=|{'page': ${currentPage - 1}}|"
|
th:attr="hx-vals=|{"page": ${currentPage - 1}}|"
|
||||||
class="px-3 py-1 border border-gray-300 rounded hover:bg-gray-100 transition-colors">
|
class="px-3 py-1 border border-gray-300 rounded hover:bg-gray-100 transition-colors">
|
||||||
Précédent
|
Précédent
|
||||||
</button>
|
</button>
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
hx-target="#paiements-table-container"
|
hx-target="#paiements-table-container"
|
||||||
hx-select="#paiements-table-container"
|
hx-select="#paiements-table-container"
|
||||||
hx-include="#filter-form"
|
hx-include="#filter-form"
|
||||||
th:attr="hx-vals=|{'page': ${pageNum}}|"
|
th:attr="hx-vals=|{"page": ${pageNum}}|"
|
||||||
th:text="${pageNum + 1}"
|
th:text="${pageNum + 1}"
|
||||||
class="px-3 py-1 rounded transition-colors"
|
class="px-3 py-1 rounded transition-colors"
|
||||||
th:classappend="${currentPage == pageNum ? 'bg-blue-600 text-white' : 'border border-gray-300 hover:bg-gray-100'}">
|
th:classappend="${currentPage == pageNum ? 'bg-blue-600 text-white' : 'border border-gray-300 hover:bg-gray-100'}">
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
hx-target="#paiements-table-container"
|
hx-target="#paiements-table-container"
|
||||||
hx-select="#paiements-table-container"
|
hx-select="#paiements-table-container"
|
||||||
hx-include="#filter-form"
|
hx-include="#filter-form"
|
||||||
th:attr="hx-vals=|{'page': ${currentPage + 1}}|"
|
th:attr="hx-vals=|{"page": ${currentPage + 1}}|"
|
||||||
class="px-3 py-1 border border-gray-300 rounded hover:bg-gray-100 transition-colors">
|
class="px-3 py-1 border border-gray-300 rounded hover:bg-gray-100 transition-colors">
|
||||||
Suivant
|
Suivant
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user