Compare commits

...

5 Commits

Author SHA1 Message Date
Julia Wehden
1326156e8d fix: calendar route photobox.name -> photobox.model
Some checks failed
Preview Deploy / deploy (push) Failing after 3m17s
2026-03-24 13:59:22 +01:00
Julia Wehden
6ec5d088a4 fix: quotation-pdf Buffer Type-Fehler behoben
Some checks failed
Preview Deploy / deploy (push) Failing after 1m58s
2026-03-24 13:54:43 +01:00
Julia Wehden
5af1a65815 fix: Nextcloud Kalender auf 'Veranstaltungen' umgestellt
Some checks failed
Preview Deploy / deploy (push) Failing after 2m5s
2026-03-24 12:53:42 +01:00
Julia Wehden
ff0da6b3e2 fix: contract-pdf Type-Fehler (null signatureData + Buffer)
Some checks failed
Preview Deploy / deploy (push) Failing after 3m51s
2026-03-20 10:59:35 +01:00
Julia Wehden
08effe4e80 fix: Build-Fehler behoben (Import + Buffer Type)
Some checks failed
Preview Deploy / deploy (push) Failing after 1m49s
2026-03-20 10:52:06 +01:00
6 changed files with 9 additions and 9 deletions

View File

@@ -36,7 +36,7 @@ export async function GET(
const pdfBuffer = await lexofficeService.getInvoicePDF(booking.lexofficeConfirmationId); const pdfBuffer = await lexofficeService.getInvoicePDF(booking.lexofficeConfirmationId);
return new NextResponse(pdfBuffer, { return new NextResponse(new Uint8Array(pdfBuffer), {
status: 200, status: 200,
headers: { headers: {
'Content-Type': 'application/pdf', 'Content-Type': 'application/pdf',

View File

@@ -46,7 +46,7 @@ export async function GET(
priceConfig, priceConfig,
}; };
const signatureData = booking.contractSignedOnline ? booking.contractSignatureData : undefined; const signatureData = booking.contractSignedOnline ? booking.contractSignatureData ?? undefined : undefined;
const pdfBuffer = await generateContractFromTemplate( const pdfBuffer = await generateContractFromTemplate(
bookingWithPriceConfig, bookingWithPriceConfig,
@@ -55,7 +55,7 @@ export async function GET(
signatureData signatureData
); );
return new NextResponse(pdfBuffer, { return new NextResponse(new Uint8Array(pdfBuffer), {
status: 200, status: 200,
headers: { headers: {
'Content-Type': 'application/pdf', 'Content-Type': 'application/pdf',

View File

@@ -36,7 +36,7 @@ export async function GET(
const pdfBuffer = await lexofficeService.getQuotationPDF(booking.lexofficeOfferId); const pdfBuffer = await lexofficeService.getQuotationPDF(booking.lexofficeOfferId);
return new NextResponse(pdfBuffer, { return new NextResponse(new Uint8Array(pdfBuffer), {
status: 200, status: 200,
headers: { headers: {
'Content-Type': 'application/pdf', 'Content-Type': 'application/pdf',

View File

@@ -45,7 +45,7 @@ export async function GET(req: NextRequest) {
customerName: booking.customerName, customerName: booking.customerName,
customerEmail: booking.customerEmail, customerEmail: booking.customerEmail,
locationName: booking.location.name, locationName: booking.location.name,
photoboxName: booking.photobox?.name || 'Keine Box', photoboxName: booking.photobox?.model || 'Keine Box',
tourId: booking.tourId, tourId: booking.tourId,
eventType: booking.eventType, eventType: booking.eventType,
}, },

View File

@@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from 'next/server';
import { prisma } from '@/lib/prisma'; import { prisma } from '@/lib/prisma';
import { AIService } from '@/lib/ai-service'; import { AIService } from '@/lib/ai-service';
import { LexOfficeService } from '@/lib/lexoffice'; import { LexOfficeService } from '@/lib/lexoffice';
import { getCalendarService } from '@/lib/nextcloud-calendar'; import { nextcloudCalendar } from '@/lib/nextcloud-calendar';
/** /**
* AUTO-WORKFLOW CRON-JOB * AUTO-WORKFLOW CRON-JOB
@@ -48,7 +48,7 @@ export async function GET(request: NextRequest) {
const aiService = new AIService(); const aiService = new AIService();
const lexoffice = new LexOfficeService(); const lexoffice = new LexOfficeService();
const calendar = getCalendarService(); const calendar = nextcloudCalendar;
let processed = 0; let processed = 0;
let errors = 0; let errors = 0;

View File

@@ -151,11 +151,11 @@ export class NextcloudCalendarService {
// Suche nach "Buchungen" Kalender, sonst verwende ersten // Suche nach "Buchungen" Kalender, sonst verwende ersten
let calendar = calendars.find((cal: any) => let calendar = calendars.find((cal: any) =>
cal.displayName?.toLowerCase().includes('buchung') cal.displayName?.toLowerCase().includes('veranstaltung')
); );
if (!calendar) { if (!calendar) {
console.warn('⚠️ Kein "Buchungen"-Kalender gefunden, verwende:', calendars[0].displayName); console.warn('⚠️ Kein "Veranstaltungen"-Kalender gefunden, verwende:', calendars[0].displayName);
calendar = calendars[0]; calendar = calendars[0];
} else { } else {
console.log('✅ Verwende Kalender:', calendar.displayName); console.log('✅ Verwende Kalender:', calendar.displayName);