feat: Seiten- und Wortzahl für den Duplikatvergleich

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bjoernpoettkerandClaude Opus 5.5 committed 2026-11-02 13:55:51 +01:00
1 parent 57a460ffa2
commit 8e0c609802
10 files changed
+273 -21

No files matched your search

@@ -1,4 +1,5 @@
import api from './client';
import type { VergleichKennzahlen } from './paperless';
export interface CorrespondentMapping {
Id: number;
@@ -50,6 +51,23 @@ export const emailImportApi = {
await api.post('/api/email-import/belegnummer/release', { date: dateStr, number });
},
attachmentPdfBlob: async (attachmentId: number, pages?: { start: number; end: number }): Promise<Blob> => {
const res = await api.get(`/api/email-import/attachments/${attachmentId}/pdf`, {
params: pages ? { start: pages.start, end: pages.end } : undefined,
responseType: 'blob',
});
return res.data;
},
vergleich: async (
attachmentId: number,
paperlessDocumentId: number,
pages?: { start: number; end: number },
): Promise<VergleichKennzahlen> => {
const res = await api.post(`/api/email-import/attachments/${attachmentId}/vergleich`, { paperlessDocumentId, pages });
return res.data;
},
printPreview: async (attachmentId: number, barcodeData: any, pages?: { start: number; end: number }): Promise<Blob> => {
const res = await api.post(`/api/email-import/attachments/${attachmentId}/print-preview`, { ...barcodeData, _pages: pages }, {
responseType: 'blob',
+6
View File
@@ -1,5 +1,6 @@
import api from './client';
import type { BarcodeActionType } from './barcode-templates';
import type { VergleichKennzahlen } from './paperless';
export type InboxSource = 'all' | 'user';
@@ -107,6 +108,11 @@ export const inboxApi = {
)
.then((r) => r.data),
vergleich: (id: string, paperlessDocumentId: number, pages: number[]) =>
api
.post<VergleichKennzahlen>(`/api/inbox/${encodeURIComponent(id)}/vergleich`, { paperlessDocumentId, pages })
.then((r) => r.data),
downloadSegmentBlob: (id: string, pages: number[]) =>
api
.post<Blob>(`/api/inbox/${encodeURIComponent(id)}/download-segment`, { pages }, { responseType: 'blob' })
+11
View File
@@ -9,6 +9,17 @@ export interface BelegnummerPruefung {
kandidaten: number[];
}
/** Kennzahlen eines Belegs; `null` = nicht ermittelbar. */
export interface Kennzahlen {
seiten: number | null;
woerter: number | null;
}
export interface VergleichKennzahlen {
vorhanden: Kennzahlen;
neu: Kennzahlen;
}
export interface PaperlessTag {
id: number;
slug: string;