refactor(order): rename Bestellbestaetigung to Angebotsbestaetigung
All checks were successful
Staging Build / build (push) Successful in 3m22s
All checks were successful
Staging Build / build (push) Successful in 3m22s
This commit is contained in:
@@ -8,7 +8,7 @@ export default async function AdminOrdersPage() {
|
|||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-3xl font-bold tracking-tight text-gradient">Bestellungen</h1>
|
<h1 className="text-3xl font-bold tracking-tight text-gradient">Bestellungen</h1>
|
||||||
<p className="text-slate-400">Verwalten Sie alle Kundenbestellungen und greifen Sie auf generierte Bestellbestätigungen zu.</p>
|
<p className="text-slate-400">Verwalten Sie alle Kundenbestellungen und greifen Sie auf generierte Angebotsbestätigungen zu.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ export default async function MyOrdersPage() {
|
|||||||
<>
|
<>
|
||||||
<Button variant="ghost" size="sm" asChild className="text-xs text-slate-400 hover:text-white">
|
<Button variant="ghost" size="sm" asChild className="text-xs text-slate-400 hover:text-white">
|
||||||
<a href={o.pdf_url} target="_blank" rel="noopener noreferrer">
|
<a href={o.pdf_url} target="_blank" rel="noopener noreferrer">
|
||||||
<ExternalLink className="w-3 h-3 mr-1" /> Bestellbestätigung ansehen
|
<ExternalLink className="w-3 h-3 mr-1" /> Angebotsbestätigung ansehen
|
||||||
</a>
|
</a>
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="ghost" size="sm" asChild className="text-xs text-slate-400 hover:text-white">
|
<Button variant="ghost" size="sm" asChild className="text-xs text-slate-400 hover:text-white">
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ export default async function OrderSuccessPage({
|
|||||||
<div className="flex gap-2 pt-2">
|
<div className="flex gap-2 pt-2">
|
||||||
<Button variant="outline" size="sm" asChild className="border-white/10 hover:bg-white/10">
|
<Button variant="outline" size="sm" asChild className="border-white/10 hover:bg-white/10">
|
||||||
<a href={o.pdf_url} target="_blank" rel="noopener noreferrer">
|
<a href={o.pdf_url} target="_blank" rel="noopener noreferrer">
|
||||||
<ExternalLink className="w-4 h-4 mr-2" /> Bestellbestätigung ansehen
|
<ExternalLink className="w-4 h-4 mr-2" /> Angebotsbestätigung ansehen
|
||||||
</a>
|
</a>
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="secondary" size="sm" asChild>
|
<Button variant="secondary" size="sm" asChild>
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export const InvoicePDF = ({ order, orderSnapshot, customer }: any) => {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Text style={styles.title}>Bestellbestätigung</Text>
|
<Text style={styles.title}>Angebotsbestätigung</Text>
|
||||||
|
|
||||||
<View style={styles.section}>
|
<View style={styles.section}>
|
||||||
<Text style={styles.label}>Besteller / Kunde</Text>
|
<Text style={styles.label}>Besteller / Kunde</Text>
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ export async function submitOrder(params: {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// 6. PDF in Supabase Storage hochladen
|
// 6. PDF in Supabase Storage hochladen
|
||||||
const fileName = `bestellbestaetigung_${order.id}.pdf`
|
const fileName = `angebotsbestaetigung_${order.id}.pdf`
|
||||||
const { error: uploadError } = await supabase
|
const { error: uploadError } = await supabase
|
||||||
.storage
|
.storage
|
||||||
.from('invoices')
|
.from('invoices')
|
||||||
@@ -227,8 +227,8 @@ export async function submitOrder(params: {
|
|||||||
|
|
||||||
await sendMail({
|
await sendMail({
|
||||||
to: user.email,
|
to: user.email,
|
||||||
subject: `Bestellbestätigung ${orderNumber}`,
|
subject: `Angebotsbestätigung ${orderNumber}`,
|
||||||
text: `Hallo,\n\nvielen Dank für Ihre Bestellung bei CASPOS Shop!\n\nBestelldetails:\n- Bestellnummer: ${orderNumber}\n- Datum: ${formattedDate}\n- Endkunde: ${customerSnapshot.company_name}\n- Gesamtsumme: ${formattedTotal}\n\nIm Anhang dieser E-Mail finden Sie Ihre Bestellbestätigung als PDF-Dokument.\n\nViele Grüße,\nIhr CASPOS Shop-Team`,
|
text: `Hallo,\n\nvielen Dank für Ihre Bestellung bei CASPOS Shop!\n\nBestelldetails:\n- Bestellnummer: ${orderNumber}\n- Datum: ${formattedDate}\n- Endkunde: ${customerSnapshot.company_name}\n- Gesamtsumme: ${formattedTotal}\n\nIm Anhang dieser E-Mail finden Sie Ihre Angebotsbestätigung als PDF-Dokument.\n\nViele Grüße,\nIhr CASPOS Shop-Team`,
|
||||||
html: `
|
html: `
|
||||||
<div style="font-family: sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e2e8f0; border-radius: 8px;">
|
<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 Bestellung!</h2>
|
<h2 style="color: #0f172a; margin-bottom: 16px;">Vielen Dank für Ihre Bestellung!</h2>
|
||||||
@@ -255,7 +255,7 @@ export async function submitOrder(params: {
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<p style="color: #475569; font-size: 16px; line-height: 1.5;">Im Anhang dieser E-Mail finden Sie Ihre Bestellbestätigung als PDF-Dokument.</p>
|
<p style="color: #475569; font-size: 16px; line-height: 1.5;">Im Anhang dieser E-Mail finden Sie Ihre Angebotsbestätigung als PDF-Dokument.</p>
|
||||||
<p style="color: #475569; font-size: 16px; line-height: 1.5; margin-top: 24px;">Mit freundlichen Grüßen,<br>Ihr CASPOS Shop-Team</p>
|
<p style="color: #475569; font-size: 16px; line-height: 1.5; margin-top: 24px;">Mit freundlichen Grüßen,<br>Ihr CASPOS Shop-Team</p>
|
||||||
<hr style="border: 0; border-top: 1px solid #e2e8f0; margin: 24px 0;">
|
<hr style="border: 0; border-top: 1px solid #e2e8f0; margin: 24px 0;">
|
||||||
<p style="color: #94a3b8; font-size: 12px; text-align: center;">Diese E-Mail wurde automatisch generiert. Bitte antworten Sie nicht darauf.</p>
|
<p style="color: #94a3b8; font-size: 12px; text-align: center;">Diese E-Mail wurde automatisch generiert. Bitte antworten Sie nicht darauf.</p>
|
||||||
@@ -263,7 +263,7 @@ export async function submitOrder(params: {
|
|||||||
`,
|
`,
|
||||||
attachments: [
|
attachments: [
|
||||||
{
|
{
|
||||||
filename: `Bestellbestaetigung_${orderNumber}.pdf`,
|
filename: `Angebotsbestaetigung_${orderNumber}.pdf`,
|
||||||
content: buffer,
|
content: buffer,
|
||||||
contentType: 'application/pdf',
|
contentType: 'application/pdf',
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user