feat: tipos TypeScript globais
This commit is contained in:
112
front-end/app/types/index.ts
Normal file
112
front-end/app/types/index.ts
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
// front-end/app/types/index.ts
|
||||||
|
|
||||||
|
export type StatusEdital =
|
||||||
|
| 'em_analise'
|
||||||
|
| 'elaborando_proposta'
|
||||||
|
| 'impugnacao'
|
||||||
|
| 'recurso'
|
||||||
|
| 'participando'
|
||||||
|
| 'vencida'
|
||||||
|
| 'perdida'
|
||||||
|
| 'deserta'
|
||||||
|
|
||||||
|
export interface Edital {
|
||||||
|
id: string
|
||||||
|
numero: string
|
||||||
|
orgao: string
|
||||||
|
modalidade: 'pregao_eletronico' | 'pregao_presencial' | 'concorrencia' | 'dispensa' | 'inexigibilidade'
|
||||||
|
objeto: string
|
||||||
|
plataforma: string
|
||||||
|
valorEstimado: number
|
||||||
|
dataPublicacao: Date
|
||||||
|
dataAbertura: Date
|
||||||
|
status: StatusEdital
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Documento {
|
||||||
|
id: string
|
||||||
|
nome: string
|
||||||
|
tipo: 'certidao' | 'contrato_social' | 'balanco' | 'atestado' | 'procuracao'
|
||||||
|
dataVencimento: Date | null
|
||||||
|
status: 'valida' | 'vencendo' | 'vencida' | 'sem_vencimento'
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Prazo {
|
||||||
|
id: string
|
||||||
|
titulo: string
|
||||||
|
descricao: string
|
||||||
|
dataLimite: Date
|
||||||
|
urgencia: 'critico' | 'urgente' | 'normal'
|
||||||
|
editalId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DashboardStats {
|
||||||
|
totalEditais: number
|
||||||
|
taxaVitoria: number
|
||||||
|
valorGanho: number
|
||||||
|
alertasAtivos: number
|
||||||
|
editalsPorEtapaPipeline: Record<number, number>
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Orgao {
|
||||||
|
id: string
|
||||||
|
nome: string
|
||||||
|
esfera: 'federal' | 'estadual' | 'municipal'
|
||||||
|
estado: string
|
||||||
|
contatos: string[]
|
||||||
|
totalParticipacoes: number
|
||||||
|
totalVitorias: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Concorrente {
|
||||||
|
id: string
|
||||||
|
cnpj: string
|
||||||
|
nome: string
|
||||||
|
totalDisputas: number
|
||||||
|
totalVitorias: number
|
||||||
|
historicoDisputas: { editalId: string; venceu: boolean; valor: number }[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Contrato {
|
||||||
|
id: string
|
||||||
|
numero: string
|
||||||
|
editalId: string
|
||||||
|
orgao: string
|
||||||
|
valor: number
|
||||||
|
dataInicio: Date
|
||||||
|
dataFim: Date
|
||||||
|
fiscalContrato: string
|
||||||
|
reajusteAnual: number
|
||||||
|
prorrogacaoMaxima: number
|
||||||
|
sla: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Usuario {
|
||||||
|
id: string
|
||||||
|
nome: string
|
||||||
|
email: string
|
||||||
|
perfil: 'comercial' | 'juridico' | 'tecnico' | 'diretoria' | 'administrador'
|
||||||
|
status: 'ativo' | 'inativo'
|
||||||
|
}
|
||||||
|
|
||||||
|
export const STATUS_EDITAL_CONFIG: Record<StatusEdital, { label: string; bg: string; color: string }> = {
|
||||||
|
em_analise: { label: 'Em Análise', bg: '#eff6ff', color: '#0284c7' },
|
||||||
|
elaborando_proposta: { label: 'Elaborando Proposta', bg: '#faf5ff', color: '#7c3aed' },
|
||||||
|
impugnacao: { label: 'Impugnação', bg: '#fff7ed', color: '#ea580c' },
|
||||||
|
recurso: { label: 'Recurso', bg: '#fffbeb', color: '#d97706' },
|
||||||
|
participando: { label: 'Participando', bg: '#eff6ff', color: '#3b82f6' },
|
||||||
|
vencida: { label: 'Vencida', bg: '#f0fdf4', color: '#16a34a' },
|
||||||
|
perdida: { label: 'Perdida', bg: '#fef2f2', color: '#dc2626' },
|
||||||
|
deserta: { label: 'Deserta / Fracassada', bg: '#f8fafc', color: '#64748b' },
|
||||||
|
}
|
||||||
|
|
||||||
|
export const PIPELINE_ETAPAS = [
|
||||||
|
'Identificado',
|
||||||
|
'Análise de Viabilidade',
|
||||||
|
'Elaborando Proposta',
|
||||||
|
'Disputa / Lances',
|
||||||
|
'Habilitação',
|
||||||
|
'Recurso / Contrarrazões',
|
||||||
|
'Adjudicação',
|
||||||
|
'Contrato',
|
||||||
|
] as const
|
||||||
Reference in New Issue
Block a user