406 lines
15 KiB
HTML
406 lines
15 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="vi">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Lịch sử Chat - EuroTile Worker</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<link rel="stylesheet" href="assets/css/style.css">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
</head>
|
|
<style>
|
|
.chat-item {
|
|
background: white;
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
margin-bottom: 12px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
gap: 12px;
|
|
position: relative;
|
|
}
|
|
|
|
.chat-item:hover {
|
|
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.chat-item.unread {
|
|
border-left: 4px solid var(--primary-blue);
|
|
}
|
|
|
|
.chat-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 20px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.chat-icon.order {
|
|
background: linear-gradient(135deg, #38B6FF 0%, #005B9A 100%);
|
|
color: white;
|
|
}
|
|
|
|
.chat-icon.product {
|
|
background: linear-gradient(135deg, #28a745 0%, #155724 100%);
|
|
color: white;
|
|
}
|
|
|
|
.chat-icon.support {
|
|
background: linear-gradient(135deg, #ffc107 0%, #856404 100%);
|
|
color: white;
|
|
}
|
|
|
|
.chat-icon.promotion {
|
|
background: linear-gradient(135deg, #dc3545 0%, #721c24 100%);
|
|
color: white;
|
|
}
|
|
|
|
.chat-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.chat-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.chat-title {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: var(--text-dark);
|
|
margin: 0;
|
|
}
|
|
|
|
.chat-time {
|
|
font-size: 11px;
|
|
color: var(--text-light);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.chat-reference {
|
|
font-size: 12px;
|
|
color: var(--primary-blue);
|
|
margin-bottom: 4px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.chat-message {
|
|
font-size: 13px;
|
|
color: var(--text-light);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.unread-badge {
|
|
width: 20px;
|
|
height: 20px;
|
|
background: var(--danger-color);
|
|
color: white;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
position: absolute;
|
|
top: 12px;
|
|
right: 12px;
|
|
}
|
|
|
|
.chat-status {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 10px;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.chat-status.pending {
|
|
background: #fff3cd;
|
|
color: #856404;
|
|
}
|
|
|
|
.chat-status.resolved {
|
|
background: #d4edda;
|
|
color: #155724;
|
|
}
|
|
|
|
.chat-status.processing {
|
|
background: #d1ecf1;
|
|
color: #0c5460;
|
|
}
|
|
</style>
|
|
<body>
|
|
<div class="page-wrapper">
|
|
<!-- Header -->
|
|
<div class="header">
|
|
<a href="index.html" class="back-button">
|
|
<i class="fas fa-arrow-left"></i>
|
|
</a>
|
|
<h1 class="header-title">Lịch sử Chat</h1>
|
|
<button class="back-button">
|
|
<i class="fas fa-search"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<!-- Filter Pills -->
|
|
<div class="filter-container">
|
|
<button class="filter-pill active">Tất cả</button>
|
|
<button class="filter-pill">Đơn hàng</button>
|
|
<button class="filter-pill">Sản phẩm</button>
|
|
<button class="filter-pill">Hỗ trợ</button>
|
|
</div>
|
|
|
|
<!-- Chat List -->
|
|
<div class="chat-list">
|
|
<!-- Chat Item 1 - Order Reference -->
|
|
<div class="chat-item unread" onclick="openChat('order', 'DH001234')">
|
|
<div class="chat-icon order">
|
|
<i class="fas fa-shopping-cart"></i>
|
|
</div>
|
|
<div class="chat-content">
|
|
<div class="chat-header">
|
|
<h4 class="chat-title">Hỗ trợ đơn hàng</h4>
|
|
<span class="chat-time">10:30</span>
|
|
</div>
|
|
<div class="chat-reference">
|
|
<i class="fas fa-hashtag"></i> Đơn hàng #DH001234
|
|
</div>
|
|
<div class="chat-message">
|
|
Hệ thống: Đơn hàng của bạn đang được xử lý. Dự kiến giao trong 3-5 ngày.
|
|
</div>
|
|
<span class="chat-status processing">Đang xử lý</span>
|
|
</div>
|
|
<span class="unread-badge">2</span>
|
|
</div>
|
|
|
|
<!-- Chat Item 2 - Product Reference -->
|
|
<div class="chat-item" onclick="openChat('product', 'PR0123')">
|
|
<div class="chat-icon product">
|
|
<i class="fas fa-box"></i>
|
|
</div>
|
|
<div class="chat-content">
|
|
<div class="chat-header">
|
|
<h4 class="chat-title">Tư vấn sản phẩm</h4>
|
|
<span class="chat-time">Hôm qua</span>
|
|
</div>
|
|
<div class="chat-reference">
|
|
<i class="fas fa-tag"></i> Sản phẩm #PR0123 - Gạch Eurotile MỘC LAM E03
|
|
</div>
|
|
<div class="chat-message">
|
|
Bạn: Sản phẩm này còn hàng không ạ?
|
|
</div>
|
|
<span class="chat-status resolved">Đã trả lời</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Chat Item 3 - Order Reference -->
|
|
<div class="chat-item unread" onclick="openChat('order', 'DH001233')">
|
|
<div class="chat-icon order">
|
|
<i class="fas fa-truck"></i>
|
|
</div>
|
|
<div class="chat-content">
|
|
<div class="chat-header">
|
|
<h4 class="chat-title">Thông tin giao hàng</h4>
|
|
<span class="chat-time">2 ngày trước</span>
|
|
</div>
|
|
<div class="chat-reference">
|
|
<i class="fas fa-hashtag"></i> Đơn hàng #DH001233
|
|
</div>
|
|
<div class="chat-message">
|
|
Hệ thống: Đơn hàng đang trên đường giao đến bạn. Mã vận đơn: VD123456
|
|
</div>
|
|
<span class="chat-status processing">Đang giao</span>
|
|
</div>
|
|
<span class="unread-badge">1</span>
|
|
</div>
|
|
|
|
<!-- Chat Item 4 - Support Reference -->
|
|
<div class="chat-item" onclick="openChat('support', 'TK001')">
|
|
<div class="chat-icon support">
|
|
<i class="fas fa-headset"></i>
|
|
</div>
|
|
<div class="chat-content">
|
|
<div class="chat-header">
|
|
<h4 class="chat-title">Hỗ trợ kỹ thuật</h4>
|
|
<span class="chat-time">3 ngày trước</span>
|
|
</div>
|
|
<div class="chat-reference">
|
|
<i class="fas fa-ticket-alt"></i> Ticket #TK001
|
|
</div>
|
|
<div class="chat-message">
|
|
Hệ thống: Yêu cầu hỗ trợ của bạn đã được giải quyết. Cảm ơn bạn đã sử dụng dịch vụ.
|
|
</div>
|
|
<span class="chat-status resolved">Đã giải quyết</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Chat Item 5 - Product Reference -->
|
|
<div class="chat-item" onclick="openChat('product', 'PR0125')">
|
|
<div class="chat-icon product">
|
|
<i class="fas fa-box"></i>
|
|
</div>
|
|
<div class="chat-content">
|
|
<div class="chat-header">
|
|
<h4 class="chat-title">Thông tin sản phẩm</h4>
|
|
<span class="chat-time">5 ngày trước</span>
|
|
</div>
|
|
<div class="chat-reference">
|
|
<i class="fas fa-tag"></i> Sản phẩm #PR0125 - Gạch Granite nhập khẩu
|
|
</div>
|
|
<div class="chat-message">
|
|
Bạn: Cho tôi xem bảng màu của sản phẩm này
|
|
</div>
|
|
<span class="chat-status resolved">Đã trả lời</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Chat Item 6 - Promotion Reference -->
|
|
<div class="chat-item" onclick="openChat('promotion', 'KM202312')">
|
|
<div class="chat-icon promotion">
|
|
<i class="fas fa-tags"></i>
|
|
</div>
|
|
<div class="chat-content">
|
|
<div class="chat-header">
|
|
<h4 class="chat-title">Chương trình khuyến mãi</h4>
|
|
<span class="chat-time">1 tuần trước</span>
|
|
</div>
|
|
<div class="chat-reference">
|
|
<i class="fas fa-gift"></i> CTKM #KM202312 - Flash Sale Cuối Năm
|
|
</div>
|
|
<div class="chat-message">
|
|
Hệ thống: Chương trình khuyến mãi áp dụng cho đơn hàng từ 10 triệu
|
|
</div>
|
|
<span class="chat-status resolved">Đã xem</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Chat Item 7 - Order Reference -->
|
|
<div class="chat-item" onclick="openChat('order', 'DH001230')">
|
|
<div class="chat-icon order">
|
|
<i class="fas fa-times-circle"></i>
|
|
</div>
|
|
<div class="chat-content">
|
|
<div class="chat-header">
|
|
<h4 class="chat-title">Yêu cầu hủy đơn</h4>
|
|
<span class="chat-time">2 tuần trước</span>
|
|
</div>
|
|
<div class="chat-reference">
|
|
<i class="fas fa-hashtag"></i> Đơn hàng #DH001230
|
|
</div>
|
|
<div class="chat-message">
|
|
Hệ thống: Đơn hàng đã được hủy thành công. Tiền sẽ hoàn về trong 3-5 ngày làm việc.
|
|
</div>
|
|
<span class="chat-status resolved">Đã hủy</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Empty State (hidden by default) -->
|
|
<div class="empty-state" style="display: none;">
|
|
<div class="empty-icon">
|
|
<i class="fas fa-comments"></i>
|
|
</div>
|
|
<h3 class="empty-title">Chưa có cuộc trò chuyện</h3>
|
|
<p class="empty-message">
|
|
Các cuộc trò chuyện về đơn hàng, sản phẩm sẽ hiển thị tại đây
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Floating Action Button -->
|
|
<button class="fab" onclick="startNewChat()">
|
|
<i class="fas fa-plus"></i>
|
|
</button>
|
|
|
|
<!-- Bottom Navigation -->
|
|
<div class="bottom-nav">
|
|
<a href="index.html" class="nav-item">
|
|
<i class="fas fa-home nav-icon"></i>
|
|
<span class="nav-label">Trang chủ</span>
|
|
</a>
|
|
<a href="loyalty.html" class="nav-item">
|
|
<i class="fas fa-crown nav-icon"></i>
|
|
<span class="nav-label">Hội viên</span>
|
|
</a>
|
|
<a href="promotions.html" class="nav-item">
|
|
<i class="fas fa-tags nav-icon"></i>
|
|
<span class="nav-label">Khuyến mãi</span>
|
|
</a>
|
|
<a href="notifications.html" class="nav-item">
|
|
<i class="fas fa-bell nav-icon"></i>
|
|
<span class="nav-label">Thông báo</span>
|
|
<span class="badge">5</span>
|
|
</a>
|
|
<a href="account.html" class="nav-item">
|
|
<i class="fas fa-user nav-icon"></i>
|
|
<span class="nav-label">Cài đặt</span>
|
|
</a>
|
|
</div>
|
|
|
|
<script>
|
|
function openChat(type, referenceId) {
|
|
// Redirect to chat detail page with reference
|
|
window.location.href = `chat-detail.html?type=${type}&ref=${referenceId}`;
|
|
}
|
|
|
|
function startNewChat() {
|
|
// Open new chat modal or page
|
|
alert('Chức năng bắt đầu trò chuyện mới');
|
|
}
|
|
|
|
// Filter functionality
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const filterButtons = document.querySelectorAll('.filter-pill');
|
|
const chatItems = document.querySelectorAll('.chat-item');
|
|
|
|
filterButtons.forEach(button => {
|
|
button.addEventListener('click', function() {
|
|
// Remove active class from all buttons
|
|
filterButtons.forEach(btn => btn.classList.remove('active'));
|
|
|
|
// Add active class to clicked button
|
|
this.classList.add('active');
|
|
|
|
// Get filter type
|
|
const filterText = this.textContent.trim();
|
|
|
|
// Filter chat items
|
|
chatItems.forEach(item => {
|
|
if (filterText === 'Tất cả') {
|
|
item.style.display = 'flex';
|
|
} else {
|
|
const icon = item.querySelector('.chat-icon');
|
|
let shouldShow = false;
|
|
|
|
if (filterText === 'Đơn hàng' && icon.classList.contains('order')) {
|
|
shouldShow = true;
|
|
} else if (filterText === 'Sản phẩm' && icon.classList.contains('product')) {
|
|
shouldShow = true;
|
|
} else if (filterText === 'Hỗ trợ' && icon.classList.contains('support')) {
|
|
shouldShow = true;
|
|
}
|
|
|
|
item.style.display = shouldShow ? 'flex' : 'none';
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |