@page "/admin/system/integrations"
@layout AdminLayout
@inherits AdminBase
@*
EN: Integration hub — integration tiles (Payment, Delivery, Accounting, Social), connection status, configure button.
VI: Trung tâm tích hợp — thẻ tích hợp (Thanh toán, Giao hàng, Kế toán, Mạng xã hội), trạng thái kết nối, nút cấu hình.
Design: pencil-design/src/pages/tPOS/admin/integration-hub.pen
*@
Tích hợp — GoodGo Admin
@* ═══ TOP BAR ═══ *@
Tích hợp
Quản lý kết nối với dịch vụ bên ngoài
@* ═══ CONTENT ═══ *@
@foreach (var group in _integrationGroups)
{
@group.GroupName
@foreach (var item in group.Items)
{
@(item.Connected ? "Đã kết nối" : "Chưa kết nối")
@item.Name@item.Description
@if (item.Connected)
{
}
else
{
}
}
}
@code {
private record IntegrationItem(string Name, string Description, string Icon, string Color, bool Connected);
private record IntegrationGroup(string GroupName, IntegrationItem[] Items);
private readonly IntegrationGroup[] _integrationGroups = new[]
{
new IntegrationGroup("THANH TOÁN", new[]
{
new IntegrationItem("VNPay", "Thanh toán QR & thẻ ngân hàng", "qr-code", "#3B82F6", true),
new IntegrationItem("MoMo", "Ví điện tử MoMo", "wallet", "#EC4899", true),
new IntegrationItem("ZaloPay", "Thanh toán qua ZaloPay", "smartphone", "#3B82F6", false),
new IntegrationItem("Visa/Mastercard", "Thanh toán thẻ quốc tế", "credit-card", "#8B5CF6", true),
}),
new IntegrationGroup("GIAO HÀNG", new[]
{
new IntegrationItem("GrabFood", "Đối tác giao đồ ăn", "bike", "#22C55E", true),
new IntegrationItem("ShopeeFood", "Nền tảng đặt đồ ăn", "shopping-bag", "#FF5C00", true),
new IntegrationItem("Baemin", "Dịch vụ giao hàng", "truck", "#06B6D4", false),
}),
new IntegrationGroup("KẾ TOÁN & QUẢN LÝ", new[]
{
new IntegrationItem("MISA", "Phần mềm kế toán", "calculator", "#F59E0B", true),
new IntegrationItem("Google Sheets", "Xuất báo cáo tự động", "file-spreadsheet", "#22C55E", false),
new IntegrationItem("Hóa đơn điện tử", "Phát hành hóa đơn GTGT", "file-text", "#3B82F6", true),
}),
new IntegrationGroup("MẠNG XÃ HỘI", new[]
{
new IntegrationItem("Facebook", "Fanpage & quảng cáo", "facebook", "#3B82F6", true),
new IntegrationItem("Zalo OA", "Chăm sóc khách hàng", "message-circle", "#3B82F6", false),
new IntegrationItem("Google Business", "Hiển thị trên Google Maps", "map-pin", "#EF4444", true),
}),
};
}