feat(user): add certificate production tracking and update localization
All checks were successful
Deploy to production / deploy (push) Successful in 2m50s
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:
@@ -194,8 +194,12 @@ void ProduceWorker::addProductionToLog(int regionId, int userId, int productId,
|
||||
ConnectionGuard connGuard(pool);
|
||||
auto &db = connGuard.get();
|
||||
db.prepare("QUERY_INSERT_UPDATE_PRODUCTION_LOG", QUERY_INSERT_UPDATE_PRODUCTION_LOG);
|
||||
db.execute("QUERY_INSERT_UPDATE_PRODUCTION_LOG", { std::to_string(regionId), std::to_string(productId),
|
||||
std::to_string(productId), std::to_string(userId) });
|
||||
db.execute("QUERY_INSERT_UPDATE_PRODUCTION_LOG", {
|
||||
std::to_string(regionId),
|
||||
std::to_string(productId),
|
||||
std::to_string(quantity),
|
||||
std::to_string(userId),
|
||||
});
|
||||
} catch (const std::exception &e) {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user