feat: allow quote editing for all statuses except completed
All checks were successful
Staging Build / build (push) Successful in 3m35s
All checks were successful
Staging Build / build (push) Successful in 3m35s
This commit is contained in:
@@ -418,8 +418,8 @@ export async function updateOrder(
|
||||
throw new Error('Keine Berechtigung dieses Angebot zu bearbeiten.')
|
||||
}
|
||||
|
||||
if (existingOrder.status !== 'pending' && !isAdmin) {
|
||||
throw new Error('Nur Angebote im Status "Eingegangen" können bearbeitet werden.')
|
||||
if (existingOrder.status === 'completed' && !isAdmin) {
|
||||
throw new Error('Abgeschlossene Angebote können nicht mehr bearbeitet werden.')
|
||||
}
|
||||
|
||||
// Fetch catalog directly from DB to prevent client tampering
|
||||
|
||||
Reference in New Issue
Block a user