| <!DOCTYPE html> |
| <html lang="pt-BR"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>Área do corretor — Sahkey Imóveis</title> |
| <meta name="robots" content="noindex"> |
| <link rel="preconnect" href="https://fonts.googleapis.com"> |
| <link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap" rel="stylesheet"> |
| <link rel="stylesheet" href="/css/style.css"> |
| </head> |
| <body> |
|
|
| <header class="site-header"> |
| <nav class="nav"> |
| <a class="brand" href="index.html">Sahkey <small>Imóveis</small></a> |
| <button class="nav-toggle" aria-label="Abrir menu">☰</button> |
| <ul class="nav-links"> |
| <li><a href="index.html">Início</a></li> |
| <li><a href="busca.html">Comprar & Alugar</a></li> |
| <li><a href="servicos.html">Serviços</a></li> |
| <li><a href="sobre.html">Sobre</a></li> |
| <li><a href="contato.html">Contato</a></li> |
| </ul> |
| <a class="nav-cta" href="/api/docs">API / Swagger</a> |
| </nav> |
| </header> |
|
|
| <section class="page-hero" style="padding-bottom:24px"> |
| <div class="container"> |
| <span class="eyebrow">Área do corretor · demonstração</span> |
| <h1>Gerenciar anúncios</h1> |
| <p>Painel de exemplo para criar, editar e remover anúncios diretamente na planilha que alimenta o site. <strong>Sem autenticação</strong> — em produção, proteja esta rota antes de publicar.</p> |
| </div> |
| </section> |
|
|
| <section class="container"> |
| <div class="section-head"> |
| <div> |
| <h2 class="mt-0">Novo anúncio</h2> |
| <p>Os campos seguem exatamente o que a API espera — nada de retrabalho na planilha.</p> |
| </div> |
| <a class="btn btn-outline" href="/api/anuncios/export/planilha">Baixar planilha (.xlsx)</a> |
| </div> |
|
|
| <form class="form-card" id="form-anuncio"> |
| <input type="hidden" id="a-id"> |
| <div class="form-grid"> |
| <div class="form-field"> |
| <label for="a-tipo-negocio">Tipo de negócio</label> |
| <select id="a-tipo-negocio" required> |
| <option value="Venda">Venda</option> |
| <option value="Locação">Locação</option> |
| </select> |
| </div> |
| <div class="form-field"> |
| <label for="a-tipo-imovel">Tipo de imóvel</label> |
| <select id="a-tipo-imovel" required> |
| <option>Casa</option><option>Apartamento</option><option>Terreno</option> |
| <option>Comercial</option><option>Sala Comercial</option><option>Galpão</option> |
| <option>Chácara/Sítio</option><option>Cobertura</option><option>Kitnet/Studio</option> |
| </select> |
| </div> |
| </div> |
|
|
| <div class="form-field"> |
| <label for="a-titulo">Título</label> |
| <input type="text" id="a-titulo" required minlength="3" maxlength="150" placeholder="Ex.: Apartamento 2 quartos vista mar - Caiobá"> |
| </div> |
| <div class="form-field"> |
| <label for="a-descricao">Descrição</label> |
| <textarea id="a-descricao" maxlength="3000"></textarea> |
| </div> |
|
|
| <div class="form-grid"> |
| <div class="form-field"> |
| <label for="a-endereco">Endereço</label> |
| <input type="text" id="a-endereco"> |
| </div> |
| <div class="form-field"> |
| <label for="a-bairro">Bairro</label> |
| <input type="text" id="a-bairro"> |
| </div> |
| <div class="form-field"> |
| <label for="a-cidade">Cidade</label> |
| <input type="text" id="a-cidade" required list="cidades-litoral"> |
| <datalist id="cidades-litoral"> |
| <option value="Matinhos"><option value="Guaratuba"><option value="Pontal do Paraná"> |
| </datalist> |
| </div> |
| <div class="form-field"> |
| <label for="a-estado">UF</label> |
| <input type="text" id="a-estado" required maxlength="2" value="PR"> |
| </div> |
| <div class="form-field"> |
| <label for="a-cep">CEP</label> |
| <input type="text" id="a-cep"> |
| </div> |
| </div> |
|
|
| <div class="form-grid"> |
| <div class="form-field"> |
| <label for="a-preco">Preço (R$)</label> |
| <input type="number" id="a-preco" required min="0" step="0.01"> |
| </div> |
| <div class="form-field"> |
| <label for="a-condominio">Condomínio (R$)</label> |
| <input type="number" id="a-condominio" min="0" step="0.01" value="0"> |
| </div> |
| <div class="form-field"> |
| <label for="a-iptu">IPTU (R$)</label> |
| <input type="number" id="a-iptu" min="0" step="0.01" value="0"> |
| </div> |
| <div class="form-field"> |
| <label for="a-area-util">Área útil (m²)</label> |
| <input type="number" id="a-area-util" min="0" step="0.01" value="0"> |
| </div> |
| <div class="form-field"> |
| <label for="a-area-total">Área total (m²)</label> |
| <input type="number" id="a-area-total" min="0" step="0.01" value="0"> |
| </div> |
| </div> |
|
|
| <div class="form-grid"> |
| <div class="form-field"> |
| <label for="a-quartos">Quartos</label> |
| <input type="number" id="a-quartos" min="0" value="0"> |
| </div> |
| <div class="form-field"> |
| <label for="a-suites">Suítes</label> |
| <input type="number" id="a-suites" min="0" value="0"> |
| </div> |
| <div class="form-field"> |
| <label for="a-banheiros">Banheiros</label> |
| <input type="number" id="a-banheiros" min="0" value="0"> |
| </div> |
| <div class="form-field"> |
| <label for="a-vagas">Vagas de garagem</label> |
| <input type="number" id="a-vagas" min="0" value="0"> |
| </div> |
| </div> |
|
|
| <div class="form-grid"> |
| <div class="form-field"> |
| <label for="a-status">Status</label> |
| <select id="a-status"> |
| <option>Disponível</option><option>Reservado</option><option>Vendido</option> |
| <option>Alugado</option><option>Inativo</option> |
| </select> |
| </div> |
| <div class="form-field"> |
| <label for="a-corretor">Corretor responsável</label> |
| <input type="text" id="a-corretor"> |
| </div> |
| <div class="form-field"> |
| <label for="a-telefone">Telefone de contato</label> |
| <input type="text" id="a-telefone"> |
| </div> |
| <div class="form-field" style="justify-content:center"> |
| <label><input type="checkbox" id="a-destaque"> Marcar como destaque</label> |
| </div> |
| </div> |
|
|
| <div style="display:flex;gap:12px;margin-top:8px"> |
| <button class="btn btn-primary" type="submit" id="btn-salvar">Salvar anúncio</button> |
| <button class="btn btn-outline" type="button" id="btn-cancelar" style="display:none">Cancelar edição</button> |
| </div> |
| </form> |
| </section> |
|
|
| <section class="container"> |
| <div class="section-head"> |
| <div> |
| <h2 class="mt-0">Anúncios cadastrados</h2> |
| <p id="admin-total" class="muted">carregando…</p> |
| </div> |
| </div> |
| <div style="overflow-x:auto"> |
| <table class="table-admin"> |
| <thead> |
| <tr><th>#</th><th>Título</th><th>Negócio</th><th>Cidade</th><th>Preço</th><th>Status</th><th>Ações</th></tr> |
| </thead> |
| <tbody id="admin-tbody"> |
| <tr><td colspan="7" class="muted">Carregando anúncios…</td></tr> |
| </tbody> |
| </table> |
| </div> |
| </section> |
|
|
| <footer class="site-footer"> |
| <div class="container"> |
| <div class="footer-bottom"> |
| <span>© <span data-year></span> Sahkey Imóveis · Painel de demonstração</span> |
| <span><a href="index.html">Voltar ao site</a></span> |
| </div> |
| </div> |
| </footer> |
|
|
| <script src="/js/api.js"></script> |
| <script src="/js/main.js"></script> |
| <script src="/js/admin.js"></script> |
| </body> |
| </html> |
|
|