52 lines
1.6 KiB
Vue
52 lines
1.6 KiB
Vue
<!-- front-end/app/pages/sistema/usuarios.vue -->
|
|
<script setup lang="ts">
|
|
import { usuarios } from '~/data/mock/usuarios'
|
|
|
|
const perfilLabel: Record<string, string> = {
|
|
comercial: 'Comercial',
|
|
juridico: 'Jurídico',
|
|
tecnico: 'Técnico',
|
|
diretoria: 'Diretoria',
|
|
administrador: 'Administrador',
|
|
}
|
|
|
|
const columns = [
|
|
{ key: 'nome', label: 'Nome' },
|
|
{ key: 'email', label: 'E-mail' },
|
|
{ key: 'perfil', label: 'Perfil' },
|
|
{ key: 'status', label: 'Status' },
|
|
]
|
|
</script>
|
|
|
|
<template>
|
|
<div class="page">
|
|
<AppTopbar title="Usuários" breadcrumb="Sistema · Usuários">
|
|
<template #actions>
|
|
<UButton size="sm" class="btn-primary">+ Novo Usuário</UButton>
|
|
</template>
|
|
</AppTopbar>
|
|
<div class="content">
|
|
<div class="card">
|
|
<UTable :data="usuarios" :columns="columns">
|
|
<template #perfil-cell="{ row }">{{ perfilLabel[row.original.perfil] }}</template>
|
|
<template #status-cell="{ row }">
|
|
<UBadge
|
|
:label="row.original.status === 'ativo' ? 'Ativo' : 'Inativo'"
|
|
:color="row.original.status === 'ativo' ? 'success' : 'neutral'"
|
|
variant="soft"
|
|
size="xs"
|
|
/>
|
|
</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>
|