refactor: update terminology from 'rejected' to 'declined'

- Change UI labels to use 'Declined' (matching Letzshop terminology)
- Rename rejectOrder() to declineOrder() in JavaScript
- Add Declined stats card to orders dashboard
- Keep internal sync_status value as 'rejected' for backwards compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-18 21:23:26 +01:00
parent 23828fd484
commit 12018fc088
2 changed files with 22 additions and 11 deletions

View File

@@ -518,20 +518,20 @@ function adminMarketplaceLetzshop() {
},
/**
* Reject an order
* Decline an order (all items)
*/
async rejectOrder(order) {
async declineOrder(order) {
if (!this.selectedVendor) return;
if (!confirm('Are you sure you want to reject this order?')) return;
if (!confirm('Are you sure you want to decline this order? All items will be marked as unavailable.')) return;
try {
await apiClient.post(`/admin/letzshop/vendors/${this.selectedVendor.id}/orders/${order.id}/reject`);
this.successMessage = 'Order rejected';
this.successMessage = 'Order declined';
await this.loadOrders();
} catch (error) {
marketplaceLetzshopLog.error('Failed to reject order:', error);
this.error = error.message || 'Failed to reject order';
marketplaceLetzshopLog.error('Failed to decline order:', error);
this.error = error.message || 'Failed to decline order';
}
},