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:
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Status Cards -->
|
||||
<div class="grid gap-6 mb-8 md:grid-cols-4">
|
||||
<div class="grid gap-6 mb-8 md:grid-cols-5">
|
||||
<!-- Connection Status -->
|
||||
<div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800">
|
||||
<div :class="letzshopStatus.is_configured ? 'bg-green-100 dark:bg-green-900' : 'bg-gray-100 dark:bg-gray-700'" class="p-3 mr-4 rounded-full">
|
||||
@@ -89,6 +89,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Declined Orders -->
|
||||
<div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800">
|
||||
<div class="p-3 mr-4 text-red-500 bg-red-100 rounded-full dark:bg-red-900">
|
||||
<span x-html="$icon('x-circle', 'w-5 h-5')"></span>
|
||||
</div>
|
||||
<div>
|
||||
<p class="mb-1 text-sm font-medium text-gray-600 dark:text-gray-400">Declined</p>
|
||||
<p class="text-lg font-semibold text-gray-700 dark:text-gray-200" x-text="orderStats.rejected"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Shipped Orders -->
|
||||
<div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800">
|
||||
<div class="p-3 mr-4 text-blue-500 bg-blue-100 rounded-full dark:bg-blue-900">
|
||||
@@ -111,7 +122,7 @@
|
||||
<option value="">All Status</option>
|
||||
<option value="pending">Pending</option>
|
||||
<option value="confirmed">Confirmed</option>
|
||||
<option value="rejected">Rejected</option>
|
||||
<option value="rejected">Declined</option>
|
||||
<option value="shipped">Shipped</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -184,7 +195,7 @@
|
||||
'text-red-700 bg-red-100 dark:bg-red-700 dark:text-red-100': order.sync_status === 'rejected',
|
||||
'text-blue-700 bg-blue-100 dark:bg-blue-700 dark:text-blue-100': order.sync_status === 'shipped'
|
||||
}"
|
||||
x-text="order.sync_status.toUpperCase()"
|
||||
x-text="order.sync_status === 'rejected' ? 'DECLINED' : order.sync_status.toUpperCase()"
|
||||
></span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm">
|
||||
@@ -202,9 +213,9 @@
|
||||
</button>
|
||||
<button
|
||||
x-show="order.sync_status === 'pending'"
|
||||
@click="rejectOrder(order)"
|
||||
@click="declineOrder(order)"
|
||||
class="flex items-center justify-center px-2 py-1 text-sm text-red-600 transition-colors duration-150 rounded-md hover:bg-red-100 dark:hover:bg-red-900"
|
||||
title="Reject Order"
|
||||
title="Decline Order"
|
||||
>
|
||||
<span x-html="$icon('x', 'w-4 h-4')"></span>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user