os botões continuam a não fucionar - Follow Up Deployment
Browse filesFiles changed (3)
- README.md+7-5
- index.html+509-19
- prompts.txtAdded+4
12345678910---title: Testeemoji: 📊colorFrom: bluecolorTo: bluesdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112---title: testeemoji: 🐳colorFrom: pinkcolorTo: purplesdk: staticpinned: falsetags:- deepsite---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509<!DOCTYPE html><html lang="pt-br"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Dashboard Pedidos & Chatwoot</title><script src="https://cdn.tailwindcss.com"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><script>tailwind.config = {theme: {extend: {colors: {primary: '#4F46E5',secondary: '#10B981',danger: '#EF4444',warning: '#F59E0B',}}}}</script><style>/* Custom CSS for printer-friendly version */@media print {body * {visibility: hidden;}.print-content, .print-content * {visibility: visible;}.print-content {position: absolute;left: 0;top: 0;width: 100%;font-family: 'Courier New', monospace;}.no-print {display: none;}}/* Animation for status changes */@keyframes pulse {0% { opacity: 0.6; }50% { opacity: 1; }100% { opacity: 0.6; }}.pulse-animation {animation: pulse 1.5s infinite;}/* Smooth transitions for status changes */.status-change {transition: background-color 0.3s ease, color 0.3s ease;}</style></head><body class="bg-gray-100 font-sans"><!-- Header with Developer Logo and Client Logo Area --><header class="bg-gradient-to-r from-red-600 to-red-800 shadow-lg"><div class="max-w-7xl mx-auto px-4 py-3 flex justify-between items-center"><div class="flex items-center space-x-4"><img src="https://cdn-icons-png.flaticon.com/512/2819/2819205.png"alt="Restaurant Logo" class="h-12"><div><h1 class="text-2xl font-bold text-white">Restaurant Dashboard</h1><p class="text-xs text-red-100">Painel de pedidos em tempo real</p></div></div><div id="clientLogoArea" class="flex items-center"><div class="bg-white/20 p-2 rounded-lg backdrop-blur-sm"><img id="restaurantLogo" src="" alt="Restaurant Logo" class="h-10 max-w-xs object-contain hidden"><span class="text-white text-sm" id="logoPlaceholder">Logo Restaurante</span></div></div><div><button id="adminBtn" class="bg-white/20 hover:bg-white/30 text-white px-4 py-2 rounded-full backdrop-blur-sm transition-all"><i class="fas fa-cog mr-2"></i>Administração</button></div></div></header><!-- Main Content --><main class="max-w-7xl mx-auto px-4 py-6"><!-- Tabs Navigation --><div class="flex mb-6"><button id="ordersTab" class="px-6 py-3 font-medium text-white bg-red-600 rounded-t-lg shadow-sm"><i class="fas fa-utensils mr-2"></i>Pedidos</button><button id="chatwootTab" class="px-6 py-3 font-medium text-red-800 bg-white ml-1 rounded-t-lg shadow-sm hover:bg-gray-100 transition-colors"><i class="fas fa-comments mr-2"></i>Chatwoot</button></div><!-- Orders Dashboard --><div id="ordersDashboard" class=""><!-- Filters and Search --><div class="bg-white rounded-lg shadow p-4 mb-6"><div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4"><div class="flex space-x-2"><select class="border rounded px-3 py-2"><option>Todos os status</option><option>Pendente</option><option>Em produção</option><option>Saiu para entrega</option><option>Entregue</option></select><input type="date" class="border rounded px-3 py-2"></div><div class="relative flex-1 max-w-md"><input type="text" placeholder="Buscar pedido..." class="border rounded px-3 py-2 pl-10 w-full"><i class="fas fa-search absolute left-3 top-3 text-gray-400"></i></div></div></div><!-- Orders List --><div class="bg-white rounded-lg shadow-lg overflow-hidden border border-gray-200"><div class="grid grid-cols-12 bg-red-600 text-white p-4 font-medium"><div class="col-span-1 font-bold">Nº</div><div class="col-span-2 font-bold">Cliente</div><div class="col-span-2 font-bold">Data/Hora</div><div class="col-span-2 font-bold">Total</div><div class="col-span-2 font-bold">Pagamento</div><div class="col-span-2 font-bold">Status</div><div class="col-span-1 font-bold">Ações</div></div><!-- Order Item (Repeater) --><div class="order-item grid grid-cols-12 items-center p-4 border-b border-gray-200 hover:bg-red-50 transition-colors duration-200"><div class="col-span-1 font-bold text-red-600">#1234</div><div class="col-span-2">João da Silva</div><div class="col-span-2 text-sm text-gray-600">10/06/2023 14:30</div><div class="col-span-2 font-semibold">R$ 59,90</div><div class="col-span-2"><span class="inline-flex items-center px-2 py-1 rounded-full text-xs bg-blue-100 text-blue-800"><i class="fas fa-credit-card mr-1"></i> Cartão</span></div><div class="col-span-2"><span class="inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800 animate-pulse status-change"><i class="fas fa-clock mr-1"></i> Pendente</span></div><div class="col-span-1 flex justify-center"><button class="view-details-btn text-red-600 hover:text-red-800 transition-colors"><i class="fas fa-eye hover:scale-110 transition-transform"></i></button></div></div><!-- More order items would go here --></div></div><!-- Chatwoot Dashboard (Hidden by default) --><div id="chatwootDashboard" class="hidden"><div class="bg-white rounded-lg shadow p-6"><h2 class="text-xl font-bold mb-4">Conversas do Chatwoot</h2><div class="grid grid-cols-1 md:grid-cols-3 gap-6"><div class="col-span-1"><div class="bg-gray-100 p-4 rounded-lg"><h3 class="font-medium mb-2">Conversas Ativas</h3><div class="space-y-2" id="activeChats"><!-- Active chats would appear here --></div></div></div><div class="col-span-2"><div class="bg-gray-100 p-4 rounded-lg h-96 overflow-y-auto"><h3 class="font-medium mb-2">Mensagens</h3><div id="chatMessages"><!-- Chat messages would appear here --></div></div><div class="mt-4"><textarea class="w-full border rounded p-3" placeholder="Digite sua mensagem..."></textarea><button class="mt-2 bg-primary text-white px-4 py-2 rounded hover:bg-indigo-700">Enviar</button></div></div></div></div></div><!-- Order Details Modal (Hidden by default) --><div id="orderDetailsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50 hidden"><div class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-y-auto"><div class="p-6"><div class="flex justify-between items-start mb-4"><h3 class="text-xl font-bold">Detalhes do Pedido #1234</h3><button id="closeModalBtn" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button></div><div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6"><div><h4 class="font-medium mb-2 text-gray-700">Informações do Cliente</h4><div class="bg-gray-50 p-4 rounded-lg"><p><span class="font-medium">Nome:</span> João da Silva</p><p><span class="font-medium">Telefone:</span> (11) 98765-4321</p><p><span class="font-medium">Endereço:</span> Rua Exemplo, 123 - Centro</p><p><span class="font-medium">Referência:</span> Próximo à praça</p></div></div><div><h4 class="font-medium mb-2 text-gray-700">Resumo do Pedido</h4><div class="bg-gray-50 p-4 rounded-lg"><p><span class="font-medium">Data/Hora:</span> 10/06/2023 14:30</p><p><span class="font-medium">Pagamento:</span> Cartão (Crédito)</p><p><span class="font-medium">Entrega:</span> R$ 5,00</p><p><span class="font-medium">Total:</span> R$ 59,90</p><div class="mt-2"><span class="font-medium">Status:</span><span id="orderStatus" class="px-2 py-1 rounded-full text-xs bg-yellow-100 text-yellow-800">Pendente</span></div></div></div></div><div class="mb-6"><h4 class="font-medium mb-2 text-gray-700">Itens do Pedido</h4><div class="border rounded-lg overflow-hidden"><div class="grid grid-cols-12 bg-gray-100 p-3 font-medium"><div class="col-span-6">Item</div><div class="col-span-2 text-center">Qtd</div><div class="col-span-2 text-right">Preço</div><div class="col-span-2 text-right">Subtotal</div></div><div class="item-list"><!-- Items would be listed here --><div class="grid grid-cols-12 p-3 border-b"><div class="col-span-6">Pizza Margherita</div><div class="col-span-2 text-center">1</div><div class="col-span-2 text-right">R$ 35,90</div><div class="col-span-2 text-right">R$ 35,90</div></div><div class="grid grid-cols-12 p-3 border-b"><div class="col-span-6">Refrigerante 2L</div><div class="col-span-2 text-center">1</div><div class="col-span-2 text-right">R$ 10,00</div><div class="col-span-2 text-right">R$ 10,00</div></div><div class="grid grid-cols-12 p-3 font-medium bg-gray-50"><div class="col-span-10 text-right">Total:</div><div class="col-span-2 text-right">R$ 45,90</div></div></div></div></div><div class="flex flex-wrap justify-between gap-4"><button id="printOrderBtn" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded flex items-center"><i class="fas fa-print mr-2"></i> Imprimir Comanda</button><div class="flex space-x-2"><button id="preparingBtn" class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-2 rounded flex items-center"><i class="fas fa-utensils mr-2"></i> Em Produção</button><button id="deliveryBtn" class="bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded flex items-center"><i class="fas fa-motorcycle mr-2"></i> Saiu para Entrega</button><button id="deliveredBtn" class="bg-purple-500 hover:bg-purple-600 text-white px-4 py-2 rounded flex items-center"><i class="fas fa-check-circle mr-2"></i> Entregue</button></div></div></div></div></div><!-- Print Content (Hidden until print button is clicked) --><div id="printContent" class="print-content hidden"><div class="p-4"><div class="text-center mb-4"><h2 class="text-xl font-bold" id="printRestaurantName">NOME DO RESTAURANTE</h2><p class="text-sm" id="printRestaurantInfo">Endereço: Rua Exemplo, 123 | Tel: (11) 1234-5678</p></div><div class="border-t-2 border-b-2 border-black py-2 mb-2"><p class="text-center font-medium">COMANDA #<span id="printOrderNumber">1234</span></p><p class="text-center text-sm"><span id="printOrderDate">10/06/2023 14:30</span></p></div><div class="mb-2"><p><span class="font-medium">Cliente:</span> <span id="printCustomerName">João da Silva</span></p><p><span class="font-medium">Endereço:</span> <span id="printCustomerAddress">Rua Exemplo, 123 - Centro</span></p><p><span class="font-medium">Referência:</span> <span id="printCustomerRef">Próximo à praça</span></p><p><span class="font-medium">Telefone:</span> <span id="printCustomerPhone">(11) 98765-4321</span></p></div><table class="w-full mb-2"><thead><tr class="border-b border-black"><th class="text-left">Item</th><th class="text-right">Qtd</th><th class="text-right">Preço</th><th class="text-right">Subtotal</th></tr></thead><tbody id="printOrderItems"><tr><td>Pizza Margherita</td><td class="text-right">1</td><td class="text-right">35,90</td><td class="text-right">35,90</td></tr><tr><td>Refrigerante 2L</td><td class="text-right">1</td><td class="text-right">10,00</td><td class="text-right">10,00</td></tr><tr class="font-bold"><td class="border-t border-black">Entrega</td><td class="border-t border-black"></td><td class="border-t border-black"></td><td class="border-t border-black text-right">5,00</td></tr><tr class="font-bold"><td class="border-t border-black">Total</td><td class="border-t border-black"></td><td class="border-t border-black"></td><td class="border-t border-black text-right">50,90</td></tr></tbody></table><div class="text-center mt-4"><p>__________________________________________</p><p>Assinatura do Entregador</p></div><div class="text-center mt-4 text-xs"><p>Muito obrigado pela preferência!</p><p>Volte sempre!</p></div></div></div><!-- Admin Modal (Hidden by default) --><div id="adminModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50 hidden"><div class="bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[90vh] overflow-y-auto"><div class="p-6"><div class="flex justify-between items-start mb-4"><h3 class="text-xl font-bold">Configurações de Administração</h3><button id="closeAdminModalBtn" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button></div><div class="space-y-6"><div><h4 class="font-medium mb-2 text-gray-700">Informações do Estabelecimento</h4><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div class="col-span-2"><label class="block text-sm font-medium text-gray-700 mb-1">Nome do Estabelecimento</label><input type="text" class="w-full border rounded px-3 py-2" value="Meu Restaurante"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Endereço</label><input type="text" class="w-full border rounded px-3 py-2" value="Rua Exemplo, 123"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Telefone</label><input type="text" class="w-full border rounded px-3 py-2" value="(11) 1234-5678"></div></div></div><div><h4 class="font-medium mb-2 text-gray-700">Logo do Estabelecimento</h4><div class="flex items-center space-x-4"><div id="clientLogoPreview" class="h-20 w-20 bg-gray-200 rounded flex items-center justify-center overflow-hidden"><span class="text-gray-500 text-xs">Logo do Cliente</span></div><div><input type="file" id="logoUpload" class="hidden" accept="image/*"><button id="uploadLogoBtn" class="bg-primary text-white px-4 py-2 rounded hover:bg-indigo-700"><i class="fas fa-upload mr-2"></i> Carregar Logo</button><p class="text-xs text-gray-500 mt-1">Max. 1MB (Recomendado: 200x200px)</p></div></div></div><div><h4 class="font-medium mb-2 text-gray-700">Configurações de Webhook</h4><div class="space-y-2"><div><label class="block text-sm font-medium text-gray-700 mb-1">URL Webhook Pedido em Produção</label><input type="text" class="w-full border rounded px-3 py-2" placeholder="https://exemplo.com/webhook/producao"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">URL Webhook Pedido Saiu para Entrega</label><input type="text" class="w-full border rounded px-3 py-2" placeholder="https://exemplo.com/webhook/entrega"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">URL Webhook Pedido Entregue</label><input type="text" class="w-full border rounded px-3 py-2" placeholder="https://exemplo.com/webhook/entregue"></div></div></div><div class="pt-4 border-t"><button class="bg-primary text-white px-6 py-2 rounded-lg hover:bg-indigo-700">Salvar Configurações</button></div></div></div></div></div></main><script>// DOM Elementsconst ordersTab = document.getElementById('ordersTab');const chatwootTab = document.getElementById('chatwootTab');const ordersDashboard = document.getElementById('ordersDashboard');const chatwootDashboard = document.getElementById('chatwootDashboard');const viewDetailsBtns = document.querySelectorAll('.view-details-btn');const orderDetailsModal = document.getElementById('orderDetailsModal');const closeModalBtn = document.getElementById('closeModalBtn');const printOrderBtn = document.getElementById('printOrderBtn');const preparingBtn = document.getElementById('preparingBtn');const deliveryBtn = document.getElementById('deliveryBtn');const deliveredBtn = document.getElementById('deliveredBtn');const orderStatus = document.getElementById('orderStatus');const printContent = document.getElementById('printContent');const adminBtn = document.getElementById('adminBtn');const adminModal = document.getElementById('adminModal');const closeAdminModalBtn = document.getElementById('closeAdminModalBtn');const uploadLogoBtn = document.getElementById('uploadLogoBtn');const logoUpload = document.getElementById('logoUpload');const clientLogoPreview = document.getElementById('clientLogoPreview');const clientLogoArea = document.getElementById('clientLogoArea');// Status Change Functionsfunction updateOrderStatus(newStatus, newClass, newText) {orderStatus.textContent = newText;orderStatus.className = 'px-2 py-1 rounded-full text-xs ' + newClass;// Atualize o status no item da lista tambémconst orderItem = document.querySelector('.order-item');const statusSpan = orderItem.querySelector('span');statusSpan.textContent = newText;statusSpan.className = 'inline-flex items-center px-3 py-1 rounded-full text-xs font-medium ' + newClass;// Se for "Entregue", remover a animaçãoif (newStatus === 'delivered') {statusSpan.classList.remove('animate-pulse');}}// Event ListenerspreparingBtn.addEventListener('click', () => {updateOrderStatus('preparing', 'bg-orange-100 text-orange-800', 'Em Produção');});deliveryBtn.addEventListener('click', () => {updateOrderStatus('delivery', 'bg-green-100 text-green-800', 'Saiu para Entrega');});deliveredBtn.addEventListener('click', () => {updateOrderStatus('delivered', 'bg-purple-100 text-purple-800', 'Entregue');});ordersTab.addEventListener('click', () => {ordersDashboard.classList.remove('hidden');chatwootDashboard.classList.add('hidden');ordersTab.classList.add('border-primary', 'text-primary');chatwootTab.classList.remove('border-primary', 'text-primary');});chatwootTab.addEventListener('click', () => {ordersDashboard.classList.add('hidden');chatwootDashboard.classList.remove('hidden');chatwootTab.classList.add('border-primary', 'text-primary');ordersTab.classList.remove('border-primary', 'text-primary');});viewDetailsBtns.forEach(btn => {btn.addEventListener('click', () => {orderDetailsModal.classList.remove('hidden');document.body.style.overflow = 'hidden';});});closeModalBtn.addEventListener('click', () => {orderDetailsModal.classList.add('hidden');document.body.style.overflow = 'auto';});printOrderBtn.addEventListener('click', () => {// Prepare print contentprintContent.classList.remove('hidden');// Use printContent for the comandaconst printWindow = window.open('', '', 'width=600,height=800');printWindow.document.write('<html><head><title>Comanda #1234</title>');printWindow.document.write('<style>body { font-family: "Courier New", monospace; padding: 20px; } table { width: 100%; border-collapse: collapse; } th, td { padding: 4px; } .text-right { text-align: right; } .text-center { text-align: center; } .font-bold { font-weight: bold; } .border-black { border-color: black; } .border-t { border-top-width: 1px; } .border-b { border-bottom-width: 1px; }</style>');printWindow.document.write('</head><body>');printWindow.document.write(printContent.innerHTML);printWindow.document.write('<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=LHSS/teste" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>
1234Dashboard para acompanhamento das conversar via chatwoot, e outro para acompanhar os pedidos com opção de atualização do status do pedido e botão para imprimir a comanda na impressora 80 colunas (Quando o pedido é confirmado o status fica como ‘pedido pendente’, quando clica no botão imprimir ele faz um chamado webhook em um fluxo separado que envia uma mensagem para o cliente informando que o pedido está sendo preparado, e muda o status do pedido para ‘Em Produção’ e deixa um botão ao lado Verde para que o atendente humano clique quando o pedido sair para a entrega que fará um webhook que notificará o cliente que o pedido saiu pra entrega.) O Dashboard precisará de uma área de adminstrador para personalização, área que o cliente irá preencher as informações dele e colocar sua logomarca. quando clicar em entregue fazer uma chamada webhook para ativar um fluxo de avaliação de pedido no n8nessa será a logo do desenvolvedor que deverá ficar em destaque https://storage.googleapis.com/hostinger-horizons-assets-prod/5c29d94d-dcdf-4fd4-9ee6-e92bcee26348/6b958ee43f948b225fa53b776779bde2.png, preciso que a area de logo do cliente fique funcional com a opção de subir logo na area Administraçãovamos organizar o Gerenciar Pedido: quando clicar em detalhes deve aparecer as informações do pedido com Número do pedido, Nome do Cliente, Endereço, Ponto de Referência, Itens do Pedido com quantidade, Valor da entrega, Valor total, Forma de pagamento, Valor da entrega, Data e Hora do Pedido em destaque e o statusO botão imprimir deve criar um documento pronto para impressão estilo comanda de restaurante com os dados do pedido continuepreciso que todos o botão e interação fucione conforme a lógica, dê um designer moderdo para dashboard de restauranteos botões continuam a não fucionarREADME.md+7-5
index.html+509-19
prompts.txtAdded+4