feat: add Agrarmonitor integration to dashboard and stats, and rename accounting permission group
Build and Push Multi-Platform Images / build-and-push (push) Successful in 33s

This commit is contained in:
2026-05-04 11:18:49 +02:00
parent 942c15eef8
commit ca1d371ad4
4 changed files with 35 additions and 2 deletions
@@ -23,6 +23,7 @@ export class StatsController {
let posteingangCount = 0;
let manuellCount = 0;
let mailpostfachCount = 0;
let agrarmonitorCount = 0;
// 1. Eingangsbox (Dateien aus /mnt/scans)
if (req.user) {
@@ -66,11 +67,24 @@ export class StatsController {
this.logger.error('Fehler beim Abrufen der E-Mail-Stats: ' + err.message);
}
// 5. Agrarmonitor (Paperless tag 3)
try {
const agrarmonitorResponse = await this.paperlessService.getDocuments({
page: 1,
page_size: 1,
tags__id__all: 3,
});
agrarmonitorCount = agrarmonitorResponse.count || 0;
} catch (err) {
this.logger.error('Fehler beim Abrufen der Agrarmonitor-Stats: ' + err.message);
}
return {
inbox: inboxCount,
posteingang: posteingangCount,
manuell: manuellCount,
mailpostfach: mailpostfachCount,
agrarmonitor: agrarmonitorCount,
};
}
}