Files
paperlessmanager/paperless-backend/src/app.module.ts
T
bjoernpoettker 4d05a94681 feat: implement two-step Freigabe→Zahlung workflow
Adds a payment step after document approval: PM_Freigabe approves
(Field 15 = "freigegeben"), then PM_Zahlung can mark as paid (Field 16).

- Backend: VIEW_ZAHLUNG permission mapped to PM_Zahlung OIDC group
- Backend: ZahlungModule with endpoints to list documents by filter
  (ausstehend/freigegeben/alle), set Field 16, fetch options from Paperless
- Backend: setZahlung() throws ForbiddenException if Field 15 ≠ "freigegeben"
- Frontend: /zahlung route with 3-way filter, two status columns (Freigabe + Zahlung)
- Frontend: "Zahlung verbuchen" button disabled with tooltip for non-approved docs
- Frontend: Zahlung menu item with EuroOutlined icon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 21:29:50 +02:00

61 lines
2.3 KiB
TypeScript

import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { ScheduleModule } from '@nestjs/schedule';
import { DatabaseModule } from './database/database.module';
import { AuthModule } from './auth/auth.module';
import { ScannerModule } from './scanner/scanner.module';
import { PaperlessModule } from './paperless/paperless.module';
import { PreprocessingModule } from './preprocessing/preprocessing.module';
import { PostprocessingModule } from './postprocessing/postprocessing.module';
import { WebhookModule } from './webhook/webhook.module';
import { InboxModule } from './inbox/inbox.module';
import { EmailModule } from './email/email.module';
import { EmailDownloadModule } from './email-download/email-download.module';
import { SettingsModule } from './settings/settings.module';
import { KontonummernModule } from './kontonummern/kontonummern.module';
import { StatsModule } from './stats/stats.module';
import { BarcodeModule } from './barcode/barcode.module';
import { InboxPostprocessorModule } from './inbox-postprocessor/inbox-postprocessor.module';
import { UserSettingsModule } from './user-settings/user-settings.module';
import { LabelPrintAgentModule } from './label-print-agent/label-print-agent.module';
import { AgrarmonitorModule } from './agrarmonitor/agrarmonitor.module';
import { FreigabeModule } from './freigabe/freigabe.module';
import { ZahlungModule } from './zahlung/zahlung.module';
import { DailyDigestModule } from './daily-digest/daily-digest.module';
import * as path from 'path';
@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
envFilePath: [
path.resolve(__dirname, '../../.env'), // Root .env (zentral)
path.resolve(__dirname, '../.env'), // Lokale .env (Fallback)
],
}),
ScheduleModule.forRoot(),
DatabaseModule,
AuthModule,
ScannerModule,
PaperlessModule,
PreprocessingModule,
PostprocessingModule,
WebhookModule,
InboxModule,
EmailModule,
EmailDownloadModule,
SettingsModule,
KontonummernModule,
StatsModule,
BarcodeModule,
InboxPostprocessorModule,
UserSettingsModule,
LabelPrintAgentModule,
AgrarmonitorModule,
FreigabeModule,
ZahlungModule,
DailyDigestModule,
],
})
export class AppModule {}