Files
lic/front-end/app/pages/gestao/concorrentes.vue

40 lines
1.2 KiB
Vue

<!-- front-end/app/pages/gestao/concorrentes.vue -->
<script setup lang="ts">
import { concorrentes } from '~/data/mock/concorrentes'
const columns = [
{ key: 'cnpj', label: 'CNPJ' },
{ key: 'nome', label: 'Empresa' },
{ key: 'totalDisputas', label: 'Disputas' },
{ key: 'totalVitorias', label: 'Vitórias' },
{ key: 'taxaVitoria', label: 'Taxa' },
]
const dados = computed(() => concorrentes.map(c => ({
...c,
taxaVitoria: c.totalDisputas > 0 ? `${Math.round((c.totalVitorias / c.totalDisputas) * 100)}%` : '0%',
})))
</script>
<template>
<div class="page">
<AppTopbar title="Concorrentes" breadcrumb="Gestão · Concorrentes">
<template #actions>
<UButton size="sm" class="btn-primary">+ Adicionar Concorrente</UButton>
</template>
</AppTopbar>
<div class="content">
<div class="card">
<UTable :data="dados" :columns="columns" />
</div>
</div>
</div>
</template>
<style scoped>
.page { display: flex; flex-direction: column; height: 100vh; }
.content { padding: 20px 22px; flex: 1; overflow-y: auto; }
.card { background: white; border-radius: 11px; border: 1px solid #e2e8f0; overflow: hidden; }
.btn-primary { background: linear-gradient(135deg, #667eea, #764ba2) !important; }
</style>