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

43 lines
1.6 KiB
Vue

<!-- 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>