Files
assistant-storefront/app/javascript/dashboard/components-next/message/bubbles/OrderDetail.vue

87 lines
2.0 KiB
Vue
Raw Normal View History

<script setup>
import { computed } from 'vue';
import { useMessageContext } from '../provider.js';
const { contentAttributes } = useMessageContext();
const orderId = computed(() => contentAttributes.value?.orderId || 'Order');
const itemCount = computed(() => contentAttributes.value?.items?.length || 0);
</script>
<template>
<div class="order-detail-placeholder">
<div class="placeholder-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
<polyline points="14 2 14 8 20 8"></polyline>
<line x1="16" y1="13" x2="8" y2="13"></line>
<line x1="16" y1="17" x2="8" y2="17"></line>
<polyline points="10 9 9 9 8 9"></polyline>
</svg>
</div>
<div class="placeholder-content">
<h4 class="placeholder-title">Order Details</h4>
<p class="placeholder-text">
Order: {{ orderId }} {{ itemCount }} items
</p>
</div>
</div>
</template>
<style scoped>
.order-detail-placeholder {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
border: 1px solid #fecaca;
border-radius: 8px;
max-width: 320px;
}
.dark .order-detail-placeholder {
background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%);
border-color: #991b1b;
}
.placeholder-icon {
flex-shrink: 0;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
color: #dc2626;
}
.dark .placeholder-icon {
color: #fca5a5;
}
.placeholder-content {
flex: 1;
}
.placeholder-title {
font-size: 14px;
font-weight: 600;
color: #1e293b;
margin: 0 0 4px 0;
}
.dark .placeholder-title {
color: #f1f5f9;
}
.placeholder-text {
font-size: 13px;
color: #64748b;
margin: 0;
}
.dark .placeholder-text {
color: #94a3b8;
}
</style>