feat(admin): update B2B PDF, mail and admin table
- format PDF order number as AE- and add upgrade flags - style status emails with sleek modern dark theme - add badge counts to admin table status filter buttons - implement preiskorrektur inline editing inside admin detail modal - trigger DB and total price recalculations on snapshot changes
This commit is contained in:
@@ -468,7 +468,7 @@ export async function updateOrderStatus(
|
||||
const oldLabel = statusLabelMap[oldStatus] || oldStatus
|
||||
const newLabel = statusLabelMap[newStatus] || newStatus
|
||||
|
||||
const statusEmail = getStatusEmailTemplate(orderNumber, oldLabel, newLabel)
|
||||
const statusEmail = getStatusEmailTemplate(orderNumber, oldLabel, newLabel, newStatus)
|
||||
|
||||
const mailOptions: any = {
|
||||
to: user.email,
|
||||
@@ -642,7 +642,7 @@ export async function rejectOrder(
|
||||
const { data: { user: orderUser }, error: userError } = await admin.auth.admin.getUserById(order.user_id)
|
||||
if (!userError && orderUser && orderUser.email) {
|
||||
const orderNumber = order.order_number || order.id.slice(0, 8)
|
||||
const statusEmail = getStatusEmailTemplate(orderNumber, 'Wartet auf Freigabe', `Abgelehnt (Grund: ${reason})`)
|
||||
const statusEmail = getStatusEmailTemplate(orderNumber, 'Wartet auf Freigabe', 'Abgelehnt', 'rejected', reason)
|
||||
|
||||
await sendMail({
|
||||
to: orderUser.email,
|
||||
|
||||
Reference in New Issue
Block a user