feat: página de gestão de documentos
This commit is contained in:
57
front-end/app/pages/gestao/documentos.vue
Normal file
57
front-end/app/pages/gestao/documentos.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<!-- front-end/app/pages/gestao/documentos.vue -->
|
||||
<script setup lang="ts">
|
||||
import { documentos } from '~/data/mock/documentos'
|
||||
|
||||
const statusConfig = {
|
||||
valida: { label: 'Válida', color: '#16a34a', bg: '#f0fdf4' },
|
||||
vencendo: { label: 'Vencendo', color: '#d97706', bg: '#fffbeb' },
|
||||
vencida: { label: 'Vencida', color: '#dc2626', bg: '#fef2f2' },
|
||||
sem_vencimento: { label: 'OK', color: '#64748b', bg: '#f8fafc' },
|
||||
}
|
||||
|
||||
const tipoLabel: Record<string, string> = {
|
||||
certidao: 'Certidão',
|
||||
contrato_social: 'Contrato Social',
|
||||
balanco: 'Balanço',
|
||||
atestado: 'Atestado',
|
||||
procuracao: 'Procuração',
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page">
|
||||
<AppTopbar title="Documentos da Empresa" breadcrumb="Gestão · Documentos">
|
||||
<template #actions>
|
||||
<UButton size="sm" class="btn-primary">+ Adicionar Documento</UButton>
|
||||
</template>
|
||||
</AppTopbar>
|
||||
<div class="content">
|
||||
<div class="card">
|
||||
<div v-for="doc in documentos" :key="doc.id" class="doc-row">
|
||||
<div class="doc-info">
|
||||
<p class="doc-nome">{{ doc.nome }}</p>
|
||||
<p class="doc-meta">{{ tipoLabel[doc.tipo] }} · {{ doc.dataVencimento ? doc.dataVencimento.toLocaleDateString('pt-BR') : 'Sem vencimento' }}</p>
|
||||
</div>
|
||||
<span
|
||||
class="doc-status"
|
||||
:style="{ color: statusConfig[doc.status].color, background: statusConfig[doc.status].bg }"
|
||||
>
|
||||
{{ statusConfig[doc.status].label }}
|
||||
</span>
|
||||
</div>
|
||||
</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; }
|
||||
.doc-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #f8fafc; }
|
||||
.doc-row:last-child { border-bottom: none; }
|
||||
.doc-nome { font-size: 13px; font-weight: 600; color: #0f172a; }
|
||||
.doc-meta { font-size: 11px; color: #94a3b8; margin-top: 2px; }
|
||||
.doc-status { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
|
||||
.btn-primary { background: linear-gradient(135deg, #667eea, #764ba2) !important; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user