feat: add mobile-responsive layout and card views across all pages
Build and Push Multi-Platform Images / build-and-push (push) Successful in 39s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 39s
- New useIsMobile hook and MobileCardList component - AppLayout: hamburger menu + Drawer navigation on mobile - All list pages (Inbox, Posteingang, Manuell, Mail, Freigabe, Zahlung, TaskLog) show card layout on mobile instead of tables - CSS: responsive modal height, horizontal table scroll, text-size-adjust - Backend: Agrarmonitor polling fixes, Zahlung service improvements, IMAP folder service extended, misc controller fixes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,12 @@ Paperless Manager is a document automation platform that extends [Paperless-NGX]
|
|||||||
|
|
||||||
UI labels and comments are in **German**.
|
UI labels and comments are in **German**.
|
||||||
|
|
||||||
|
## Sprache
|
||||||
|
|
||||||
|
Alle Antworten an den Nutzer, Erklärungen, Commit-Messages, Code-Kommentare und UI-Texte
|
||||||
|
sollen — wo möglich — auf **Deutsch** verfasst werden. Technische Bezeichner (Variablen-,
|
||||||
|
Funktions- und Dateinamen) bleiben unverändert in der bestehenden Konvention.
|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -85,18 +85,25 @@ export class AgrarmonitorPollingService implements OnModuleInit {
|
|||||||
importWartezeitMinuten: string;
|
importWartezeitMinuten: string;
|
||||||
notizMarker: string;
|
notizMarker: string;
|
||||||
}> {
|
}> {
|
||||||
const [fertig, verbucht, hochgeladen, linkField, manuell, wartezeit, marker] =
|
const [
|
||||||
await Promise.all([
|
fertig,
|
||||||
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_tag_fertig' }),
|
verbucht,
|
||||||
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_tag_verbucht' }),
|
hochgeladen,
|
||||||
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_tag_hochgeladen' }),
|
linkField,
|
||||||
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_link_field' }),
|
manuell,
|
||||||
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_tag_manuell' }),
|
wartezeit,
|
||||||
this.settingRepo.findOneBy({
|
marker,
|
||||||
Tag: 'agrarmonitor_import_wartezeit_minuten',
|
] = await Promise.all([
|
||||||
}),
|
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_tag_fertig' }),
|
||||||
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_notiz_marker' }),
|
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_tag_verbucht' }),
|
||||||
]);
|
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_tag_hochgeladen' }),
|
||||||
|
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_link_field' }),
|
||||||
|
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_tag_manuell' }),
|
||||||
|
this.settingRepo.findOneBy({
|
||||||
|
Tag: 'agrarmonitor_import_wartezeit_minuten',
|
||||||
|
}),
|
||||||
|
this.settingRepo.findOneBy({ Tag: 'agrarmonitor_notiz_marker' }),
|
||||||
|
]);
|
||||||
return {
|
return {
|
||||||
tagFertig: fertig?.Wert ?? '4',
|
tagFertig: fertig?.Wert ?? '4',
|
||||||
tagVerbucht: verbucht?.Wert ?? '9',
|
tagVerbucht: verbucht?.Wert ?? '9',
|
||||||
|
|||||||
@@ -648,11 +648,17 @@ export class EmailImportService {
|
|||||||
this.logger.log(
|
this.logger.log(
|
||||||
`Email ${firstAtt.EmailMessageId} als verarbeitet markiert.`,
|
`Email ${firstAtt.EmailMessageId} als verarbeitet markiert.`,
|
||||||
);
|
);
|
||||||
const emailEntity = await this.emailRepo.findOne({ where: { Id: firstAtt.EmailMessageId } });
|
const emailEntity = await this.emailRepo.findOne({
|
||||||
|
where: { Id: firstAtt.EmailMessageId },
|
||||||
|
});
|
||||||
if (emailEntity) {
|
if (emailEntity) {
|
||||||
this.imapFolderService.moveToImportiert(emailEntity.MessageId).catch(err =>
|
this.imapFolderService
|
||||||
this.logger.error('IMAP-Verschieben fehlgeschlagen: ' + err.message),
|
.moveToImportiert(emailEntity.MessageId)
|
||||||
);
|
.catch((err) =>
|
||||||
|
this.logger.error(
|
||||||
|
'IMAP-Verschieben fehlgeschlagen: ' + err.message,
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,9 +204,11 @@ export class EmailController {
|
|||||||
this.logger.log(
|
this.logger.log(
|
||||||
`Prüfung abgeschlossen. ${updatedCount} E-Mails aktualisiert, ${idsUpdated} Paperless-IDs ergänzt, ${skippedCount} übersprungen.`,
|
`Prüfung abgeschlossen. ${updatedCount} E-Mails aktualisiert, ${idsUpdated} Paperless-IDs ergänzt, ${skippedCount} übersprungen.`,
|
||||||
);
|
);
|
||||||
this.imapFolderService.cleanupImportedEmails().catch(err =>
|
this.imapFolderService
|
||||||
this.logger.error('IMAP-Cleanup fehlgeschlagen: ' + err.message),
|
.cleanupImportedEmails()
|
||||||
);
|
.catch((err) =>
|
||||||
|
this.logger.error('IMAP-Cleanup fehlgeschlagen: ' + err.message),
|
||||||
|
);
|
||||||
|
|
||||||
let movedToImportiert = 0;
|
let movedToImportiert = 0;
|
||||||
if (body.includeProcessed) {
|
if (body.includeProcessed) {
|
||||||
@@ -214,8 +216,13 @@ export class EmailController {
|
|||||||
where: [{ Status: 1 }, { Status: 3 }],
|
where: [{ Status: 1 }, { Status: 3 }],
|
||||||
select: ['MessageId'],
|
select: ['MessageId'],
|
||||||
});
|
});
|
||||||
const messageIds = processedEmails.map((e) => e.MessageId).filter(Boolean);
|
const messageIds = processedEmails
|
||||||
movedToImportiert = await this.imapFolderService.moveProcessedInboxToImportiert(messageIds);
|
.map((e) => e.MessageId)
|
||||||
|
.filter(Boolean);
|
||||||
|
movedToImportiert =
|
||||||
|
await this.imapFolderService.moveProcessedInboxToImportiert(
|
||||||
|
messageIds,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return { updatedCount, idsUpdated, movedToImportiert };
|
return { updatedCount, idsUpdated, movedToImportiert };
|
||||||
|
|||||||
@@ -25,8 +25,14 @@ export class ImapFolderService {
|
|||||||
@Cron('0 3 * * *', { timeZone: 'Europe/Berlin' })
|
@Cron('0 3 * * *', { timeZone: 'Europe/Berlin' })
|
||||||
async cleanupImportedEmails(): Promise<void> {
|
async cleanupImportedEmails(): Promise<void> {
|
||||||
if (!this.configService.get<string>('IMAP_HOST')) return;
|
if (!this.configService.get<string>('IMAP_HOST')) return;
|
||||||
const importedFolder = this.configService.get<string>('IMAP_IMPORTED_FOLDER', 'importiert');
|
const importedFolder = this.configService.get<string>(
|
||||||
const trashFolder = this.configService.get<string>('IMAP_TRASH_FOLDER', 'Trash');
|
'IMAP_IMPORTED_FOLDER',
|
||||||
|
'importiert',
|
||||||
|
);
|
||||||
|
const trashFolder = this.configService.get<string>(
|
||||||
|
'IMAP_TRASH_FOLDER',
|
||||||
|
'Trash',
|
||||||
|
);
|
||||||
const client = this.createClient();
|
const client = this.createClient();
|
||||||
try {
|
try {
|
||||||
await client.connect();
|
await client.connect();
|
||||||
@@ -39,10 +45,14 @@ export class ImapFolderService {
|
|||||||
const oldUids = await client.search({ before: cutoff }, { uid: true });
|
const oldUids = await client.search({ before: cutoff }, { uid: true });
|
||||||
if (Array.isArray(oldUids) && oldUids.length > 0) {
|
if (Array.isArray(oldUids) && oldUids.length > 0) {
|
||||||
await client.messageMove(oldUids, trashFolder, { uid: true });
|
await client.messageMove(oldUids, trashFolder, { uid: true });
|
||||||
this.logger.log(`${oldUids.length} alte E-Mail(s) aus "${importedFolder}" in "${trashFolder}" verschoben.`);
|
this.logger.log(
|
||||||
|
`${oldUids.length} alte E-Mail(s) aus "${importedFolder}" in "${trashFolder}" verschoben.`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
this.logger.warn(`Bereinigung "${importedFolder}" nicht möglich: ${err.message}`);
|
this.logger.warn(
|
||||||
|
`Bereinigung "${importedFolder}" nicht möglich: ${err.message}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Papierkorb leeren
|
// Papierkorb leeren
|
||||||
@@ -51,10 +61,14 @@ export class ImapFolderService {
|
|||||||
const trashUids = await client.search({ all: true }, { uid: true });
|
const trashUids = await client.search({ all: true }, { uid: true });
|
||||||
if (Array.isArray(trashUids) && trashUids.length > 0) {
|
if (Array.isArray(trashUids) && trashUids.length > 0) {
|
||||||
await client.messageDelete(trashUids, { uid: true });
|
await client.messageDelete(trashUids, { uid: true });
|
||||||
this.logger.log(`${trashUids.length} E-Mail(s) aus "${trashFolder}" gelöscht.`);
|
this.logger.log(
|
||||||
|
`${trashUids.length} E-Mail(s) aus "${trashFolder}" gelöscht.`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
this.logger.warn(`Papierkorb "${trashFolder}" konnte nicht geleert werden: ${err.message}`);
|
this.logger.warn(
|
||||||
|
`Papierkorb "${trashFolder}" konnte nicht geleert werden: ${err.message}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
this.logger.error(`IMAP-Cleanup fehlgeschlagen: ${err.message}`);
|
this.logger.error(`IMAP-Cleanup fehlgeschlagen: ${err.message}`);
|
||||||
@@ -64,9 +78,13 @@ export class ImapFolderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async moveProcessedInboxToImportiert(messageIds: string[]): Promise<number> {
|
async moveProcessedInboxToImportiert(messageIds: string[]): Promise<number> {
|
||||||
if (!this.configService.get<string>('IMAP_HOST') || messageIds.length === 0) return 0;
|
if (!this.configService.get<string>('IMAP_HOST') || messageIds.length === 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
const importedFolder = this.configService.get<string>('IMAP_IMPORTED_FOLDER', 'importiert');
|
const importedFolder = this.configService.get<string>(
|
||||||
|
'IMAP_IMPORTED_FOLDER',
|
||||||
|
'importiert',
|
||||||
|
);
|
||||||
const client = this.createClient();
|
const client = this.createClient();
|
||||||
let movedCount = 0;
|
let movedCount = 0;
|
||||||
|
|
||||||
@@ -74,7 +92,7 @@ export class ImapFolderService {
|
|||||||
await client.connect();
|
await client.connect();
|
||||||
|
|
||||||
const mailboxes = await client.list();
|
const mailboxes = await client.list();
|
||||||
if (!mailboxes.some(m => m.path === importedFolder)) {
|
if (!mailboxes.some((m) => m.path === importedFolder)) {
|
||||||
await client.mailboxCreate(importedFolder);
|
await client.mailboxCreate(importedFolder);
|
||||||
this.logger.log(`IMAP-Ordner "${importedFolder}" erstellt.`);
|
this.logger.log(`IMAP-Ordner "${importedFolder}" erstellt.`);
|
||||||
}
|
}
|
||||||
@@ -86,7 +104,10 @@ export class ImapFolderService {
|
|||||||
const idSet = new Set(messageIds.map(normalize));
|
const idSet = new Set(messageIds.map(normalize));
|
||||||
const uidsToMove: number[] = [];
|
const uidsToMove: number[] = [];
|
||||||
|
|
||||||
for await (const msg of client.fetch('1:*', { uid: true, envelope: true })) {
|
for await (const msg of client.fetch('1:*', {
|
||||||
|
uid: true,
|
||||||
|
envelope: true,
|
||||||
|
})) {
|
||||||
const msgId = msg.envelope?.messageId;
|
const msgId = msg.envelope?.messageId;
|
||||||
if (msgId && idSet.has(normalize(msgId))) {
|
if (msgId && idSet.has(normalize(msgId))) {
|
||||||
uidsToMove.push(msg.uid);
|
uidsToMove.push(msg.uid);
|
||||||
@@ -96,10 +117,14 @@ export class ImapFolderService {
|
|||||||
if (uidsToMove.length > 0) {
|
if (uidsToMove.length > 0) {
|
||||||
await client.messageMove(uidsToMove, importedFolder, { uid: true });
|
await client.messageMove(uidsToMove, importedFolder, { uid: true });
|
||||||
movedCount = uidsToMove.length;
|
movedCount = uidsToMove.length;
|
||||||
this.logger.log(`${movedCount} E-Mail(s) aus INBOX → "${importedFolder}" verschoben.`);
|
this.logger.log(
|
||||||
|
`${movedCount} E-Mail(s) aus INBOX → "${importedFolder}" verschoben.`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
this.logger.error(`moveProcessedInboxToImportiert fehlgeschlagen: ${err.message}`);
|
this.logger.error(
|
||||||
|
`moveProcessedInboxToImportiert fehlgeschlagen: ${err.message}`,
|
||||||
|
);
|
||||||
} finally {
|
} finally {
|
||||||
await client.logout().catch(() => {});
|
await client.logout().catch(() => {});
|
||||||
}
|
}
|
||||||
@@ -110,24 +135,34 @@ export class ImapFolderService {
|
|||||||
async moveToImportiert(messageId: string): Promise<void> {
|
async moveToImportiert(messageId: string): Promise<void> {
|
||||||
if (!this.configService.get<string>('IMAP_HOST')) return;
|
if (!this.configService.get<string>('IMAP_HOST')) return;
|
||||||
|
|
||||||
const importedFolder = this.configService.get<string>('IMAP_IMPORTED_FOLDER', 'importiert');
|
const importedFolder = this.configService.get<string>(
|
||||||
|
'IMAP_IMPORTED_FOLDER',
|
||||||
|
'importiert',
|
||||||
|
);
|
||||||
const client = this.createClient();
|
const client = this.createClient();
|
||||||
try {
|
try {
|
||||||
await client.connect();
|
await client.connect();
|
||||||
|
|
||||||
const mailboxes = await client.list();
|
const mailboxes = await client.list();
|
||||||
if (!mailboxes.some(m => m.path === importedFolder)) {
|
if (!mailboxes.some((m) => m.path === importedFolder)) {
|
||||||
await client.mailboxCreate(importedFolder);
|
await client.mailboxCreate(importedFolder);
|
||||||
this.logger.log(`IMAP-Ordner "${importedFolder}" erstellt.`);
|
this.logger.log(`IMAP-Ordner "${importedFolder}" erstellt.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
await client.mailboxOpen('INBOX');
|
await client.mailboxOpen('INBOX');
|
||||||
const uids = await client.search({ header: { 'message-id': messageId } }, { uid: true });
|
const uids = await client.search(
|
||||||
|
{ header: { 'message-id': messageId } },
|
||||||
|
{ uid: true },
|
||||||
|
);
|
||||||
if (Array.isArray(uids) && uids.length > 0) {
|
if (Array.isArray(uids) && uids.length > 0) {
|
||||||
await client.messageMove(uids, importedFolder, { uid: true });
|
await client.messageMove(uids, importedFolder, { uid: true });
|
||||||
this.logger.log(`E-Mail ${messageId} → "${importedFolder}" verschoben.`);
|
this.logger.log(
|
||||||
|
`E-Mail ${messageId} → "${importedFolder}" verschoben.`,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
this.logger.warn(`E-Mail ${messageId} nicht in INBOX gefunden (bereits verschoben?).`);
|
this.logger.warn(
|
||||||
|
`E-Mail ${messageId} nicht in INBOX gefunden (bereits verschoben?).`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
this.logger.error(`IMAP moveToImportiert fehlgeschlagen: ${err.message}`);
|
this.logger.error(`IMAP moveToImportiert fehlgeschlagen: ${err.message}`);
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ export class PaperlessProcessorService {
|
|||||||
doc.correspondent !== null && doc.correspondent !== undefined;
|
doc.correspondent !== null && doc.correspondent !== undefined;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
isFilled = !!doc.created || !!doc.created_date;
|
isFilled = !!doc.created;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
isFilled =
|
isFilled =
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ export class PaperlessController {
|
|||||||
asn: doc.archive_serial_number,
|
asn: doc.archive_serial_number,
|
||||||
documentType: doc.document_type,
|
documentType: doc.document_type,
|
||||||
correspondent: doc.correspondent,
|
correspondent: doc.correspondent,
|
||||||
created: doc.created_date,
|
created: doc.created,
|
||||||
added: doc.added,
|
added: doc.added,
|
||||||
tags: doc.tags,
|
tags: doc.tags,
|
||||||
customFields: doc.custom_fields,
|
customFields: doc.custom_fields,
|
||||||
@@ -179,7 +179,7 @@ export class PaperlessController {
|
|||||||
asn: doc.archive_serial_number,
|
asn: doc.archive_serial_number,
|
||||||
documentType: doc.document_type,
|
documentType: doc.document_type,
|
||||||
correspondent: doc.correspondent,
|
correspondent: doc.correspondent,
|
||||||
created: doc.created_date,
|
created: doc.created,
|
||||||
added: doc.added,
|
added: doc.added,
|
||||||
tags: doc.tags,
|
tags: doc.tags,
|
||||||
customFields: doc.custom_fields,
|
customFields: doc.custom_fields,
|
||||||
@@ -338,7 +338,7 @@ export class PaperlessController {
|
|||||||
docDate.getHours() * 60 * 60 * 1000,
|
docDate.getHours() * 60 * 60 * 1000,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
oldDocument.created_date = docDate.toISOString().split('T')[0];
|
oldDocument.created = docDate.toISOString();
|
||||||
}
|
}
|
||||||
|
|
||||||
const cfDefinitions = await this.paperlessService.getCustomFields();
|
const cfDefinitions = await this.paperlessService.getCustomFields();
|
||||||
@@ -390,7 +390,7 @@ export class PaperlessController {
|
|||||||
for (const req of reqs) {
|
for (const req of reqs) {
|
||||||
let isFieldValid = false;
|
let isFieldValid = false;
|
||||||
if (req.Type === 1) isFieldValid = oldDocument.correspondent !== null;
|
if (req.Type === 1) isFieldValid = oldDocument.correspondent !== null;
|
||||||
if (req.Type === 2) isFieldValid = oldDocument.created_date !== null;
|
if (req.Type === 2) isFieldValid = oldDocument.created !== null;
|
||||||
if (req.Type === 3)
|
if (req.Type === 3)
|
||||||
isFieldValid = oldDocument.archive_serial_number !== null;
|
isFieldValid = oldDocument.archive_serial_number !== null;
|
||||||
if (req.Type === 4)
|
if (req.Type === 4)
|
||||||
@@ -446,10 +446,8 @@ export class PaperlessController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
titleTemplate = titleTemplate.replace(
|
const createdDatePart = String(oldDocument.created ?? '').split('T')[0];
|
||||||
'{{DATE}}',
|
titleTemplate = titleTemplate.replace('{{DATE}}', createdDatePart);
|
||||||
oldDocument.created_date,
|
|
||||||
);
|
|
||||||
oldDocument.title = titleTemplate;
|
oldDocument.title = titleTemplate;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -471,6 +469,9 @@ export class PaperlessController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Veraltetes Feld nicht mit-PATCHen (löst Paperless-Deprecation-Warnung aus)
|
||||||
|
delete oldDocument.created_date;
|
||||||
|
|
||||||
await this.paperlessService.updateDocument(documentId, oldDocument);
|
await this.paperlessService.updateDocument(documentId, oldDocument);
|
||||||
return { success: true };
|
return { success: true };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,10 +22,7 @@ export class ZahlungController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Put('documents/:id/zahlung')
|
@Put('documents/:id/zahlung')
|
||||||
setZahlung(
|
setZahlung(@Param('id') id: string, @Body('value') value: string | null) {
|
||||||
@Param('id') id: string,
|
|
||||||
@Body('value') value: string | null,
|
|
||||||
) {
|
|
||||||
return this.zahlungService.setZahlung(parseInt(id, 10), value ?? null);
|
return this.zahlungService.setZahlung(parseInt(id, 10), value ?? null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,11 @@ export class ZahlungService {
|
|||||||
private readonly paperlessService: PaperlessService,
|
private readonly paperlessService: PaperlessService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async getZahlungDocuments(page: number, pageSize: number, filter: ZahlungFilter) {
|
async getZahlungDocuments(
|
||||||
|
page: number,
|
||||||
|
pageSize: number,
|
||||||
|
filter: ZahlungFilter,
|
||||||
|
) {
|
||||||
const docTypes = await this.documentTypeRepo.find({
|
const docTypes = await this.documentTypeRepo.find({
|
||||||
where: { FreigabeErforderlich: true as any },
|
where: { FreigabeErforderlich: true as any },
|
||||||
});
|
});
|
||||||
@@ -44,7 +48,10 @@ export class ZahlungService {
|
|||||||
const result = await this.paperlessService.getDocuments(params);
|
const result = await this.paperlessService.getDocuments(params);
|
||||||
allDocs = result.results ?? [];
|
allDocs = result.results ?? [];
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
this.logger.warn('Fehler beim Laden der Belege für Zahlung', err?.message);
|
this.logger.warn(
|
||||||
|
'Fehler beim Laden der Belege für Zahlung',
|
||||||
|
err?.message,
|
||||||
|
);
|
||||||
return { count: 0, results: [] };
|
return { count: 0, results: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,9 +80,12 @@ export class ZahlungService {
|
|||||||
|
|
||||||
private getCfValue(doc: any, fieldId: number): string | null {
|
private getCfValue(doc: any, fieldId: number): string | null {
|
||||||
const cf = (doc.custom_fields ?? []).find((f: any) => f.field === fieldId);
|
const cf = (doc.custom_fields ?? []).find((f: any) => f.field === fieldId);
|
||||||
if (!cf || cf.value === null || cf.value === undefined || cf.value === '') return null;
|
if (!cf || cf.value === null || cf.value === undefined || cf.value === '')
|
||||||
|
return null;
|
||||||
if (typeof cf.value === 'object') {
|
if (typeof cf.value === 'object') {
|
||||||
return String(cf.value?.id ?? cf.value?.value ?? cf.value?.label ?? '') || null;
|
return (
|
||||||
|
String(cf.value?.id ?? cf.value?.value ?? cf.value?.label ?? '') || null
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return String(cf.value);
|
return String(cf.value);
|
||||||
}
|
}
|
||||||
@@ -91,20 +101,24 @@ export class ZahlungService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const customFields: any[] = [...(doc.custom_fields ?? [])];
|
const customFields: any[] = [...(doc.custom_fields ?? [])];
|
||||||
const existing = customFields.find((f: any) => f.field === ZAHLUNG_FIELD_ID);
|
const existing = customFields.find(
|
||||||
|
(f: any) => f.field === ZAHLUNG_FIELD_ID,
|
||||||
|
);
|
||||||
if (existing) {
|
if (existing) {
|
||||||
existing.value = value;
|
existing.value = value;
|
||||||
} else if (value !== null && value !== '') {
|
} else if (value !== null && value !== '') {
|
||||||
customFields.push({ field: ZAHLUNG_FIELD_ID, value });
|
customFields.push({ field: ZAHLUNG_FIELD_ID, value });
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.paperlessService.updateDocument(documentId, { custom_fields: customFields });
|
await this.paperlessService.updateDocument(documentId, {
|
||||||
|
custom_fields: customFields,
|
||||||
|
});
|
||||||
return { success: true };
|
return { success: true };
|
||||||
}
|
}
|
||||||
|
|
||||||
async getZahlungOptions(): Promise<{ id: string; label: string }[]> {
|
async getZahlungOptions(): Promise<{ id: string; label: string }[]> {
|
||||||
const fields = await this.paperlessService.getCustomFields();
|
const fields = await this.paperlessService.getCustomFields();
|
||||||
const field = (fields as any[]).find((f: any) => f.id === ZAHLUNG_FIELD_ID);
|
const field = fields.find((f: any) => f.id === ZAHLUNG_FIELD_ID);
|
||||||
if (!field) return [];
|
if (!field) return [];
|
||||||
|
|
||||||
const rawOptions: any[] = field.extra_data?.select_options ?? [];
|
const rawOptions: any[] = field.extra_data?.select_options ?? [];
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ export interface FreigabeDocument {
|
|||||||
id: number;
|
id: number;
|
||||||
title: string;
|
title: string;
|
||||||
created: string;
|
created: string;
|
||||||
created_date: string;
|
|
||||||
correspondent: number | null;
|
correspondent: number | null;
|
||||||
document_type: number | null;
|
document_type: number | null;
|
||||||
archive_serial_number: number | null;
|
archive_serial_number: number | null;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ export interface ZahlungDocument {
|
|||||||
id: number;
|
id: number;
|
||||||
title: string;
|
title: string;
|
||||||
created: string;
|
created: string;
|
||||||
created_date: string;
|
|
||||||
correspondent: number | null;
|
correspondent: number | null;
|
||||||
document_type: number | null;
|
document_type: number | null;
|
||||||
archive_serial_number: number | null;
|
archive_serial_number: number | null;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useEffect, useState, useCallback } from 'react';
|
import { useEffect, useState, useCallback } from 'react';
|
||||||
import { Modal, Form, Select, DatePicker, Input, Spin, message, Row, Col, Button, Space, Divider, Tag } from 'antd';
|
import { Modal, Form, Select, DatePicker, Input, Spin, message, Row, Col, Button, Space, Divider, Tag } from 'antd';
|
||||||
import { PlusOutlined, EyeOutlined, SearchOutlined } from '@ant-design/icons';
|
import { PlusOutlined, EyeOutlined, SearchOutlined, ExportOutlined } from '@ant-design/icons';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { posteingangApi } from '../api/posteingang';
|
import { posteingangApi } from '../api/posteingang';
|
||||||
import type { DocumentRequirement, PosteingangDocument, Kontonummer } from '../api/posteingang';
|
import type { DocumentRequirement, PosteingangDocument, Kontonummer } from '../api/posteingang';
|
||||||
@@ -11,6 +11,7 @@ import type { PaperlessDocType, PaperlessCorrespondent, PaperlessTag } from '../
|
|||||||
import { getEnv } from '../utils/env';
|
import { getEnv } from '../utils/env';
|
||||||
import { AuthIframe, openAuthUrl } from '../utils/auth-resource';
|
import { AuthIframe, openAuthUrl } from '../utils/auth-resource';
|
||||||
import DocumentSearchModal from './DocumentSearchModal';
|
import DocumentSearchModal from './DocumentSearchModal';
|
||||||
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
|
|
||||||
const { Option } = Select;
|
const { Option } = Select;
|
||||||
|
|
||||||
@@ -26,6 +27,7 @@ interface Props {
|
|||||||
|
|
||||||
export default function DocumentEditModal({ documentId, document, open, onClose, onSave, isPosteingang = true, hasNextDocument = true }: Props) {
|
export default function DocumentEditModal({ documentId, document, open, onClose, onSave, isPosteingang = true, hasNextDocument = true }: Props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [saving, setSaving] = useState(false);
|
const [saving, setSaving] = useState(false);
|
||||||
@@ -349,8 +351,8 @@ export default function DocumentEditModal({ documentId, document, open, onClose,
|
|||||||
title={`Dokument bearbeiten (${document?.title || ''})`}
|
title={`Dokument bearbeiten (${document?.title || ''})`}
|
||||||
open={open && !kontonummerMissing}
|
open={open && !kontonummerMissing}
|
||||||
onCancel={() => onClose(false)}
|
onCancel={() => onClose(false)}
|
||||||
width={1400}
|
width={{ xs: '100vw', md: 900, xl: 1400 }}
|
||||||
style={{ top: 20 }}
|
style={isMobile ? {} : { top: 20 }}
|
||||||
footer={
|
footer={
|
||||||
hasNextDocument ? [
|
hasNextDocument ? [
|
||||||
<Button key="cancel" onClick={() => onClose(false)}>Abbrechen</Button>,
|
<Button key="cancel" onClick={() => onClose(false)}>Abbrechen</Button>,
|
||||||
@@ -363,8 +365,12 @@ export default function DocumentEditModal({ documentId, document, open, onClose,
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
<Row gutter={16} style={{ height: '75vh', overflow: 'hidden' }}>
|
<Row gutter={[16, 16]} style={isMobile ? {} : { height: '75vh', overflow: 'hidden' }}>
|
||||||
<Col span={10} style={{ overflowY: 'auto', paddingRight: '1rem', borderRight: '1px solid #f0f0f0' }}>
|
<Col
|
||||||
|
xs={24}
|
||||||
|
lg={10}
|
||||||
|
style={isMobile ? {} : { overflowY: 'auto', paddingRight: '1rem', borderRight: '1px solid #f0f0f0' }}
|
||||||
|
>
|
||||||
<Form form={form} layout="vertical" disabled={saving}>
|
<Form form={form} layout="vertical" disabled={saving}>
|
||||||
|
|
||||||
<Form.Item name="mandant" label="Mandant" rules={[{ required: true, message: 'Wähle einen Mandanten' }]}>
|
<Form.Item name="mandant" label="Mandant" rules={[{ required: true, message: 'Wähle einen Mandanten' }]}>
|
||||||
@@ -556,10 +562,20 @@ export default function DocumentEditModal({ documentId, document, open, onClose,
|
|||||||
})}
|
})}
|
||||||
</Form>
|
</Form>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={14} style={{ height: '100%' }}>
|
<Col xs={24} lg={14} style={isMobile ? {} : { height: '100%' }}>
|
||||||
|
{isMobile && (
|
||||||
|
<Button
|
||||||
|
icon={<ExportOutlined />}
|
||||||
|
block
|
||||||
|
style={{ marginBottom: 8 }}
|
||||||
|
onClick={() => openAuthUrl(`${getEnv('VITE_API_URL')}/api/paperless/inbox/pdf/${documentId}`)}
|
||||||
|
>
|
||||||
|
PDF in neuem Tab öffnen
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
<AuthIframe
|
<AuthIframe
|
||||||
src={`${getEnv('VITE_API_URL')}/api/paperless/inbox/pdf/${documentId}#toolbar=0`}
|
src={`${getEnv('VITE_API_URL')}/api/paperless/inbox/pdf/${documentId}#toolbar=0`}
|
||||||
style={{ width: '100%', height: '100%' }}
|
style={{ width: '100%', height: isMobile ? '50vh' : '100%' }}
|
||||||
title="PDF Preview"
|
title="PDF Preview"
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default function DocumentSearchModal({ open, onCancel, onSelect }: Props)
|
|||||||
open={open}
|
open={open}
|
||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
footer={null}
|
footer={null}
|
||||||
width={800}
|
width={{ xs: '100vw', md: 800 }}
|
||||||
style={{ top: 50 }}
|
style={{ top: 50 }}
|
||||||
>
|
>
|
||||||
<div style={{ marginBottom: 16 }}>
|
<div style={{ marginBottom: 16 }}>
|
||||||
@@ -100,7 +100,7 @@ export default function DocumentSearchModal({ open, onCancel, onSelect }: Props)
|
|||||||
description={
|
description={
|
||||||
<Space direction="vertical" size={0}>
|
<Space direction="vertical" size={0}>
|
||||||
<Text type="secondary" style={{ fontSize: 12 }}>ID: {doc.id} | ASN: {doc.archive_serial_number || 'Keine'}</Text>
|
<Text type="secondary" style={{ fontSize: 12 }}>ID: {doc.id} | ASN: {doc.archive_serial_number || 'Keine'}</Text>
|
||||||
<Text type="secondary" style={{ fontSize: 12 }}>Erstellt: {dayjs(doc.created_date).format('DD.MM.YYYY')}</Text>
|
<Text type="secondary" style={{ fontSize: 12 }}>Erstellt: {dayjs(doc.created).format('DD.MM.YYYY')}</Text>
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -538,8 +538,8 @@ export default function MailImportWizard({ visible, onClose, onSuccess, email, a
|
|||||||
{toProcess.map(item => (
|
{toProcess.map(item => (
|
||||||
<div key={item.virtualId} style={{ marginBottom: 24, padding: 16, border: '1px solid #f0f0f0', borderRadius: 8 }}>
|
<div key={item.virtualId} style={{ marginBottom: 24, padding: 16, border: '1px solid #f0f0f0', borderRadius: 8 }}>
|
||||||
<Text strong style={{ fontSize: 16, marginBottom: 12, display: 'block' }}>{item.fileName}</Text>
|
<Text strong style={{ fontSize: 16, marginBottom: 12, display: 'block' }}>{item.fileName}</Text>
|
||||||
<Row gutter={24}>
|
<Row gutter={[24, 16]}>
|
||||||
<Col span={8}>
|
<Col xs={24} lg={8}>
|
||||||
{/* Eingangsdatum */}
|
{/* Eingangsdatum */}
|
||||||
<div style={{ marginBottom: 16 }}>
|
<div style={{ marginBottom: 16 }}>
|
||||||
<Text style={{ display: 'block', marginBottom: 4 }}>Eingangsdatum:</Text>
|
<Text style={{ display: 'block', marginBottom: 4 }}>Eingangsdatum:</Text>
|
||||||
@@ -626,7 +626,7 @@ export default function MailImportWizard({ visible, onClose, onSuccess, email, a
|
|||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={16}>
|
<Col xs={24} lg={16}>
|
||||||
<BarcodePositioner
|
<BarcodePositioner
|
||||||
attachmentId={item.attachmentId}
|
attachmentId={item.attachmentId}
|
||||||
startPage={item.pages?.start}
|
startPage={item.pages?.start}
|
||||||
@@ -666,9 +666,9 @@ export default function MailImportWizard({ visible, onClose, onSuccess, email, a
|
|||||||
return (
|
return (
|
||||||
<div key={main.virtualId} style={{ marginBottom: 24, padding: 16, border: '1px solid #f0f0f0', borderRadius: 8 }}>
|
<div key={main.virtualId} style={{ marginBottom: 24, padding: 16, border: '1px solid #f0f0f0', borderRadius: 8 }}>
|
||||||
<Text strong style={{ fontSize: 16, marginBottom: 12, display: 'block' }}>{main.fileName}</Text>
|
<Text strong style={{ fontSize: 16, marginBottom: 12, display: 'block' }}>{main.fileName}</Text>
|
||||||
<Row gutter={24} align="middle">
|
<Row gutter={[24, 12]} align="middle">
|
||||||
<Col span={showPrint ? 20 : 24}>
|
<Col xs={24} md={showPrint ? 20 : 24}>
|
||||||
<Space size={24}>
|
<Space size={24} wrap>
|
||||||
<Text type="secondary">
|
<Text type="secondary">
|
||||||
Eingangsdatum: <Text strong>{datum?.format('DD.MM.YYYY') ?? '—'}</Text>
|
Eingangsdatum: <Text strong>{datum?.format('DD.MM.YYYY') ?? '—'}</Text>
|
||||||
</Text>
|
</Text>
|
||||||
@@ -690,7 +690,7 @@ export default function MailImportWizard({ visible, onClose, onSuccess, email, a
|
|||||||
)}
|
)}
|
||||||
</Col>
|
</Col>
|
||||||
{showPrint && (
|
{showPrint && (
|
||||||
<Col span={4} style={{ textAlign: 'right' }}>
|
<Col xs={24} md={4} style={{ textAlign: 'right' }}>
|
||||||
<Button icon={<PrinterOutlined />} onClick={() => printDocument(main.virtualId, main.attachmentId)}>
|
<Button icon={<PrinterOutlined />} onClick={() => printDocument(main.virtualId, main.attachmentId)}>
|
||||||
Drucken
|
Drucken
|
||||||
</Button>
|
</Button>
|
||||||
@@ -735,7 +735,7 @@ export default function MailImportWizard({ visible, onClose, onSuccess, email, a
|
|||||||
title="Paperless Import-Wizard"
|
title="Paperless Import-Wizard"
|
||||||
open={visible}
|
open={visible}
|
||||||
onCancel={onClose}
|
onCancel={onClose}
|
||||||
width={1000}
|
width={{ xs: '100vw', md: 900, lg: 1000 }}
|
||||||
footer={
|
footer={
|
||||||
importSuccess ? (
|
importSuccess ? (
|
||||||
<Button type="primary" onClick={onSuccess ?? onClose}>Schließen</Button>
|
<Button type="primary" onClick={onSuccess ?? onClose}>Schließen</Button>
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
import type { ReactNode } from 'react';
|
||||||
|
import { List, Card } from 'antd';
|
||||||
|
import type { TablePaginationConfig } from 'antd';
|
||||||
|
|
||||||
|
interface MobileCardListProps<T> {
|
||||||
|
dataSource: T[];
|
||||||
|
rowKey: keyof T | ((record: T) => React.Key);
|
||||||
|
loading?: boolean;
|
||||||
|
/** Gleiche Pagination-Config wie bei <Table> — wird durchgereicht (mobil kompakt). */
|
||||||
|
pagination?: TablePaginationConfig | false;
|
||||||
|
/** Seitenspezifischer Karteninhalt für einen Datensatz. */
|
||||||
|
renderCard: (record: T) => ReactNode;
|
||||||
|
onCardClick?: (record: T) => void;
|
||||||
|
emptyText?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mobile Karten-Ansicht als Ersatz für breite Tabellen:
|
||||||
|
* eine Karte pro Datensatz, Pagination wie bei der Tabelle.
|
||||||
|
*/
|
||||||
|
export default function MobileCardList<T>({
|
||||||
|
dataSource,
|
||||||
|
rowKey,
|
||||||
|
loading,
|
||||||
|
pagination,
|
||||||
|
renderCard,
|
||||||
|
onCardClick,
|
||||||
|
emptyText = 'Keine Einträge vorhanden',
|
||||||
|
}: MobileCardListProps<T>) {
|
||||||
|
const getKey = (record: T): React.Key =>
|
||||||
|
typeof rowKey === 'function' ? rowKey(record) : (record[rowKey] as React.Key);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<List
|
||||||
|
dataSource={dataSource}
|
||||||
|
loading={loading}
|
||||||
|
rowKey={getKey}
|
||||||
|
locale={{ emptyText }}
|
||||||
|
pagination={
|
||||||
|
pagination
|
||||||
|
? {
|
||||||
|
...pagination,
|
||||||
|
position: undefined,
|
||||||
|
simple: true,
|
||||||
|
showSizeChanger: false,
|
||||||
|
}
|
||||||
|
: false
|
||||||
|
}
|
||||||
|
renderItem={(record) => (
|
||||||
|
<List.Item style={{ padding: 0, marginBottom: 8, borderBlockEnd: 'none' }}>
|
||||||
|
<Card
|
||||||
|
size="small"
|
||||||
|
style={{ width: '100%' }}
|
||||||
|
styles={{ body: { padding: 12 } }}
|
||||||
|
hoverable={!!onCardClick}
|
||||||
|
onClick={onCardClick ? () => onCardClick(record) : undefined}
|
||||||
|
>
|
||||||
|
{renderCard(record)}
|
||||||
|
</Card>
|
||||||
|
</List.Item>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { Grid } from 'antd';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zentraler Breakpoint-Hook: mobil = Viewport unter `md` (768px).
|
||||||
|
* Beim allerersten Render liefert useBreakpoint() noch keine Werte —
|
||||||
|
* dann Desktop annehmen, um ein Layout-Flackern zu vermeiden.
|
||||||
|
*/
|
||||||
|
export function useIsMobile(): boolean {
|
||||||
|
const screens = Grid.useBreakpoint();
|
||||||
|
return screens.md === undefined ? false : !screens.md;
|
||||||
|
}
|
||||||
@@ -139,3 +139,29 @@ body {
|
|||||||
.ant-picker-input > input {
|
.ant-picker-input > input {
|
||||||
font-size: 14px !important;
|
font-size: 14px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Responsive / Mobile ─────────────────────────────────────── */
|
||||||
|
|
||||||
|
html {
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.ant-modal {
|
||||||
|
top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Modal-Inhalte scrollbar statt abgeschnitten (v. a. Settings-Dialoge) */
|
||||||
|
.ant-modal .ant-modal-body {
|
||||||
|
max-height: calc(100dvh - 160px);
|
||||||
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sicherheitsnetz: Tabellen ohne Karten-Ansicht seitlich scrollbar */
|
||||||
|
.ant-table-content,
|
||||||
|
.ant-table-body {
|
||||||
|
overflow-x: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import { Outlet, useNavigate, useLocation } from 'react-router-dom';
|
import { Outlet, useNavigate, useLocation } from 'react-router-dom';
|
||||||
import { Layout, Menu, Avatar, Dropdown, theme, Typography, Tooltip, Badge } from 'antd';
|
import { Layout, Menu, Avatar, Dropdown, theme, Typography, Tooltip, Badge, Drawer, Button } from 'antd';
|
||||||
import {
|
import {
|
||||||
InboxOutlined,
|
InboxOutlined,
|
||||||
FileTextOutlined,
|
FileTextOutlined,
|
||||||
@@ -15,9 +15,11 @@ import {
|
|||||||
GlobalOutlined,
|
GlobalOutlined,
|
||||||
CheckCircleOutlined,
|
CheckCircleOutlined,
|
||||||
EuroOutlined,
|
EuroOutlined,
|
||||||
|
MenuOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { useAuth } from '../auth/AuthContext';
|
import { useAuth } from '../auth/AuthContext';
|
||||||
import { useTheme } from '../theme/ThemeContext';
|
import { useTheme } from '../theme/ThemeContext';
|
||||||
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
import { Permission } from '../auth/permissions';
|
import { Permission } from '../auth/permissions';
|
||||||
import { statsApi, type StatsCounts } from '../api/stats';
|
import { statsApi, type StatsCounts } from '../api/stats';
|
||||||
|
|
||||||
@@ -47,17 +49,22 @@ const allMenuItems: MenuItemDef[] = [
|
|||||||
|
|
||||||
export default function AppLayout() {
|
export default function AppLayout() {
|
||||||
const [collapsed, setCollapsed] = useState(false);
|
const [collapsed, setCollapsed] = useState(false);
|
||||||
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const { user, logout, hasPermission, isAuthenticated } = useAuth();
|
const { user, logout, hasPermission, isAuthenticated } = useAuth();
|
||||||
const { token: themeToken } = theme.useToken();
|
const { token: themeToken } = theme.useToken();
|
||||||
const { isDark, toggleTheme } = useTheme();
|
const { isDark, toggleTheme } = useTheme();
|
||||||
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
const [counts, setCounts] = useState<StatsCounts | null>(null);
|
const [counts, setCounts] = useState<StatsCounts | null>(null);
|
||||||
|
|
||||||
|
// Im Drawer (mobil) ist die Navigation nie eingeklappt
|
||||||
|
const effectiveCollapsed = isMobile ? false : collapsed;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isAuthenticated) return;
|
if (!isAuthenticated) return;
|
||||||
|
|
||||||
const fetchCounts = async () => {
|
const fetchCounts = async () => {
|
||||||
try {
|
try {
|
||||||
const data = await statsApi.getCounts();
|
const data = await statsApi.getCounts();
|
||||||
@@ -66,10 +73,10 @@ export default function AppLayout() {
|
|||||||
console.error('Fehler beim Abrufen der Zählerstände:', err);
|
console.error('Fehler beim Abrufen der Zählerstände:', err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
fetchCounts();
|
fetchCounts();
|
||||||
const interval = setInterval(fetchCounts, 30000); // 30 Sekunden Polling
|
const interval = setInterval(fetchCounts, 30000); // 30 Sekunden Polling
|
||||||
|
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, [isAuthenticated, location.pathname]); // Update after navigation or auth change
|
}, [isAuthenticated, location.pathname]); // Update after navigation or auth change
|
||||||
|
|
||||||
@@ -80,9 +87,9 @@ export default function AppLayout() {
|
|||||||
label: (
|
label: (
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', width: '100%', paddingRight: 8 }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', width: '100%', paddingRight: 8 }}>
|
||||||
<span>{item.label}</span>
|
<span>{item.label}</span>
|
||||||
{item.countKey && counts && counts[item.countKey] > 0 && !collapsed && (
|
{item.countKey && counts && counts[item.countKey] > 0 && !effectiveCollapsed && (
|
||||||
<Badge
|
<Badge
|
||||||
count={counts[item.countKey]}
|
count={counts[item.countKey]}
|
||||||
overflowCount={99}
|
overflowCount={99}
|
||||||
size="small"
|
size="small"
|
||||||
color={isDark ? themeToken.colorPrimary : '#1677ff'}
|
color={isDark ? themeToken.colorPrimary : '#1677ff'}
|
||||||
@@ -107,158 +114,231 @@ export default function AppLayout() {
|
|||||||
|
|
||||||
const logoColor = isDark ? '#fff' : '#1a1a2e';
|
const logoColor = isDark ? '#fff' : '#1a1a2e';
|
||||||
const subtleColor = isDark ? '#ffffffa6' : '#4a4a6a';
|
const subtleColor = isDark ? '#ffffffa6' : '#4a4a6a';
|
||||||
|
const dividerColor = isDark ? 'rgba(255,255,255,0.08)' : '#e2e4ea';
|
||||||
|
|
||||||
|
// Sidebar-Inhalt (Logo, Menü, Bottom-Sektion) — identisch für Sider (Desktop)
|
||||||
|
// und Drawer (mobil). `onNavigate` schließt auf Mobil den Drawer.
|
||||||
|
const renderSidebarContent = (isCollapsed: boolean, onNavigate?: () => void) => (
|
||||||
|
<>
|
||||||
|
{/* Logo / Collapse-Toggle */}
|
||||||
|
<button
|
||||||
|
onClick={() => (onNavigate ? onNavigate() : setCollapsed(!collapsed))}
|
||||||
|
style={{
|
||||||
|
height: 56,
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
cursor: 'pointer',
|
||||||
|
userSelect: 'none',
|
||||||
|
border: 'none',
|
||||||
|
borderBottom: `1px solid ${dividerColor}`,
|
||||||
|
background: 'transparent',
|
||||||
|
width: '100%',
|
||||||
|
padding: 0,
|
||||||
|
transition: 'background 0.2s',
|
||||||
|
}}
|
||||||
|
onMouseEnter={(e) => (e.currentTarget.style.background = isDark ? 'rgba(255,255,255,0.04)' : 'rgba(0,0,0,0.02)')}
|
||||||
|
onMouseLeave={(e) => (e.currentTarget.style.background = 'transparent')}
|
||||||
|
>
|
||||||
|
<Text strong style={{ color: logoColor, fontSize: isCollapsed ? 14 : 18, transition: 'font-size 0.2s' }}>
|
||||||
|
{isCollapsed ? 'PM' : 'Paperless'}
|
||||||
|
</Text>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{/* Navigation Menu */}
|
||||||
|
<Menu
|
||||||
|
theme={isDark ? 'dark' : 'light'}
|
||||||
|
mode="inline"
|
||||||
|
selectedKeys={[selectedKey]}
|
||||||
|
items={menuItems}
|
||||||
|
onClick={({ key }) => {
|
||||||
|
const item = allMenuItems.find((i) => i.key === key);
|
||||||
|
if (item?.externalUrl) {
|
||||||
|
window.open(item.externalUrl, '_blank', 'noopener,noreferrer');
|
||||||
|
} else {
|
||||||
|
navigate(key);
|
||||||
|
}
|
||||||
|
onNavigate?.();
|
||||||
|
}}
|
||||||
|
style={isDark ? { flex: 1 } : { background: 'transparent', flex: 1 }}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* Bottom Section: User + Theme Toggle */}
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
borderTop: `1px solid ${dividerColor}`,
|
||||||
|
padding: isCollapsed ? '12px 0' : '12px 16px',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
gap: 4,
|
||||||
|
transition: 'padding 0.2s',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{/* Theme Toggle */}
|
||||||
|
<Tooltip title={isDark ? 'Light Mode' : 'Dark Mode'} placement="right">
|
||||||
|
<button
|
||||||
|
onClick={toggleTheme}
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: 10,
|
||||||
|
padding: isCollapsed ? '8px 0' : '8px 12px',
|
||||||
|
borderRadius: 6,
|
||||||
|
cursor: 'pointer',
|
||||||
|
color: subtleColor,
|
||||||
|
justifyContent: isCollapsed ? 'center' : 'flex-start',
|
||||||
|
border: 'none',
|
||||||
|
background: 'transparent',
|
||||||
|
width: '100%',
|
||||||
|
transition: 'background 0.2s',
|
||||||
|
}}
|
||||||
|
onMouseEnter={(e) => (e.currentTarget.style.background = isDark ? 'rgba(255,255,255,0.08)' : '#eef1f8')}
|
||||||
|
onMouseLeave={(e) => (e.currentTarget.style.background = 'transparent')}
|
||||||
|
>
|
||||||
|
{isDark ? <SunOutlined style={{ fontSize: 16 }} /> : <MoonOutlined style={{ fontSize: 16 }} />}
|
||||||
|
{!isCollapsed && <Text style={{ color: subtleColor, fontSize: 13 }}>{isDark ? 'Light Mode' : 'Dark Mode'}</Text>}
|
||||||
|
</button>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
|
{/* User Menu */}
|
||||||
|
<Dropdown
|
||||||
|
menu={{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
key: 'user-settings',
|
||||||
|
icon: <SettingOutlined />,
|
||||||
|
label: 'Benutzereinstellungen',
|
||||||
|
onClick: () => {
|
||||||
|
navigate('/user-settings');
|
||||||
|
onNavigate?.();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'logout',
|
||||||
|
icon: <LogoutOutlined />,
|
||||||
|
label: 'Abmelden',
|
||||||
|
onClick: () => logout(),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}}
|
||||||
|
placement="topRight"
|
||||||
|
trigger={['click']}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: 10,
|
||||||
|
padding: isCollapsed ? '8px 0' : '8px 12px',
|
||||||
|
borderRadius: 6,
|
||||||
|
cursor: 'pointer',
|
||||||
|
justifyContent: isCollapsed ? 'center' : 'flex-start',
|
||||||
|
transition: 'all 0.2s',
|
||||||
|
}}
|
||||||
|
onMouseEnter={(e) => (e.currentTarget.style.background = isDark ? 'rgba(255,255,255,0.08)' : '#eef1f8')}
|
||||||
|
onMouseLeave={(e) => (e.currentTarget.style.background = 'transparent')}
|
||||||
|
>
|
||||||
|
<Avatar size="small" icon={<UserOutlined />} />
|
||||||
|
{!isCollapsed && (
|
||||||
|
<Text ellipsis style={{ color: subtleColor, fontSize: 13, maxWidth: 120 }}>
|
||||||
|
{user?.profile?.name || 'Benutzer'}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</Dropdown>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout style={{ minHeight: '100vh' }}>
|
<Layout style={{ minHeight: '100vh' }}>
|
||||||
<Sider
|
{isMobile ? (
|
||||||
width={240}
|
<>
|
||||||
trigger={null}
|
{/* Mobile Top-Bar mit Hamburger */}
|
||||||
collapsible
|
<div
|
||||||
collapsed={collapsed}
|
style={{
|
||||||
theme={isDark ? 'dark' : 'light'}
|
position: 'fixed',
|
||||||
style={{
|
top: 0,
|
||||||
overflow: 'hidden',
|
left: 0,
|
||||||
height: '100vh',
|
right: 0,
|
||||||
position: 'fixed',
|
height: 48,
|
||||||
left: 0,
|
zIndex: 100,
|
||||||
top: 0,
|
display: 'flex',
|
||||||
bottom: 0,
|
alignItems: 'center',
|
||||||
display: 'flex',
|
gap: 8,
|
||||||
flexDirection: 'column',
|
padding: '0 8px',
|
||||||
...siderStyle,
|
background: themeToken.colorBgContainer,
|
||||||
}}
|
borderBottom: `1px solid ${dividerColor}`,
|
||||||
>
|
}}
|
||||||
{/* Logo / Collapse-Toggle */}
|
>
|
||||||
<button
|
<Button
|
||||||
onClick={() => setCollapsed(!collapsed)}
|
type="text"
|
||||||
style={{
|
icon={<MenuOutlined />}
|
||||||
height: 56,
|
aria-label="Menü öffnen"
|
||||||
display: 'flex',
|
onClick={() => setDrawerOpen(true)}
|
||||||
alignItems: 'center',
|
/>
|
||||||
justifyContent: 'center',
|
<Text strong style={{ color: logoColor, fontSize: 18 }}>Paperless</Text>
|
||||||
cursor: 'pointer',
|
</div>
|
||||||
userSelect: 'none',
|
|
||||||
border: 'none',
|
|
||||||
borderBottom: `1px solid ${isDark ? 'rgba(255,255,255,0.08)' : '#e2e4ea'}`,
|
|
||||||
background: 'transparent',
|
|
||||||
width: '100%',
|
|
||||||
padding: 0,
|
|
||||||
transition: 'background 0.2s',
|
|
||||||
}}
|
|
||||||
onMouseEnter={(e) => (e.currentTarget.style.background = isDark ? 'rgba(255,255,255,0.04)' : 'rgba(0,0,0,0.02)')}
|
|
||||||
onMouseLeave={(e) => (e.currentTarget.style.background = 'transparent')}
|
|
||||||
>
|
|
||||||
<Text strong style={{ color: logoColor, fontSize: collapsed ? 14 : 18, transition: 'font-size 0.2s' }}>
|
|
||||||
{collapsed ? 'PM' : 'Paperless'}
|
|
||||||
</Text>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{/* Navigation Menu */}
|
<Drawer
|
||||||
<Menu
|
placement="left"
|
||||||
|
width={260}
|
||||||
|
open={drawerOpen}
|
||||||
|
onClose={() => setDrawerOpen(false)}
|
||||||
|
closable={false}
|
||||||
|
styles={{
|
||||||
|
body: {
|
||||||
|
padding: 0,
|
||||||
|
position: 'relative',
|
||||||
|
background: isDark ? '#001529' : '#f0f2f7',
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{renderSidebarContent(false, () => setDrawerOpen(false))}
|
||||||
|
</Drawer>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<Sider
|
||||||
|
width={240}
|
||||||
|
trigger={null}
|
||||||
|
collapsible
|
||||||
|
collapsed={collapsed}
|
||||||
theme={isDark ? 'dark' : 'light'}
|
theme={isDark ? 'dark' : 'light'}
|
||||||
mode="inline"
|
|
||||||
selectedKeys={[selectedKey]}
|
|
||||||
items={menuItems}
|
|
||||||
onClick={({ key }) => {
|
|
||||||
const item = allMenuItems.find((i) => i.key === key);
|
|
||||||
if (item?.externalUrl) {
|
|
||||||
window.open(item.externalUrl, '_blank', 'noopener,noreferrer');
|
|
||||||
} else {
|
|
||||||
navigate(key);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
style={isDark ? { flex: 1 } : { background: 'transparent', flex: 1 }}
|
|
||||||
/>
|
|
||||||
|
|
||||||
{/* Bottom Section: User + Theme Toggle */}
|
|
||||||
<div
|
|
||||||
style={{
|
style={{
|
||||||
position: 'absolute',
|
overflow: 'hidden',
|
||||||
bottom: 0,
|
height: '100vh',
|
||||||
|
position: 'fixed',
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
top: 0,
|
||||||
borderTop: `1px solid ${isDark ? 'rgba(255,255,255,0.08)' : '#e2e4ea'}`,
|
bottom: 0,
|
||||||
padding: collapsed ? '12px 0' : '12px 16px',
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
gap: 4,
|
...siderStyle,
|
||||||
transition: 'padding 0.2s',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Theme Toggle */}
|
{renderSidebarContent(collapsed)}
|
||||||
<Tooltip title={isDark ? 'Light Mode' : 'Dark Mode'} placement="right">
|
</Sider>
|
||||||
<button
|
)}
|
||||||
onClick={toggleTheme}
|
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
gap: 10,
|
|
||||||
padding: collapsed ? '8px 0' : '8px 12px',
|
|
||||||
borderRadius: 6,
|
|
||||||
cursor: 'pointer',
|
|
||||||
color: subtleColor,
|
|
||||||
justifyContent: collapsed ? 'center' : 'flex-start',
|
|
||||||
border: 'none',
|
|
||||||
background: 'transparent',
|
|
||||||
width: '100%',
|
|
||||||
transition: 'background 0.2s',
|
|
||||||
}}
|
|
||||||
onMouseEnter={(e) => (e.currentTarget.style.background = isDark ? 'rgba(255,255,255,0.08)' : '#eef1f8')}
|
|
||||||
onMouseLeave={(e) => (e.currentTarget.style.background = 'transparent')}
|
|
||||||
>
|
|
||||||
{isDark ? <SunOutlined style={{ fontSize: 16 }} /> : <MoonOutlined style={{ fontSize: 16 }} />}
|
|
||||||
{!collapsed && <Text style={{ color: subtleColor, fontSize: 13 }}>{isDark ? 'Light Mode' : 'Dark Mode'}</Text>}
|
|
||||||
</button>
|
|
||||||
</Tooltip>
|
|
||||||
|
|
||||||
{/* User Menu */}
|
<Layout
|
||||||
<Dropdown
|
style={{
|
||||||
menu={{
|
marginLeft: isMobile ? 0 : collapsed ? 80 : 240,
|
||||||
items: [
|
marginTop: isMobile ? 48 : 0,
|
||||||
{
|
transition: 'margin-left 0.2s',
|
||||||
key: 'user-settings',
|
}}
|
||||||
icon: <SettingOutlined />,
|
>
|
||||||
label: 'Benutzereinstellungen',
|
<Content
|
||||||
onClick: () => navigate('/user-settings'),
|
style={{
|
||||||
},
|
margin: isMobile ? 8 : 24,
|
||||||
{
|
padding: isMobile ? 12 : 24,
|
||||||
key: 'logout',
|
background: themeToken.colorBgContainer,
|
||||||
icon: <LogoutOutlined />,
|
borderRadius: 8,
|
||||||
label: 'Abmelden',
|
}}
|
||||||
onClick: () => logout(),
|
>
|
||||||
},
|
|
||||||
],
|
|
||||||
}}
|
|
||||||
placement="topRight"
|
|
||||||
trigger={['click']}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
gap: 10,
|
|
||||||
padding: collapsed ? '8px 0' : '8px 12px',
|
|
||||||
borderRadius: 6,
|
|
||||||
cursor: 'pointer',
|
|
||||||
justifyContent: collapsed ? 'center' : 'flex-start',
|
|
||||||
transition: 'all 0.2s',
|
|
||||||
}}
|
|
||||||
onMouseEnter={(e) => (e.currentTarget.style.background = isDark ? 'rgba(255,255,255,0.08)' : '#eef1f8')}
|
|
||||||
onMouseLeave={(e) => (e.currentTarget.style.background = 'transparent')}
|
|
||||||
>
|
|
||||||
<Avatar size="small" icon={<UserOutlined />} />
|
|
||||||
{!collapsed && (
|
|
||||||
<Text ellipsis style={{ color: subtleColor, fontSize: 13, maxWidth: 120 }}>
|
|
||||||
{user?.profile?.name || 'Benutzer'}
|
|
||||||
</Text>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</Dropdown>
|
|
||||||
</div>
|
|
||||||
</Sider>
|
|
||||||
|
|
||||||
<Layout style={{ marginLeft: collapsed ? 80 : 240, transition: 'margin-left 0.2s' }}>
|
|
||||||
<Content style={{ margin: 24, padding: 24, background: themeToken.colorBgContainer, borderRadius: 8 }}>
|
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</Content>
|
</Content>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
@@ -7,11 +7,14 @@ import type { ColumnsType } from 'antd/es/table';
|
|||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { freigabeApi, type FreigabeDocument, type FreigabeOption } from '../api/freigabe';
|
import { freigabeApi, type FreigabeDocument, type FreigabeOption } from '../api/freigabe';
|
||||||
import { paperlessApi, type PaperlessDocType, type PaperlessCorrespondent } from '../api/paperless';
|
import { paperlessApi, type PaperlessDocType, type PaperlessCorrespondent } from '../api/paperless';
|
||||||
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
|
import MobileCardList from '../components/MobileCardList';
|
||||||
|
|
||||||
const { Title } = Typography;
|
const { Title, Text } = Typography;
|
||||||
const FREIGABE_FIELD_ID = 15;
|
const FREIGABE_FIELD_ID = 15;
|
||||||
|
|
||||||
export default function FreigabePage() {
|
export default function FreigabePage() {
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const [data, setData] = useState<FreigabeDocument[]>([]);
|
const [data, setData] = useState<FreigabeDocument[]>([]);
|
||||||
const [total, setTotal] = useState(0);
|
const [total, setTotal] = useState(0);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
@@ -119,7 +122,7 @@ export default function FreigabePage() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Erstellt',
|
title: 'Erstellt',
|
||||||
dataIndex: 'created_date',
|
dataIndex: 'created',
|
||||||
key: 'created',
|
key: 'created',
|
||||||
width: 110,
|
width: 110,
|
||||||
render: (v: string) => v ? dayjs(v).format('DD.MM.YYYY') : '—',
|
render: (v: string) => v ? dayjs(v).format('DD.MM.YYYY') : '—',
|
||||||
@@ -153,44 +156,92 @@ export default function FreigabePage() {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const paginationConfig = {
|
||||||
|
current: page,
|
||||||
|
pageSize,
|
||||||
|
total,
|
||||||
|
showSizeChanger: true,
|
||||||
|
pageSizeOptions: ['25', '50', '100'],
|
||||||
|
onChange: (p: number, ps: number) => {
|
||||||
|
setPage(p);
|
||||||
|
setPageSize(ps);
|
||||||
|
},
|
||||||
|
showTotal: (t: number) => `${t} Belege`,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Title level={4} style={{ marginTop: 0, marginBottom: 16 }}>Freigabe</Title>
|
<Title level={4} style={{ marginTop: 0, marginBottom: 16 }}>Freigabe</Title>
|
||||||
|
|
||||||
<Space style={{ marginBottom: 16 }}>
|
{isMobile ? (
|
||||||
<Radio.Group
|
<Select
|
||||||
|
style={{ width: '100%', marginBottom: 16 }}
|
||||||
value={nurNichtFreigegeben}
|
value={nurNichtFreigegeben}
|
||||||
onChange={(e) => {
|
onChange={(v) => {
|
||||||
setPage(1);
|
setPage(1);
|
||||||
setNurNichtFreigegeben(e.target.value);
|
setNurNichtFreigegeben(v);
|
||||||
}}
|
}}
|
||||||
optionType="button"
|
options={[
|
||||||
buttonStyle="solid"
|
{ value: true, label: 'Nicht freigegeben' },
|
||||||
>
|
{ value: false, label: 'Alle' },
|
||||||
<Radio.Button value={true}>Nicht freigegeben</Radio.Button>
|
]}
|
||||||
<Radio.Button value={false}>Alle</Radio.Button>
|
/>
|
||||||
</Radio.Group>
|
) : (
|
||||||
</Space>
|
<Space style={{ marginBottom: 16 }}>
|
||||||
|
<Radio.Group
|
||||||
|
value={nurNichtFreigegeben}
|
||||||
|
onChange={(e) => {
|
||||||
|
setPage(1);
|
||||||
|
setNurNichtFreigegeben(e.target.value);
|
||||||
|
}}
|
||||||
|
optionType="button"
|
||||||
|
buttonStyle="solid"
|
||||||
|
>
|
||||||
|
<Radio.Button value={true}>Nicht freigegeben</Radio.Button>
|
||||||
|
<Radio.Button value={false}>Alle</Radio.Button>
|
||||||
|
</Radio.Group>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
|
||||||
<Table<FreigabeDocument>
|
{isMobile ? (
|
||||||
dataSource={data}
|
<MobileCardList<FreigabeDocument>
|
||||||
columns={columns}
|
dataSource={data}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
size="small"
|
pagination={paginationConfig}
|
||||||
pagination={{
|
emptyText="Keine Belege vorhanden"
|
||||||
current: page,
|
renderCard={(doc) => (
|
||||||
pageSize,
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
|
||||||
total,
|
<Text strong>{doc.title || '—'}</Text>
|
||||||
showSizeChanger: true,
|
<Text type="secondary" style={{ fontSize: 13 }}>Dokumenttyp: {getDocTypeName(doc.document_type)}</Text>
|
||||||
pageSizeOptions: ['25', '50', '100'],
|
<Text type="secondary" style={{ fontSize: 13 }}>Absender: {getCorrespondentName(doc.correspondent)}</Text>
|
||||||
onChange: (p, ps) => {
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||||
setPage(p);
|
<Text type="secondary" style={{ fontSize: 13 }}>
|
||||||
setPageSize(ps);
|
Erstellt: {doc.created ? dayjs(doc.created).format('DD.MM.YYYY') : '—'}
|
||||||
},
|
</Text>
|
||||||
showTotal: (t) => `${t} Belege`,
|
{getFreigabeValue(doc)}
|
||||||
}}
|
</div>
|
||||||
/>
|
<Button
|
||||||
|
icon={<CheckCircleOutlined />}
|
||||||
|
type="primary"
|
||||||
|
block
|
||||||
|
onClick={() => openModal(doc)}
|
||||||
|
>
|
||||||
|
Freigabe setzen
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Table<FreigabeDocument>
|
||||||
|
dataSource={data}
|
||||||
|
columns={columns}
|
||||||
|
rowKey="id"
|
||||||
|
loading={loading}
|
||||||
|
size="small"
|
||||||
|
pagination={paginationConfig}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title="Freigabe setzen"
|
title="Freigabe setzen"
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import {
|
|||||||
import { inboxApi, type InboxBarcode, type InboxFile, type PostprocessActionResult } from '../api/inbox';
|
import { inboxApi, type InboxBarcode, type InboxFile, type PostprocessActionResult } from '../api/inbox';
|
||||||
import { paperlessApi } from '../api/paperless';
|
import { paperlessApi } from '../api/paperless';
|
||||||
import { userSettingsApi, type SenderOption } from '../api/userSettings';
|
import { userSettingsApi, type SenderOption } from '../api/userSettings';
|
||||||
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
|
|
||||||
const ZOOM_MIN = 0.5;
|
const ZOOM_MIN = 0.5;
|
||||||
const ZOOM_MAX = 3;
|
const ZOOM_MAX = 3;
|
||||||
@@ -113,6 +114,7 @@ function CompareModal({
|
|||||||
onCreateNewVersion,
|
onCreateNewVersion,
|
||||||
onSkip,
|
onSkip,
|
||||||
}: CompareModalProps) {
|
}: CompareModalProps) {
|
||||||
|
const compareIsMobile = useIsMobile();
|
||||||
const [paperlessUrl, setPaperlessUrl] = useState<string | null>(null);
|
const [paperlessUrl, setPaperlessUrl] = useState<string | null>(null);
|
||||||
const [inboxUrl, setInboxUrl] = useState<string | null>(null);
|
const [inboxUrl, setInboxUrl] = useState<string | null>(null);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
@@ -165,8 +167,8 @@ function CompareModal({
|
|||||||
</Button>,
|
</Button>,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<div style={{ display: 'flex', gap: 12, height: '75vh' }}>
|
<div style={{ display: 'flex', flexDirection: compareIsMobile ? 'column' : 'row', gap: 12, height: '75vh' }}>
|
||||||
<div style={{ flex: 1, display: 'flex', flexDirection: 'column', minWidth: 0 }}>
|
<div style={{ flex: 1, display: 'flex', flexDirection: 'column', minWidth: 0, minHeight: 0 }}>
|
||||||
<Typography.Text strong style={{ marginBottom: 4 }}>
|
<Typography.Text strong style={{ marginBottom: 4 }}>
|
||||||
Original (Paperless)
|
Original (Paperless)
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
@@ -180,7 +182,7 @@ function CompareModal({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ flex: 1, display: 'flex', flexDirection: 'column', minWidth: 0 }}>
|
<div style={{ flex: 1, display: 'flex', flexDirection: 'column', minWidth: 0, minHeight: 0 }}>
|
||||||
<Typography.Text strong style={{ marginBottom: 4 }}>
|
<Typography.Text strong style={{ marginBottom: 4 }}>
|
||||||
Aktueller Abschnitt (Inbox)
|
Aktueller Abschnitt (Inbox)
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
@@ -858,6 +860,7 @@ function SendEmailDialog({ open, fileId, fileName, documents, thumbUrls, onClose
|
|||||||
export default function InboxDetailPage() {
|
export default function InboxDetailPage() {
|
||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const [file, setFile] = useState<InboxFile | null>(null);
|
const [file, setFile] = useState<InboxFile | null>(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [thumbUrls, setThumbUrls] = useState<Map<number, string>>(new Map());
|
const [thumbUrls, setThumbUrls] = useState<Map<number, string>>(new Map());
|
||||||
@@ -1211,13 +1214,13 @@ export default function InboxDetailPage() {
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ display: 'flex', flexDirection: 'column', height: 'calc(100vh - 120px)' }}>
|
<div style={{ display: 'flex', flexDirection: 'column', height: isMobile ? 'calc(100dvh - 180px)' : 'calc(100vh - 120px)' }}>
|
||||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 12, gap: 12 }}>
|
<div style={{ display: 'flex', alignItems: 'center', flexWrap: 'wrap', rowGap: 8, marginBottom: 12, gap: 12 }}>
|
||||||
<Space>
|
<Space wrap>
|
||||||
<Button icon={<ArrowLeftOutlined />} onClick={() => navigate('/inbox')}>
|
<Button icon={<ArrowLeftOutlined />} onClick={() => navigate('/inbox')}>
|
||||||
Zurück
|
Zurück
|
||||||
</Button>
|
</Button>
|
||||||
<Title level={3} style={{ margin: 0 }}>
|
<Title level={isMobile ? 5 : 3} style={{ margin: 0, maxWidth: isMobile ? 180 : undefined }} ellipsis={{ tooltip: file.name }}>
|
||||||
{file.name}
|
{file.name}
|
||||||
</Title>
|
</Title>
|
||||||
<SourceTag source={file.source} />
|
<SourceTag source={file.source} />
|
||||||
@@ -1399,12 +1402,13 @@ export default function InboxDetailPage() {
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: 140,
|
width: isMobile ? 84 : 140,
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
padding: 6,
|
padding: 6,
|
||||||
background: '#fafafa',
|
background: '#fafafa',
|
||||||
border: '1px solid #f0f0f0',
|
border: '1px solid #f0f0f0',
|
||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
|
flexShrink: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{sidebarPages.map((n, idx) => {
|
{sidebarPages.map((n, idx) => {
|
||||||
@@ -1428,7 +1432,7 @@ export default function InboxDetailPage() {
|
|||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: 170,
|
height: isMobile ? 100 : 170,
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
@@ -1439,7 +1443,7 @@ export default function InboxDetailPage() {
|
|||||||
<img
|
<img
|
||||||
src={url}
|
src={url}
|
||||||
alt={`Seite ${docPage}`}
|
alt={`Seite ${docPage}`}
|
||||||
style={thumbImageStyle(rotationFor(n), 130)}
|
style={thumbImageStyle(rotationFor(n), isMobile ? 72 : 130)}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Spin size="small" />
|
<Spin size="small" />
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ import { inboxApi, type InboxBarcode, type InboxFile } from '../api/inbox';
|
|||||||
import { barcodeTemplatesApi, type BarcodeTemplate } from '../api/barcode-templates';
|
import { barcodeTemplatesApi, type BarcodeTemplate } from '../api/barcode-templates';
|
||||||
import { labelPrintAgentApi } from '../api/labelPrintAgent';
|
import { labelPrintAgentApi } from '../api/labelPrintAgent';
|
||||||
import { userSettingsApi } from '../api/userSettings';
|
import { userSettingsApi } from '../api/userSettings';
|
||||||
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
|
import MobileCardList from '../components/MobileCardList';
|
||||||
|
|
||||||
const { Title } = Typography;
|
const { Title } = Typography;
|
||||||
|
|
||||||
@@ -51,6 +53,18 @@ function formatDate(iso: string): string {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renderSourceTag(src: InboxFile['source']): ReactNode {
|
||||||
|
return src === 'user' ? (
|
||||||
|
<Tag icon={<UserOutlined />} color="purple">
|
||||||
|
Persönlich
|
||||||
|
</Tag>
|
||||||
|
) : (
|
||||||
|
<Tag icon={<FolderOpenOutlined />} color="blue">
|
||||||
|
Gemeinsam
|
||||||
|
</Tag>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function renderBarcodes(barcodes: InboxBarcode[]): ReactNode {
|
function renderBarcodes(barcodes: InboxBarcode[]): ReactNode {
|
||||||
if (!barcodes || barcodes.length === 0) {
|
if (!barcodes || barcodes.length === 0) {
|
||||||
return <Typography.Text type="secondary">—</Typography.Text>;
|
return <Typography.Text type="secondary">—</Typography.Text>;
|
||||||
@@ -137,6 +151,7 @@ function buildInitialFieldValues(template: BarcodeTemplate | null): Record<strin
|
|||||||
|
|
||||||
export default function InboxPage() {
|
export default function InboxPage() {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const [files, setFiles] = useState<InboxFile[]>([]);
|
const [files, setFiles] = useState<InboxFile[]>([]);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [search, setSearch] = useState('');
|
const [search, setSearch] = useState('');
|
||||||
@@ -261,6 +276,50 @@ export default function InboxPage() {
|
|||||||
search ? f.name.toLowerCase().includes(search.toLowerCase()) : true,
|
search ? f.name.toLowerCase().includes(search.toLowerCase()) : true,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Karten-Ansicht sortiert wie die Tabelle (neueste zuerst)
|
||||||
|
const sortedForMobile = [...filtered].sort((a, b) => b.createdAt.localeCompare(a.createdAt));
|
||||||
|
|
||||||
|
const renderActions = (record: InboxFile, direction: 'column' | 'row' = 'column') => (
|
||||||
|
<div style={{ display: 'flex', flexDirection: direction, alignItems: 'flex-start', flexWrap: 'wrap' }}>
|
||||||
|
<Tooltip title="Vorschau öffnen">
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
icon={<EyeOutlined />}
|
||||||
|
onClick={() => navigate(`/inbox/${encodeURIComponent(record.id)}`)}
|
||||||
|
>
|
||||||
|
Weiterverarbeiten
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
|
<Popconfirm
|
||||||
|
title="Dokument löschen?"
|
||||||
|
description="Datei und Datenbank-Eintrag werden dauerhaft entfernt."
|
||||||
|
okText="Löschen"
|
||||||
|
cancelText="Abbrechen"
|
||||||
|
okButtonProps={{ danger: true }}
|
||||||
|
onConfirm={() => handleDelete(record.id)}
|
||||||
|
>
|
||||||
|
<Button type="link" danger icon={<DeleteOutlined />}>
|
||||||
|
Löschen
|
||||||
|
</Button>
|
||||||
|
</Popconfirm>
|
||||||
|
<Tooltip
|
||||||
|
title={
|
||||||
|
record.source === 'all'
|
||||||
|
? 'In meinen persönlichen Scan-Ordner verschieben'
|
||||||
|
: 'In den gemeinsamen Ordner (Öffentlich) verschieben'
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
icon={record.source === 'all' ? <UserOutlined /> : <TeamOutlined />}
|
||||||
|
onClick={() => handleUpdateSource(record.id, record.source)}
|
||||||
|
>
|
||||||
|
{record.source === 'all' ? 'Zu Persönlich' : 'Zu Öffentlich'}
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
const columns: ColumnsType<InboxFile> = [
|
const columns: ColumnsType<InboxFile> = [
|
||||||
{
|
{
|
||||||
title: 'Dateiname',
|
title: 'Dateiname',
|
||||||
@@ -283,16 +342,7 @@ export default function InboxPage() {
|
|||||||
{ text: 'Persönlich', value: 'user' },
|
{ text: 'Persönlich', value: 'user' },
|
||||||
],
|
],
|
||||||
onFilter: (value, record) => record.source === value,
|
onFilter: (value, record) => record.source === value,
|
||||||
render: (src: InboxFile['source']) =>
|
render: (src: InboxFile['source']) => renderSourceTag(src),
|
||||||
src === 'user' ? (
|
|
||||||
<Tag icon={<UserOutlined />} color="purple">
|
|
||||||
Persönlich
|
|
||||||
</Tag>
|
|
||||||
) : (
|
|
||||||
<Tag icon={<FolderOpenOutlined />} color="blue">
|
|
||||||
Gemeinsam
|
|
||||||
</Tag>
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'QR-Code / Vorlage',
|
title: 'QR-Code / Vorlage',
|
||||||
@@ -321,46 +371,7 @@ export default function InboxPage() {
|
|||||||
title: 'Aktionen',
|
title: 'Aktionen',
|
||||||
key: 'actions',
|
key: 'actions',
|
||||||
width: 140,
|
width: 140,
|
||||||
render: (_, record) => (
|
render: (_, record) => renderActions(record),
|
||||||
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'flex-start' }}>
|
|
||||||
<Tooltip title="Vorschau öffnen">
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
icon={<EyeOutlined />}
|
|
||||||
onClick={() => navigate(`/inbox/${encodeURIComponent(record.id)}`)}
|
|
||||||
>
|
|
||||||
Weiterverarbeiten
|
|
||||||
</Button>
|
|
||||||
</Tooltip>
|
|
||||||
<Popconfirm
|
|
||||||
title="Dokument löschen?"
|
|
||||||
description="Datei und Datenbank-Eintrag werden dauerhaft entfernt."
|
|
||||||
okText="Löschen"
|
|
||||||
cancelText="Abbrechen"
|
|
||||||
okButtonProps={{ danger: true }}
|
|
||||||
onConfirm={() => handleDelete(record.id)}
|
|
||||||
>
|
|
||||||
<Button type="link" danger icon={<DeleteOutlined />}>
|
|
||||||
Löschen
|
|
||||||
</Button>
|
|
||||||
</Popconfirm>
|
|
||||||
<Tooltip
|
|
||||||
title={
|
|
||||||
record.source === 'all'
|
|
||||||
? 'In meinen persönlichen Scan-Ordner verschieben'
|
|
||||||
: 'In den gemeinsamen Ordner (Öffentlich) verschieben'
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
icon={record.source === 'all' ? <UserOutlined /> : <TeamOutlined />}
|
|
||||||
onClick={() => handleUpdateSource(record.id, record.source)}
|
|
||||||
>
|
|
||||||
{record.source === 'all' ? 'Zu Persönlich' : 'Zu Öffentlich'}
|
|
||||||
</Button>
|
|
||||||
</Tooltip>
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -371,6 +382,8 @@ export default function InboxPage() {
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
gap: 12,
|
||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -383,11 +396,11 @@ export default function InboxPage() {
|
|||||||
Scan-Ordner.
|
Scan-Ordner.
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
</div>
|
</div>
|
||||||
<Space>
|
<Space wrap>
|
||||||
<Input
|
<Input
|
||||||
prefix={<SearchOutlined />}
|
prefix={<SearchOutlined />}
|
||||||
placeholder="Suchen …"
|
placeholder="Suchen …"
|
||||||
style={{ width: 260 }}
|
style={{ width: isMobile ? '100%' : 260 }}
|
||||||
value={search}
|
value={search}
|
||||||
onChange={(e) => setSearch(e.target.value)}
|
onChange={(e) => setSearch(e.target.value)}
|
||||||
allowClear
|
allowClear
|
||||||
@@ -478,20 +491,48 @@ export default function InboxPage() {
|
|||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<Card>
|
{isMobile ? (
|
||||||
<Table<InboxFile>
|
<MobileCardList<InboxFile>
|
||||||
|
dataSource={sortedForMobile}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
columns={columns}
|
|
||||||
dataSource={filtered}
|
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
pageSize: 25,
|
pageSize: 25,
|
||||||
showSizeChanger: true,
|
|
||||||
showTotal: (t) => `${t} Dateien`,
|
showTotal: (t) => `${t} Dateien`,
|
||||||
}}
|
}}
|
||||||
locale={{ emptyText: 'Keine Dateien vorhanden' }}
|
emptyText="Keine Dateien vorhanden"
|
||||||
|
renderCard={(record) => (
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
|
||||||
|
<DocumentPreviewPopover record={record}>
|
||||||
|
<Typography.Text strong>{record.name}</Typography.Text>
|
||||||
|
</DocumentPreviewPopover>
|
||||||
|
<div style={{ display: 'flex', gap: 8, flexWrap: 'wrap', alignItems: 'center' }}>
|
||||||
|
{renderSourceTag(record.source)}
|
||||||
|
<Typography.Text type="secondary" style={{ fontSize: 13 }}>
|
||||||
|
{record.pageCount > 0 ? `${record.pageCount} Seiten` : '—'} · {formatDate(record.createdAt)}
|
||||||
|
</Typography.Text>
|
||||||
|
</div>
|
||||||
|
{renderBarcodes(record.barcodes)}
|
||||||
|
{renderActions(record, 'row')}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
</Card>
|
) : (
|
||||||
|
<Card>
|
||||||
|
<Table<InboxFile>
|
||||||
|
rowKey="id"
|
||||||
|
columns={columns}
|
||||||
|
dataSource={filtered}
|
||||||
|
loading={loading}
|
||||||
|
pagination={{
|
||||||
|
pageSize: 25,
|
||||||
|
showSizeChanger: true,
|
||||||
|
showTotal: (t) => `${t} Dateien`,
|
||||||
|
}}
|
||||||
|
locale={{ emptyText: 'Keine Dateien vorhanden' }}
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,14 @@ import { emailsApi, type EmailItem, type EmailAttachment } from '../api/emails';
|
|||||||
import { emailImportApi } from '../api/email-import';
|
import { emailImportApi } from '../api/email-import';
|
||||||
import { getEnv } from '../utils/env';
|
import { getEnv } from '../utils/env';
|
||||||
import MailImportWizard from '../components/MailImportWizard';
|
import MailImportWizard from '../components/MailImportWizard';
|
||||||
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
|
|
||||||
const { Title, Text } = Typography;
|
const { Title, Text } = Typography;
|
||||||
|
|
||||||
export default function MailDetailPage() {
|
export default function MailDetailPage() {
|
||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const [email, setEmail] = useState<EmailItem | null>(null);
|
const [email, setEmail] = useState<EmailItem | null>(null);
|
||||||
const [attachments, setAttachments] = useState<EmailAttachment[]>([]);
|
const [attachments, setAttachments] = useState<EmailAttachment[]>([]);
|
||||||
const [selected, setSelected] = useState<EmailAttachment | null>(null);
|
const [selected, setSelected] = useState<EmailAttachment | null>(null);
|
||||||
@@ -136,16 +138,16 @@ export default function MailDetailPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', flexWrap: 'wrap', gap: 8, marginBottom: 16 }}>
|
||||||
<Space>
|
<Space wrap>
|
||||||
<Button icon={<ArrowLeftOutlined />} onClick={() => navigate('/mailpostfach')}>
|
<Button icon={<ArrowLeftOutlined />} onClick={() => navigate('/mailpostfach')}>
|
||||||
Zurück
|
Zurück
|
||||||
</Button>
|
</Button>
|
||||||
<Title level={3} style={{ margin: 0 }}>{email.Subject}</Title>
|
<Title level={isMobile ? 5 : 3} style={{ margin: 0 }}>{email.Subject}</Title>
|
||||||
{hasErechnung && <Tag color="green">eRechnung</Tag>}
|
{hasErechnung && <Tag color="green">eRechnung</Tag>}
|
||||||
</Space>
|
</Space>
|
||||||
|
|
||||||
<Space>
|
<Space wrap>
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title="E-Mail ignorieren"
|
title="E-Mail ignorieren"
|
||||||
description="Möchten Sie diese E-Mail wirklich als ignoriert markieren?"
|
description="Möchten Sie diese E-Mail wirklich als ignoriert markieren?"
|
||||||
@@ -183,12 +185,26 @@ export default function MailDetailPage() {
|
|||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ display: 'grid', gridTemplateColumns: '2fr 3fr', gap: 16, height: 'calc(100vh - 140px)' }}>
|
<div
|
||||||
|
style={{
|
||||||
|
display: 'grid',
|
||||||
|
gridTemplateColumns: isMobile ? '1fr' : '2fr 3fr',
|
||||||
|
gap: 16,
|
||||||
|
height: isMobile ? 'auto' : 'calc(100vh - 140px)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
{/* Linke Seite: E-Mail-Inhalt */}
|
{/* Linke Seite: E-Mail-Inhalt */}
|
||||||
<Card
|
<Card
|
||||||
title="E-Mail"
|
title="E-Mail"
|
||||||
size="small"
|
size="small"
|
||||||
styles={{ body: { overflow: 'auto', height: 'calc(100vh - 200px)', display: 'flex', flexDirection: 'column' } }}
|
styles={{
|
||||||
|
body: {
|
||||||
|
overflow: 'auto',
|
||||||
|
height: isMobile ? 'auto' : 'calc(100vh - 200px)',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
},
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div style={{ marginBottom: 12 }}>
|
<div style={{ marginBottom: 12 }}>
|
||||||
<div><Text type="secondary">Von:</Text> <Text>{email.SenderAddress}</Text></div>
|
<div><Text type="secondary">Von:</Text> <Text>{email.SenderAddress}</Text></div>
|
||||||
@@ -208,7 +224,17 @@ export default function MailDetailPage() {
|
|||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{/* Rechte Seite: Anhänge + Vorschau */}
|
{/* Rechte Seite: Anhänge + Vorschau */}
|
||||||
<Card size="small" styles={{ body: { padding: 0, display: 'flex', flexDirection: 'column', height: 'calc(100vh - 200px)' } }}>
|
<Card
|
||||||
|
size="small"
|
||||||
|
styles={{
|
||||||
|
body: {
|
||||||
|
padding: 0,
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
height: isMobile ? 'auto' : 'calc(100vh - 200px)',
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
<div style={{ flex: '0 0 auto', borderBottom: `1px solid ${token.colorBorder}`, maxHeight: 240, overflow: 'auto' }}>
|
<div style={{ flex: '0 0 auto', borderBottom: `1px solid ${token.colorBorder}`, maxHeight: 240, overflow: 'auto' }}>
|
||||||
<Table<EmailAttachment>
|
<Table<EmailAttachment>
|
||||||
columns={columns}
|
columns={columns}
|
||||||
@@ -224,7 +250,7 @@ export default function MailDetailPage() {
|
|||||||
locale={{ emptyText: <Empty description="Keine Anhänge" image={Empty.PRESENTED_IMAGE_SIMPLE} /> }}
|
locale={{ emptyText: <Empty description="Keine Anhänge" image={Empty.PRESENTED_IMAGE_SIMPLE} /> }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ flex: 1, minHeight: 0, background: token.colorBgLayout }}>
|
<div style={isMobile ? { height: '60vh', background: token.colorBgLayout } : { flex: 1, minHeight: 0, background: token.colorBgLayout }}>
|
||||||
{previewLoading ? (
|
{previewLoading ? (
|
||||||
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100%' }}>
|
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100%' }}>
|
||||||
<Spin />
|
<Spin />
|
||||||
|
|||||||
@@ -7,11 +7,22 @@ import dayjs from 'dayjs';
|
|||||||
import { emailsApi, type EmailItem } from '../api/emails';
|
import { emailsApi, type EmailItem } from '../api/emails';
|
||||||
import { useAuth } from '../auth/AuthContext';
|
import { useAuth } from '../auth/AuthContext';
|
||||||
import { Permission } from '../auth/permissions';
|
import { Permission } from '../auth/permissions';
|
||||||
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
|
import MobileCardList from '../components/MobileCardList';
|
||||||
|
|
||||||
const { Title } = Typography;
|
const { Title, Text } = Typography;
|
||||||
|
|
||||||
|
function renderStatusTag(s: number) {
|
||||||
|
if (s === 0) return <Tag color="blue">Neu</Tag>;
|
||||||
|
if (s === 1) return <Tag color="green">Verarbeitet</Tag>;
|
||||||
|
if (s === 2) return <Tag color="red">Fehler</Tag>;
|
||||||
|
if (s === 3) return <Tag color="default">Ignoriert</Tag>;
|
||||||
|
return <Tag>{s}</Tag>;
|
||||||
|
}
|
||||||
|
|
||||||
export default function MailpostfachPage() {
|
export default function MailpostfachPage() {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const [emails, setEmails] = useState<EmailItem[]>([]);
|
const [emails, setEmails] = useState<EmailItem[]>([]);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [fetching, setFetching] = useState(false);
|
const [fetching, setFetching] = useState(false);
|
||||||
@@ -84,13 +95,7 @@ export default function MailpostfachPage() {
|
|||||||
dataIndex: 'Status',
|
dataIndex: 'Status',
|
||||||
key: 'Status',
|
key: 'Status',
|
||||||
width: 110,
|
width: 110,
|
||||||
render: (s: number) => {
|
render: renderStatusTag,
|
||||||
if (s === 0) return <Tag color="blue">Neu</Tag>;
|
|
||||||
if (s === 1) return <Tag color="green">Verarbeitet</Tag>;
|
|
||||||
if (s === 2) return <Tag color="red">Fehler</Tag>;
|
|
||||||
if (s === 3) return <Tag color="default">Ignoriert</Tag>;
|
|
||||||
return <Tag>{s}</Tag>;
|
|
||||||
},
|
|
||||||
filters: [
|
filters: [
|
||||||
{ text: 'Neu', value: 0 },
|
{ text: 'Neu', value: 0 },
|
||||||
{ text: 'Verarbeitet', value: 1 },
|
{ text: 'Verarbeitet', value: 1 },
|
||||||
@@ -116,9 +121,9 @@ export default function MailpostfachPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', flexWrap: 'wrap', gap: 12, marginBottom: 16 }}>
|
||||||
<Title level={3} style={{ margin: 0 }}>Mailpostfach</Title>
|
<Title level={3} style={{ margin: 0 }}>Mailpostfach</Title>
|
||||||
<Space>
|
<Space wrap>
|
||||||
<Button
|
<Button
|
||||||
icon={<DownloadOutlined />}
|
icon={<DownloadOutlined />}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
@@ -198,13 +203,13 @@ export default function MailpostfachPage() {
|
|||||||
prefix={<SearchOutlined />}
|
prefix={<SearchOutlined />}
|
||||||
value={searchText}
|
value={searchText}
|
||||||
onChange={(e) => setSearchText(e.target.value)}
|
onChange={(e) => setSearchText(e.target.value)}
|
||||||
style={{ width: 300 }}
|
style={{ width: isMobile ? '100%' : 300 }}
|
||||||
allowClear
|
allowClear
|
||||||
/>
|
/>
|
||||||
<Select
|
<Select
|
||||||
value={statusFilter}
|
value={statusFilter}
|
||||||
onChange={setStatusFilter}
|
onChange={setStatusFilter}
|
||||||
style={{ width: 200 }}
|
style={{ width: isMobile ? '100%' : 200 }}
|
||||||
options={[
|
options={[
|
||||||
{ value: 'all', label: 'Alle Status' },
|
{ value: 'all', label: 'Alle Status' },
|
||||||
{ value: 0, label: 'Neu' },
|
{ value: 0, label: 'Neu' },
|
||||||
@@ -214,18 +219,48 @@ export default function MailpostfachPage() {
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Table<EmailItem>
|
{isMobile ? (
|
||||||
columns={columns}
|
<MobileCardList<EmailItem>
|
||||||
dataSource={filteredEmails}
|
dataSource={[...filteredEmails].sort(
|
||||||
loading={loading}
|
(a, b) => new Date(b.Date).getTime() - new Date(a.Date).getTime(),
|
||||||
rowKey="Id"
|
)}
|
||||||
pagination={{ pageSize: 20, showSizeChanger: true, showTotal: (t) => `${t} E-Mails` }}
|
rowKey="Id"
|
||||||
locale={{ emptyText: 'Keine Einträge vorhanden' }}
|
loading={loading}
|
||||||
onRow={(record) => ({
|
pagination={{ pageSize: 20, showTotal: (t) => `${t} E-Mails` }}
|
||||||
onClick: () => navigate(`/mailpostfach/${record.Id}`),
|
onCardClick={(record) => navigate(`/mailpostfach/${record.Id}`)}
|
||||||
style: { cursor: 'pointer' },
|
renderCard={(record) => {
|
||||||
})}
|
const hasErechnung = record.Attachments?.some((a) => a.Erechnung);
|
||||||
/>
|
return (
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
|
||||||
|
<div style={{ display: 'flex', gap: 8, alignItems: 'baseline', flexWrap: 'wrap' }}>
|
||||||
|
<Text strong>{record.Subject || '—'}</Text>
|
||||||
|
{hasErechnung && <Tag color="green">eRechnung</Tag>}
|
||||||
|
</div>
|
||||||
|
<Text type="secondary" style={{ fontSize: 13 }}>{record.SenderAddress}</Text>
|
||||||
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||||
|
<Text type="secondary" style={{ fontSize: 13 }}>
|
||||||
|
{record.Date ? dayjs(record.Date).format('DD.MM.YYYY HH:mm') : '-'}
|
||||||
|
</Text>
|
||||||
|
{renderStatusTag(record.Status)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Table<EmailItem>
|
||||||
|
columns={columns}
|
||||||
|
dataSource={filteredEmails}
|
||||||
|
loading={loading}
|
||||||
|
rowKey="Id"
|
||||||
|
pagination={{ pageSize: 20, showSizeChanger: true, showTotal: (t) => `${t} E-Mails` }}
|
||||||
|
locale={{ emptyText: 'Keine Einträge vorhanden' }}
|
||||||
|
onRow={(record) => ({
|
||||||
|
onClick: () => navigate(`/mailpostfach/${record.Id}`),
|
||||||
|
style: { cursor: 'pointer' },
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { Table, Popover, Button, Space, message, Tooltip, Typography, Tag } from 'antd';
|
import { Table, Popover, Button, Space, message, Tooltip, Typography, Tag } from 'antd';
|
||||||
|
|
||||||
const { Title } = Typography;
|
const { Title, Text } = Typography;
|
||||||
import { ReloadOutlined } from '@ant-design/icons';
|
import { ReloadOutlined } from '@ant-design/icons';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { posteingangApi } from '../api/posteingang';
|
import { posteingangApi } from '../api/posteingang';
|
||||||
@@ -11,8 +11,11 @@ import type { PaperlessTag } from '../api/paperless';
|
|||||||
import DocumentEditModal from '../components/DocumentEditModal';
|
import DocumentEditModal from '../components/DocumentEditModal';
|
||||||
import { getEnv } from '../utils/env';
|
import { getEnv } from '../utils/env';
|
||||||
import { AuthImage } from '../utils/auth-resource';
|
import { AuthImage } from '../utils/auth-resource';
|
||||||
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
|
import MobileCardList from '../components/MobileCardList';
|
||||||
|
|
||||||
export default function ManuellBearbeitenPage() {
|
export default function ManuellBearbeitenPage() {
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const [data, setData] = useState<PosteingangDocument[]>([]);
|
const [data, setData] = useState<PosteingangDocument[]>([]);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [editModalOpen, setEditModalOpen] = useState(false);
|
const [editModalOpen, setEditModalOpen] = useState(false);
|
||||||
@@ -77,6 +80,26 @@ export default function ManuellBearbeitenPage() {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const getContentTags = (record: PosteingangDocument) =>
|
||||||
|
(record.tags || [])
|
||||||
|
.filter(id => !steuertagIds.includes(id))
|
||||||
|
.map(id => allTags.find(t => t.id === id))
|
||||||
|
.filter((t): t is PaperlessTag => !!t);
|
||||||
|
|
||||||
|
const renderContentTags = (record: PosteingangDocument) => {
|
||||||
|
const contentTags = getContentTags(record);
|
||||||
|
if (contentTags.length === 0) return null;
|
||||||
|
return (
|
||||||
|
<Space size={[4, 4]} wrap style={{ marginTop: 4 }}>
|
||||||
|
{contentTags.map(t => (
|
||||||
|
<Tag key={t.id} color={t.color} style={{ color: t.text_color, margin: 0 }}>
|
||||||
|
{t.name}
|
||||||
|
</Tag>
|
||||||
|
))}
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: 'Vorschau',
|
title: 'Vorschau',
|
||||||
@@ -97,26 +120,12 @@ export default function ManuellBearbeitenPage() {
|
|||||||
dataIndex: 'title',
|
dataIndex: 'title',
|
||||||
key: 'title',
|
key: 'title',
|
||||||
width: '35%',
|
width: '35%',
|
||||||
render: (_: any, record: PosteingangDocument) => {
|
render: (_: any, record: PosteingangDocument) => (
|
||||||
const contentTags = (record.tags || [])
|
<div>
|
||||||
.filter(id => !steuertagIds.includes(id))
|
<div>{record.title}</div>
|
||||||
.map(id => allTags.find(t => t.id === id))
|
{renderContentTags(record)}
|
||||||
.filter((t): t is PaperlessTag => !!t);
|
</div>
|
||||||
return (
|
),
|
||||||
<div>
|
|
||||||
<div>{record.title}</div>
|
|
||||||
{contentTags.length > 0 && (
|
|
||||||
<Space size={[4, 4]} wrap style={{ marginTop: 4 }}>
|
|
||||||
{contentTags.map(t => (
|
|
||||||
<Tag key={t.id} color={t.color} style={{ color: t.text_color, margin: 0 }}>
|
|
||||||
{t.name}
|
|
||||||
</Tag>
|
|
||||||
))}
|
|
||||||
</Space>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Eingangsdatum',
|
title: 'Eingangsdatum',
|
||||||
@@ -153,14 +162,47 @@ export default function ManuellBearbeitenPage() {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
<Table
|
{isMobile ? (
|
||||||
columns={columns}
|
<MobileCardList<PosteingangDocument>
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{ pageSize: 20, showSizeChanger: true, showTotal: (t) => `${t} Dokumente` }}
|
pagination={{ pageSize: 20, showTotal: (t) => `${t} Dokumente` }}
|
||||||
locale={{ emptyText: 'Keine Einträge vorhanden' }}
|
renderCard={(record) => (
|
||||||
/>
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||||||
|
<div style={{ display: 'flex', gap: 12 }}>
|
||||||
|
<AuthImage
|
||||||
|
src={`${getEnv('VITE_API_URL')}/api/paperless/inbox/preview/${record.id}`}
|
||||||
|
width={72}
|
||||||
|
style={{ border: '1px solid #d9d9d9', objectFit: 'contain', flexShrink: 0 }}
|
||||||
|
/>
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 4, minWidth: 0 }}>
|
||||||
|
<Text strong>{record.title || '—'}</Text>
|
||||||
|
{renderContentTags(record)}
|
||||||
|
<Text type="secondary" style={{ fontSize: 13 }}>
|
||||||
|
Eingangsdatum: {record.created ? dayjs(record.created).format('DD.MM.YYYY') : '-'}
|
||||||
|
</Text>
|
||||||
|
<Text type="secondary" style={{ fontSize: 13 }}>
|
||||||
|
Importiert am: {dayjs(record.added).format('DD.MM.YYYY HH:mm')}
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Button type="primary" block onClick={() => handleEdit(record)}>
|
||||||
|
Bearbeiten
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Table
|
||||||
|
columns={columns}
|
||||||
|
dataSource={data}
|
||||||
|
rowKey="id"
|
||||||
|
loading={loading}
|
||||||
|
pagination={{ pageSize: 20, showSizeChanger: true, showTotal: (t) => `${t} Dokumente` }}
|
||||||
|
locale={{ emptyText: 'Keine Einträge vorhanden' }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<DocumentEditModal
|
<DocumentEditModal
|
||||||
documentId={selectedDoc?.id || null}
|
documentId={selectedDoc?.id || null}
|
||||||
|
|||||||
@@ -3,14 +3,17 @@ import { Table, Popover, Button, Space, message, Tooltip, Typography } from 'ant
|
|||||||
import { AuthImage } from '../utils/auth-resource';
|
import { AuthImage } from '../utils/auth-resource';
|
||||||
import { ReloadOutlined } from '@ant-design/icons';
|
import { ReloadOutlined } from '@ant-design/icons';
|
||||||
|
|
||||||
const { Title } = Typography;
|
const { Title, Text } = Typography;
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { posteingangApi } from '../api/posteingang';
|
import { posteingangApi } from '../api/posteingang';
|
||||||
import type { PosteingangDocument } from '../api/posteingang';
|
import type { PosteingangDocument } from '../api/posteingang';
|
||||||
import DocumentEditModal from '../components/DocumentEditModal';
|
import DocumentEditModal from '../components/DocumentEditModal';
|
||||||
import { getEnv } from '../utils/env';
|
import { getEnv } from '../utils/env';
|
||||||
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
|
import MobileCardList from '../components/MobileCardList';
|
||||||
|
|
||||||
export default function PosteingangPage() {
|
export default function PosteingangPage() {
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const [data, setData] = useState<PosteingangDocument[]>([]);
|
const [data, setData] = useState<PosteingangDocument[]>([]);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [editModalOpen, setEditModalOpen] = useState(false);
|
const [editModalOpen, setEditModalOpen] = useState(false);
|
||||||
@@ -64,6 +67,11 @@ export default function PosteingangPage() {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const getEingangsdatum = (record: PosteingangDocument) => {
|
||||||
|
const cf = record.customFields?.find((f) => f.field === 9);
|
||||||
|
return cf?.value ? dayjs(cf.value).format('DD.MM.YYYY') : '-';
|
||||||
|
};
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: 'Vorschau',
|
title: 'Vorschau',
|
||||||
@@ -88,10 +96,7 @@ export default function PosteingangPage() {
|
|||||||
{
|
{
|
||||||
title: 'Eingangsdatum',
|
title: 'Eingangsdatum',
|
||||||
key: 'eingangsdatum',
|
key: 'eingangsdatum',
|
||||||
render: (_: any, record: PosteingangDocument) => {
|
render: (_: any, record: PosteingangDocument) => getEingangsdatum(record),
|
||||||
const cf = record.customFields?.find((f) => f.field === 9);
|
|
||||||
return cf?.value ? dayjs(cf.value).format('DD.MM.YYYY') : '-';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Importiert am',
|
title: 'Importiert am',
|
||||||
@@ -121,14 +126,46 @@ export default function PosteingangPage() {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
<Table
|
{isMobile ? (
|
||||||
columns={columns}
|
<MobileCardList<PosteingangDocument>
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{ pageSize: 20, showSizeChanger: true, showTotal: (t) => `${t} Dokumente` }}
|
pagination={{ pageSize: 20, showTotal: (t) => `${t} Dokumente` }}
|
||||||
locale={{ emptyText: 'Keine Einträge vorhanden' }}
|
renderCard={(record) => (
|
||||||
/>
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||||||
|
<div style={{ display: 'flex', gap: 12 }}>
|
||||||
|
<AuthImage
|
||||||
|
src={`${getEnv('VITE_API_URL')}/api/paperless/inbox/preview/${record.id}`}
|
||||||
|
width={72}
|
||||||
|
style={{ border: '1px solid #d9d9d9', objectFit: 'contain', flexShrink: 0 }}
|
||||||
|
/>
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 4, minWidth: 0 }}>
|
||||||
|
<Text strong>{record.title || '—'}</Text>
|
||||||
|
<Text type="secondary" style={{ fontSize: 13 }}>
|
||||||
|
Eingangsdatum: {getEingangsdatum(record)}
|
||||||
|
</Text>
|
||||||
|
<Text type="secondary" style={{ fontSize: 13 }}>
|
||||||
|
Importiert am: {dayjs(record.added).format('DD.MM.YYYY HH:mm')}
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Button type="primary" block onClick={() => handleEdit(record)}>
|
||||||
|
Bearbeiten
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Table
|
||||||
|
columns={columns}
|
||||||
|
dataSource={data}
|
||||||
|
rowKey="id"
|
||||||
|
loading={loading}
|
||||||
|
pagination={{ pageSize: 20, showSizeChanger: true, showTotal: (t) => `${t} Dokumente` }}
|
||||||
|
locale={{ emptyText: 'Keine Einträge vorhanden' }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<DocumentEditModal
|
<DocumentEditModal
|
||||||
documentId={selectedDoc?.id || null}
|
documentId={selectedDoc?.id || null}
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ function UserClientsTab() {
|
|||||||
<Button type="primary" icon={<PlusOutlined />} onClick={() => setModalOpen(true)} style={{ marginBottom: 16 }}>
|
<Button type="primary" icon={<PlusOutlined />} onClick={() => setModalOpen(true)} style={{ marginBottom: 16 }}>
|
||||||
Zuordnung hinzufügen
|
Zuordnung hinzufügen
|
||||||
</Button>
|
</Button>
|
||||||
<Table dataSource={data} columns={columns} loading={loading} rowKey="Id" size="small" pagination={false} />
|
<Table dataSource={data} columns={columns} loading={loading} rowKey="Id" size="small" pagination={false} scroll={{ x: 'max-content' }} />
|
||||||
|
|
||||||
<Divider />
|
<Divider />
|
||||||
<Typography.Title level={5} style={{ marginBottom: 8 }}>Betriebe — Agrarmonitor-Zuordnung</Typography.Title>
|
<Typography.Title level={5} style={{ marginBottom: 8 }}>Betriebe — Agrarmonitor-Zuordnung</Typography.Title>
|
||||||
@@ -335,6 +335,7 @@ function UserClientsTab() {
|
|||||||
rowKey="Id"
|
rowKey="Id"
|
||||||
size="small"
|
size="small"
|
||||||
pagination={false}
|
pagination={false}
|
||||||
|
scroll={{ x: 'max-content' }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Modal title="Neue Zuordnung" open={modalOpen} onOk={handleAdd} onCancel={() => setModalOpen(false)}>
|
<Modal title="Neue Zuordnung" open={modalOpen} onOk={handleAdd} onCancel={() => setModalOpen(false)}>
|
||||||
@@ -599,13 +600,14 @@ function DocTypesTab() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Table
|
<Table
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
rowKey="Id"
|
rowKey="Id"
|
||||||
size="small"
|
size="small"
|
||||||
pagination={false}
|
pagination={false}
|
||||||
|
scroll={{ x: 'max-content' }}
|
||||||
/>
|
/>
|
||||||
<Modal
|
<Modal
|
||||||
title="Dokumenttyp bearbeiten"
|
title="Dokumenttyp bearbeiten"
|
||||||
@@ -1039,7 +1041,7 @@ function PostprocessingTab() {
|
|||||||
<Button type="primary" icon={<PlusOutlined />} onClick={openNew} style={{ marginBottom: 16 }}>
|
<Button type="primary" icon={<PlusOutlined />} onClick={openNew} style={{ marginBottom: 16 }}>
|
||||||
Regel hinzufügen
|
Regel hinzufügen
|
||||||
</Button>
|
</Button>
|
||||||
<Table dataSource={data} columns={columns} loading={loading} rowKey="Id" size="small" pagination={false} />
|
<Table dataSource={data} columns={columns} loading={loading} rowKey="Id" size="small" pagination={false} scroll={{ x: 'max-content' }} />
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title={isNew ? 'Neue Postprocessing-Regel' : 'Regel bearbeiten'}
|
title={isNew ? 'Neue Postprocessing-Regel' : 'Regel bearbeiten'}
|
||||||
@@ -1181,7 +1183,7 @@ function ExportTargetsTab() {
|
|||||||
<Button type="primary" icon={<PlusOutlined />} onClick={openNew} style={{ marginBottom: 16 }}>
|
<Button type="primary" icon={<PlusOutlined />} onClick={openNew} style={{ marginBottom: 16 }}>
|
||||||
Export-Ziel hinzufügen
|
Export-Ziel hinzufügen
|
||||||
</Button>
|
</Button>
|
||||||
<Table dataSource={data} columns={columns} loading={loading} rowKey="Id" size="small" pagination={false} />
|
<Table dataSource={data} columns={columns} loading={loading} rowKey="Id" size="small" pagination={false} scroll={{ x: 'max-content' }} />
|
||||||
|
|
||||||
<Modal title={isNew ? 'Neues Export-Ziel' : 'Export-Ziel bearbeiten'} open={!!editing} onOk={handleSave} onCancel={() => setEditing(null)}>
|
<Modal title={isNew ? 'Neues Export-Ziel' : 'Export-Ziel bearbeiten'} open={!!editing} onOk={handleSave} onCancel={() => setEditing(null)}>
|
||||||
<Form form={form} layout="vertical">
|
<Form form={form} layout="vertical">
|
||||||
@@ -1247,6 +1249,7 @@ function PostprocessingLogsTab() {
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
rowKey="Id"
|
rowKey="Id"
|
||||||
size="small"
|
size="small"
|
||||||
|
scroll={{ x: 'max-content' }}
|
||||||
pagination={{
|
pagination={{
|
||||||
current: page,
|
current: page,
|
||||||
total,
|
total,
|
||||||
@@ -1352,7 +1355,7 @@ function ApiKeysTab() {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Table dataSource={data} columns={columns} loading={loading} rowKey="id" size="small" pagination={false} />
|
<Table dataSource={data} columns={columns} loading={loading} rowKey="id" size="small" pagination={false} scroll={{ x: 'max-content' }} />
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title="Neuen API-Key erstellen"
|
title="Neuen API-Key erstellen"
|
||||||
@@ -1572,13 +1575,14 @@ function CorrespondentsTab() {
|
|||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Table
|
<Table
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
size="small"
|
size="small"
|
||||||
pagination={{
|
scroll={{ x: 'max-content' }}
|
||||||
|
pagination={{
|
||||||
current: currentPage,
|
current: currentPage,
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
total: total,
|
total: total,
|
||||||
@@ -1911,7 +1915,7 @@ function InboxActionsForTemplateEditor({ templateId }: { templateId: number }) {
|
|||||||
<h4 style={{ margin: 0 }}>Weiterverarbeitungs-Aktionen</h4>
|
<h4 style={{ margin: 0 }}>Weiterverarbeitungs-Aktionen</h4>
|
||||||
<Button type="dashed" size="small" icon={<PlusOutlined />} onClick={openNew}>Aktion hinzufügen</Button>
|
<Button type="dashed" size="small" icon={<PlusOutlined />} onClick={openNew}>Aktion hinzufügen</Button>
|
||||||
</Space>
|
</Space>
|
||||||
<Table<InboxAction> rowKey="Id" columns={columns} dataSource={actions} loading={loading} pagination={false} size="small" />
|
<Table<InboxAction> rowKey="Id" columns={columns} dataSource={actions} loading={loading} pagination={false} size="small" scroll={{ x: 'max-content' }} />
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title={isNew ? 'Neue Aktion' : 'Aktion bearbeiten'}
|
title={isNew ? 'Neue Aktion' : 'Aktion bearbeiten'}
|
||||||
@@ -2168,6 +2172,7 @@ function BarcodeTemplatesTab() {
|
|||||||
dataSource={data}
|
dataSource={data}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
|
scroll={{ x: 'max-content' }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { Table, Button, Space, Tag, Tooltip, Popconfirm, message, ConfigProvider } from 'antd';
|
import { Table, Button, Space, Tag, Tooltip, Popconfirm, message, ConfigProvider, Typography } from 'antd';
|
||||||
import { ReloadOutlined, DeleteOutlined } from '@ant-design/icons';
|
import { ReloadOutlined, DeleteOutlined } from '@ant-design/icons';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { tasksApi } from '../api/tasks';
|
import { tasksApi } from '../api/tasks';
|
||||||
import type { Task } from '../api/tasks';
|
import type { Task } from '../api/tasks';
|
||||||
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
|
import MobileCardList from '../components/MobileCardList';
|
||||||
|
|
||||||
|
const { Text } = Typography;
|
||||||
|
|
||||||
function statusTag(fertig: number | null) {
|
function statusTag(fertig: number | null) {
|
||||||
if (fertig === 1) return <Tag color="success">Fertig</Tag>;
|
if (fertig === 1) return <Tag color="success">Fertig</Tag>;
|
||||||
@@ -12,6 +16,7 @@ function statusTag(fertig: number | null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function TaskLogPage() {
|
export default function TaskLogPage() {
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const [data, setData] = useState<Task[]>([]);
|
const [data, setData] = useState<Task[]>([]);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [deleting, setDeleting] = useState(false);
|
const [deleting, setDeleting] = useState(false);
|
||||||
@@ -155,14 +160,55 @@ export default function TaskLogPage() {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
<Table
|
{isMobile ? (
|
||||||
columns={columns}
|
<MobileCardList<Task>
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
rowKey="TaskId"
|
rowKey="TaskId"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{ pageSize: 20 }}
|
pagination={{ pageSize: 20 }}
|
||||||
locale={{ emptyText: 'Keine Einträge vorhanden' }}
|
renderCard={(record) => (
|
||||||
/>
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
|
||||||
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 8 }}>
|
||||||
|
<Text strong>{record.InterneBelegnummer || '—'}</Text>
|
||||||
|
{statusTag(record.Fertig)}
|
||||||
|
</div>
|
||||||
|
<Text type="secondary" style={{ fontFamily: 'monospace', fontSize: 12 }}>
|
||||||
|
{record.TaskId.slice(0, 8)}…
|
||||||
|
</Text>
|
||||||
|
<Text type="secondary" style={{ fontSize: 13 }}>Lieferant: {record.Lieferant || '-'}</Text>
|
||||||
|
<Text type="secondary" style={{ fontSize: 13 }}>
|
||||||
|
Belegdatum: {record.Belegdatum ? dayjs(record.Belegdatum).format('DD.MM.YYYY') : '-'}
|
||||||
|
{' · '}
|
||||||
|
Eingang: {record.Eingangsdatum ? dayjs(record.Eingangsdatum).format('DD.MM.YYYY') : '-'}
|
||||||
|
</Text>
|
||||||
|
<Text type="secondary" style={{ fontSize: 13 }}>
|
||||||
|
Paperless-Dok.-ID: {record.PaperlessDocumentID ?? '-'}
|
||||||
|
</Text>
|
||||||
|
<Popconfirm
|
||||||
|
title="Task löschen"
|
||||||
|
description={`Task ${record.TaskId.slice(0, 8)}… dauerhaft entfernen?`}
|
||||||
|
onConfirm={() => handleDeleteOne(record.TaskId)}
|
||||||
|
okText="Löschen"
|
||||||
|
cancelText="Abbrechen"
|
||||||
|
okButtonProps={{ danger: true }}
|
||||||
|
>
|
||||||
|
<Button danger size="small" icon={<DeleteOutlined />} block>
|
||||||
|
Löschen
|
||||||
|
</Button>
|
||||||
|
</Popconfirm>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Table
|
||||||
|
columns={columns}
|
||||||
|
dataSource={data}
|
||||||
|
rowKey="TaskId"
|
||||||
|
loading={loading}
|
||||||
|
pagination={{ pageSize: 20 }}
|
||||||
|
locale={{ emptyText: 'Keine Einträge vorhanden' }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</ConfigProvider>
|
</ConfigProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,13 +5,22 @@ import type { ColumnsType } from 'antd/es/table';
|
|||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { zahlungApi, type ZahlungDocument, type ZahlungOption, type ZahlungFilter } from '../api/zahlung';
|
import { zahlungApi, type ZahlungDocument, type ZahlungOption, type ZahlungFilter } from '../api/zahlung';
|
||||||
import { paperlessApi, type PaperlessDocType, type PaperlessCorrespondent } from '../api/paperless';
|
import { paperlessApi, type PaperlessDocType, type PaperlessCorrespondent } from '../api/paperless';
|
||||||
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
|
import MobileCardList from '../components/MobileCardList';
|
||||||
|
|
||||||
const { Title } = Typography;
|
const { Title, Text } = Typography;
|
||||||
const FREIGABE_FIELD_ID = 15;
|
const FREIGABE_FIELD_ID = 15;
|
||||||
const ZAHLUNG_FIELD_ID = 16;
|
const ZAHLUNG_FIELD_ID = 16;
|
||||||
const FREIGABE_WERT_FREIGEGEBEN = 'freigegeben';
|
const FREIGABE_WERT_FREIGEGEBEN = 'freigegeben';
|
||||||
|
|
||||||
|
const FILTER_OPTIONS: { value: ZahlungFilter; label: string }[] = [
|
||||||
|
{ value: 'ausstehend', label: 'Freigegeben, noch nicht bezahlt' },
|
||||||
|
{ value: 'freigegeben', label: 'Alle freigegebenen' },
|
||||||
|
{ value: 'alle', label: 'Alle' },
|
||||||
|
];
|
||||||
|
|
||||||
export default function ZahlungPage() {
|
export default function ZahlungPage() {
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const [data, setData] = useState<ZahlungDocument[]>([]);
|
const [data, setData] = useState<ZahlungDocument[]>([]);
|
||||||
const [total, setTotal] = useState(0);
|
const [total, setTotal] = useState(0);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
@@ -132,7 +141,7 @@ export default function ZahlungPage() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Erstellt',
|
title: 'Erstellt',
|
||||||
dataIndex: 'created_date',
|
dataIndex: 'created',
|
||||||
key: 'created',
|
key: 'created',
|
||||||
width: 110,
|
width: 110,
|
||||||
render: (v: string) => v ? dayjs(v).format('DD.MM.YYYY') : '—',
|
render: (v: string) => v ? dayjs(v).format('DD.MM.YYYY') : '—',
|
||||||
@@ -178,45 +187,100 @@ export default function ZahlungPage() {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const paginationConfig = {
|
||||||
|
current: page,
|
||||||
|
pageSize,
|
||||||
|
total,
|
||||||
|
showSizeChanger: true,
|
||||||
|
pageSizeOptions: ['25', '50', '100'],
|
||||||
|
onChange: (p: number, ps: number) => {
|
||||||
|
setPage(p);
|
||||||
|
setPageSize(ps);
|
||||||
|
},
|
||||||
|
showTotal: (t: number) => `${t} Belege`,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Title level={4} style={{ marginTop: 0, marginBottom: 16 }}>Zahlung</Title>
|
<Title level={4} style={{ marginTop: 0, marginBottom: 16 }}>Zahlung</Title>
|
||||||
|
|
||||||
<Space style={{ marginBottom: 16 }}>
|
{isMobile ? (
|
||||||
<Radio.Group
|
<Select
|
||||||
|
style={{ width: '100%', marginBottom: 16 }}
|
||||||
value={filter}
|
value={filter}
|
||||||
onChange={(e) => {
|
onChange={(v) => {
|
||||||
setPage(1);
|
setPage(1);
|
||||||
setFilter(e.target.value);
|
setFilter(v);
|
||||||
}}
|
}}
|
||||||
optionType="button"
|
options={FILTER_OPTIONS}
|
||||||
buttonStyle="solid"
|
/>
|
||||||
>
|
) : (
|
||||||
<Radio.Button value="ausstehend">Freigegeben, noch nicht bezahlt</Radio.Button>
|
<Space style={{ marginBottom: 16 }}>
|
||||||
<Radio.Button value="freigegeben">Alle freigegebenen</Radio.Button>
|
<Radio.Group
|
||||||
<Radio.Button value="alle">Alle</Radio.Button>
|
value={filter}
|
||||||
</Radio.Group>
|
onChange={(e) => {
|
||||||
</Space>
|
setPage(1);
|
||||||
|
setFilter(e.target.value);
|
||||||
|
}}
|
||||||
|
optionType="button"
|
||||||
|
buttonStyle="solid"
|
||||||
|
>
|
||||||
|
{FILTER_OPTIONS.map((o) => (
|
||||||
|
<Radio.Button key={o.value} value={o.value}>{o.label}</Radio.Button>
|
||||||
|
))}
|
||||||
|
</Radio.Group>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
|
||||||
<Table<ZahlungDocument>
|
{isMobile ? (
|
||||||
dataSource={data}
|
<MobileCardList<ZahlungDocument>
|
||||||
columns={columns}
|
dataSource={data}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
size="small"
|
pagination={paginationConfig}
|
||||||
pagination={{
|
emptyText="Keine Belege vorhanden"
|
||||||
current: page,
|
renderCard={(doc) => {
|
||||||
pageSize,
|
const freigegeben = istFreigegeben(doc);
|
||||||
total,
|
return (
|
||||||
showSizeChanger: true,
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
|
||||||
pageSizeOptions: ['25', '50', '100'],
|
<Text strong>{doc.title || '—'}</Text>
|
||||||
onChange: (p, ps) => {
|
<Text type="secondary" style={{ fontSize: 13 }}>Dokumenttyp: {getDocTypeName(doc.document_type)}</Text>
|
||||||
setPage(p);
|
<Text type="secondary" style={{ fontSize: 13 }}>Absender: {getCorrespondentName(doc.correspondent)}</Text>
|
||||||
setPageSize(ps);
|
<Text type="secondary" style={{ fontSize: 13 }}>
|
||||||
},
|
Erstellt: {doc.created ? dayjs(doc.created).format('DD.MM.YYYY') : '—'}
|
||||||
showTotal: (t) => `${t} Belege`,
|
</Text>
|
||||||
}}
|
<div style={{ display: 'flex', gap: 4, flexWrap: 'wrap' }}>
|
||||||
/>
|
{renderFreigabeTag(doc)}
|
||||||
|
{renderZahlungTag(doc)}
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
icon={<EuroOutlined />}
|
||||||
|
type="primary"
|
||||||
|
block
|
||||||
|
disabled={!freigegeben}
|
||||||
|
onClick={() => openModal(doc)}
|
||||||
|
>
|
||||||
|
Zahlung verbuchen
|
||||||
|
</Button>
|
||||||
|
{!freigegeben && (
|
||||||
|
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||||
|
Beleg muss zuerst freigegeben werden
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Table<ZahlungDocument>
|
||||||
|
dataSource={data}
|
||||||
|
columns={columns}
|
||||||
|
rowKey="id"
|
||||||
|
loading={loading}
|
||||||
|
size="small"
|
||||||
|
pagination={paginationConfig}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title="Zahlung verbuchen"
|
title="Zahlung verbuchen"
|
||||||
|
|||||||
Reference in New Issue
Block a user