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.
|
||||
* 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 }
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user