refactor(wording): change 'Angebot' to 'Anfrage' in client views and order emails

This commit is contained in:
DanielS
2026-07-03 14:55:56 +02:00
parent 5c28fbdea5
commit 23be8bcb52
6 changed files with 31 additions and 32 deletions

View File

@@ -315,7 +315,7 @@ export async function submitOrder(params: {
await sendMail({
to: user.email,
subject: `Anfragebestätigung ${orderNumber}`,
text: `Hallo,\n\nvielen Dank für Ihre Anfrage bei CASPOS Shop!\n\nAngebotsdetails:\n- Anfrage-Nummer: ${orderNumber}\n- Datum: ${formattedDate}\n- Endkunde: ${customerSnapshot.company_name}\n${totalDetailsText}\n\nIm Anhang dieser E-Mail finden Sie Ihre Anfragebestätigung als PDF-Dokument.\n\nViele Grüße,\nIhr CASPOS Shop-Team`,
text: `Hallo,\n\nvielen Dank für Ihre Anfrage bei CASPOS Shop!\n\nAnfragedetails:\n- Anfrage-Nummer: ${orderNumber}\n- Datum: ${formattedDate}\n- Endkunde: ${customerSnapshot.company_name}\n${totalDetailsText}\n\nIm Anhang dieser E-Mail finden Sie Ihre Anfragebestätigung als PDF-Dokument.\n\nViele Grüße,\nIhr CASPOS Shop-Team`,
html: `
<div style="font-family: sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e2e8f0; border-radius: 8px;">
<h2 style="color: #0f172a; margin-bottom: 16px;">Vielen Dank für Ihre Anfrage!</h2>
@@ -347,7 +347,7 @@ export async function submitOrder(params: {
`,
attachments: [
{
filename: `Angebotsbestaetigung_${orderNumber}.pdf`,
filename: `Anfragebestaetigung_${orderNumber}.pdf`,
content: buffer,
contentType: 'application/pdf',
}
@@ -499,11 +499,11 @@ export async function updateOrder(
const isOwner = existingOrder.user_id === user.id
if (!isAdmin && !isOwner) {
throw new Error('Keine Berechtigung dieses Angebot zu bearbeiten.')
throw new Error('Keine Berechtigung dieses Anfrage zu bearbeiten.')
}
if (existingOrder.status === 'completed' && !isAdmin) {
throw new Error('Abgeschlossene Angebote können nicht mehr bearbeitet werden.')
throw new Error('Abgeschlossene Anfragen können nicht mehr bearbeitet werden.')
}
// Fetch catalog directly from DB to prevent client tampering
@@ -720,13 +720,13 @@ export async function updateOrder(
await sendMail({
to: orderUserEmail,
subject: `Angebotsänderung ${order.order_number}`,
text: `Hallo,\n\nihr Angebot wurde erfolgreich aktualisiert!\n\nNeue Angebotsdetails:\n- Anfrage-Nummer: ${order.order_number}\n- Datum: ${formattedDate}\n- Endkunde: ${customerSnapshot.company_name}\n${totalDetailsText}\n\nIm Anhang dieser E-Mail finden Sie Ihr aktualisiertes Angebot als PDF-Dokument.\n\nViele Grüße,\nIhr CASPOS Shop-Team`,
subject: `Anfrageänderung ${order.order_number}`,
text: `Hallo,\n\nihre Anfrage wurde erfolgreich aktualisiert!\n\nNeue Anfragedetails:\n- Anfrage-Nummer: ${order.order_number}\n- Datum: ${formattedDate}\n- Endkunde: ${customerSnapshot.company_name}\n${totalDetailsText}\n\nIm Anhang dieser E-Mail finden Sie Ihre aktualisierte Anfrage als PDF-Dokument.\n\nViele Grüße,\nIhr CASPOS Shop-Team`,
html: `
<div style="font-family: sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e2e8f0; border-radius: 8px;">
<h2 style="color: #0f172a; margin-bottom: 16px;">Ihr Angebot wurde aktualisiert!</h2>
<h2 style="color: #0f172a; margin-bottom: 16px;">Ihre Anfrage wurde aktualisiert!</h2>
<p style="color: #475569; font-size: 16px; line-height: 1.5;">Hallo,</p>
<p style="color: #475569; font-size: 16px; line-height: 1.5;">Ihr Angebot mit der Nummer ${order.order_number} wurde erfolgreich aktualisiert.</p>
<p style="color: #475569; font-size: 16px; line-height: 1.5;">Ihr Anfrage mit der Nummer ${order.order_number} wurde erfolgreich aktualisiert.</p>
<div style="background-color: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 16px; margin: 24px 0;">
<h3 style="color: #0f172a; margin-top: 0; margin-bottom: 12px;">Neue Anfrage-Details</h3>
<table style="width: 100%; border-collapse: collapse; font-size: 14px; color: #475569;">
@@ -751,7 +751,7 @@ export async function updateOrder(
`,
attachments: [
{
filename: `Angebotsbestaetigung_${order.order_number}.pdf`,
filename: `Anfragebestaetigung_${order.order_number}.pdf`,
content: buffer,
contentType: 'application/pdf',
}