feat(user): add certificate production tracking and update localization
All checks were successful
Deploy to production / deploy (push) Successful in 2m50s

- Introduced a new field `certificateProductionsCountSince` in the `FalukantUser` model to track the date from which production logs are counted for certificate requirements.
- Updated the `FalukantService` to utilize the new field for calculating completed productions since the specified date.
- Enhanced the UI to display the count of productions since the last promotion, with corresponding translations added for multiple languages including Cebuano, German, English, Spanish, and French.
- Implemented a method to delete old production logs, ensuring efficient data management while maintaining necessary historical records for certificate calculations.
This commit is contained in:
Torsten Schulz (local)
2026-04-09 08:19:19 +02:00
parent f7030bbabe
commit 360bb59a4e
18 changed files with 200 additions and 25 deletions

View File

@@ -2,6 +2,7 @@
"falukant": {
"overview": {
"certificate": {
"productionsSince": "Mga produksyon sugod sa {date} ra ang ihap (sukad sa katapusang pag-asenso, bangkaruta, o panununod).",
"factor": {
"avgKnowledge": "Average kahibalo",
"completedProductions": "Nahuman produksyons",

View File

@@ -158,6 +158,7 @@
},
"factors": "Karon nga mga bili",
"requirements": "Mga kinahanglanon sa sunod nga level",
"productionsSince": "Mga produksyon sugod sa {date} ra ang ihap (sukad sa katapusang pag-asenso, bangkaruta, o panununod).",
"factor": {
"avgKnowledge": "Average kahibalo",
"completedProductions": "Nahuman produksyons",

View File

@@ -178,6 +178,7 @@
},
"factors": "Aktuelle Werte",
"requirements": "Bedingungen für die nächste Stufe",
"productionsSince": "Nur Produktionen ab {date} zählen (seit letztem Aufstieg, Bankrott oder Erbfolge).",
"factor": {
"avgKnowledge": "Durchschnittliches Wissen",
"completedProductions": "Abgeschlossene Produktionen",

View File

@@ -159,6 +159,7 @@
},
"factors": "Current values",
"requirements": "Requirements for the next level",
"productionsSince": "Only productions on or after {date} count (since last promotion, bankruptcy, or succession).",
"factor": {
"avgKnowledge": "Average knowledge",
"completedProductions": "Completed productions",

View File

@@ -177,6 +177,7 @@
},
"factors": "Valores actuales",
"requirements": "Condiciones para el siguiente nivel",
"productionsSince": "Solo cuentan producciones desde el {date} (desde el último ascenso, quiebra o sucesión).",
"factor": {
"avgKnowledge": "Conocimiento medio",
"completedProductions": "Producciones completadas",

View File

@@ -177,6 +177,7 @@
},
"factors": "Valeurs actuelles",
"requirements": "Conditions pour la prochaine étape",
"productionsSince": "Seules les productions à partir du {date} comptent (depuis la dernière promotion, faillite ou succession).",
"factor": {
"avgKnowledge": "Connaissance moyenne",
"completedProductions": "Productions terminées",

View File

@@ -131,6 +131,16 @@
<div class="detail-list__item">
<span>{{ $t('falukant.overview.certificate.factor.completedProductions') }}</span>
<strong>{{ certificateProgress.currentValues.completedProductions }}</strong>
<p
v-if="certificateProgress.certificateProductionsCountSince"
class="certificate-panel__productions-since"
>
{{
$t('falukant.overview.certificate.productionsSince', {
date: formatDate(certificateProgress.certificateProductionsCountSince),
})
}}
</p>
</div>
<div class="detail-list__item">
<span>{{ $t('falukant.overview.certificate.factor.reputation') }}</span>
@@ -907,6 +917,13 @@ export default {
color: var(--color-text-secondary);
}
.certificate-panel__productions-since {
margin: 6px 0 0;
font-size: 0.85rem;
line-height: 1.35;
color: var(--color-text-secondary);
}
.certificate-panel__grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));