feat(falukant): update production counting logic and enhance localization
All checks were successful
Deploy to production / deploy (push) Successful in 2m55s
All checks were successful
Deploy to production / deploy (push) Successful in 2m55s
- Modified the production counting logic in FalukantService to count each completed production directly from the falukant_log.production table, simplifying the query structure. - Added a new localization entry for "scoreHowToRaise" in Cebuano, German, English, Spanish, and French to provide users with clear guidance on how to improve their score through various factors. - Updated the OverviewView component to display the new score improvement information, enhancing user experience and understanding of scoring dynamics.
This commit is contained in:
@@ -2954,7 +2954,7 @@ class FalukantService extends BaseService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Zertifikat: abgeschlossene Produktionen über alle Regionen/Niederlassungen.
|
* Zertifikat: abgeschlossene Produktionen über alle Regionen/Niederlassungen.
|
||||||
* Pro (Produkt, Kalendertag) nur ein Zähler – mehrere Niederlassungen in verschiedenen Regionen werden zusammengeführt.
|
* Es zählt jede abgeschlossene Produktion (ein Datensatz in falukant_log.production).
|
||||||
* Filter bei gesetztem countSince wie Daemon (GET_PRODUCTION_CERTIFICATE_INPUT_ROWS):
|
* Filter bei gesetztem countSince wie Daemon (GET_PRODUCTION_CERTIFICATE_INPUT_ROWS):
|
||||||
* COALESCE(production_timestamp, production_date::timestamp) >= countSince.
|
* COALESCE(production_timestamp, production_date::timestamp) >= countSince.
|
||||||
*
|
*
|
||||||
@@ -2970,12 +2970,8 @@ class FalukantService extends BaseService {
|
|||||||
const rows = await sequelize.query(
|
const rows = await sequelize.query(
|
||||||
`
|
`
|
||||||
SELECT COUNT(*)::int AS cnt
|
SELECT COUNT(*)::int AS cnt
|
||||||
FROM (
|
FROM falukant_log.production
|
||||||
SELECT 1
|
WHERE producer_id = :producerId${sinceClause}
|
||||||
FROM falukant_log.production
|
|
||||||
WHERE producer_id = :producerId${sinceClause}
|
|
||||||
GROUP BY product_id, production_date
|
|
||||||
) AS sub
|
|
||||||
`,
|
`,
|
||||||
{ replacements, type: sequelize.QueryTypes.SELECT }
|
{ replacements, type: sequelize.QueryTypes.SELECT }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -161,6 +161,7 @@
|
|||||||
"scoreMetMinimumsMissing": "Ang weighted score igo na unta para sa level {next}, pero naa pay kulang nga minimum nga kinahanglanon.",
|
"scoreMetMinimumsMissing": "Ang weighted score igo na unta para sa level {next}, pero naa pay kulang nga minimum nga kinahanglanon.",
|
||||||
"notReady": "Para sa level {next}, kinahanglan maabot ang minimum nga mga kinahanglanon ug ang score threshold nga {threshold}."
|
"notReady": "Para sa level {next}, kinahanglan maabot ang minimum nga mga kinahanglanon ug ang score threshold nga {threshold}."
|
||||||
},
|
},
|
||||||
|
"scoreHowToRaise": "Ang score threshold mosaka pinaagi sa weighted points: knowledge (45%), completed productions (30%), office status (8%), reputation status (7%), house status (5%), ug nobility status (5%). Para sa paspas nga progreso, i-prioritize ang knowledge ug daghang completed productions.",
|
||||||
"factors": "Karon nga mga bili",
|
"factors": "Karon nga mga bili",
|
||||||
"requirements": "Mga kinahanglanon sa sunod nga level",
|
"requirements": "Mga kinahanglanon sa sunod nga level",
|
||||||
"productionsSince": "Mga produksyon sugod sa {date} ra ang ihap (sukad sa katapusang pag-asenso, bangkaruta, o panununod).",
|
"productionsSince": "Mga produksyon sugod sa {date} ra ang ihap (sukad sa katapusang pag-asenso, bangkaruta, o panununod).",
|
||||||
|
|||||||
@@ -181,6 +181,7 @@
|
|||||||
"scoreMetMinimumsMissing": "Die gewichtete Wertung reicht grundsätzlich für Stufe {next}, aber mindestens eine Mindestanforderung ist noch nicht erfüllt.",
|
"scoreMetMinimumsMissing": "Die gewichtete Wertung reicht grundsätzlich für Stufe {next}, aber mindestens eine Mindestanforderung ist noch nicht erfüllt.",
|
||||||
"notReady": "Für Stufe {next} müssen sowohl die Mindestanforderungen als auch die Wertungsgrenze von {threshold} erfüllt sein."
|
"notReady": "Für Stufe {next} müssen sowohl die Mindestanforderungen als auch die Wertungsgrenze von {threshold} erfüllt sein."
|
||||||
},
|
},
|
||||||
|
"scoreHowToRaise": "Die Wertungsgrenze steigt über gewichtete Punkte: Wissen (45%), abgeschlossene Produktionen (30%), Amtsstatus (8%), Ansehensstatus (7%), Hausstatus (5%) und Adelsstatus (5%). Für schnelle Fortschritte sind Wissen + viele abgeschlossene Produktionen die stärksten Hebel.",
|
||||||
"factors": "Aktuelle Werte",
|
"factors": "Aktuelle Werte",
|
||||||
"requirements": "Bedingungen für die nächste Stufe",
|
"requirements": "Bedingungen für die nächste Stufe",
|
||||||
"productionsSince": "Nur Produktionen ab {date} zählen (seit letztem Aufstieg, Bankrott oder Erbfolge).",
|
"productionsSince": "Nur Produktionen ab {date} zählen (seit letztem Aufstieg, Bankrott oder Erbfolge).",
|
||||||
|
|||||||
@@ -161,6 +161,7 @@
|
|||||||
"scoreMetMinimumsMissing": "The weighted score is generally high enough for level {next}, but at least one minimum requirement is still missing.",
|
"scoreMetMinimumsMissing": "The weighted score is generally high enough for level {next}, but at least one minimum requirement is still missing.",
|
||||||
"notReady": "For level {next}, both the minimum requirements and the score threshold of {threshold} must be met."
|
"notReady": "For level {next}, both the minimum requirements and the score threshold of {threshold} must be met."
|
||||||
},
|
},
|
||||||
|
"scoreHowToRaise": "The score threshold rises via weighted points: knowledge (45%), completed productions (30%), office status (8%), reputation status (7%), house status (5%), and nobility status (5%). For fastest progress, focus on knowledge + many completed productions.",
|
||||||
"factors": "Current values",
|
"factors": "Current values",
|
||||||
"requirements": "Requirements for the next level",
|
"requirements": "Requirements for the next level",
|
||||||
"productionsSince": "Only productions on or after {date} count (since last promotion, bankruptcy, or succession).",
|
"productionsSince": "Only productions on or after {date} count (since last promotion, bankruptcy, or succession).",
|
||||||
|
|||||||
@@ -180,6 +180,7 @@
|
|||||||
"scoreMetMinimumsMissing": "La puntuación ponderada ya sería suficiente para el nivel {next}, pero todavía falta al menos un requisito mínimo.",
|
"scoreMetMinimumsMissing": "La puntuación ponderada ya sería suficiente para el nivel {next}, pero todavía falta al menos un requisito mínimo.",
|
||||||
"notReady": "Para el nivel {next} deben cumplirse tanto los requisitos mínimos como el umbral de puntuación de {threshold}."
|
"notReady": "Para el nivel {next} deben cumplirse tanto los requisitos mínimos como el umbral de puntuación de {threshold}."
|
||||||
},
|
},
|
||||||
|
"scoreHowToRaise": "El umbral de puntuación sube por puntos ponderados: conocimiento (45%), producciones completadas (30%), estatus de cargo (8%), estatus de reputación (7%), estatus de casa (5%) y estatus nobiliario (5%). Para avanzar rápido, prioriza conocimiento + muchas producciones completadas.",
|
||||||
"factors": "Valores actuales",
|
"factors": "Valores actuales",
|
||||||
"requirements": "Condiciones para el siguiente nivel",
|
"requirements": "Condiciones para el siguiente nivel",
|
||||||
"productionsSince": "Solo cuentan producciones desde el {date} (desde el último ascenso, quiebra o sucesión).",
|
"productionsSince": "Solo cuentan producciones desde el {date} (desde el último ascenso, quiebra o sucesión).",
|
||||||
|
|||||||
@@ -180,6 +180,7 @@
|
|||||||
"scoreMetMinimumsMissing": "La note pondérée est généralement suffisante pour le niveau {next}, mais au moins une exigence minimale n'est pas encore remplie.",
|
"scoreMetMinimumsMissing": "La note pondérée est généralement suffisante pour le niveau {next}, mais au moins une exigence minimale n'est pas encore remplie.",
|
||||||
"notReady": "Pour le niveau {next}, les exigences minimales et la limite de notation de {threshold} doivent être remplies."
|
"notReady": "Pour le niveau {next}, les exigences minimales et la limite de notation de {threshold} doivent être remplies."
|
||||||
},
|
},
|
||||||
|
"scoreHowToRaise": "Le seuil de note monte via des points pondérés : connaissance (45%), productions terminées (30%), statut d'office (8%), statut de réputation (7%), statut de maison (5%) et statut de noblesse (5%). Pour progresser vite, concentrez-vous sur la connaissance et de nombreuses productions terminées.",
|
||||||
"factors": "Valeurs actuelles",
|
"factors": "Valeurs actuelles",
|
||||||
"requirements": "Conditions pour la prochaine étape",
|
"requirements": "Conditions pour la prochaine étape",
|
||||||
"productionsSince": "Seules les productions à partir du {date} comptent (depuis la dernière promotion, faillite ou succession).",
|
"productionsSince": "Seules les productions à partir du {date} comptent (depuis la dernière promotion, faillite ou succession).",
|
||||||
|
|||||||
@@ -119,6 +119,9 @@
|
|||||||
<p class="certificate-panel__hint">
|
<p class="certificate-panel__hint">
|
||||||
{{ certificateProgressHint }}
|
{{ certificateProgressHint }}
|
||||||
</p>
|
</p>
|
||||||
|
<p class="certificate-panel__howto">
|
||||||
|
{{ $t('falukant.overview.certificate.scoreHowToRaise') }}
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="certificate-panel__grid">
|
<div class="certificate-panel__grid">
|
||||||
<article class="certificate-panel__block">
|
<article class="certificate-panel__block">
|
||||||
@@ -917,6 +920,12 @@ export default {
|
|||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.certificate-panel__howto {
|
||||||
|
margin: -8px 0 16px;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
font-size: 0.92rem;
|
||||||
|
}
|
||||||
|
|
||||||
.certificate-panel__productions-since {
|
.certificate-panel__productions-since {
|
||||||
margin: 6px 0 0;
|
margin: 6px 0 0;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user