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
Build and Push Multi-Platform Images / build-and-push (push) Successful in 33s
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user