feat: páginas de órgãos, concorrentes e contratos
This commit is contained in:
39
front-end/app/pages/gestao/concorrentes.vue
Normal file
39
front-end/app/pages/gestao/concorrentes.vue
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<!-- 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>
|
||||||
42
front-end/app/pages/gestao/contratos.vue
Normal file
42
front-end/app/pages/gestao/contratos.vue
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<!-- front-end/app/pages/gestao/contratos.vue -->
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { contratos } from '~/data/mock/contratos'
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{ key: 'numero', label: 'Nº Contrato' },
|
||||||
|
{ key: 'orgao', label: 'Órgão' },
|
||||||
|
{ key: 'valor', label: 'Valor' },
|
||||||
|
{ key: 'dataInicio', label: 'Início' },
|
||||||
|
{ key: 'dataFim', label: 'Término' },
|
||||||
|
{ key: 'fiscalContrato', label: 'Fiscal' },
|
||||||
|
{ key: 'sla', label: 'SLA' },
|
||||||
|
]
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
<AppTopbar title="Contratos" breadcrumb="Gestão · Contratos">
|
||||||
|
<template #actions>
|
||||||
|
<UButton size="sm" class="btn-primary">+ Novo Contrato</UButton>
|
||||||
|
</template>
|
||||||
|
</AppTopbar>
|
||||||
|
<div class="content">
|
||||||
|
<div class="card">
|
||||||
|
<UTable :data="contratos" :columns="columns">
|
||||||
|
<template #valor-cell="{ row }">
|
||||||
|
{{ new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL', maximumFractionDigits: 0 }).format(row.original.valor) }}
|
||||||
|
</template>
|
||||||
|
<template #dataInicio-cell="{ row }">{{ row.original.dataInicio.toLocaleDateString('pt-BR') }}</template>
|
||||||
|
<template #dataFim-cell="{ row }">{{ row.original.dataFim.toLocaleDateString('pt-BR') }}</template>
|
||||||
|
</UTable>
|
||||||
|
</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>
|
||||||
43
front-end/app/pages/gestao/orgaos.vue
Normal file
43
front-end/app/pages/gestao/orgaos.vue
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<!-- front-end/app/pages/gestao/orgaos.vue -->
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { orgaos } from '~/data/mock/orgaos'
|
||||||
|
|
||||||
|
const esferaLabel = { federal: 'Federal', estadual: 'Estadual', municipal: 'Municipal' }
|
||||||
|
const columns = [
|
||||||
|
{ key: 'nome', label: 'Órgão' },
|
||||||
|
{ key: 'esfera', label: 'Esfera' },
|
||||||
|
{ key: 'estado', label: 'UF' },
|
||||||
|
{ key: 'totalParticipacoes', label: 'Participações' },
|
||||||
|
{ key: 'totalVitorias', label: 'Vitórias' },
|
||||||
|
{ key: 'taxaVitoria', label: 'Taxa' },
|
||||||
|
]
|
||||||
|
|
||||||
|
const dados = computed(() => orgaos.map(o => ({
|
||||||
|
...o,
|
||||||
|
taxaVitoria: o.totalParticipacoes > 0 ? `${Math.round((o.totalVitorias / o.totalParticipacoes) * 100)}%` : '0%',
|
||||||
|
})))
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
<AppTopbar title="Órgãos Públicos" breadcrumb="Gestão · Órgãos">
|
||||||
|
<template #actions>
|
||||||
|
<UButton size="sm" class="btn-primary">+ Adicionar Órgão</UButton>
|
||||||
|
</template>
|
||||||
|
</AppTopbar>
|
||||||
|
<div class="content">
|
||||||
|
<div class="card">
|
||||||
|
<UTable :data="dados" :columns="columns">
|
||||||
|
<template #esfera-cell="{ row }">{{ esferaLabel[row.original.esfera] }}</template>
|
||||||
|
</UTable>
|
||||||
|
</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>
|
||||||
Reference in New Issue
Block a user