feat: implement ProcessVerarbeiteteDocuments (Upload-Check)
Build and Push Multi-Platform Images / build-and-push (push) Successful in 37s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 37s
Ported ProcessVerarbeiteteDocuments() from C# ProcessUploads.cs: - Checks docs tagged "hochgeladen" → eingangsrechnungVorhanden() - On match: livesearch, update title/type/created/correspondent/tags, set custom fields (externeBelegnummer, AgrarmonitorLink), addNote - Tag "hochgeladen" → "fertig" swap; owner via Client.AgrarmonitorBetriebId - 401/403 guard: clearClient() + break (same pattern as runPolling) - Cron: AGRARMONITOR_UPLOAD_CHECK_CRON (default: 0 * * * * *) - New settings: agrarmonitor_tag_hochgeladen, agrarmonitor_link_field - Endpoint: POST /api/agrarmonitor/process-uploads - Frontend: polling-config extended with tagHochgeladen + linkField select, new card "Dokumenten-Verarbeitung" with run button + result display Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,8 +32,8 @@ export class AgrarmonitorController {
|
||||
|
||||
@Put('polling-config')
|
||||
@RequirePermissions(Permission.MANAGE_SETTINGS)
|
||||
async updatePollingConfig(@Body() body: { tagFertig: string; tagVerbucht: string }) {
|
||||
return this.pollingService.updatePollingConfig(body.tagFertig, body.tagVerbucht);
|
||||
async updatePollingConfig(@Body() body: { tagFertig: string; tagVerbucht: string; tagHochgeladen: string; linkField: string }) {
|
||||
return this.pollingService.updatePollingConfig(body.tagFertig, body.tagVerbucht, body.tagHochgeladen, body.linkField);
|
||||
}
|
||||
|
||||
@Post('run-polling')
|
||||
@@ -42,4 +42,11 @@ export class AgrarmonitorController {
|
||||
async runPolling() {
|
||||
return this.pollingService.runPolling();
|
||||
}
|
||||
|
||||
@Post('process-uploads')
|
||||
@HttpCode(200)
|
||||
@RequirePermissions(Permission.MANAGE_SETTINGS)
|
||||
async processUploads() {
|
||||
return this.pollingService.processVerarbeiteteDocuments();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user