feat(falukant): update production counting logic and enhance localization
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:
Torsten Schulz (local)
2026-04-13 13:59:37 +02:00
parent 162e908c1c
commit b0624422b8
7 changed files with 17 additions and 7 deletions

View File

@@ -2954,7 +2954,7 @@ class FalukantService extends BaseService {
/**
* 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):
* COALESCE(production_timestamp, production_date::timestamp) >= countSince.
*
@@ -2970,12 +2970,8 @@ class FalukantService extends BaseService {
const rows = await sequelize.query(
`
SELECT COUNT(*)::int AS cnt
FROM (
SELECT 1
FROM falukant_log.production
WHERE producer_id = :producerId${sinceClause}
GROUP BY product_id, production_date
) AS sub
FROM falukant_log.production
WHERE producer_id = :producerId${sinceClause}
`,
{ replacements, type: sequelize.QueryTypes.SELECT }
);