Fix import/export of egf pin and ffg licence

This commit is contained in:
Claude Brisson
2024-04-10 13:56:07 +02:00
parent 974dba59ea
commit 19d8dfc2fb

View File

@@ -170,6 +170,13 @@ object OpenGotha {
player.participating.forEachIndexed { i,c ->
if (c == '0') it.skip.add(i + 1)
}
if (player.ffgLicence.isNotEmpty()) {
it.externalIds[DatabaseId.FFG] = player.ffgLicence
}
if (player.egfPin.isNotEmpty()) {
it.externalIds[DatabaseId.EGF] = player.egfPin
}
it.externalIds
canonicMap.put("${player.name.replace(" ", "")}${player.firstName.replace(" ", "")}".uppercase(Locale.ENGLISH), it.id)
}
}.associateByTo(tournament.players) { it.id }
@@ -222,7 +229,11 @@ object OpenGotha {
player.club
}" country="${
player.country
}" egfPin="" ffgLicence="" ffgLicenceStatus="" firstName="${
}" egfPin="${
player.externalIds[DatabaseId.EGF] ?: ""
}" ffgLicence="${
player.externalIds[DatabaseId.FFG] ?: ""
}" ffgLicenceStatus="" firstName="${
player.firstname
}" grade="${
player.displayRank()