Compare commits
72 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b664221d5d | ||
|
|
c3511a7065 | ||
|
|
5ef46780a5 | ||
|
|
fd79837fdc | ||
|
|
b5ea5a75a8 | ||
|
|
4561194b6b | ||
|
|
c8863e573f | ||
|
|
fca1d0c293 | ||
|
|
32937c9501 | ||
|
|
790dbe2df3 | ||
|
|
4770c42596 | ||
|
|
aceb17b235 | ||
|
|
21d5d94197 | ||
|
|
8f9659ea5b | ||
|
|
e39970587b | ||
|
|
bcbcc8557b | ||
|
|
f6f4892d09 | ||
|
|
1e9627e924 | ||
|
|
f23decf071 | ||
|
|
43d0863342 | ||
|
|
e24a35709b | ||
|
|
3eb0bd6f0e | ||
|
|
c6217b0520 | ||
|
|
7a2305c918 | ||
|
|
26f0016813 | ||
|
|
0ec57bd6f8 | ||
|
|
50814c9b14 | ||
|
|
2f891ffc38 | ||
|
|
52d16a1548 | ||
|
|
26df474611 | ||
|
|
cdc5e953a5 | ||
|
|
f1abddb383 | ||
|
|
824ac5da24 | ||
|
|
386b8b0307 | ||
|
|
a400bd233e | ||
|
|
60dce3876a | ||
|
|
7745961ff6 | ||
|
|
69d34c713e | ||
|
|
91346bfb19 | ||
|
|
d2494f20b7 | ||
|
|
4ef0517cb7 | ||
|
|
714a0e1f97 | ||
|
|
df46a60b81 | ||
|
|
0dc065d9bb | ||
|
|
99791bd06f | ||
|
|
5f8d2cf670 | ||
|
|
369dfcdfc3 | ||
|
|
f4b0118b36 | ||
|
|
053b86ee69 | ||
|
|
f7b13648a1 | ||
|
|
744e51d215 | ||
|
|
41f31ed2f1 | ||
|
|
0e3cb35309 | ||
|
|
24e259fc16 | ||
|
|
6fc76254c0 | ||
|
|
1c4d52ebe9 | ||
|
|
6e4646c96b | ||
|
|
f09b152192 | ||
|
|
ff3ff6c2e0 | ||
|
|
dfee9eb752 | ||
|
|
e01fa690a3 | ||
|
|
f9df3cd8a3 | ||
|
|
e98a293286 | ||
|
|
4c16b19184 | ||
|
|
de3a022800 | ||
|
|
4da16c3fe2 | ||
|
|
d1732558ff | ||
|
|
7db6d27035 | ||
|
|
32924cd8da | ||
| 7af4c82dd1 | |||
|
|
3df00e38bc | ||
|
|
7fe725bdeb |
710 changed files with 9795 additions and 6944 deletions
|
|
@ -1,13 +1,11 @@
|
||||||
{
|
{
|
||||||
"folders": [
|
"folders": [{ "path": "D:/IIS/Orius/app" }],
|
||||||
{ "path": "D:/IIS/Orius/app" }
|
|
||||||
],
|
|
||||||
"settings": {
|
"settings": {
|
||||||
// === GERAL ===
|
// === GERAL ===
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll": "explicit",
|
"source.fixAll": "explicit",
|
||||||
"source.organizeImports": "explicit"
|
"source.organizeImports": "explicit",
|
||||||
},
|
},
|
||||||
"editor.formatOnPaste": false,
|
"editor.formatOnPaste": false,
|
||||||
"editor.formatOnType": false,
|
"editor.formatOnType": false,
|
||||||
|
|
@ -23,53 +21,48 @@
|
||||||
"**/dist/**": true,
|
"**/dist/**": true,
|
||||||
"**/build/**": true,
|
"**/build/**": true,
|
||||||
"**/.next/**": true,
|
"**/.next/**": true,
|
||||||
"**/.git/**": true
|
"**/.git/**": true,
|
||||||
},
|
},
|
||||||
"search.exclude": {
|
"search.exclude": {
|
||||||
"**/node_modules": true,
|
"**/node_modules": true,
|
||||||
"**/dist": true,
|
"**/dist": true,
|
||||||
"**/.next": true,
|
"**/.next": true,
|
||||||
"**/.git": true
|
"**/.git": true,
|
||||||
},
|
},
|
||||||
|
|
||||||
// === FRONTEND ===
|
// === FRONTEND ===
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
"eslint.validate": [
|
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
|
||||||
"javascript",
|
|
||||||
"javascriptreact",
|
|
||||||
"typescript",
|
|
||||||
"typescriptreact"
|
|
||||||
],
|
|
||||||
"[typescript]": {
|
"[typescript]": {
|
||||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
"editor.defaultFormatter": "vscode.typescript-language-features",
|
||||||
},
|
},
|
||||||
"[typescriptreact]": {
|
"[typescriptreact]": {
|
||||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
"editor.defaultFormatter": "vscode.typescript-language-features",
|
||||||
},
|
},
|
||||||
|
|
||||||
// === TAILWIND ===
|
// === TAILWIND ===
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.css": "tailwindcss"
|
"*.css": "tailwindcss",
|
||||||
},
|
},
|
||||||
"tailwindCSS.includeLanguages": {
|
"tailwindCSS.includeLanguages": {
|
||||||
"plaintext": "html",
|
"plaintext": "html",
|
||||||
"javascript": "javascript",
|
"javascript": "javascript",
|
||||||
"typescriptreact": "typescriptreact"
|
"typescriptreact": "typescriptreact",
|
||||||
},
|
},
|
||||||
|
|
||||||
// === TERMINAIS ===
|
// === TERMINAIS ===
|
||||||
"terminal.integrated.profiles.windows": {
|
"terminal.integrated.profiles.windows": {
|
||||||
"Next.js Dev": {
|
"Next.js Dev": {
|
||||||
"path": "cmd.exe",
|
"path": "cmd.exe",
|
||||||
"args": ["/k", "cd D:\\IIS\\Orius\\app && npm run dev"]
|
"args": ["/k", "cd D:\\IIS\\Orius\\app && npm run dev"],
|
||||||
},
|
},
|
||||||
"Build & Preview": {
|
"Build & Preview": {
|
||||||
"path": "cmd.exe",
|
"path": "cmd.exe",
|
||||||
"args": ["/k", "cd D:\\IIS\\Orius\\app && npm run build && npm run start"]
|
"args": ["/k", "cd D:\\IIS\\Orius\\app && npm run build && npm run start"],
|
||||||
},
|
},
|
||||||
"Git Bash": {
|
"Git Bash": {
|
||||||
"path": "C:\\Program Files\\Git\\bin\\bash.exe"
|
"path": "C:\\Program Files\\Git\\bin\\bash.exe",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
"terminal.integrated.defaultProfile.windows": "Git Bash",
|
"terminal.integrated.defaultProfile.windows": "Git Bash",
|
||||||
|
|
||||||
|
|
@ -88,8 +81,8 @@
|
||||||
// === MISC ===
|
// === MISC ===
|
||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
"**/.DS_Store": true,
|
"**/.DS_Store": true,
|
||||||
"**/*.log": true
|
"**/*.log": true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
"launch": {
|
"launch": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
|
|
@ -101,9 +94,9 @@
|
||||||
"runtimeExecutable": "npm",
|
"runtimeExecutable": "npm",
|
||||||
"runtimeArgs": ["run", "dev"],
|
"runtimeArgs": ["run", "dev"],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"port": 9229
|
"port": 9229,
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
|
|
@ -118,7 +111,7 @@
|
||||||
"streetsidesoftware.code-spell-checker",
|
"streetsidesoftware.code-spell-checker",
|
||||||
"eamodio.gitlens",
|
"eamodio.gitlens",
|
||||||
"mhutchie.git-graph",
|
"mhutchie.git-graph",
|
||||||
"donjayamanne.githistory"
|
"donjayamanne.githistory",
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
65
Dockerfile
65
Dockerfile
|
|
@ -1,22 +1,59 @@
|
||||||
# Use uma imagem Node.js completa para o desenvolvimento
|
# ============================
|
||||||
FROM node:20-alpine
|
# STAGE 1 – Build
|
||||||
|
# ============================
|
||||||
|
FROM node:20-alpine AS builder
|
||||||
|
|
||||||
# Define o diretório de trabalho no container
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copia os arquivos de configuração do projeto
|
# Copia pacotes e instala dependências
|
||||||
COPY package.json package-lock.json ./
|
COPY package*.json ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
# Instala todas as dependências do projeto
|
# Copia o restante do código
|
||||||
# Isso é necessário para o modo de desenvolvimento, pois o build não pré-compila os arquivos.
|
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
# Copia o restante do código da sua aplicação
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Expõe a porta de desenvolvimento padrão do Next.js
|
# ---------- Variáveis de build ----------
|
||||||
|
# Estas variáveis são usadas pelo Next.js durante o "build"
|
||||||
|
# para embutir no bundle do frontend.
|
||||||
|
ARG NEXT_PUBLIC_ORIUS_APP_STATE
|
||||||
|
ARG NEXT_PUBLIC_ORIUS_APP_API_URL
|
||||||
|
ARG NEXT_PUBLIC_ORIUS_APP_API_PREFIX
|
||||||
|
ARG NEXT_PUBLIC_ORIUS_APP_API_CONTENT_TYPE
|
||||||
|
|
||||||
|
ENV NEXT_PUBLIC_ORIUS_APP_STATE=$NEXT_PUBLIC_ORIUS_APP_STATE
|
||||||
|
ENV NEXT_PUBLIC_ORIUS_APP_API_URL=$NEXT_PUBLIC_ORIUS_APP_API_URL
|
||||||
|
ENV NEXT_PUBLIC_ORIUS_APP_API_PREFIX=$NEXT_PUBLIC_ORIUS_APP_API_PREFIX
|
||||||
|
ENV NEXT_PUBLIC_ORIUS_APP_API_CONTENT_TYPE=$NEXT_PUBLIC_ORIUS_APP_API_CONTENT_TYPE
|
||||||
|
|
||||||
|
# ---------- Build ----------
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# ============================
|
||||||
|
# STAGE 2 – Runner (standalone)
|
||||||
|
# ============================
|
||||||
|
FROM node:20-alpine AS runner
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# ---------- Variáveis em runtime ----------
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
|
# Copia apenas o necessário do build
|
||||||
|
COPY --from=builder /app/.next/standalone ./
|
||||||
|
COPY --from=builder /app/.next/static ./.next/static
|
||||||
|
COPY --from=builder /app/public ./public
|
||||||
|
COPY --from=builder /app/package*.json ./
|
||||||
|
|
||||||
|
# ---------- Corrige permissões ----------
|
||||||
|
RUN addgroup -S nodejs && adduser -S nextjs -G nodejs \
|
||||||
|
&& mkdir -p .next/cache/images \
|
||||||
|
&& chown -R nextjs:nodejs /app
|
||||||
|
|
||||||
|
USER nextjs
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Define o comando para iniciar a aplicação em modo de desenvolvimento
|
# ---------- Executa o servidor ----------
|
||||||
# Isso ativará o servidor de desenvolvimento e a recarga automática
|
CMD ["node", "server.js"]
|
||||||
CMD ["npm", "run", "dev"]
|
|
||||||
|
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
# Etapa 1: Construir a aplicação
|
|
||||||
FROM node:20-alpine AS builder
|
|
||||||
|
|
||||||
# Define o diretório de trabalho
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Copia os arquivos de configuração do pacote
|
|
||||||
COPY package.json package-lock.json ./
|
|
||||||
|
|
||||||
# Instala as dependências do projeto
|
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
# Copia todo o código da aplicação para o container
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Constrói a aplicação com o output 'standalone'
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
# Etapa 2: Executar a aplicação
|
|
||||||
# Usa uma imagem Node.js leve
|
|
||||||
FROM node:20-alpine AS runner
|
|
||||||
|
|
||||||
# Define o diretório de trabalho
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Copia o diretório 'standalone' da etapa de build, que já contém o servidor e as dependências
|
|
||||||
# O diretório 'standalone' é a pasta .next/standalone gerada pela configuração 'output: standalone'
|
|
||||||
COPY --from=builder /app/.next/standalone ./
|
|
||||||
|
|
||||||
# Copia os arquivos públicos
|
|
||||||
COPY --from=builder /app/public ./public
|
|
||||||
|
|
||||||
# Copia os arquivos estáticos gerados pelo build. É aqui que os arquivos CSS e JS ficam.
|
|
||||||
COPY --from=builder /app/.next/static ./.next/static
|
|
||||||
|
|
||||||
# Expõe a porta padrão do Next.js
|
|
||||||
EXPOSE 3000
|
|
||||||
|
|
||||||
# Define o comando para iniciar a aplicação
|
|
||||||
# O 'start' do package.json não é necessário, o próprio servidor standalone já está no container
|
|
||||||
CMD ["node", "server.js"]
|
|
||||||
57
README.md
57
README.md
|
|
@ -1 +1,58 @@
|
||||||
# saas_app
|
# saas_app
|
||||||
|
|
||||||
|
Criar envlocal para usar variaveis de ambiente no em desenvolvimento
|
||||||
|
NEXT_PUBLIC_ORIUS_APP_STATE=GO
|
||||||
|
NEXT_PUBLIC_ORIUS_APP_API_URL=<http://localhost:8000/>
|
||||||
|
NEXT_PUBLIC_ORIUS_APP_API_PREFIX=api/v1/
|
||||||
|
NEXT_PUBLIC_ORIUS_APP_API_CONTENT_TYPE=application/json
|
||||||
|
|
||||||
|
## Modo Debug
|
||||||
|
|
||||||
|
Abra Run → Add Configuration… → Attach to Node.js
|
||||||
|
|
||||||
|
Configure:
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Attach Next.js (9230)",
|
||||||
|
"type": "node",
|
||||||
|
"request": "attach",
|
||||||
|
"port": 9230,
|
||||||
|
"restart": true,
|
||||||
|
"smartStep": true,
|
||||||
|
"skipFiles": ["<node_internals>/**"]
|
||||||
|
}
|
||||||
|
|
||||||
|
npm run dev:debug
|
||||||
|
|
||||||
|
## onlyoffice
|
||||||
|
|
||||||
|
docker run -i -t -d -p 8081:80 --restart=always -e JWT_ENABLED=false onlyoffice/documentserver
|
||||||
|
|
||||||
|
## next em rede
|
||||||
|
|
||||||
|
```
|
||||||
|
npx next dev -H 0.0.0.0
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
"scripts": {
|
||||||
|
"dev": "next dev",
|
||||||
|
"build": "next build",
|
||||||
|
"start": "next start",
|
||||||
|
"dev:lan": "next dev -H 0.0.0.0" <-- Adicione esta linha
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
|
Como acessar no outro dispositivo
|
||||||
|
Descubra seu IP Local:
|
||||||
|
|
||||||
|
No Windows (seu caso), abra um terminal (CMD ou PowerShell) e digite:
|
||||||
|
|
||||||
|
Bash
|
||||||
|
|
||||||
|
ipconfig
|
||||||
|
Procure por Endereço IPv4 (geralmente começa com 192.168.x.x ou 10.0.x.x).
|
||||||
|
|
||||||
|
Acesse no navegador: No celular ou outro computador, digite: http://SEU_IP_AQUI:3000
|
||||||
|
|
||||||
|
Exemplo: <http://192.168.0.15:3000>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,17 @@
|
||||||
import type { NextConfig } from 'next';
|
/** @type {import('next').NextConfig} */
|
||||||
|
const nextConfig = {
|
||||||
const nextConfig: NextConfig = {
|
// Gera build autônomo para rodar com "node server.js"
|
||||||
// Isso gera um diretório otimizado que inclui tudo o que a aplicação precisa para rodar
|
|
||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
eslint: {
|
|
||||||
// Desativa a verificação de lint durante o build
|
// Configurações gerais
|
||||||
ignoreDuringBuilds: true,
|
reactStrictMode: true,
|
||||||
},
|
poweredByHeader: false,
|
||||||
|
compress: true,
|
||||||
|
|
||||||
|
// Desativa verificações no build de produção
|
||||||
|
eslint: { ignoreDuringBuilds: true },
|
||||||
|
typescript: { ignoreBuildErrors: true },
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
module.exports = nextConfig;
|
||||||
|
|
|
||||||
324
package-lock.json
generated
324
package-lock.json
generated
|
|
@ -7,9 +7,11 @@
|
||||||
"": {
|
"": {
|
||||||
"name": "saas",
|
"name": "saas",
|
||||||
"version": "25.9.1",
|
"version": "25.9.1",
|
||||||
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@faker-js/faker": "^10.0.0",
|
"@faker-js/faker": "^10.0.0",
|
||||||
"@hookform/resolvers": "^5.2.1",
|
"@hookform/resolvers": "^5.2.1",
|
||||||
|
"@onlyoffice/document-editor-react": "^2.1.1",
|
||||||
"@radix-ui/react-alert-dialog": "^1.1.15",
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
||||||
"@radix-ui/react-avatar": "^1.1.10",
|
"@radix-ui/react-avatar": "^1.1.10",
|
||||||
"@radix-ui/react-checkbox": "^1.3.3",
|
"@radix-ui/react-checkbox": "^1.3.3",
|
||||||
|
|
@ -33,7 +35,7 @@
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"cmdk": "^1.1.1",
|
"cmdk": "^1.1.1",
|
||||||
"cookies-next": "^6.1.0",
|
"cookies-next": "^6.1.0",
|
||||||
"date-fns": "^4.1.0",
|
"date-fns": "^3.6.0",
|
||||||
"faker-js": "^1.0.0",
|
"faker-js": "^1.0.0",
|
||||||
"framer-motion": "^12.23.24",
|
"framer-motion": "^12.23.24",
|
||||||
"input-otp": "^1.4.2",
|
"input-otp": "^1.4.2",
|
||||||
|
|
@ -63,6 +65,7 @@
|
||||||
"@types/react-dom": "^19",
|
"@types/react-dom": "^19",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.46.1",
|
"@typescript-eslint/eslint-plugin": "^8.46.1",
|
||||||
"@typescript-eslint/parser": "^8.46.1",
|
"@typescript-eslint/parser": "^8.46.1",
|
||||||
|
"cross-env": "^10.1.0",
|
||||||
"eslint": "^9.38.0",
|
"eslint": "^9.38.0",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-import-resolver-typescript": "^4.4.4",
|
"eslint-import-resolver-typescript": "^4.4.4",
|
||||||
|
|
@ -74,6 +77,7 @@
|
||||||
"eslint-plugin-unused-imports": "^4.2.0",
|
"eslint-plugin-unused-imports": "^4.2.0",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"prettier-plugin-tailwindcss": "^0.6.14",
|
"prettier-plugin-tailwindcss": "^0.6.14",
|
||||||
|
"shx": "^0.4.0",
|
||||||
"tailwindcss": "^4",
|
"tailwindcss": "^4",
|
||||||
"tw-animate-css": "^1.3.7",
|
"tw-animate-css": "^1.3.7",
|
||||||
"typescript": "5.9.3",
|
"typescript": "5.9.3",
|
||||||
|
|
@ -400,6 +404,13 @@
|
||||||
"tslib": "^2.4.0"
|
"tslib": "^2.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@epic-web/invariant": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@eslint-community/eslint-utils": {
|
"node_modules/@eslint-community/eslint-utils": {
|
||||||
"version": "4.9.0",
|
"version": "4.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz",
|
||||||
|
|
@ -1383,6 +1394,19 @@
|
||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@onlyoffice/document-editor-react": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@onlyoffice/document-editor-react/-/document-editor-react-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-b0SnFPmT+OEyJons18PPHpwtFABVCI4nr3gPtAAImar1PhN9tNc9703Yo5KPYsHhIgVq+FqHSWgunI9GJnKa5w==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"lodash": "4.17.21"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^16.9.0 || ^17 || ^18 || ^19",
|
||||||
|
"react-dom": "^16.9.0 || ^17 || ^18 || ^19"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@pkgr/core": {
|
"node_modules/@pkgr/core": {
|
||||||
"version": "0.2.9",
|
"version": "0.2.9",
|
||||||
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz",
|
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz",
|
||||||
|
|
@ -4254,6 +4278,24 @@
|
||||||
"react": ">= 16.8.0"
|
"react": ">= 16.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/cross-env": {
|
||||||
|
"version": "10.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-10.1.0.tgz",
|
||||||
|
"integrity": "sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@epic-web/invariant": "^1.0.0",
|
||||||
|
"cross-spawn": "^7.0.6"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"cross-env": "dist/bin/cross-env.js",
|
||||||
|
"cross-env-shell": "dist/bin/cross-env-shell.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/cross-spawn": {
|
"node_modules/cross-spawn": {
|
||||||
"version": "7.0.6",
|
"version": "7.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||||
|
|
@ -4459,9 +4501,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/date-fns": {
|
"node_modules/date-fns": {
|
||||||
"version": "4.1.0",
|
"version": "3.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz",
|
||||||
"integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==",
|
"integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "github",
|
"type": "github",
|
||||||
|
|
@ -4602,6 +4644,16 @@
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/end-of-stream": {
|
||||||
|
"version": "1.4.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
|
||||||
|
"integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"once": "^1.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/enhanced-resolve": {
|
"node_modules/enhanced-resolve": {
|
||||||
"version": "5.18.3",
|
"version": "5.18.3",
|
||||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz",
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz",
|
||||||
|
|
@ -5459,6 +5511,98 @@
|
||||||
"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==",
|
"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/execa": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"cross-spawn": "^6.0.0",
|
||||||
|
"get-stream": "^4.0.0",
|
||||||
|
"is-stream": "^1.1.0",
|
||||||
|
"npm-run-path": "^2.0.0",
|
||||||
|
"p-finally": "^1.0.0",
|
||||||
|
"signal-exit": "^3.0.0",
|
||||||
|
"strip-eof": "^1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/execa/node_modules/cross-spawn": {
|
||||||
|
"version": "6.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz",
|
||||||
|
"integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"nice-try": "^1.0.4",
|
||||||
|
"path-key": "^2.0.1",
|
||||||
|
"semver": "^5.5.0",
|
||||||
|
"shebang-command": "^1.2.0",
|
||||||
|
"which": "^1.2.9"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/execa/node_modules/path-key": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/execa/node_modules/semver": {
|
||||||
|
"version": "5.7.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
|
||||||
|
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC",
|
||||||
|
"bin": {
|
||||||
|
"semver": "bin/semver"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/execa/node_modules/shebang-command": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"shebang-regex": "^1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/execa/node_modules/shebang-regex": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/execa/node_modules/which": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||||
|
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"isexe": "^2.0.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"which": "bin/which"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/faker-js": {
|
"node_modules/faker-js": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/faker-js/-/faker-js-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/faker-js/-/faker-js-1.0.0.tgz",
|
||||||
|
|
@ -5749,6 +5893,19 @@
|
||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/get-stream": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"pump": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/get-symbol-description": {
|
"node_modules/get-symbol-description": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz",
|
||||||
|
|
@ -6042,6 +6199,16 @@
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/interpret": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/is-array-buffer": {
|
"node_modules/is-array-buffer": {
|
||||||
"version": "3.0.5",
|
"version": "3.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
|
||||||
|
|
@ -6347,6 +6514,16 @@
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/is-stream": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/is-string": {
|
"node_modules/is-string": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz",
|
||||||
|
|
@ -6928,6 +7105,12 @@
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/lodash": {
|
||||||
|
"version": "4.17.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||||
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/lodash.includes": {
|
"node_modules/lodash.includes": {
|
||||||
"version": "4.3.0",
|
"version": "4.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
|
||||||
|
|
@ -7261,6 +7444,13 @@
|
||||||
"node": "^10 || ^12 || >=14"
|
"node": "^10 || ^12 || >=14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/nice-try": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||||
|
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/node-releases": {
|
"node_modules/node-releases": {
|
||||||
"version": "2.0.25",
|
"version": "2.0.25",
|
||||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.25.tgz",
|
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.25.tgz",
|
||||||
|
|
@ -7268,6 +7458,29 @@
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/npm-run-path": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"path-key": "^2.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/npm-run-path/node_modules/path-key": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/object-assign": {
|
"node_modules/object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
|
|
@ -7390,6 +7603,16 @@
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/once": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"wrappy": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/optionator": {
|
"node_modules/optionator": {
|
||||||
"version": "0.9.4",
|
"version": "0.9.4",
|
||||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
|
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
|
||||||
|
|
@ -7426,6 +7649,16 @@
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/p-finally": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/p-limit": {
|
"node_modules/p-limit": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||||
|
|
@ -7694,6 +7927,17 @@
|
||||||
"react-is": "^16.13.1"
|
"react-is": "^16.13.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/pump": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"end-of-stream": "^1.1.0",
|
||||||
|
"once": "^1.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/punycode": {
|
"node_modules/punycode": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
||||||
|
|
@ -7898,6 +8142,18 @@
|
||||||
"react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
"react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/rechoir": {
|
||||||
|
"version": "0.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
|
||||||
|
"integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"resolve": "^1.1.6"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/redux": {
|
"node_modules/redux": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
|
||||||
|
|
@ -8248,6 +8504,42 @@
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/shelljs": {
|
||||||
|
"version": "0.9.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.9.2.tgz",
|
||||||
|
"integrity": "sha512-S3I64fEiKgTZzKCC46zT/Ib9meqofLrQVbpSswtjFfAVDW+AZ54WTnAM/3/yENoxz/V1Cy6u3kiiEbQ4DNphvw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"dependencies": {
|
||||||
|
"execa": "^1.0.0",
|
||||||
|
"fast-glob": "^3.3.2",
|
||||||
|
"interpret": "^1.0.0",
|
||||||
|
"rechoir": "^0.6.2"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"shjs": "bin/shjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/shx": {
|
||||||
|
"version": "0.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shx/-/shx-0.4.0.tgz",
|
||||||
|
"integrity": "sha512-Z0KixSIlGPpijKgcH6oCMCbltPImvaKy0sGH8AkLRXw1KyzpKtaCTizP2xen+hNDqVF4xxgvA0KXSb9o4Q6hnA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"minimist": "^1.2.8",
|
||||||
|
"shelljs": "^0.9.2"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"shx": "lib/cli.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/side-channel": {
|
"node_modules/side-channel": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
||||||
|
|
@ -8324,6 +8616,13 @@
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/signal-exit": {
|
||||||
|
"version": "3.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||||
|
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/sonner": {
|
"node_modules/sonner": {
|
||||||
"version": "2.0.7",
|
"version": "2.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz",
|
||||||
|
|
@ -8490,6 +8789,16 @@
|
||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/strip-eof": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/strip-json-comments": {
|
"node_modules/strip-json-comments": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
|
||||||
|
|
@ -9155,6 +9464,13 @@
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/wrappy": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/yallist": {
|
"node_modules/yallist": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
|
||||||
|
|
|
||||||
11
package.json
11
package.json
|
|
@ -4,14 +4,17 @@
|
||||||
"version": "25.9.1",
|
"version": "25.9.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbopack",
|
"dev": "next dev",
|
||||||
|
"dev:debug": "cross-env NEXT_USE_TURBOPACK=0 NODE_OPTIONS=\"--inspect=9230\" next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint",
|
||||||
|
"postinstall": "shx mkdir -p public/libs && shx cp -r node_modules/tinymce public/libs/tinymce"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@faker-js/faker": "^10.0.0",
|
"@faker-js/faker": "^10.0.0",
|
||||||
"@hookform/resolvers": "^5.2.1",
|
"@hookform/resolvers": "^5.2.1",
|
||||||
|
"@onlyoffice/document-editor-react": "^2.1.1",
|
||||||
"@radix-ui/react-alert-dialog": "^1.1.15",
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
||||||
"@radix-ui/react-avatar": "^1.1.10",
|
"@radix-ui/react-avatar": "^1.1.10",
|
||||||
"@radix-ui/react-checkbox": "^1.3.3",
|
"@radix-ui/react-checkbox": "^1.3.3",
|
||||||
|
|
@ -35,7 +38,7 @@
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"cmdk": "^1.1.1",
|
"cmdk": "^1.1.1",
|
||||||
"cookies-next": "^6.1.0",
|
"cookies-next": "^6.1.0",
|
||||||
"date-fns": "^4.1.0",
|
"date-fns": "^3.6.0",
|
||||||
"faker-js": "^1.0.0",
|
"faker-js": "^1.0.0",
|
||||||
"framer-motion": "^12.23.24",
|
"framer-motion": "^12.23.24",
|
||||||
"input-otp": "^1.4.2",
|
"input-otp": "^1.4.2",
|
||||||
|
|
@ -65,6 +68,7 @@
|
||||||
"@types/react-dom": "^19",
|
"@types/react-dom": "^19",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.46.1",
|
"@typescript-eslint/eslint-plugin": "^8.46.1",
|
||||||
"@typescript-eslint/parser": "^8.46.1",
|
"@typescript-eslint/parser": "^8.46.1",
|
||||||
|
"cross-env": "^10.1.0",
|
||||||
"eslint": "^9.38.0",
|
"eslint": "^9.38.0",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-import-resolver-typescript": "^4.4.4",
|
"eslint-import-resolver-typescript": "^4.4.4",
|
||||||
|
|
@ -76,6 +80,7 @@
|
||||||
"eslint-plugin-unused-imports": "^4.2.0",
|
"eslint-plugin-unused-imports": "^4.2.0",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"prettier-plugin-tailwindcss": "^0.6.14",
|
"prettier-plugin-tailwindcss": "^0.6.14",
|
||||||
|
"shx": "^0.4.0",
|
||||||
"tailwindcss": "^4",
|
"tailwindcss": "^4",
|
||||||
"tw-animate-css": "^1.3.7",
|
"tw-animate-css": "^1.3.7",
|
||||||
"typescript": "5.9.3",
|
"typescript": "5.9.3",
|
||||||
|
|
|
||||||
BIN
public/modelo.docx
Normal file
BIN
public/modelo.docx
Normal file
Binary file not shown.
|
|
@ -1,50 +0,0 @@
|
||||||
'use client';
|
|
||||||
|
|
||||||
import { useEffect } from 'react';
|
|
||||||
import { useParams } from 'next/navigation';
|
|
||||||
|
|
||||||
import { Card, CardContent } from '@/components/ui/card';
|
|
||||||
import { useGUsuarioReadHooks } from '@/packages/administrativo/hooks/GUsuario/useGUsuarioReadHooks';
|
|
||||||
import Usuario from '@/packages/administrativo/interfaces/GUsuario/GUsuarioInterface';
|
|
||||||
import Loading from '@/shared/components/loading/loading';
|
|
||||||
|
|
||||||
export default function UsuarioDetalhes() {
|
|
||||||
const params = useParams();
|
|
||||||
|
|
||||||
const { usuario, fetchUsuario } = useGUsuarioReadHooks();
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (params.id) {
|
|
||||||
fetchUsuario({ usuario_id: Number(params.id) } as Usuario);
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
if (!usuario) return <Loading type={1} />;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Card>
|
|
||||||
<CardContent>
|
|
||||||
<div className="mb-4 grid grid-cols-4 gap-4">
|
|
||||||
<div>
|
|
||||||
<div className="text-2xl font-semibold">Nome</div>
|
|
||||||
<div className="text-xl">{usuario?.nome_completo}</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div className="text-2xl font-semibold">CPF</div>
|
|
||||||
<div className="text-xl">{usuario?.cpf}</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div className="text-2xl font-semibold">Função</div>
|
|
||||||
<div className="text-xl">{usuario?.funcao}</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div className="text-2xl font-semibold">Email</div>
|
|
||||||
<div className="text-xl">{usuario?.email}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,126 +0,0 @@
|
||||||
'use client';
|
|
||||||
|
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
|
||||||
import { useForm } from 'react-hook-form';
|
|
||||||
import { z } from 'zod';
|
|
||||||
|
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button';
|
|
||||||
import { Card, CardContent } from '@/components/ui/card';
|
|
||||||
import {
|
|
||||||
Form,
|
|
||||||
FormControl,
|
|
||||||
FormField,
|
|
||||||
FormItem,
|
|
||||||
FormLabel,
|
|
||||||
FormMessage,
|
|
||||||
} from '@/components/ui/form';
|
|
||||||
import { Input } from '@/components/ui/input';
|
|
||||||
|
|
||||||
import { useGUsuarioSaveHook } from '../../../../../../packages/administrativo/hooks/GUsuario/useGUsuarioSaveHook';
|
|
||||||
import { GUsuarioSchema } from '../../../../../../packages/administrativo/schemas/GUsuario/GUsuarioSchema';
|
|
||||||
|
|
||||||
type FormValues = z.infer<typeof GUsuarioSchema>;
|
|
||||||
|
|
||||||
export default function UsuarioFormularioPage() {
|
|
||||||
const { usuario, saveUsuario } = useGUsuarioSaveHook();
|
|
||||||
|
|
||||||
const form = useForm<FormValues>({
|
|
||||||
resolver: zodResolver(GUsuarioSchema),
|
|
||||||
defaultValues: {
|
|
||||||
login: '',
|
|
||||||
nome_completo: '',
|
|
||||||
funcao: '',
|
|
||||||
email: '',
|
|
||||||
cpf: '',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
async function onSubmit(values: FormValues) {
|
|
||||||
saveUsuario(values);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Card>
|
|
||||||
<CardContent>
|
|
||||||
<Form {...form}>
|
|
||||||
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="login"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem>
|
|
||||||
<FormLabel>Login</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Input {...field} />
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="nome_completo"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem>
|
|
||||||
<FormLabel>Nome Completo</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Input {...field} />
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="funcao"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem>
|
|
||||||
<FormLabel>Função</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Input {...field} />
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="email"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem>
|
|
||||||
<FormLabel>Email</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Input {...field} />
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="cpf"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem>
|
|
||||||
<FormLabel>Cpf</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Input {...field} />
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Button type="submit">Salvar</Button>
|
|
||||||
</form>
|
|
||||||
</Form>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
||||||
'use client';
|
|
||||||
|
|
||||||
import Link from 'next/link';
|
|
||||||
import { useEffect } from 'react';
|
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button';
|
|
||||||
import { Card, CardContent } from '@/components/ui/card';
|
|
||||||
import {
|
|
||||||
Table,
|
|
||||||
TableBody,
|
|
||||||
TableCell,
|
|
||||||
TableHead,
|
|
||||||
TableHeader,
|
|
||||||
TableRow,
|
|
||||||
} from '@/components/ui/table';
|
|
||||||
import Loading from '@/shared/components/loading/loading';
|
|
||||||
|
|
||||||
import { useGUsuarioIndexHook } from '../../../../../packages/administrativo/hooks/GUsuario/useGUsuarioIndexHook';
|
|
||||||
import Usuario from '../../../../../packages/administrativo/interfaces/GUsuario/GUsuarioInterface';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default function UsuarioPage() {
|
|
||||||
const { usuarios, fetchUsuarios } = useGUsuarioIndexHook();
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
fetchUsuarios();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
if (!usuarios) return <Loading type={2} />;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Card>
|
|
||||||
<CardContent>
|
|
||||||
<div className="grid grid-cols-2">
|
|
||||||
<div className="text-2xl font-semibold">Usuarios</div>
|
|
||||||
<div className="text-right">
|
|
||||||
<Button asChild>
|
|
||||||
<Link href="/usuarios/formulario">+ Usuário</Link>
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Table>
|
|
||||||
<TableHeader>
|
|
||||||
<TableRow>
|
|
||||||
<TableHead className="text-center">#</TableHead>
|
|
||||||
<TableHead>Situação</TableHead>
|
|
||||||
<TableHead>CPF</TableHead>
|
|
||||||
<TableHead>Login / Sigla / Nome</TableHead>
|
|
||||||
<TableHead>Função</TableHead>
|
|
||||||
<TableHead></TableHead>
|
|
||||||
<TableHead></TableHead>
|
|
||||||
</TableRow>
|
|
||||||
</TableHeader>
|
|
||||||
<TableBody>
|
|
||||||
{usuarios.map((usuario: Usuario) => (
|
|
||||||
<TableRow key={usuario.usuario_id} className="cursor-pointer">
|
|
||||||
<TableCell className="text-center">{usuario.usuario_id}</TableCell>
|
|
||||||
<TableCell className="font-medium">{usuario.situacao}</TableCell>
|
|
||||||
<TableCell className="font-medium">{usuario.cpf}</TableCell>
|
|
||||||
<TableCell>
|
|
||||||
<div className="text-xs font-semibold">
|
|
||||||
{usuario.login} - {usuario.sigla}
|
|
||||||
</div>
|
|
||||||
<div className="text-base">{usuario.nome_completo}</div>
|
|
||||||
</TableCell>
|
|
||||||
<TableCell>
|
|
||||||
<div className="text-base">{usuario.funcao}</div>
|
|
||||||
</TableCell>
|
|
||||||
<TableCell>
|
|
||||||
<Button asChild>
|
|
||||||
<Link href={`/usuarios/${usuario.usuario_id}/detalhes`}>Detalhes</Link>
|
|
||||||
</Button>
|
|
||||||
</TableCell>
|
|
||||||
</TableRow>
|
|
||||||
))}
|
|
||||||
</TableBody>
|
|
||||||
</Table>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import GCartorioIndex from "@/packages/administrativo/components/GCartorio/GCartorioIndex";
|
import GCartorioIndex from '@/packages/administrativo/components/GCartorio/GCartorioIndex';
|
||||||
|
|
||||||
export default function GCartorioPage() {
|
export default function GCartorioPage() {
|
||||||
return (
|
return <GCartorioIndex />;
|
||||||
< GCartorioIndex />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
export default function TCensecPage() {
|
export default function TCensecPage() {
|
||||||
return (
|
return <div></div>;
|
||||||
<div></div>
|
}
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import GCalculoIndex from "@/packages/administrativo/components/GCalculo/GCalculoIndex";
|
import GCalculoIndex from '@/packages/administrativo/components/GCalculo/GCalculoIndex';
|
||||||
|
|
||||||
export default function GEmolumentoPeriodoPage() {
|
export default function GEmolumentoPeriodoPage() {
|
||||||
|
return <GCalculoIndex />;
|
||||||
return (
|
}
|
||||||
<GCalculoIndex />
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,16 @@
|
||||||
'use client'
|
'use client';
|
||||||
|
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from 'next/navigation';
|
||||||
|
|
||||||
import GEmolumentoItemIndex from "@/packages/administrativo/components/GEmolumentoItem/GEmolumentoItemIndex";
|
import GEmolumentoItemIndex from '@/packages/administrativo/components/GEmolumentoItem/GEmolumentoItemIndex';
|
||||||
|
|
||||||
export default function GGramaticaPage() {
|
export default function GGramaticaPage() {
|
||||||
|
const params = useParams();
|
||||||
|
|
||||||
const params = useParams();
|
return (
|
||||||
|
<GEmolumentoItemIndex
|
||||||
return (
|
emolumento_id={Number(params.emolumentoId)}
|
||||||
<GEmolumentoItemIndex
|
emolumento_periodo_id={Number(params.emolumentoPeriodoId)}
|
||||||
emolumento_id={Number(params.emolumentoId)}
|
/>
|
||||||
emolumento_periodo_id={Number(params.emolumentoPeriodoId)}
|
);
|
||||||
/>
|
}
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import GEmolumentoIndex from "@/packages/administrativo/components/GEmolumento/GEmolumentoIndex";
|
import GEmolumentoIndex from '@/packages/administrativo/components/GEmolumento/GEmolumentoIndex';
|
||||||
|
|
||||||
export default function GEmolumentoPeriodoPage() {
|
export default function GEmolumentoPeriodoPage() {
|
||||||
|
return <GEmolumentoIndex />;
|
||||||
return (
|
}
|
||||||
<GEmolumentoIndex />
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import GEmolumentoPeriodoIndex from "@/packages/administrativo/components/GEmolumentoPeriodo/GEmolumentoPeriodoIndex";
|
import GEmolumentoPeriodoIndex from '@/packages/administrativo/components/GEmolumentoPeriodo/GEmolumentoPeriodoIndex';
|
||||||
|
|
||||||
export default function GEmolumentoPeriodoPage() {
|
export default function GEmolumentoPeriodoPage() {
|
||||||
|
return <GEmolumentoPeriodoIndex />;
|
||||||
return (
|
}
|
||||||
<GEmolumentoPeriodoIndex />
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import GGramaticaIndex from "@/packages/administrativo/components/GGramatica/GGramaticaIndex";
|
import GGramaticaIndex from '@/packages/administrativo/components/GGramatica/GGramaticaIndex';
|
||||||
|
|
||||||
export default function GGramaticaPage() {
|
export default function GGramaticaPage() {
|
||||||
|
return <GGramaticaIndex />;
|
||||||
return (
|
}
|
||||||
<GGramaticaIndex />
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import TImovelDashboard from "@/packages/administrativo/components/TImovel/TImovelDashboard";
|
import TImovelDashboard from '@/packages/administrativo/components/TImovel/TImovelDashboard';
|
||||||
|
|
||||||
export default function TImovelDashboardPage() {
|
export default function TImovelDashboardPage() {
|
||||||
return (
|
return <TImovelDashboard />;
|
||||||
<TImovelDashboard />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import TPessoaDashboard from "@/packages/administrativo/components/TPessoa/TPessoaDashboard";
|
import TPessoaDashboard from '@/packages/administrativo/components/TPessoa/TPessoaDashboard';
|
||||||
|
|
||||||
export default function TPessoaDashboardPage() {
|
export default function TPessoaDashboardPage() {
|
||||||
return (
|
return <TPessoaDashboard />;
|
||||||
<TPessoaDashboard />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import GSeloGrupoIndex from "@/packages/administrativo/components/GSeloGrupo/GSeloGrupoIndex";
|
import GSeloGrupoIndex from '@/packages/administrativo/components/GSeloGrupo/GSeloGrupoIndex';
|
||||||
|
|
||||||
export default function GSeloGrupoPage() {
|
export default function GSeloGrupoPage() {
|
||||||
|
return <GSeloGrupoIndex />;
|
||||||
return (
|
}
|
||||||
<GSeloGrupoIndex />
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
import TServicoTipoIndex from '@/packages/administrativo/components/TServicoTipo/TServicoTipoIndex';
|
||||||
|
|
||||||
|
export default function TServicoTipoPage() {
|
||||||
|
return <TServicoTipoIndex />;
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,5 @@
|
||||||
import GNaturezaTituloIndex from "@/packages/administrativo/components/GNaturezaTitulo/GNaturezaTituloIndex";
|
import GNaturezaTituloIndex from '@/packages/administrativo/components/GNaturezaTitulo/GNaturezaTituloIndex';
|
||||||
|
|
||||||
export default function GNaturezaPage() {
|
export default function GNaturezaPage() {
|
||||||
|
return <GNaturezaTituloIndex sistema_id={2} />;
|
||||||
return (
|
}
|
||||||
<GNaturezaTituloIndex
|
|
||||||
sistema_id={2}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,13 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
import { useParams } from 'next/navigation';
|
import { useParams } from 'next/navigation';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { Card, CardContent } from '@/components/ui/card';
|
|
||||||
import MainEditor from '@/components/MainEditor';
|
import MainEditor from '@/components/MainEditor';
|
||||||
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import Loading from '@/shared/components/loading/loading';
|
|
||||||
import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook';
|
import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook';
|
||||||
import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface';
|
import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface';
|
||||||
|
import Loading from '@/shared/components/loading/loading';
|
||||||
|
|
||||||
export default function TMinutaDetalhes() {
|
export default function TMinutaDetalhes() {
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import z from 'zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { useForm, Controller } from 'react-hook-form';
|
import { useForm, Controller } from 'react-hook-form';
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import z from 'zod';
|
||||||
|
|
||||||
|
import MainEditor from '@/components/MainEditor';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import { Checkbox } from '@/components/ui/checkbox';
|
import { Checkbox } from '@/components/ui/checkbox';
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
|
|
@ -17,11 +19,8 @@ import {
|
||||||
} from '@/components/ui/form';
|
} from '@/components/ui/form';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
|
|
||||||
import MainEditor from '@/components/MainEditor';
|
|
||||||
import { TMinutaSchema } from '@/packages/administrativo/schemas/TMinuta/TMinutaSchema';
|
|
||||||
import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook';
|
import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook';
|
||||||
import { Card, CardContent } from '@/components/ui/card';
|
import { TMinutaSchema } from '@/packages/administrativo/schemas/TMinuta/TMinutaSchema';
|
||||||
|
|
||||||
type FormValues = z.infer<typeof TMinutaSchema>;
|
type FormValues = z.infer<typeof TMinutaSchema>;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,19 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useEffect, useState, useCallback } from 'react';
|
import { useEffect, useState, useCallback } from 'react';
|
||||||
|
|
||||||
import { Card, CardContent } from '@/components/ui/card';
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog';
|
|
||||||
|
|
||||||
import Header from '@/shared/components/structure/Header';
|
|
||||||
import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog';
|
|
||||||
import Loading from '@/shared/components/loading/loading';
|
|
||||||
|
|
||||||
import TMinutaTable from '@/packages/administrativo/components/TMinuta/TMinutaTable';
|
|
||||||
import TMinutaForm from '@/packages/administrativo/components/TMinuta/TMinutaForm';
|
import TMinutaForm from '@/packages/administrativo/components/TMinuta/TMinutaForm';
|
||||||
|
import TMinutaTable from '@/packages/administrativo/components/TMinuta/TMinutaTable';
|
||||||
import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook';
|
|
||||||
import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook';
|
|
||||||
import { useTMinutaRemoveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook';
|
|
||||||
|
|
||||||
import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface';
|
|
||||||
import { useTMinutaIndexHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook';
|
import { useTMinutaIndexHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook';
|
||||||
|
import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook';
|
||||||
|
import { useTMinutaRemoveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook';
|
||||||
|
import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook';
|
||||||
|
import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface';
|
||||||
|
import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog';
|
||||||
|
import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog';
|
||||||
|
import Loading from '@/shared/components/loading/loading';
|
||||||
|
import Header from '@/shared/components/structure/Header';
|
||||||
|
|
||||||
export default function TMinutaPage() {
|
export default function TMinutaPage() {
|
||||||
// Hooks de leitura e escrita
|
// Hooks de leitura e escrita
|
||||||
|
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
||||||
'use client';
|
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button';
|
|
||||||
import {
|
|
||||||
DropdownMenu,
|
|
||||||
DropdownMenuContent,
|
|
||||||
DropdownMenuGroup,
|
|
||||||
DropdownMenuItem,
|
|
||||||
DropdownMenuSeparator,
|
|
||||||
DropdownMenuTrigger,
|
|
||||||
} from '@/components/ui/dropdown-menu';
|
|
||||||
import {
|
|
||||||
Table,
|
|
||||||
TableBody,
|
|
||||||
TableCell,
|
|
||||||
TableHead,
|
|
||||||
TableHeader,
|
|
||||||
TableRow,
|
|
||||||
} from '@/components/ui/table';
|
|
||||||
|
|
||||||
import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react';
|
|
||||||
import TServicoTipoInterface from '../../_interfaces/TServicoTipoInterface'; // Import alterado
|
|
||||||
|
|
||||||
// Tipagem das props do componente da tabela
|
|
||||||
interface TServicoTipoTableProps {
|
|
||||||
// Nome da interface alterado
|
|
||||||
data: TServicoTipoInterface[]; // lista de tipos de serviço
|
|
||||||
onEdit: (item: TServicoTipoInterface, isEditingFormStatus: boolean) => void; // callback para edição
|
|
||||||
onDelete: (item: TServicoTipoInterface, isEditingFormStatus: boolean) => void; // callback para exclusão
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Componente principal da tabela de Tipos de Serviço
|
|
||||||
*/
|
|
||||||
export default function TServicoTipoTable({ data, onEdit, onDelete }: TServicoTipoTableProps) {
|
|
||||||
return (
|
|
||||||
<Table className="w-full table-fixed">
|
|
||||||
{/* Cabeçalho da tabela */}
|
|
||||||
<TableHeader>
|
|
||||||
<TableRow>
|
|
||||||
<TableHead className="w-15 font-bold">#</TableHead>
|
|
||||||
{/* As colunas IBGE e UF foram removidas */}
|
|
||||||
<TableHead className="font-bold">Descrição</TableHead>
|
|
||||||
<TableHead className="text-right"></TableHead>
|
|
||||||
</TableRow>
|
|
||||||
</TableHeader>
|
|
||||||
|
|
||||||
{/* Corpo da tabela */}
|
|
||||||
<TableBody>
|
|
||||||
{data.map((item) => (
|
|
||||||
// Assumindo que o ID do Tipo de Serviço é 'servico_tipo_id'
|
|
||||||
<TableRow key={item.servico_tipo_id} className="cursor-pointer">
|
|
||||||
{/* ID do Tipo de Serviço */}
|
|
||||||
<TableCell>{item.servico_tipo_id}</TableCell>
|
|
||||||
|
|
||||||
{/* Nome/descrição do Tipo de Serviço (descricao) */}
|
|
||||||
<TableCell>{item.descricao}</TableCell>
|
|
||||||
{/* As células de IBGE e UF foram removidas */}
|
|
||||||
|
|
||||||
{/* Ações (menu dropdown) */}
|
|
||||||
<TableCell className="text-right">
|
|
||||||
<DropdownMenu>
|
|
||||||
{/* Botão de disparo do menu */}
|
|
||||||
<DropdownMenuTrigger asChild>
|
|
||||||
<Button variant="outline" size="icon" className="cursor-pointer">
|
|
||||||
<EllipsisIcon />
|
|
||||||
</Button>
|
|
||||||
</DropdownMenuTrigger>
|
|
||||||
|
|
||||||
{/* Conteúdo do menu */}
|
|
||||||
<DropdownMenuContent side="left" align="start">
|
|
||||||
<DropdownMenuGroup>
|
|
||||||
{/* Opção editar */}
|
|
||||||
<DropdownMenuItem
|
|
||||||
className="cursor-pointer"
|
|
||||||
onSelect={() => onEdit(item, true)}
|
|
||||||
>
|
|
||||||
<PencilIcon className="mr-2 h-4 w-4" />
|
|
||||||
Editar
|
|
||||||
</DropdownMenuItem>
|
|
||||||
|
|
||||||
<DropdownMenuSeparator />
|
|
||||||
|
|
||||||
{/* Opção remover */}
|
|
||||||
<DropdownMenuItem
|
|
||||||
className="cursor-pointer"
|
|
||||||
onSelect={() => onDelete(item, true)}
|
|
||||||
>
|
|
||||||
<Trash2Icon className="mr-2 h-4 w-4" />
|
|
||||||
Remover
|
|
||||||
</DropdownMenuItem>
|
|
||||||
</DropdownMenuGroup>
|
|
||||||
</DropdownMenuContent>
|
|
||||||
</DropdownMenu>
|
|
||||||
</TableCell>
|
|
||||||
</TableRow>
|
|
||||||
))}
|
|
||||||
</TableBody>
|
|
||||||
</Table>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Importa o utilitário responsável por tratar erros de forma padronizada no cliente
|
|
||||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler';
|
|
||||||
|
|
||||||
// Importa a classe de serviço que gerencia requisições HTTP para a API
|
|
||||||
import API from '@/shared/services/api/Api';
|
|
||||||
|
|
||||||
// Importa o enum que define os métodos HTTP disponíveis (GET, POST, PUT, DELETE, etc.)
|
|
||||||
import { Methods } from '@/shared/services/api/enums/ApiMethodEnum';
|
|
||||||
|
|
||||||
import { GEmolumentoReadInterface } from '../../_interfaces/GEmolumentoReadInterface';
|
|
||||||
|
|
||||||
// Função assíncrona responsável por executar a requisição para listar os tipos de marcação
|
|
||||||
async function executeGEmolumentoIndexData(data: GEmolumentoReadInterface) {
|
|
||||||
|
|
||||||
// Cria uma nova instância da classe API para enviar a requisição
|
|
||||||
const api = new API();
|
|
||||||
|
|
||||||
// Envia uma requisição GET para o endpoint 'administrativo/g_marcacao_tipo/'
|
|
||||||
return await api.send({
|
|
||||||
method: Methods.GET,
|
|
||||||
endpoint: `administrativo/g_emolumento/sistema/${data.sistema_id}?${new URLSearchParams(data.urlParams).toString()}`,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Exporta a função encapsulada pelo handler de erro, garantindo tratamento uniforme em caso de falhas
|
|
||||||
export const GEmolumentoIndexData = withClientErrorHandler(executeGEmolumentoIndexData);
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
// Importa o utilitário responsável por tratar erros de forma padronizada no cliente
|
|
||||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler';
|
|
||||||
|
|
||||||
// Importa a classe de serviço que gerencia requisições HTTP para a API
|
|
||||||
import API from '@/shared/services/api/Api';
|
|
||||||
|
|
||||||
// Importa o enum que define os métodos HTTP disponíveis (GET, POST, PUT, DELETE, etc.)
|
|
||||||
import { Methods } from '@/shared/services/api/enums/ApiMethodEnum';
|
|
||||||
import { TTBReconhecimentoTipoReadInterface } from '../../_interfaces/TTBReconhecimentoTipoReadInterface';
|
|
||||||
|
|
||||||
// Função assíncrona responsável por executar a requisição para listar os tipos de marcação
|
|
||||||
async function executeTTBReconhecimentoTipoIndexData(data: TTBReconhecimentoTipoReadInterface) {
|
|
||||||
// Cria uma nova instância da classe API para enviar a requisição
|
|
||||||
const api = new API();
|
|
||||||
|
|
||||||
// Concatena o endpoint com a query string (caso existam parâmetros)
|
|
||||||
const endpoint = `administrativo/t_tb_reconhecimentotipo/`;
|
|
||||||
|
|
||||||
// Envia uma requisição GET para o endpoint 'administrativo/g_marcacao_tipo/'
|
|
||||||
return await api.send({
|
|
||||||
method: Methods.GET,
|
|
||||||
endpoint: endpoint,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Exporta a função encapsulada pelo handler de erro, garantindo tratamento uniforme em caso de falhas
|
|
||||||
export const TTBReconhecimentoTipoIndexData = withClientErrorHandler(
|
|
||||||
executeTTBReconhecimentoTipoIndexData,
|
|
||||||
);
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
// Importa o hook responsável por gerenciar e exibir respostas globais (sucesso, erro, etc.)
|
|
||||||
import { useMemo, useState } from 'react';
|
|
||||||
|
|
||||||
import { useResponse } from '@/shared/components/response/ResponseContext';
|
|
||||||
|
|
||||||
// Importa hooks do React para gerenciamento de estado e memorização de valores
|
|
||||||
|
|
||||||
// Importa a interface que define a estrutura dos dados de "GEmolumento"
|
|
||||||
import { GEmolumentoInterface } from '../../_interfaces/GEmolumentoInterface';
|
|
||||||
import { GEmolumentoReadInterface } from '../../_interfaces/GEmolumentoReadInterface';
|
|
||||||
|
|
||||||
// Importa o serviço responsável por buscar os dados de "GEmolumento" na API
|
|
||||||
import { GEmolumentoIndexService } from '../../_services/g_emolumento/GEmolumentoIndexService';
|
|
||||||
|
|
||||||
// Hook personalizado para leitura (consulta) dos emolumentos
|
|
||||||
export const useGEmolumentoReadHook = () => {
|
|
||||||
// Obtém a função que atualiza a resposta global do sistema
|
|
||||||
const { setResponse } = useResponse();
|
|
||||||
|
|
||||||
// Define o estado local que armazenará a lista de emolumentos
|
|
||||||
const [gEmolumento, setGEmolumento] = useState<GEmolumentoInterface[]>([]);
|
|
||||||
|
|
||||||
// Função responsável por buscar os dados da API e atualizar o estado
|
|
||||||
const fetchGEmolumento = async (data: GEmolumentoReadInterface) => {
|
|
||||||
// Executa o serviço que faz a requisição à API
|
|
||||||
const response = await GEmolumentoIndexService(data);
|
|
||||||
|
|
||||||
// Atualiza o estado local com os dados retornados
|
|
||||||
setGEmolumento(response.data);
|
|
||||||
|
|
||||||
// Atualiza o contexto global de resposta (ex: para exibir alertas ou mensagens)
|
|
||||||
setResponse(response);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Retorna os dados e a função de busca, memorizando o valor para evitar recriações desnecessárias
|
|
||||||
return useMemo(() => ({ gEmolumento, fetchGEmolumento }), [gEmolumento, fetchGEmolumento]);
|
|
||||||
};
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
// Importa o hook responsável por gerenciar e exibir respostas globais (sucesso, erro, etc.)
|
|
||||||
import { useResponse } from '@/shared/components/response/ResponseContext';
|
|
||||||
|
|
||||||
// Importa hooks do React para gerenciamento de estado e memorização de valores
|
|
||||||
import { useMemo, useState } from 'react';
|
|
||||||
|
|
||||||
// Importa a interface que define a estrutura dos dados de "TTBReconhecimentoTipo"
|
|
||||||
import { TTBReconhecimentoTipoReadInterface } from '../../_interfaces/TTBReconhecimentoTipoReadInterface';
|
|
||||||
import { TTBReconhecimentoTipoInterface } from '../../_interfaces/TTBReconhecimentoTipoInterface';
|
|
||||||
|
|
||||||
// Importa o serviço responsável por buscar os dados de "TTBReconhecimentoTipo" na API
|
|
||||||
import { TTBReconhecimentoTipoIndexService } from '../../_services/t_tb_reconhecimentotipo/TTBReconhecimentoTipoIndexService';
|
|
||||||
|
|
||||||
// Hook personalizado para leitura (consulta) dos tipos de marcação
|
|
||||||
export const useTTBReconhecimentoTipoReadHook = () => {
|
|
||||||
// Obtém a função que atualiza a resposta global do sistema
|
|
||||||
const { setResponse } = useResponse();
|
|
||||||
|
|
||||||
// Define o estado local que armazenará a lista de tipos de marcação
|
|
||||||
const [tTBReconhecimentoTipo, setTTBReconhecimentoTipo] = useState<
|
|
||||||
TTBReconhecimentoTipoInterface[]
|
|
||||||
>([]);
|
|
||||||
|
|
||||||
// Função responsável por buscar os dados da API e atualizar o estado
|
|
||||||
const fetchTTBReconhecimentoTipo = async (data: TTBReconhecimentoTipoReadInterface) => {
|
|
||||||
// Executa o serviço que faz a requisição à API
|
|
||||||
const response = await TTBReconhecimentoTipoIndexService(data);
|
|
||||||
|
|
||||||
// Atualiza o estado local com os dados retornados
|
|
||||||
setTTBReconhecimentoTipo(response.data);
|
|
||||||
|
|
||||||
// Atualiza o contexto global de resposta (ex: para exibir alertas ou mensagens)
|
|
||||||
setResponse(response);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Retorna os dados e a função de busca, memorizando o valor para evitar recriações desnecessárias
|
|
||||||
return useMemo(
|
|
||||||
() => ({ tTBReconhecimentoTipo, fetchTTBReconhecimentoTipo }),
|
|
||||||
[tTBReconhecimentoTipo, fetchTTBReconhecimentoTipo],
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
// Interface que representa a tabela G_EMOLUMENTO
|
|
||||||
export interface GEmolumentoInterface {
|
|
||||||
emolumento_id?: number; // NUMERIC(10,2) - Chave primária
|
|
||||||
descricao?: string; // VARCHAR(260)
|
|
||||||
tipo?: string; // VARCHAR(1)
|
|
||||||
sistema_id?: number; // NUMERIC(10,2)
|
|
||||||
selo_grupo_id?: number; // NUMERIC(10,2)
|
|
||||||
reg_averb?: string; // VARCHAR(1)
|
|
||||||
pre_definido?: string; // VARCHAR(1)
|
|
||||||
situacao?: string; // VARCHAR(1)
|
|
||||||
situacao_ri?: string; // VARCHAR(1)
|
|
||||||
com_reducao?: string; // VARCHAR(1)
|
|
||||||
motivo_reducao?: string; // VARCHAR(120)
|
|
||||||
valor_maximo_certidao?: number; // NUMERIC(14,3)
|
|
||||||
tipo_objetivo?: string; // VARCHAR(3)
|
|
||||||
modelo_tag?: string; // VARCHAR(3)
|
|
||||||
codigo_nota_id?: number; // NUMERIC(10,2)
|
|
||||||
convenio_codhab?: string; // VARCHAR(1)
|
|
||||||
item_df?: string; // VARCHAR(10)
|
|
||||||
}
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
// Interface que representa a tabela G_EMOLUMENTO_ITEM (inferido)
|
|
||||||
export interface GEmolumentoItemInterface {
|
|
||||||
valor_emolumento?: number; // NUMERIC(14,3)
|
|
||||||
emolumento_item_id: number; // NUMERIC(10,2) NOT NULL - Chave primária (assumida)
|
|
||||||
emolumento_id?: number; // NUMERIC(10,2)
|
|
||||||
valor_inicio?: number; // NUMERIC(14,3)
|
|
||||||
valor_fim?: number; // NUMERIC(14,3)
|
|
||||||
valor_taxa_judiciaria?: number; // NUMERIC(14,3)
|
|
||||||
emolumento_periodo_id?: number; // NUMERIC(10,2)
|
|
||||||
codigo?: number; // NUMERIC(10,2)
|
|
||||||
pagina_extra?: number; // NUMERIC(10,2)
|
|
||||||
valor_pagina_extra?: number; // NUMERIC(14,3)
|
|
||||||
valor_outra_taxa1?: number; // NUMERIC(14,3)
|
|
||||||
codigo_selo?: string; // VARCHAR(30)
|
|
||||||
valor_fundo_ri?: number; // NUMERIC(14,3)
|
|
||||||
codigo_tabela?: string; // VARCHAR(30)
|
|
||||||
selo_grupo_id?: number; // NUMERIC(10,2)
|
|
||||||
codigo_km?: string; // VARCHAR(30)
|
|
||||||
emolumento_acresce?: number; // NUMERIC(14,3)
|
|
||||||
taxa_acresce?: number; // NUMERIC(14,3)
|
|
||||||
funcivil_acresce?: number; // NUMERIC(14,3)
|
|
||||||
valor_fracao?: number; // NUMERIC(14,3)
|
|
||||||
valor_por_excedente_emol?: number; // NUMERIC(14,3)
|
|
||||||
valor_por_excedente_tj?: number; // NUMERIC(14,3)
|
|
||||||
valor_por_excedente_fundo?: number; // NUMERIC(14,3)
|
|
||||||
valor_limite_excedente_emol?: number; // NUMERIC(14,3)
|
|
||||||
valor_limite_excedente_tj?: number; // NUMERIC(14,3)
|
|
||||||
valor_limite_excedente_fundo?: number; // NUMERIC(14,3)
|
|
||||||
fundo_selo?: number; // NUMERIC(14,3)
|
|
||||||
distribuicao?: number; // NUMERIC(14,3)
|
|
||||||
vrc_ext?: number; // NUMERIC(10,2) - Renomeado de VRCEXT para vrc_ext (convenção)
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
export default interface TServicoTipoInterface {
|
|
||||||
servico_tipo_id?: number; // SERVICO_TIPO_ID NUMERIC(10,2) NOT NULL (PK)
|
|
||||||
descricao: string; // DESCRICAO VARCHAR(60)
|
|
||||||
valor?: number; // VALOR NUMERIC(14,3)
|
|
||||||
tipo_item?: string;
|
|
||||||
requer_autorizacao?: string; // REQUER_AUTORIZACAO VARCHAR(1)
|
|
||||||
requer_biometria?: string; // REQUER_BIOMETRIA VARCHAR(1)
|
|
||||||
tipo_pessoa?: string; // TIPO_PESSOA VARCHAR(1)
|
|
||||||
tb_reconhecimentotipo_id?: number; // TB_RECONHECIMENTOTIPO_ID NUMERIC(10,2) (FK)
|
|
||||||
requer_abonador?: string; // REQUER_ABONADOR VARCHAR(1)
|
|
||||||
situacao?: string; // SITUACAO VARCHAR(1)
|
|
||||||
requer_cpf?: string; // REQUER_CPF VARCHAR(1)
|
|
||||||
servico_padrao?: string; // SERVICO_PADRAO VARCHAR(1)
|
|
||||||
maximo_pessoa?: number; // MAXIMO_PESSOA NUMERIC(10,2)
|
|
||||||
alterar_valor?: string; // ALTERAR_VALOR VARCHAR(1)
|
|
||||||
servico_caixa_id?: number; // SERVICO_CAIXA_ID NUMERIC(10,2)
|
|
||||||
caixa_servico_id?: number; // LIBERAR_DESCONTO VARCHAR(1)
|
|
||||||
valor_fixo?: string; // VALOR_FIXO VARCHAR(1)
|
|
||||||
emolumento_id?: number; // EMOLUMENTO_ID NUMERIC(10,2) (FK)
|
|
||||||
emolumento_obrigatorio?: number; // EMOLUMENTO_OBRIGATORIO NUMERIC(10,2) (FK)
|
|
||||||
ato_praticado?: string; // ATO_PRATICADO VARCHAR(1)
|
|
||||||
selar?: string; // SELAR VARCHAR(1)
|
|
||||||
frenteverso?: string; // FRENTEVERSO VARCHAR(1)
|
|
||||||
etiqueta_unica?: string; // ETIQUETA_UNICA VARCHAR(1)
|
|
||||||
transferencia_veiculo?: string; // TRANSFERENCIA_VEICULO VARCHAR(1)
|
|
||||||
usar_a4?: string; // USAR_A4 VARCHAR(1)
|
|
||||||
averbacao?: string; // AVERBACAO VARCHAR(1)
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
// Interface que representa a tabela T_TB_RECONHECIMENTOTIPO
|
|
||||||
export interface TTbReconhecimentoTipoInterface {
|
|
||||||
tb_reconhecimentotipo_id: number; // NUMERIC(10,2) NOT NULL - Chave primária
|
|
||||||
descricao?: string; // VARCHAR(30)
|
|
||||||
situacao?: string; // VARCHAR(1)
|
|
||||||
}
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
import z from 'zod';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tipos utilitários para campos simples
|
|
||||||
*/
|
|
||||||
const SN = z.enum(['S', 'N']).default('N'); // Campos do tipo Sim/Não
|
|
||||||
const AI = z.enum(['A', 'I']).default('A'); // Situação Ativo/Inativo
|
|
||||||
const OneCharString = z.string().max(1, 'Deve ter no máximo 1 caractere').optional();
|
|
||||||
const RequiredString = z.string().min(1, 'O campo é obrigatório');
|
|
||||||
const OptionalNumber = z.number().optional();
|
|
||||||
const RequiredNumber = z.number();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Schema principal baseado na DDL e adaptado ao formulário React
|
|
||||||
*/
|
|
||||||
export const TServicoTipoSchema = z.object({
|
|
||||||
// Identificador
|
|
||||||
servico_tipo_id: RequiredNumber.describe('ID do Tipo de Serviço').optional(),
|
|
||||||
|
|
||||||
// Campos principais
|
|
||||||
descricao: z.string().max(60, 'A descrição deve ter no máximo 60 caracteres').optional(),
|
|
||||||
categoria: z.string().optional(),
|
|
||||||
|
|
||||||
// Controle de flags (S/N)
|
|
||||||
frenteverso: SN.optional(),
|
|
||||||
averbacao: SN.optional(),
|
|
||||||
transferencia_veiculo: SN.optional(),
|
|
||||||
usar_a4: SN.optional(),
|
|
||||||
etiqueta_unica: SN.optional(),
|
|
||||||
selar: SN.optional(),
|
|
||||||
servico_padrao: SN.optional(),
|
|
||||||
// lancar_taxa: SN.optional(),
|
|
||||||
// lancar_fundesp: SN.optional(),
|
|
||||||
// liberar_desconto: SN.optional(),
|
|
||||||
// fundesp_automatica: SN.optional(),
|
|
||||||
// lancar_valor_documento: SN.optional(),
|
|
||||||
valor_fixo: SN.optional(),
|
|
||||||
ato_praticado: SN.optional(),
|
|
||||||
// apresentante_selo: SN.optional(),
|
|
||||||
// renovacao_cartao: SN.optional(),
|
|
||||||
|
|
||||||
// Situação
|
|
||||||
situacao: AI,
|
|
||||||
|
|
||||||
// Campos numéricos
|
|
||||||
valor: OptionalNumber,
|
|
||||||
maximo_pessoa: OptionalNumber,
|
|
||||||
servico_caixa_id: OptionalNumber,
|
|
||||||
emolumento_id: z.number().nullable(),
|
|
||||||
emolumento_obrigatorio: z.number().nullable(),
|
|
||||||
|
|
||||||
// Relacionamentos e permissões
|
|
||||||
tipo_item: OneCharString,
|
|
||||||
requer_autorizacao: OneCharString,
|
|
||||||
requer_biometria: OneCharString,
|
|
||||||
tipo_pessoa: OneCharString,
|
|
||||||
tb_reconhecimentotipo_id: OptionalNumber,
|
|
||||||
// tipo_permissao_cpf: OneCharString,
|
|
||||||
requer_abonador: OneCharString,
|
|
||||||
// requer_representante: OneCharString,
|
|
||||||
requer_cpf: OneCharString,
|
|
||||||
// alterar_valor: OneCharString,
|
|
||||||
// pagina_acrescida: OneCharString,
|
|
||||||
|
|
||||||
// Campos auxiliares usados apenas no formulário (não persistidos)
|
|
||||||
valor_emolumento: z.number().optional(),
|
|
||||||
valor_taxa_judiciaria: z.number().optional(),
|
|
||||||
fundesp_valor: z.number().optional(),
|
|
||||||
valor_total: z.number().optional(),
|
|
||||||
etiquetas_carimbos: z.any().optional(),
|
|
||||||
emolumento: z.any().optional(),
|
|
||||||
emolumento_auxiliar: z.any().optional(),
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tipo inferido do schema — usado diretamente no useForm
|
|
||||||
*/
|
|
||||||
export type TServicoTipoFormValues = z.infer<typeof TServicoTipoSchema>;
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
// Importa o utilitário responsável por lidar com erros de forma padronizada no cliente
|
|
||||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler';
|
|
||||||
|
|
||||||
// Importa a função que realiza a requisição de listagem dos tipos de marcação
|
|
||||||
import { GEmolumentoIndexData } from '../../_data/GEmolumento/GEmolumentoIndexData';
|
|
||||||
import { GEmolumentoReadInterface } from '../../_interfaces/GEmolumentoReadInterface';
|
|
||||||
|
|
||||||
// Função assíncrona responsável por executar o serviço de listagem de tipos de marcação
|
|
||||||
async function executeGEmolumentoIndexService(data: GEmolumentoReadInterface) {
|
|
||||||
|
|
||||||
// Chama a função que realiza a requisição à API e aguarda a resposta
|
|
||||||
const response = await GEmolumentoIndexData(data);
|
|
||||||
|
|
||||||
// Retorna a resposta obtida da requisição
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Exporta o serviço encapsulado pelo handler de erro, garantindo tratamento uniforme em caso de falhas
|
|
||||||
export const GEmolumentoIndexService = withClientErrorHandler(executeGEmolumentoIndexService);
|
|
||||||
|
|
@ -19,7 +19,6 @@ import { Toaster } from '@/components/ui/sonner';
|
||||||
import Response from '../../shared/components/response/response';
|
import Response from '../../shared/components/response/response';
|
||||||
import { ResponseProvider } from '../../shared/components/response/ResponseContext';
|
import { ResponseProvider } from '../../shared/components/response/ResponseContext';
|
||||||
|
|
||||||
|
|
||||||
const geistSans = Geist({
|
const geistSans = Geist({
|
||||||
variable: '--font-geist-sans',
|
variable: '--font-geist-sans',
|
||||||
subsets: ['latin'],
|
subsets: ['latin'],
|
||||||
|
|
@ -57,9 +56,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
||||||
<Breadcrumb>
|
<Breadcrumb>
|
||||||
<BreadcrumbList>
|
<BreadcrumbList>
|
||||||
<BreadcrumbItem className="hidden md:block">
|
<BreadcrumbItem className="hidden md:block">
|
||||||
<BreadcrumbLink href="#">
|
<BreadcrumbLink href="#">Building Your Application</BreadcrumbLink>
|
||||||
Building Your Application
|
|
||||||
</BreadcrumbLink>
|
|
||||||
</BreadcrumbItem>
|
</BreadcrumbItem>
|
||||||
<BreadcrumbSeparator className="hidden md:block" />
|
<BreadcrumbSeparator className="hidden md:block" />
|
||||||
<BreadcrumbItem>
|
<BreadcrumbItem>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import useGUsuarioGetJWTHook from '@/shared/hooks/auth/useGUsuarioGetJWTHook';
|
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
import useGUsuarioGetJWTHook from '@/shared/hooks/auth/useGUsuarioGetJWTHook';
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
const { userAuthenticated } = useGUsuarioGetJWTHook();
|
const { userAuthenticated } = useGUsuarioGetJWTHook();
|
||||||
|
|
||||||
|
|
|
||||||
5
src/app/(protected)/servicos/atos/ato/page.tsx
Normal file
5
src/app/(protected)/servicos/atos/ato/page.tsx
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import TAtoForm from '@/packages/servicos/components/TAto/TAtoForm';
|
||||||
|
|
||||||
|
export default function TAtoFormPage() {
|
||||||
|
return <TAtoForm />;
|
||||||
|
}
|
||||||
5
src/app/(protected)/servicos/atos/page.tsx
Normal file
5
src/app/(protected)/servicos/atos/page.tsx
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import TAtoIndex from '@/packages/servicos/components/TAto/TAtoIndex';
|
||||||
|
|
||||||
|
export default function TServicoAToPag() {
|
||||||
|
return <TAtoIndex />;
|
||||||
|
}
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
'use client'
|
|
||||||
|
|
||||||
import { useParams } from "next/navigation";
|
|
||||||
|
|
||||||
import TServicoPedidoDetails from "@/packages/servicos/components/TServicoPedido/TServicoPedidoDetails";
|
|
||||||
|
|
||||||
export default function TServicoPedidoDetailsPage() {
|
|
||||||
|
|
||||||
const params = useParams();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<TServicoPedidoDetails
|
|
||||||
servico_pedido_id={Number(params.servicoPedidoId)}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
import TServicoPedidoIndex from "@/packages/servicos/components/TServicoPedido/TServicoPedidoIndex";
|
|
||||||
|
|
||||||
export default function TServicoPedidoPage() {
|
|
||||||
return (
|
|
||||||
<TServicoPedidoIndex />
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
'use client'
|
|
||||||
|
|
||||||
import { useParams } from "next/navigation";
|
|
||||||
|
|
||||||
import TServicoPedidoForm from "@/packages/servicos/components/TServicoPedido/TServicoPedidoForm";
|
|
||||||
|
|
||||||
export default function TServicoPedidoPage() {
|
|
||||||
|
|
||||||
const params = useParams();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<TServicoPedidoForm
|
|
||||||
servico_pedido_id={Number(params.servicoPedidoId)}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
import TServicoPedidoForm from "@/packages/servicos/components/TServicoPedido/TServicoPedidoForm"
|
|
||||||
|
|
||||||
export default function TServicoPedidoPage() {
|
|
||||||
return (
|
|
||||||
<TServicoPedidoForm />
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import TServicoPedidoDashboard from "@/packages/servicos/components/TServicoPedido/TServicoPedidoDashboard";
|
import TServicoPedidoDashboard from '@/packages/servicos/components/TServicoPedido/TServicoPedidoDashboard';
|
||||||
|
|
||||||
export default function TServicoPedidoPage() {
|
export default function TServicoPedidoPage() {
|
||||||
return (
|
return <TServicoPedidoDashboard />;
|
||||||
<TServicoPedidoDashboard />
|
}
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useParams } from 'next/navigation';
|
||||||
|
|
||||||
|
import TServicoPedidoDetails from '@/packages/servicos/components/TServicoPedido/TServicoPedidoDetails';
|
||||||
|
|
||||||
|
export default function TServicoPedidoDetailsPage() {
|
||||||
|
const params = useParams();
|
||||||
|
|
||||||
|
return <TServicoPedidoDetails servico_pedido_id={Number(params.servicoPedidoId)} />;
|
||||||
|
}
|
||||||
5
src/app/(protected)/servicos/pedidos/page.tsx
Normal file
5
src/app/(protected)/servicos/pedidos/page.tsx
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import TServicoPedidoIndex from '@/packages/servicos/components/TServicoPedido/TServicoPedidoIndex';
|
||||||
|
|
||||||
|
export default function TServicoPedidoPage() {
|
||||||
|
return <TServicoPedidoIndex />;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useParams } from 'next/navigation';
|
||||||
|
|
||||||
|
import TServicoPedidoForm from '@/packages/servicos/components/TServicoPedido/TServicoPedidoForm';
|
||||||
|
|
||||||
|
export default function TServicoPedidoPage() {
|
||||||
|
const params = useParams();
|
||||||
|
|
||||||
|
return <TServicoPedidoForm servico_pedido_id={Number(params.servicoPedidoId)} />;
|
||||||
|
}
|
||||||
5
src/app/(protected)/servicos/pedidos/pedido/page.tsx
Normal file
5
src/app/(protected)/servicos/pedidos/pedido/page.tsx
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import TServicoPedidoForm from '@/packages/servicos/components/TServicoPedido/TServicoPedidoForm';
|
||||||
|
|
||||||
|
export default function TServicoPedidoPage() {
|
||||||
|
return <TServicoPedidoForm />;
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AlertDialog,
|
AlertDialog,
|
||||||
AlertDialogCancel,
|
AlertDialogCancel,
|
||||||
|
|
@ -11,7 +12,6 @@ import {
|
||||||
AlertDialogTitle,
|
AlertDialogTitle,
|
||||||
AlertDialogAction,
|
AlertDialogAction,
|
||||||
} from '@/components/ui/alert-dialog';
|
} from '@/components/ui/alert-dialog';
|
||||||
|
|
||||||
import { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/ui/input-otp';
|
import { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/ui/input-otp';
|
||||||
|
|
||||||
interface ConfirmExclusionProps {
|
interface ConfirmExclusionProps {
|
||||||
|
|
|
||||||
|
|
@ -6,39 +6,44 @@
|
||||||
:root {
|
:root {
|
||||||
--background: oklch(0.9911 0 0);
|
--background: oklch(0.9911 0 0);
|
||||||
--foreground: oklch(0.2988 0.0123 222.4429);
|
--foreground: oklch(0.2988 0.0123 222.4429);
|
||||||
--card: oklch(1.0000 0 0);
|
--card: oklch(1 0 0);
|
||||||
--card-foreground: oklch(0.2988 0.0123 222.4429);
|
--card-foreground: oklch(0.2988 0.0123 222.4429);
|
||||||
--popover: oklch(0.9881 0 0);
|
--popover: oklch(0.9881 0 0);
|
||||||
--popover-foreground: oklch(0.2988 0.0123 222.4429);
|
--popover-foreground: oklch(0.2988 0.0123 222.4429);
|
||||||
--primary: oklch(0.7210 0.1873 47.5640);
|
--primary: oklch(0.721 0.1873 47.564);
|
||||||
--primary-foreground: oklch(1.0000 0 0);
|
--primary-foreground: oklch(1 0 0);
|
||||||
--secondary: oklch(0.2988 0.0123 222.4429);
|
--secondary: oklch(0.2988 0.0123 222.4429);
|
||||||
--secondary-foreground: oklch(1.0000 0 0);
|
--secondary-foreground: oklch(1 0 0);
|
||||||
--muted: oklch(0.9700 0 0);
|
--muted: oklch(0.97 0 0);
|
||||||
--muted-foreground: oklch(0.5560 0 0);
|
--muted-foreground: oklch(0.556 0 0);
|
||||||
--accent: oklch(0.9551 0 0);
|
--accent: oklch(0.9551 0 0);
|
||||||
--accent-foreground: oklch(0.2988 0.0123 222.4429);
|
--accent-foreground: oklch(0.2988 0.0123 222.4429);
|
||||||
--destructive: oklch(0.5770 0.2450 27.3250);
|
--destructive: oklch(0.577 0.245 27.325);
|
||||||
--destructive-foreground: oklch(1 0 0);
|
--destructive-foreground: oklch(1 0 0);
|
||||||
--border: oklch(0.9220 0 0);
|
--border: oklch(0.922 0 0);
|
||||||
--input: oklch(0.9220 0 0);
|
--input: oklch(0.922 0 0);
|
||||||
--ring: oklch(0.7080 0 0);
|
--ring: oklch(0.708 0 0);
|
||||||
--chart-1: oklch(0.8100 0.1000 252);
|
--chart-1: oklch(0.81 0.1 252);
|
||||||
--chart-2: oklch(0.6200 0.1900 260);
|
--chart-2: oklch(0.62 0.19 260);
|
||||||
--chart-3: oklch(0.5500 0.2200 263);
|
--chart-3: oklch(0.55 0.22 263);
|
||||||
--chart-4: oklch(0.4900 0.2200 264);
|
--chart-4: oklch(0.49 0.22 264);
|
||||||
--chart-5: oklch(0.4200 0.1800 266);
|
--chart-5: oklch(0.42 0.18 266);
|
||||||
--sidebar: oklch(1.0000 0 0);
|
--sidebar: oklch(1 0 0);
|
||||||
--sidebar-foreground: oklch(0.2988 0.0123 222.4429);
|
--sidebar-foreground: oklch(0.2988 0.0123 222.4429);
|
||||||
--sidebar-primary: oklch(0.2364 0.0083 240.2365);
|
--sidebar-primary: oklch(0.2364 0.0083 240.2365);
|
||||||
--sidebar-primary-foreground: oklch(0.9850 0 0);
|
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||||
--sidebar-accent: oklch(0.9700 0 0);
|
--sidebar-accent: oklch(0.97 0 0);
|
||||||
--sidebar-accent-foreground: oklch(0.2050 0 0);
|
--sidebar-accent-foreground: oklch(0.205 0 0);
|
||||||
--sidebar-border: oklch(0.9220 0 0);
|
--sidebar-border: oklch(0.922 0 0);
|
||||||
--sidebar-ring: oklch(0.7080 0 0);
|
--sidebar-ring: oklch(0.708 0 0);
|
||||||
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
--font-sans:
|
||||||
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
||||||
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
||||||
|
'Segoe UI Symbol', 'Noto Color Emoji';
|
||||||
|
--font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
|
||||||
|
--font-mono:
|
||||||
|
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
||||||
|
monospace;
|
||||||
--radius: 0.625rem;
|
--radius: 0.625rem;
|
||||||
--shadow-x: 0;
|
--shadow-x: 0;
|
||||||
--shadow-y: 1px;
|
--shadow-y: 1px;
|
||||||
|
|
@ -48,11 +53,11 @@
|
||||||
--shadow-color: oklch(0 0 0);
|
--shadow-color: oklch(0 0 0);
|
||||||
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
||||||
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
||||||
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
|
||||||
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
|
||||||
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
|
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
|
||||||
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
|
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);
|
||||||
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
|
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);
|
||||||
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
|
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
|
||||||
--tracking-normal: 0em;
|
--tracking-normal: 0em;
|
||||||
--spacing: 0.25rem;
|
--spacing: 0.25rem;
|
||||||
|
|
@ -68,35 +73,40 @@
|
||||||
--card-foreground: oklch(0.9881 0 0);
|
--card-foreground: oklch(0.9881 0 0);
|
||||||
--popover: oklch(0.2988 0.0123 222.4429);
|
--popover: oklch(0.2988 0.0123 222.4429);
|
||||||
--popover-foreground: oklch(0.9881 0 0);
|
--popover-foreground: oklch(0.9881 0 0);
|
||||||
--primary: oklch(0.7210 0.1873 47.5640);
|
--primary: oklch(0.721 0.1873 47.564);
|
||||||
--primary-foreground: oklch(0.2988 0.0123 222.4429);
|
--primary-foreground: oklch(0.2988 0.0123 222.4429);
|
||||||
--secondary: oklch(0.2988 0.0123 222.4429);
|
--secondary: oklch(0.2988 0.0123 222.4429);
|
||||||
--secondary-foreground: oklch(1.0000 0 0);
|
--secondary-foreground: oklch(1 0 0);
|
||||||
--muted: oklch(0.2690 0 0);
|
--muted: oklch(0.269 0 0);
|
||||||
--muted-foreground: oklch(0.7080 0 0);
|
--muted-foreground: oklch(0.708 0 0);
|
||||||
--accent: oklch(0.2988 0.0123 222.4429);
|
--accent: oklch(0.2988 0.0123 222.4429);
|
||||||
--accent-foreground: oklch(1.0000 0 0);
|
--accent-foreground: oklch(1 0 0);
|
||||||
--destructive: oklch(0.7040 0.1910 22.2160);
|
--destructive: oklch(0.704 0.191 22.216);
|
||||||
--destructive-foreground: oklch(0.9850 0 0);
|
--destructive-foreground: oklch(0.985 0 0);
|
||||||
--border: oklch(0.2750 0 0);
|
--border: oklch(0.275 0 0);
|
||||||
--input: oklch(0.3250 0 0);
|
--input: oklch(0.325 0 0);
|
||||||
--ring: oklch(0.5560 0 0);
|
--ring: oklch(0.556 0 0);
|
||||||
--chart-1: oklch(0.8100 0.1000 252);
|
--chart-1: oklch(0.81 0.1 252);
|
||||||
--chart-2: oklch(0.6200 0.1900 260);
|
--chart-2: oklch(0.62 0.19 260);
|
||||||
--chart-3: oklch(0.5500 0.2200 263);
|
--chart-3: oklch(0.55 0.22 263);
|
||||||
--chart-4: oklch(0.4900 0.2200 264);
|
--chart-4: oklch(0.49 0.22 264);
|
||||||
--chart-5: oklch(0.4200 0.1800 266);
|
--chart-5: oklch(0.42 0.18 266);
|
||||||
--sidebar: oklch(0.2364 0.0083 240.2365);
|
--sidebar: oklch(0.2364 0.0083 240.2365);
|
||||||
--sidebar-foreground: oklch(0.9881 0 0);
|
--sidebar-foreground: oklch(0.9881 0 0);
|
||||||
--sidebar-primary: oklch(0.4880 0.2430 264.3760);
|
--sidebar-primary: oklch(0.488 0.243 264.376);
|
||||||
--sidebar-primary-foreground: oklch(0.9850 0 0);
|
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||||
--sidebar-accent: oklch(0.2690 0 0);
|
--sidebar-accent: oklch(0.269 0 0);
|
||||||
--sidebar-accent-foreground: oklch(0.9850 0 0);
|
--sidebar-accent-foreground: oklch(0.985 0 0);
|
||||||
--sidebar-border: oklch(0.2750 0 0);
|
--sidebar-border: oklch(0.275 0 0);
|
||||||
--sidebar-ring: oklch(0.4390 0 0);
|
--sidebar-ring: oklch(0.439 0 0);
|
||||||
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
--font-sans:
|
||||||
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
||||||
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
||||||
|
'Segoe UI Symbol', 'Noto Color Emoji';
|
||||||
|
--font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
|
||||||
|
--font-mono:
|
||||||
|
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
||||||
|
monospace;
|
||||||
--radius: 0.625rem;
|
--radius: 0.625rem;
|
||||||
--shadow-x: 0;
|
--shadow-x: 0;
|
||||||
--shadow-y: 1px;
|
--shadow-y: 1px;
|
||||||
|
|
@ -106,11 +116,11 @@
|
||||||
--shadow-color: oklch(0 0 0);
|
--shadow-color: oklch(0 0 0);
|
||||||
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
||||||
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
||||||
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
|
||||||
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
|
||||||
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
|
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
|
||||||
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
|
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);
|
||||||
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
|
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);
|
||||||
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
|
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
|
||||||
--shadow-offset-x: 0;
|
--shadow-offset-x: 0;
|
||||||
--shadow-offset-y: 1px;
|
--shadow-offset-y: 1px;
|
||||||
|
|
@ -152,9 +162,14 @@
|
||||||
--color-sidebar-border: var(--sidebar-border);
|
--color-sidebar-border: var(--sidebar-border);
|
||||||
--color-sidebar-ring: var(--sidebar-ring);
|
--color-sidebar-ring: var(--sidebar-ring);
|
||||||
|
|
||||||
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
--font-sans:
|
||||||
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
||||||
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
||||||
|
'Segoe UI Symbol', 'Noto Color Emoji';
|
||||||
|
--font-mono:
|
||||||
|
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
||||||
|
monospace;
|
||||||
|
--font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
|
||||||
|
|
||||||
--radius-sm: calc(var(--radius) - 4px);
|
--radius-sm: calc(var(--radius) - 4px);
|
||||||
--radius-md: calc(var(--radius) - 2px);
|
--radius-md: calc(var(--radius) - 2px);
|
||||||
|
|
@ -197,4 +212,4 @@
|
||||||
.bg-brand {
|
.bg-brand {
|
||||||
background-color: #1a292f;
|
background-color: #1a292f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
import { Editor } from '@tinymce/tinymce-react';
|
import { Editor } from '@tinymce/tinymce-react';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
// 1. Define as propriedades que nosso componente vai receber
|
// 1. Define as propriedades que nosso componente vai receber
|
||||||
interface MainEditorProps {
|
interface MainEditorProps {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import {
|
||||||
HouseIcon,
|
HouseIcon,
|
||||||
SquareMousePointer,
|
SquareMousePointer,
|
||||||
SquareTerminal,
|
SquareTerminal,
|
||||||
UsersIcon
|
UsersIcon,
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
@ -27,7 +27,6 @@ import {
|
||||||
} from '@/components/ui/sidebar';
|
} from '@/components/ui/sidebar';
|
||||||
import useGUsuarioGetJWTHook from '@/shared/hooks/auth/useGUsuarioGetJWTHook';
|
import useGUsuarioGetJWTHook from '@/shared/hooks/auth/useGUsuarioGetJWTHook';
|
||||||
|
|
||||||
|
|
||||||
// This is sample data.
|
// This is sample data.
|
||||||
const data = {
|
const data = {
|
||||||
teams: [],
|
teams: [],
|
||||||
|
|
@ -55,8 +54,12 @@ const data = {
|
||||||
url: '/servicos/dashboard/',
|
url: '/servicos/dashboard/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Balcão',
|
title: 'Pedidos',
|
||||||
url: '/servicos/balcao/',
|
url: '/servicos/pedidos/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Atos',
|
||||||
|
url: '/servicos/atos/',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -170,41 +173,41 @@ const data = {
|
||||||
url: '/administrativo/centrais/censec/naturezas-litigios',
|
url: '/administrativo/centrais/censec/naturezas-litigios',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Serviços/Tipos',
|
title: 'Tipos/Serviços',
|
||||||
url: '/cadastros/servicos-tipo/',
|
url: '/administrativo/tipos-servicos',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Atos/Partes Tipos',
|
title: 'Atos/Partes Tipos',
|
||||||
url: '/administrativo/atos/partes-tipos',
|
url: '/administrativo/atos/partes-tipos',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Valores de Serviços",
|
title: 'Valores de Serviços',
|
||||||
url: "/administrativo/valores-de-servicos",
|
url: '/administrativo/valores-de-servicos',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Gramatica",
|
title: 'Gramatica',
|
||||||
url: "/administrativo/gramatica",
|
url: '/administrativo/gramatica',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Cartório",
|
title: 'Cartório',
|
||||||
url: "/administrativo/cartorio",
|
url: '/administrativo/cartorio',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Financeiro/Periodo",
|
title: 'Financeiro/Periodo',
|
||||||
url: "/administrativo/financeiro/periodos",
|
url: '/administrativo/financeiro/periodos',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Financeiro/Emolumentos",
|
title: 'Financeiro/Emolumentos',
|
||||||
url: "/administrativo/financeiro/emolumentos",
|
url: '/administrativo/financeiro/emolumentos',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Selos/Grupos",
|
title: 'Selos/Grupos',
|
||||||
url: "/administrativo/selos/grupos",
|
url: '/administrativo/selos/grupos',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Financeiro/Cálculo Rápido",
|
title: 'Financeiro/Cálculo Rápido',
|
||||||
url: "/administrativo/financeiro/calculo-rapido",
|
url: '/administrativo/financeiro/calculo-rapido',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,20 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import { cn } from '@/lib/utils';
|
import { useState } from 'react';
|
||||||
|
import { useForm } from 'react-hook-form';
|
||||||
|
import z from 'zod';
|
||||||
|
|
||||||
import { Card, CardContent } from '@/components/ui/card';
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import z from 'zod';
|
import { cn } from '@/lib/utils';
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
|
||||||
import GUsuarioLoginService from '@/packages/administrativo/services/GUsuario/GUsuarioLogin';
|
|
||||||
import { useForm } from 'react-hook-form';
|
|
||||||
import { useState } from 'react';
|
|
||||||
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from './ui/form';
|
|
||||||
import LoadingButton from '@/shared/components/loadingButton/LoadingButton';
|
|
||||||
import { Button } from './ui/button';
|
|
||||||
import { GUsuarioLoginSchema } from '@/packages/administrativo/schemas/GUsuario/GUsuarioLoginSchema';
|
import { GUsuarioLoginSchema } from '@/packages/administrativo/schemas/GUsuario/GUsuarioLoginSchema';
|
||||||
|
import GUsuarioLoginService from '@/packages/administrativo/services/GUsuario/GUsuarioLogin';
|
||||||
|
import LoadingButton from '@/shared/components/loadingButton/LoadingButton';
|
||||||
|
|
||||||
|
import { Button } from './ui/button';
|
||||||
|
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from './ui/form';
|
||||||
|
|
||||||
type FormValues = z.infer<typeof GUsuarioLoginSchema>;
|
type FormValues = z.infer<typeof GUsuarioLoginSchema>;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,6 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import {
|
import { ChevronsUpDown, LogOut, Moon, Sparkles, Sun } from 'lucide-react';
|
||||||
ChevronsUpDown,
|
|
||||||
LogOut,
|
|
||||||
Moon,
|
|
||||||
Sparkles,
|
|
||||||
Sun,
|
|
||||||
} from 'lucide-react';
|
|
||||||
import { useTheme } from 'next-themes';
|
import { useTheme } from 'next-themes';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
|
|
@ -75,9 +69,7 @@ export function NavUser({ user }: { user: GUsuarioAuthenticatedInterface }) {
|
||||||
>
|
>
|
||||||
<Avatar className="h-8 w-8 rounded-lg">
|
<Avatar className="h-8 w-8 rounded-lg">
|
||||||
<AvatarImage src={user.sigla} alt={user.nome} />
|
<AvatarImage src={user.sigla} alt={user.nome} />
|
||||||
<AvatarFallback className="rounded-lg">
|
<AvatarFallback className="rounded-lg">{user.sigla}</AvatarFallback>
|
||||||
{user.sigla}
|
|
||||||
</AvatarFallback>
|
|
||||||
</Avatar>
|
</Avatar>
|
||||||
|
|
||||||
<div className="grid flex-1 text-left text-sm leading-tight">
|
<div className="grid flex-1 text-left text-sm leading-tight">
|
||||||
|
|
@ -99,9 +91,7 @@ export function NavUser({ user }: { user: GUsuarioAuthenticatedInterface }) {
|
||||||
<div className="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
|
<div className="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
|
||||||
<Avatar className="h-8 w-8 rounded-lg">
|
<Avatar className="h-8 w-8 rounded-lg">
|
||||||
<AvatarImage src={user.sigla} alt={user.nome} />
|
<AvatarImage src={user.sigla} alt={user.nome} />
|
||||||
<AvatarFallback className="rounded-lg">
|
<AvatarFallback className="rounded-lg">{user.sigla}</AvatarFallback>
|
||||||
{user.sigla}
|
|
||||||
</AvatarFallback>
|
|
||||||
</Avatar>
|
</Avatar>
|
||||||
|
|
||||||
<div className="grid flex-1 text-left text-sm leading-tight">
|
<div className="grid flex-1 text-left text-sm leading-tight">
|
||||||
|
|
@ -115,15 +105,8 @@ export function NavUser({ user }: { user: GUsuarioAuthenticatedInterface }) {
|
||||||
|
|
||||||
<DropdownMenuGroup>
|
<DropdownMenuGroup>
|
||||||
{/* Alternância de tema */}
|
{/* Alternância de tema */}
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem className="cursor-pointer" onClick={handleToggleTheme}>
|
||||||
className="cursor-pointer"
|
{isDark ? <Sun className="mr-2 h-4 w-4" /> : <Moon className="mr-2 h-4 w-4" />}
|
||||||
onClick={handleToggleTheme}
|
|
||||||
>
|
|
||||||
{isDark ? (
|
|
||||||
<Sun className="mr-2 h-4 w-4" />
|
|
||||||
) : (
|
|
||||||
<Moon className="mr-2 h-4 w-4" />
|
|
||||||
)}
|
|
||||||
{isDark ? 'Modo claro' : 'Modo escuro'}
|
{isDark ? 'Modo claro' : 'Modo escuro'}
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
|
||||||
|
|
@ -135,10 +118,7 @@ export function NavUser({ user }: { user: GUsuarioAuthenticatedInterface }) {
|
||||||
|
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
|
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem className="cursor-pointer" onClick={handleConfirmOpen}>
|
||||||
className="cursor-pointer"
|
|
||||||
onClick={handleConfirmOpen}
|
|
||||||
>
|
|
||||||
<LogOut className="mr-2 h-4 w-4" />
|
<LogOut className="mr-2 h-4 w-4" />
|
||||||
Log out
|
Log out
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import { ChevronsUpDown, Plus } from 'lucide-react';
|
import { ChevronsUpDown, Plus } from 'lucide-react';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
"use client";
|
'use client';
|
||||||
|
|
||||||
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
import { ThemeProvider as NextThemesProvider } from 'next-themes';
|
||||||
import * as React from "react";
|
import * as React from 'react';
|
||||||
|
|
||||||
export function ThemeProvider({ children }: { children: React.ReactNode }) {
|
export function ThemeProvider({ children }: { children: React.ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<NextThemesProvider
|
<NextThemesProvider
|
||||||
attribute="class"
|
attribute="class"
|
||||||
defaultTheme="system"
|
defaultTheme="system"
|
||||||
enableSystem
|
enableSystem
|
||||||
disableTransitionOnChange
|
disableTransitionOnChange
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</NextThemesProvider>
|
</NextThemesProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
|
||||||
import { buttonVariants } from '@/components/ui/button';
|
import { buttonVariants } from '@/components/ui/button';
|
||||||
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
||||||
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
|
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,46 +1,39 @@
|
||||||
import * as React from "react"
|
import { Slot } from '@radix-ui/react-slot';
|
||||||
import { Slot } from "@radix-ui/react-slot"
|
import { cva, type VariantProps } from 'class-variance-authority';
|
||||||
import { cva, type VariantProps } from "class-variance-authority"
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
const badgeVariants = cva(
|
const badgeVariants = cva(
|
||||||
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
'inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',
|
||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default:
|
default: 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
|
||||||
"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
||||||
secondary:
|
secondary:
|
||||||
"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
|
||||||
destructive:
|
destructive:
|
||||||
"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
||||||
outline:
|
outline: 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
|
||||||
"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: "default",
|
variant: 'default',
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
)
|
);
|
||||||
|
|
||||||
function Badge({
|
function Badge({
|
||||||
className,
|
className,
|
||||||
variant,
|
variant,
|
||||||
asChild = false,
|
asChild = false,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<"span"> &
|
}: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
||||||
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
const Comp = asChild ? Slot : 'span';
|
||||||
const Comp = asChild ? Slot : "span"
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Comp
|
<Comp data-slot="badge" className={cn(badgeVariants({ variant }), className)} {...props} />
|
||||||
data-slot="badge"
|
);
|
||||||
className={cn(badgeVariants({ variant }), className)}
|
|
||||||
{...props}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Badge, badgeVariants }
|
export { Badge, badgeVariants };
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from 'react';
|
|
||||||
import { Slot } from '@radix-ui/react-slot';
|
import { Slot } from '@radix-ui/react-slot';
|
||||||
import { ChevronRight, MoreHorizontal } from 'lucide-react';
|
import { ChevronRight, MoreHorizontal } from 'lucide-react';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { Slot } from "@radix-ui/react-slot"
|
import { Slot } from '@radix-ui/react-slot';
|
||||||
import { cva, type VariantProps } from "class-variance-authority"
|
import { cva, type VariantProps } from 'class-variance-authority';
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { Separator } from '@/components/ui/separator';
|
||||||
import { Separator } from "@/components/ui/separator"
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
const buttonGroupVariants = cva(
|
const buttonGroupVariants = cva(
|
||||||
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
|
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
|
||||||
|
|
@ -10,22 +10,22 @@ const buttonGroupVariants = cva(
|
||||||
variants: {
|
variants: {
|
||||||
orientation: {
|
orientation: {
|
||||||
horizontal:
|
horizontal:
|
||||||
"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
'[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none',
|
||||||
vertical:
|
vertical:
|
||||||
"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",
|
'flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
orientation: "horizontal",
|
orientation: 'horizontal',
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
)
|
);
|
||||||
|
|
||||||
function ButtonGroup({
|
function ButtonGroup({
|
||||||
className,
|
className,
|
||||||
orientation,
|
orientation,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>) {
|
}: React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
role="group"
|
role="group"
|
||||||
|
|
@ -34,32 +34,32 @@ function ButtonGroup({
|
||||||
className={cn(buttonGroupVariants({ orientation }), className)}
|
className={cn(buttonGroupVariants({ orientation }), className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ButtonGroupText({
|
function ButtonGroupText({
|
||||||
className,
|
className,
|
||||||
asChild = false,
|
asChild = false,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<"div"> & {
|
}: React.ComponentProps<'div'> & {
|
||||||
asChild?: boolean
|
asChild?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const Comp = asChild ? Slot : "div"
|
const Comp = asChild ? Slot : 'div';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Comp
|
<Comp
|
||||||
className={cn(
|
className={cn(
|
||||||
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
||||||
className
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ButtonGroupSeparator({
|
function ButtonGroupSeparator({
|
||||||
className,
|
className,
|
||||||
orientation = "vertical",
|
orientation = 'vertical',
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<typeof Separator>) {
|
}: React.ComponentProps<typeof Separator>) {
|
||||||
return (
|
return (
|
||||||
|
|
@ -67,17 +67,12 @@ function ButtonGroupSeparator({
|
||||||
data-slot="button-group-separator"
|
data-slot="button-group-separator"
|
||||||
orientation={orientation}
|
orientation={orientation}
|
||||||
className={cn(
|
className={cn(
|
||||||
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
'bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto',
|
||||||
className
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
||||||
ButtonGroup,
|
|
||||||
ButtonGroupSeparator,
|
|
||||||
ButtonGroupText,
|
|
||||||
buttonGroupVariants,
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,40 +1,38 @@
|
||||||
import * as React from "react"
|
import { Slot } from '@radix-ui/react-slot';
|
||||||
import { Slot } from "@radix-ui/react-slot"
|
import { cva, type VariantProps } from 'class-variance-authority';
|
||||||
import { cva, type VariantProps } from "class-variance-authority"
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
const buttonVariants = cva(
|
const buttonVariants = cva(
|
||||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
||||||
destructive:
|
destructive:
|
||||||
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
||||||
outline:
|
outline:
|
||||||
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
|
||||||
secondary:
|
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
||||||
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
||||||
ghost:
|
link: 'text-primary underline-offset-4 hover:underline',
|
||||||
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
||||||
link: "text-primary underline-offset-4 hover:underline",
|
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
||||||
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
||||||
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
||||||
icon: "size-9",
|
icon: 'size-9',
|
||||||
"icon-sm": "size-8",
|
'icon-sm': 'size-8',
|
||||||
"icon-lg": "size-10",
|
'icon-lg': 'size-10',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: "default",
|
variant: 'default',
|
||||||
size: "default",
|
size: 'default',
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
)
|
);
|
||||||
|
|
||||||
function Button({
|
function Button({
|
||||||
className,
|
className,
|
||||||
|
|
@ -42,11 +40,11 @@ function Button({
|
||||||
size,
|
size,
|
||||||
asChild = false,
|
asChild = false,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<"button"> &
|
}: React.ComponentProps<'button'> &
|
||||||
VariantProps<typeof buttonVariants> & {
|
VariantProps<typeof buttonVariants> & {
|
||||||
asChild?: boolean
|
asChild?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const Comp = asChild ? Slot : "button"
|
const Comp = asChild ? Slot : 'button';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Comp
|
<Comp
|
||||||
|
|
@ -54,7 +52,7 @@ function Button({
|
||||||
className={cn(buttonVariants({ variant, size, className }))}
|
className={cn(buttonVariants({ variant, size, className }))}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Button, buttonVariants }
|
export { Button, buttonVariants };
|
||||||
|
|
|
||||||
|
|
@ -1,92 +1,75 @@
|
||||||
import * as React from "react"
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
function Card({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="card"
|
data-slot="card"
|
||||||
className={cn(
|
className={cn(
|
||||||
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm',
|
||||||
className
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="card-header"
|
data-slot="card-header"
|
||||||
className={cn(
|
className={cn(
|
||||||
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
|
||||||
className
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
function CardTitle({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="card-title"
|
data-slot="card-title"
|
||||||
className={cn("leading-none font-semibold", className)}
|
className={cn('leading-none font-semibold', className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
function CardDescription({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="card-description"
|
data-slot="card-description"
|
||||||
className={cn("text-muted-foreground text-sm", className)}
|
className={cn('text-muted-foreground text-sm', className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
function CardAction({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="card-action"
|
data-slot="card-action"
|
||||||
className={cn(
|
className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}
|
||||||
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
function CardContent({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return <div data-slot="card-content" className={cn('px-6', className)} {...props} />;
|
||||||
<div
|
|
||||||
data-slot="card-content"
|
|
||||||
className={cn("px-6", className)}
|
|
||||||
{...props}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
function CardFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="card-footer"
|
data-slot="card-footer"
|
||||||
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
|
className={cn('flex items-center px-6 [.border-t]:pt-6', className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
|
||||||
Card,
|
|
||||||
CardHeader,
|
|
||||||
CardFooter,
|
|
||||||
CardTitle,
|
|
||||||
CardAction,
|
|
||||||
CardDescription,
|
|
||||||
CardContent,
|
|
||||||
}
|
|
||||||
|
|
|
||||||
132
src/components/ui/chart.tsx
Normal file
132
src/components/ui/chart.tsx
Normal file
|
|
@ -0,0 +1,132 @@
|
||||||
|
const ChartTooltip = RechartsPrimitive.Tooltip;
|
||||||
|
|
||||||
|
function ChartTooltipContent(props: any) {
|
||||||
|
const {
|
||||||
|
active,
|
||||||
|
payload,
|
||||||
|
className,
|
||||||
|
indicator = 'dot',
|
||||||
|
hideLabel = false,
|
||||||
|
hideIndicator = false,
|
||||||
|
label,
|
||||||
|
labelFormatter,
|
||||||
|
labelClassName,
|
||||||
|
formatter,
|
||||||
|
color,
|
||||||
|
nameKey,
|
||||||
|
labelKey,
|
||||||
|
} = props;
|
||||||
|
|
||||||
|
const { config } = useChart();
|
||||||
|
|
||||||
|
const tooltipLabel = React.useMemo(() => {
|
||||||
|
if (hideLabel || !payload?.length) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const [item] = payload;
|
||||||
|
const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;
|
||||||
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
||||||
|
const value =
|
||||||
|
!labelKey && typeof label === 'string'
|
||||||
|
? config[label as keyof typeof config]?.label || label
|
||||||
|
: itemConfig?.label;
|
||||||
|
|
||||||
|
if (labelFormatter) {
|
||||||
|
return (
|
||||||
|
<div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!value) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return <div className={cn('font-medium', labelClassName)}>{value}</div>;
|
||||||
|
}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
|
||||||
|
|
||||||
|
if (!active || !payload?.length) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const nestLabel = payload.length === 1 && indicator !== 'dot';
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={cn(
|
||||||
|
'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl',
|
||||||
|
className,
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{!nestLabel ? tooltipLabel : null}
|
||||||
|
<div className="grid gap-1.5">
|
||||||
|
{payload
|
||||||
|
.filter((item: any) => item.type !== 'none')
|
||||||
|
.map((item: any, index: number) => {
|
||||||
|
const key = `${nameKey || item.name || item.dataKey || 'value'}`;
|
||||||
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
||||||
|
const indicatorColor = color || item.payload?.fill || item.color;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={item.dataKey}
|
||||||
|
className={cn(
|
||||||
|
'[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',
|
||||||
|
indicator === 'dot' && 'items-center',
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{formatter && item?.value !== undefined && item.name ? (
|
||||||
|
formatter(item.value, item.name, item, index, item.payload)
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
{itemConfig?.icon ? (
|
||||||
|
<itemConfig.icon />
|
||||||
|
) : (
|
||||||
|
!hideIndicator && (
|
||||||
|
<div
|
||||||
|
className={cn(
|
||||||
|
'shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)',
|
||||||
|
{
|
||||||
|
'h-2.5 w-2.5': indicator === 'dot',
|
||||||
|
'w-1': indicator === 'line',
|
||||||
|
'w-0 border-[1.5px] border-dashed bg-transparent':
|
||||||
|
indicator === 'dashed',
|
||||||
|
'my-0.5': nestLabel && indicator === 'dashed',
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
style={
|
||||||
|
{
|
||||||
|
'--color-bg': indicatorColor,
|
||||||
|
'--color-border': indicatorColor,
|
||||||
|
} as React.CSSProperties
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
)}
|
||||||
|
<div
|
||||||
|
className={cn(
|
||||||
|
'flex flex-1 justify-between leading-none',
|
||||||
|
nestLabel ? 'items-end' : 'items-center',
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<div className="grid gap-1.5">
|
||||||
|
{nestLabel ? tooltipLabel : null}
|
||||||
|
<span className="text-muted-foreground">
|
||||||
|
{itemConfig?.label || item.name}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{item.value && (
|
||||||
|
<span className="text-foreground font-mono font-medium tabular-nums">
|
||||||
|
{item.value.toLocaleString()}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
||||||
import { CheckIcon } from 'lucide-react';
|
import { CheckIcon } from 'lucide-react';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import { Command as CommandPrimitive } from 'cmdk';
|
import { Command as CommandPrimitive } from 'cmdk';
|
||||||
import { SearchIcon } from 'lucide-react';
|
import { SearchIcon } from 'lucide-react';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
|
|
@ -12,6 +11,7 @@ import {
|
||||||
DialogHeader,
|
DialogHeader,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
} from '@/components/ui/dialog';
|
} from '@/components/ui/dialog';
|
||||||
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {
|
function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||||
import { XIcon } from 'lucide-react';
|
import { XIcon } from 'lucide-react';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
||||||
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as LabelPrimitive from '@radix-ui/react-label';
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
||||||
import { Slot } from '@radix-ui/react-slot';
|
import { Slot } from '@radix-ui/react-slot';
|
||||||
|
import * as React from 'react';
|
||||||
import {
|
import {
|
||||||
Controller,
|
Controller,
|
||||||
FormProvider,
|
FormProvider,
|
||||||
|
|
@ -13,8 +13,8 @@ import {
|
||||||
type FieldValues,
|
type FieldValues,
|
||||||
} from 'react-hook-form';
|
} from 'react-hook-form';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
const Form = FormProvider;
|
const Form = FormProvider;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import { OTPInput, OTPInputContext } from 'input-otp';
|
import { OTPInput, OTPInputContext } from 'input-otp';
|
||||||
import { MinusIcon } from 'lucide-react';
|
import { MinusIcon } from 'lucide-react';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
import * as React from "react"
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
type={type}
|
type={type}
|
||||||
data-slot="input"
|
data-slot="input"
|
||||||
className={cn(
|
className={cn(
|
||||||
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
||||||
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
||||||
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
||||||
className
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Input }
|
export { Input };
|
||||||
|
|
|
||||||
|
|
@ -1,65 +1,61 @@
|
||||||
import * as React from "react"
|
import { Slot } from '@radix-ui/react-slot';
|
||||||
import { Slot } from "@radix-ui/react-slot"
|
import { cva, type VariantProps } from 'class-variance-authority';
|
||||||
import { cva, type VariantProps } from "class-variance-authority"
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { Separator } from '@/components/ui/separator';
|
||||||
import { Separator } from "@/components/ui/separator"
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
|
function ItemGroup({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
role="list"
|
role="list"
|
||||||
data-slot="item-group"
|
data-slot="item-group"
|
||||||
className={cn("group/item-group flex flex-col", className)}
|
className={cn('group/item-group flex flex-col', className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ItemSeparator({
|
function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>) {
|
||||||
className,
|
|
||||||
...props
|
|
||||||
}: React.ComponentProps<typeof Separator>) {
|
|
||||||
return (
|
return (
|
||||||
<Separator
|
<Separator
|
||||||
data-slot="item-separator"
|
data-slot="item-separator"
|
||||||
orientation="horizontal"
|
orientation="horizontal"
|
||||||
className={cn("my-0", className)}
|
className={cn('my-0', className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const itemVariants = cva(
|
const itemVariants = cva(
|
||||||
"group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
'group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default: "bg-transparent",
|
default: 'bg-transparent',
|
||||||
outline: "border-border",
|
outline: 'border-border',
|
||||||
muted: "bg-muted/50",
|
muted: 'bg-muted/50',
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
default: "p-4 gap-4 ",
|
default: 'p-4 gap-4 ',
|
||||||
sm: "py-3 px-4 gap-2.5",
|
sm: 'py-3 px-4 gap-2.5',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: "default",
|
variant: 'default',
|
||||||
size: "default",
|
size: 'default',
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
)
|
);
|
||||||
|
|
||||||
function Item({
|
function Item({
|
||||||
className,
|
className,
|
||||||
variant = "default",
|
variant = 'default',
|
||||||
size = "default",
|
size = 'default',
|
||||||
asChild = false,
|
asChild = false,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<"div"> &
|
}: React.ComponentProps<'div'> & VariantProps<typeof itemVariants> & { asChild?: boolean }) {
|
||||||
VariantProps<typeof itemVariants> & { asChild?: boolean }) {
|
const Comp = asChild ? Slot : 'div';
|
||||||
const Comp = asChild ? Slot : "div"
|
|
||||||
return (
|
return (
|
||||||
<Comp
|
<Comp
|
||||||
data-slot="item"
|
data-slot="item"
|
||||||
|
|
@ -68,31 +64,30 @@ function Item({
|
||||||
className={cn(itemVariants({ variant, size, className }))}
|
className={cn(itemVariants({ variant, size, className }))}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const itemMediaVariants = cva(
|
const itemMediaVariants = cva(
|
||||||
"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5",
|
'flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5',
|
||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default: "bg-transparent",
|
default: 'bg-transparent',
|
||||||
icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
|
icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
|
||||||
image:
|
image: 'size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover',
|
||||||
"size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: "default",
|
variant: 'default',
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
)
|
);
|
||||||
|
|
||||||
function ItemMedia({
|
function ItemMedia({
|
||||||
className,
|
className,
|
||||||
variant = "default",
|
variant = 'default',
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>) {
|
}: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="item-media"
|
data-slot="item-media"
|
||||||
|
|
@ -100,83 +95,67 @@ function ItemMedia({
|
||||||
className={cn(itemMediaVariants({ variant, className }))}
|
className={cn(itemMediaVariants({ variant, className }))}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ItemContent({ className, ...props }: React.ComponentProps<"div">) {
|
function ItemContent({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="item-content"
|
data-slot="item-content"
|
||||||
className={cn(
|
className={cn('flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none', className)}
|
||||||
"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ItemTitle({ className, ...props }: React.ComponentProps<"div">) {
|
function ItemTitle({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="item-title"
|
data-slot="item-title"
|
||||||
className={cn(
|
className={cn('flex w-fit items-center gap-2 text-sm leading-snug font-medium', className)}
|
||||||
"flex w-fit items-center gap-2 text-sm leading-snug font-medium",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ItemDescription({ className, ...props }: React.ComponentProps<"p">) {
|
function ItemDescription({ className, ...props }: React.ComponentProps<'p'>) {
|
||||||
return (
|
return (
|
||||||
<p
|
<p
|
||||||
data-slot="item-description"
|
data-slot="item-description"
|
||||||
className={cn(
|
className={cn(
|
||||||
"text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
|
'text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance',
|
||||||
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
'[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',
|
||||||
className
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ItemActions({ className, ...props }: React.ComponentProps<"div">) {
|
function ItemActions({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div data-slot="item-actions" className={cn('flex items-center gap-2', className)} {...props} />
|
||||||
data-slot="item-actions"
|
);
|
||||||
className={cn("flex items-center gap-2", className)}
|
|
||||||
{...props}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ItemHeader({ className, ...props }: React.ComponentProps<"div">) {
|
function ItemHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="item-header"
|
data-slot="item-header"
|
||||||
className={cn(
|
className={cn('flex basis-full items-center justify-between gap-2', className)}
|
||||||
"flex basis-full items-center justify-between gap-2",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ItemFooter({ className, ...props }: React.ComponentProps<"div">) {
|
function ItemFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="item-footer"
|
data-slot="item-footer"
|
||||||
className={cn(
|
className={cn('flex basis-full items-center justify-between gap-2', className)}
|
||||||
"flex basis-full items-center justify-between gap-2",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
@ -190,4 +169,4 @@ export {
|
||||||
ItemDescription,
|
ItemDescription,
|
||||||
ItemHeader,
|
ItemHeader,
|
||||||
ItemFooter,
|
ItemFooter,
|
||||||
}
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as LabelPrimitive from '@radix-ui/react-label';
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
"use client"
|
'use client';
|
||||||
|
|
||||||
import * as React from "react"
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
||||||
import * as ProgressPrimitive from "@radix-ui/react-progress"
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
function Progress({
|
function Progress({
|
||||||
className,
|
className,
|
||||||
|
|
@ -13,10 +13,7 @@ function Progress({
|
||||||
return (
|
return (
|
||||||
<ProgressPrimitive.Root
|
<ProgressPrimitive.Root
|
||||||
data-slot="progress"
|
data-slot="progress"
|
||||||
className={cn(
|
className={cn('bg-primary/20 relative h-2 w-full overflow-hidden rounded-full', className)}
|
||||||
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<ProgressPrimitive.Indicator
|
<ProgressPrimitive.Indicator
|
||||||
|
|
@ -25,7 +22,7 @@ function Progress({
|
||||||
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
||||||
/>
|
/>
|
||||||
</ProgressPrimitive.Root>
|
</ProgressPrimitive.Root>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Progress }
|
export { Progress };
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
"use client"
|
'use client';
|
||||||
|
|
||||||
import * as React from "react"
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
||||||
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
function ScrollArea({
|
function ScrollArea({
|
||||||
className,
|
className,
|
||||||
|
|
@ -13,7 +13,7 @@ function ScrollArea({
|
||||||
return (
|
return (
|
||||||
<ScrollAreaPrimitive.Root
|
<ScrollAreaPrimitive.Root
|
||||||
data-slot="scroll-area"
|
data-slot="scroll-area"
|
||||||
className={cn("relative", className)}
|
className={cn('relative', className)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<ScrollAreaPrimitive.Viewport
|
<ScrollAreaPrimitive.Viewport
|
||||||
|
|
@ -25,12 +25,12 @@ function ScrollArea({
|
||||||
<ScrollBar />
|
<ScrollBar />
|
||||||
<ScrollAreaPrimitive.Corner />
|
<ScrollAreaPrimitive.Corner />
|
||||||
</ScrollAreaPrimitive.Root>
|
</ScrollAreaPrimitive.Root>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ScrollBar({
|
function ScrollBar({
|
||||||
className,
|
className,
|
||||||
orientation = "vertical",
|
orientation = 'vertical',
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
||||||
return (
|
return (
|
||||||
|
|
@ -38,12 +38,10 @@ function ScrollBar({
|
||||||
data-slot="scroll-area-scrollbar"
|
data-slot="scroll-area-scrollbar"
|
||||||
orientation={orientation}
|
orientation={orientation}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex touch-none p-px transition-colors select-none",
|
'flex touch-none p-px transition-colors select-none',
|
||||||
orientation === "vertical" &&
|
orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent',
|
||||||
"h-full w-2.5 border-l border-l-transparent",
|
orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent',
|
||||||
orientation === "horizontal" &&
|
className,
|
||||||
"h-2.5 flex-col border-t border-t-transparent",
|
|
||||||
className
|
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
@ -52,7 +50,7 @@ function ScrollBar({
|
||||||
className="bg-border relative flex-1 rounded-full"
|
className="bg-border relative flex-1 rounded-full"
|
||||||
/>
|
/>
|
||||||
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { ScrollArea, ScrollBar }
|
export { ScrollArea, ScrollBar };
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,30 @@
|
||||||
"use client"
|
'use client';
|
||||||
|
|
||||||
import * as React from "react"
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
||||||
import * as SelectPrimitive from "@radix-ui/react-select"
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
||||||
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
function Select({
|
function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
||||||
...props
|
return <SelectPrimitive.Root data-slot="select" {...props} />;
|
||||||
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
||||||
return <SelectPrimitive.Root data-slot="select" {...props} />
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function SelectGroup({
|
function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
||||||
...props
|
return <SelectPrimitive.Group data-slot="select-group" {...props} />;
|
||||||
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
||||||
return <SelectPrimitive.Group data-slot="select-group" {...props} />
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function SelectValue({
|
function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
||||||
...props
|
return <SelectPrimitive.Value data-slot="select-value" {...props} />;
|
||||||
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
||||||
return <SelectPrimitive.Value data-slot="select-value" {...props} />
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function SelectTrigger({
|
function SelectTrigger({
|
||||||
className,
|
className,
|
||||||
size = "default",
|
size = 'default',
|
||||||
children,
|
children,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
||||||
size?: "sm" | "default"
|
size?: 'sm' | 'default';
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<SelectPrimitive.Trigger
|
<SelectPrimitive.Trigger
|
||||||
|
|
@ -38,7 +32,7 @@ function SelectTrigger({
|
||||||
data-size={size}
|
data-size={size}
|
||||||
className={cn(
|
className={cn(
|
||||||
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
||||||
className
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
@ -47,14 +41,14 @@ function SelectTrigger({
|
||||||
<ChevronDownIcon className="size-4 opacity-50" />
|
<ChevronDownIcon className="size-4 opacity-50" />
|
||||||
</SelectPrimitive.Icon>
|
</SelectPrimitive.Icon>
|
||||||
</SelectPrimitive.Trigger>
|
</SelectPrimitive.Trigger>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SelectContent({
|
function SelectContent({
|
||||||
className,
|
className,
|
||||||
children,
|
children,
|
||||||
position = "popper",
|
position = 'popper',
|
||||||
align = "center",
|
align = 'center',
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
||||||
return (
|
return (
|
||||||
|
|
@ -62,10 +56,10 @@ function SelectContent({
|
||||||
<SelectPrimitive.Content
|
<SelectPrimitive.Content
|
||||||
data-slot="select-content"
|
data-slot="select-content"
|
||||||
className={cn(
|
className={cn(
|
||||||
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',
|
||||||
position === "popper" &&
|
position === 'popper' &&
|
||||||
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
||||||
className
|
className,
|
||||||
)}
|
)}
|
||||||
position={position}
|
position={position}
|
||||||
align={align}
|
align={align}
|
||||||
|
|
@ -74,9 +68,9 @@ function SelectContent({
|
||||||
<SelectScrollUpButton />
|
<SelectScrollUpButton />
|
||||||
<SelectPrimitive.Viewport
|
<SelectPrimitive.Viewport
|
||||||
className={cn(
|
className={cn(
|
||||||
"p-1",
|
'p-1',
|
||||||
position === "popper" &&
|
position === 'popper' &&
|
||||||
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
@ -84,20 +78,17 @@ function SelectContent({
|
||||||
<SelectScrollDownButton />
|
<SelectScrollDownButton />
|
||||||
</SelectPrimitive.Content>
|
</SelectPrimitive.Content>
|
||||||
</SelectPrimitive.Portal>
|
</SelectPrimitive.Portal>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SelectLabel({
|
function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
||||||
className,
|
|
||||||
...props
|
|
||||||
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
||||||
return (
|
return (
|
||||||
<SelectPrimitive.Label
|
<SelectPrimitive.Label
|
||||||
data-slot="select-label"
|
data-slot="select-label"
|
||||||
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
|
className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SelectItem({
|
function SelectItem({
|
||||||
|
|
@ -110,7 +101,7 @@ function SelectItem({
|
||||||
data-slot="select-item"
|
data-slot="select-item"
|
||||||
className={cn(
|
className={cn(
|
||||||
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
||||||
className
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
@ -121,7 +112,7 @@ function SelectItem({
|
||||||
</span>
|
</span>
|
||||||
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
||||||
</SelectPrimitive.Item>
|
</SelectPrimitive.Item>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SelectSeparator({
|
function SelectSeparator({
|
||||||
|
|
@ -131,10 +122,10 @@ function SelectSeparator({
|
||||||
return (
|
return (
|
||||||
<SelectPrimitive.Separator
|
<SelectPrimitive.Separator
|
||||||
data-slot="select-separator"
|
data-slot="select-separator"
|
||||||
className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
|
className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SelectScrollUpButton({
|
function SelectScrollUpButton({
|
||||||
|
|
@ -144,15 +135,12 @@ function SelectScrollUpButton({
|
||||||
return (
|
return (
|
||||||
<SelectPrimitive.ScrollUpButton
|
<SelectPrimitive.ScrollUpButton
|
||||||
data-slot="select-scroll-up-button"
|
data-slot="select-scroll-up-button"
|
||||||
className={cn(
|
className={cn('flex cursor-default items-center justify-center py-1', className)}
|
||||||
"flex cursor-default items-center justify-center py-1",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<ChevronUpIcon className="size-4" />
|
<ChevronUpIcon className="size-4" />
|
||||||
</SelectPrimitive.ScrollUpButton>
|
</SelectPrimitive.ScrollUpButton>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SelectScrollDownButton({
|
function SelectScrollDownButton({
|
||||||
|
|
@ -162,15 +150,12 @@ function SelectScrollDownButton({
|
||||||
return (
|
return (
|
||||||
<SelectPrimitive.ScrollDownButton
|
<SelectPrimitive.ScrollDownButton
|
||||||
data-slot="select-scroll-down-button"
|
data-slot="select-scroll-down-button"
|
||||||
className={cn(
|
className={cn('flex cursor-default items-center justify-center py-1', className)}
|
||||||
"flex cursor-default items-center justify-center py-1",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<ChevronDownIcon className="size-4" />
|
<ChevronDownIcon className="size-4" />
|
||||||
</SelectPrimitive.ScrollDownButton>
|
</SelectPrimitive.ScrollDownButton>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
@ -184,4 +169,4 @@ export {
|
||||||
SelectSeparator,
|
SelectSeparator,
|
||||||
SelectTrigger,
|
SelectTrigger,
|
||||||
SelectValue,
|
SelectValue,
|
||||||
}
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
"use client"
|
'use client';
|
||||||
|
|
||||||
import * as React from "react"
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
||||||
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
function Separator({
|
function Separator({
|
||||||
className,
|
className,
|
||||||
orientation = "horizontal",
|
orientation = 'horizontal',
|
||||||
decorative = true,
|
decorative = true,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
||||||
|
|
@ -17,12 +17,12 @@ function Separator({
|
||||||
decorative={decorative}
|
decorative={decorative}
|
||||||
orientation={orientation}
|
orientation={orientation}
|
||||||
className={cn(
|
className={cn(
|
||||||
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',
|
||||||
className
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Separator }
|
export { Separator };
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
||||||
import { XIcon } from 'lucide-react';
|
import { XIcon } from 'lucide-react';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -548,7 +548,7 @@ function SidebarMenuAction({
|
||||||
'peer-data-[size=lg]/menu-button:top-2.5',
|
'peer-data-[size=lg]/menu-button:top-2.5',
|
||||||
'group-data-[collapsible=icon]:hidden',
|
'group-data-[collapsible=icon]:hidden',
|
||||||
showOnHover &&
|
showOnHover &&
|
||||||
'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0',
|
'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0',
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
@ -690,6 +690,5 @@ export {
|
||||||
SidebarRail,
|
SidebarRail,
|
||||||
SidebarSeparator,
|
SidebarSeparator,
|
||||||
SidebarTrigger,
|
SidebarTrigger,
|
||||||
useSidebar
|
useSidebar,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,19 @@ import { NextResponse, type MiddlewareConfig, type NextRequest } from 'next/serv
|
||||||
const publicRoutes = [
|
const publicRoutes = [
|
||||||
{ path: '/login', whenAuthenticated: 'redirect' },
|
{ path: '/login', whenAuthenticated: 'redirect' },
|
||||||
{ path: '/register', whenAuthenticated: 'redirect' },
|
{ path: '/register', whenAuthenticated: 'redirect' },
|
||||||
{ path: '/', whenAuthenticated: 'next' },
|
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
const ROOT_PATH = '/login'; // url raiz
|
const ROOT_PATH = '/login'; // url raiz
|
||||||
|
|
||||||
export function middleware(request: NextRequest) {
|
export function middleware(request: NextRequest) {
|
||||||
const path = request.nextUrl.pathname;
|
const path = request.nextUrl.pathname;
|
||||||
|
|
||||||
|
// --- AJUSTE NECESSÁRIO PARA ONLYOFFICE ---
|
||||||
|
// Se a rota termina em .docx, libera o acesso imediatamente (sem checar token)
|
||||||
|
if (path.endsWith('.docx')) {
|
||||||
|
return NextResponse.next();
|
||||||
|
}
|
||||||
|
// -----------------------------------------
|
||||||
const publicRoute = publicRoutes.find((route) => route.path === path);
|
const publicRoute = publicRoutes.find((route) => route.path === path);
|
||||||
const authToken = request.cookies.get('access_token');
|
const authToken = request.cookies.get('access_token');
|
||||||
|
|
||||||
|
|
@ -26,6 +32,8 @@ export function middleware(request: NextRequest) {
|
||||||
|
|
||||||
// 3. Autenticado em rota pública com flag "redirect" → vai para raiz
|
// 3. Autenticado em rota pública com flag "redirect" → vai para raiz
|
||||||
if (authToken && publicRoute && publicRoute.whenAuthenticated === 'redirect') {
|
if (authToken && publicRoute && publicRoute.whenAuthenticated === 'redirect') {
|
||||||
|
// OBS: Se ROOT_PATH for '/login', isso pode gerar um loop infinito para usuários logados.
|
||||||
|
// O ideal seria redirecionar para '/' (dashboard), mas mantive seu código original.
|
||||||
return NextResponse.redirect(new URL(ROOT_PATH, request.url));
|
return NextResponse.redirect(new URL(ROOT_PATH, request.url));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -53,7 +61,7 @@ export function middleware(request: NextRequest) {
|
||||||
|
|
||||||
export const config: MiddlewareConfig = {
|
export const config: MiddlewareConfig = {
|
||||||
matcher: [
|
matcher: [
|
||||||
// ignora APIs, arquivos estáticos e metadados
|
// ignora APIs, arquivos estáticos, metadados E ARQUIVOS .DOCX
|
||||||
'/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt|images).*)',
|
'/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt|images|.*\\.docx$).*)',
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {
|
import {
|
||||||
Command,
|
Command,
|
||||||
|
|
@ -13,10 +15,9 @@ import {
|
||||||
import { FormControl } from '@/components/ui/form';
|
import { FormControl } from '@/components/ui/form';
|
||||||
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
|
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
import { CCaixaServicoReadInterface } from '@/packages/administrativo/hooks/CCaixaServico/CCaixaServicoReadInterface';
|
||||||
|
import { useCCaixaServicoReadHook } from '@/packages/administrativo/interfaces/CCaixaServico/useCCaixaServicoReadHook';
|
||||||
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
||||||
import { useCCaixaServicoReadHook } from '@/app/(protected)/(cadastros)/cadastros/_hooks/c_caixa_servico/useCCaixaServicoReadHook';
|
|
||||||
import { CCaixaServicoReadInterface } from '@/app/(protected)/(cadastros)/cadastros/_interfaces/CCaixaServicoReadInterface';
|
|
||||||
|
|
||||||
export default function CCaixaServicoSelect({ sistema_id, field }: any) {
|
export default function CCaixaServicoSelect({ sistema_id, field }: any) {
|
||||||
const cCaixaServicoReadParams: CCaixaServicoReadInterface = { sistema_id };
|
const cCaixaServicoReadParams: CCaixaServicoReadInterface = { sistema_id };
|
||||||
|
|
@ -58,7 +59,7 @@ export default function CCaixaServicoSelect({ sistema_id, field }: any) {
|
||||||
</Button>
|
</Button>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent className="w-full p-0">
|
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||||
<Command>
|
<Command>
|
||||||
<CommandInput placeholder="Buscar etiquetas/carimbos..." />
|
<CommandInput placeholder="Buscar etiquetas/carimbos..." />
|
||||||
<CommandList>
|
<CommandList>
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,11 @@ import GCalculoInterface from '@/packages/administrativo/interfaces/GCalculo/GCa
|
||||||
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
||||||
import { SortableHeader } from '@/shared/components/dataTable/SortableHeader';
|
import { SortableHeader } from '@/shared/components/dataTable/SortableHeader';
|
||||||
|
|
||||||
|
|
||||||
export default function GCalculoColumns(
|
export default function GCalculoColumns(
|
||||||
onEdit: (item: GCalculoInterface, isEditingFormStatus: boolean) => void,
|
onEdit: (item: GCalculoInterface, isEditingFormStatus: boolean) => void,
|
||||||
onDelete: (item: GCalculoInterface, isEditingFormStatus: boolean) => void,
|
onDelete: (item: GCalculoInterface, isEditingFormStatus: boolean) => void,
|
||||||
): ColumnDef<GCalculoInterface>[] {
|
): ColumnDef<GCalculoInterface>[] {
|
||||||
return [
|
return [
|
||||||
|
|
||||||
// Descrição
|
// Descrição
|
||||||
{
|
{
|
||||||
accessorKey: 'apresentante',
|
accessorKey: 'apresentante',
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ export default function GCalculoForm({
|
||||||
onSave,
|
onSave,
|
||||||
buttonIsLoading,
|
buttonIsLoading,
|
||||||
}: GCalculoFormInterface) {
|
}: GCalculoFormInterface) {
|
||||||
|
|
||||||
const form = useGCalculoFormHook({});
|
const form = useGCalculoFormHook({});
|
||||||
|
|
||||||
// Atualiza o formulário quando recebe dados para edição
|
// Atualiza o formulário quando recebe dados para edição
|
||||||
|
|
@ -78,10 +77,7 @@ export default function GCalculoForm({
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Apresentante</FormLabel>
|
<FormLabel>Apresentante</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input {...field} type="text" />
|
||||||
{...field}
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -97,10 +93,7 @@ export default function GCalculoForm({
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Observação</FormLabel>
|
<FormLabel>Observação</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input {...field} type="text" />
|
||||||
{...field}
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -115,7 +108,7 @@ export default function GCalculoForm({
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Emolumento</FormLabel>
|
<FormLabel>Emolumento</FormLabel>
|
||||||
<GEmolumentoSelect field={field} />
|
<GEmolumentoSelect field={field} sistema_id={2} />
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
|
|
@ -130,10 +123,7 @@ export default function GCalculoForm({
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Valor Documento</FormLabel>
|
<FormLabel>Valor Documento</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input {...field} type="number" />
|
||||||
{...field}
|
|
||||||
type="number"
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -149,10 +139,7 @@ export default function GCalculoForm({
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Quantidade</FormLabel>
|
<FormLabel>Quantidade</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input {...field} type="number" />
|
||||||
{...field}
|
|
||||||
type="number"
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
|
|
||||||
import { useGCalculoDeleteHook } from '@/packages/administrativo/hooks/GCalculo/useGCalculoDeleteHook';
|
import { useGCalculoDeleteHook } from '@/packages/administrativo/hooks/GCalculo/useGCalculoDeleteHook';
|
||||||
import { useGCalculoIndexHook } from '@/packages/administrativo/hooks/GCalculo/useGCalculoIndexHook';
|
import { useGCalculoIndexHook } from '@/packages/administrativo/hooks/GCalculo/useGCalculoIndexHook';
|
||||||
import { useGCalculoSaveHook } from '@/packages/administrativo/hooks/GCalculo/useGCalculoSaveHook';
|
import { useGCalculoSaveHook } from '@/packages/administrativo/hooks/GCalculo/useGCalculoSaveHook';
|
||||||
|
|
@ -15,7 +14,6 @@ import GCalculoForm from './GCalculoForm';
|
||||||
import GCalculoTable from './GCalculoTable';
|
import GCalculoTable from './GCalculoTable';
|
||||||
|
|
||||||
export default function GCalculoIndex() {
|
export default function GCalculoIndex() {
|
||||||
|
|
||||||
// Controle de estado do botão
|
// Controle de estado do botão
|
||||||
const [buttonIsLoading, setButtonIsLoading] = useState(false);
|
const [buttonIsLoading, setButtonIsLoading] = useState(false);
|
||||||
|
|
||||||
|
|
@ -96,9 +94,7 @@ export default function GCalculoIndex() {
|
||||||
await deleteGCalculo(itemToDelete);
|
await deleteGCalculo(itemToDelete);
|
||||||
|
|
||||||
// Atualiza a lista de cálculos em memória, removendo o item pelo índice
|
// Atualiza a lista de cálculos em memória, removendo o item pelo índice
|
||||||
setGCalculo((prev) =>
|
setGCalculo((prev) => prev.filter((_, index) => index !== itemToDelete.index));
|
||||||
prev.filter((_, index) => index !== itemToDelete.index)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Limpa o item selecionado para exclusão
|
// Limpa o item selecionado para exclusão
|
||||||
setItemToDelete(null);
|
setItemToDelete(null);
|
||||||
|
|
@ -119,10 +115,7 @@ export default function GCalculoIndex() {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/* Tabela de andamentos */}
|
{/* Tabela de andamentos */}
|
||||||
<GCalculoTable
|
<GCalculoTable data={gCalculo} onEdit={handleOpenForm} onDelete={handleConfirmDelete} />
|
||||||
data={gCalculo}
|
|
||||||
onEdit={handleOpenForm}
|
|
||||||
onDelete={handleConfirmDelete} />
|
|
||||||
{/* Modal de confirmação */}
|
{/* Modal de confirmação */}
|
||||||
{isConfirmOpen && (
|
{isConfirmOpen && (
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,9 @@ import { DataTable } from '@/shared/components/dataTable/DataTable';
|
||||||
|
|
||||||
import GCalculoColumns from './GCalculoColumns';
|
import GCalculoColumns from './GCalculoColumns';
|
||||||
|
|
||||||
/**
|
|
||||||
* Componente principal da tabela de Naturezas
|
|
||||||
*/
|
|
||||||
export default function GCalculoTable({ data, onEdit, onDelete }: GCalculoTableInterface) {
|
export default function GCalculoTable({ data, onEdit, onDelete }: GCalculoTableInterface) {
|
||||||
const columns = GCalculoColumns(onEdit, onDelete);
|
const columns = GCalculoColumns(onEdit, onDelete);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<DataTable
|
<DataTable
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import {
|
||||||
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
||||||
import { SortableHeader } from '@/shared/components/dataTable/SortableHeader';
|
import { SortableHeader } from '@/shared/components/dataTable/SortableHeader';
|
||||||
|
|
||||||
import GCartorioInterface from '../../interfaces/GCartorio/GCartorioInterface';
|
import GCartorioInterface from '@/packages/administrativo/interfaces/GCartorio/GCartorioInterface';
|
||||||
|
|
||||||
export default function GCartorioColumns(
|
export default function GCartorioColumns(
|
||||||
onEdit: (item: GCartorioInterface, isEditingFormStatus: boolean) => void,
|
onEdit: (item: GCartorioInterface, isEditingFormStatus: boolean) => void,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import React, { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {
|
import {
|
||||||
|
|
@ -24,8 +24,8 @@ import { Input } from '@/components/ui/input';
|
||||||
import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData';
|
import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData';
|
||||||
import LoadingButton from '@/shared/components/loadingButton/LoadingButton';
|
import LoadingButton from '@/shared/components/loadingButton/LoadingButton';
|
||||||
|
|
||||||
import { useGCartorioFormHook } from '../../hooks/GCartorio/useGCartorioFormHook';
|
import { useGCartorioFormHook } from '@/packages/administrativo/hooks/GCartorio/useGCartorioFormHook';
|
||||||
import { GCartorioFormInterface } from '../../interfaces/GCartorio/GCartorioFormInterface';
|
import { GCartorioFormInterface } from '@/packages/administrativo/interfaces/GCartorio/GCartorioFormInterface';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formulário de cadastro/edição de Natureza
|
* Formulário de cadastro/edição de Natureza
|
||||||
|
|
@ -409,7 +409,6 @@ export default function GCartorioForm({
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import { useEffect, useState, useCallback } from 'react';
|
import { useEffect, useState, useCallback } from 'react';
|
||||||
|
|
||||||
|
|
||||||
import { useGCartorioDeleteHook } from '@/packages/administrativo/hooks/GCartorio/useGCartorioDeleteHook';
|
import { useGCartorioDeleteHook } from '@/packages/administrativo/hooks/GCartorio/useGCartorioDeleteHook';
|
||||||
import { useGCartorioIndexHook } from '@/packages/administrativo/hooks/GCartorio/useGCartorioIndexHook';
|
import { useGCartorioIndexHook } from '@/packages/administrativo/hooks/GCartorio/useGCartorioIndexHook';
|
||||||
import { useGCartorioSaveHook } from '@/packages/administrativo/hooks/GCartorio/useGCartorioSaveHook';
|
import { useGCartorioSaveHook } from '@/packages/administrativo/hooks/GCartorio/useGCartorioSaveHook';
|
||||||
|
|
@ -16,7 +15,6 @@ import GCartorioForm from './GCartorioForm';
|
||||||
import GCartorioTable from './GCartorioTable';
|
import GCartorioTable from './GCartorioTable';
|
||||||
|
|
||||||
export default function GCartorioIndex() {
|
export default function GCartorioIndex() {
|
||||||
|
|
||||||
// Controle de estado do botão
|
// Controle de estado do botão
|
||||||
const [buttonIsLoading, setButtonIsLoading] = useState(false);
|
const [buttonIsLoading, setButtonIsLoading] = useState(false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
import { DataTable } from '@/shared/components/dataTable/DataTable';
|
import { DataTable } from '@/shared/components/dataTable/DataTable';
|
||||||
|
|
||||||
|
import GCartorioTableInterface from '@/packages/administrativo/interfaces/GCartorio/GCartorioTableInterface';
|
||||||
import GCartorioColumns from './GCartorioColumns';
|
import GCartorioColumns from './GCartorioColumns';
|
||||||
import GCartorioTableInterface from '../../interfaces/GCartorio/GCartorioTableInterface';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Componente principal da tabela de Naturezas
|
* Componente principal da tabela de Naturezas
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ import {
|
||||||
} from '@/components/ui/select';
|
} from '@/components/ui/select';
|
||||||
import { useGUfReadHook } from '@/packages/administrativo/hooks/GUF/useGUfReadHook';
|
import { useGUfReadHook } from '@/packages/administrativo/hooks/GUF/useGUfReadHook';
|
||||||
|
|
||||||
import { GCidadeSchema } from '../../schemas/GCidade/GCidadeSchema';
|
import { GCidadeSchema } from '@/packages/administrativo/schemas/GCidade/GCidadeSchema';
|
||||||
|
|
||||||
// Hook responsável em trazer todos os estados brasileiros
|
// Hook responsável em trazer todos os estados brasileiros
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import {
|
||||||
TableRow,
|
TableRow,
|
||||||
} from '@/components/ui/table';
|
} from '@/components/ui/table';
|
||||||
|
|
||||||
import GCidadeInterface from '../../interfaces/GCidade/GCidadeInterface';
|
import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface';
|
||||||
|
|
||||||
// Tipagem das props do componente da tabela
|
// Tipagem das props do componente da tabela
|
||||||
interface GCidadeTableProps {
|
interface GCidadeTableProps {
|
||||||
|
|
|
||||||
|
|
@ -14,16 +14,14 @@ import {
|
||||||
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
||||||
import { SortableHeader } from '@/shared/components/dataTable/SortableHeader';
|
import { SortableHeader } from '@/shared/components/dataTable/SortableHeader';
|
||||||
|
|
||||||
import GEmolumentoInterface from '../../interfaces/GEmolumento/GEmolumentoInterface';
|
import GEmolumentoInterface from '@/packages/administrativo/interfaces/GEmolumento/GEmolumentoInterface';
|
||||||
|
|
||||||
export default function GEmolumentoColumns(
|
export default function GEmolumentoColumns(
|
||||||
onEdit: (item: GEmolumentoInterface, isEditingFormStatus: boolean) => void,
|
onEdit: (item: GEmolumentoInterface, isEditingFormStatus: boolean) => void,
|
||||||
onDelete: (item: GEmolumentoInterface, isEditingFormStatus: boolean) => void,
|
onDelete: (item: GEmolumentoInterface, isEditingFormStatus: boolean) => void,
|
||||||
emolumentoPeriodoId: number,
|
emolumentoPeriodoId: number,
|
||||||
): ColumnDef<GEmolumentoInterface>[] {
|
): ColumnDef<GEmolumentoInterface>[] {
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
// ID
|
// ID
|
||||||
{
|
{
|
||||||
accessorKey: 'emolumento_id',
|
accessorKey: 'emolumento_id',
|
||||||
|
|
@ -60,7 +58,9 @@ export default function GEmolumentoColumns(
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<DropdownMenuItem asChild>
|
<DropdownMenuItem asChild>
|
||||||
<Link href={`/administrativo/financeiro/emolumentos/${Number(row.getValue('emolumento_id'))}/${emolumentoPeriodoId}/itens`}>
|
<Link
|
||||||
|
href={`/administrativo/financeiro/emolumentos/${Number(row.getValue('emolumento_id'))}/${emolumentoPeriodoId}/itens`}
|
||||||
|
>
|
||||||
<ListIcon className="mr-2 h-4 w-4" />
|
<ListIcon className="mr-2 h-4 w-4" />
|
||||||
Itens
|
Itens
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@ import SistemasSelect from '@/shared/components/sistemas/SistemasSelect';
|
||||||
import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect';
|
import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect';
|
||||||
import TipoEmolumentoSelect from '@/shared/components/tipoEmolumento/TipoAtoAnteriorSelect';
|
import TipoEmolumentoSelect from '@/shared/components/tipoEmolumento/TipoAtoAnteriorSelect';
|
||||||
|
|
||||||
import { useGEmolumentoFormHook } from '../../hooks/GEmolumento/useGEmolumentoFormHook';
|
import { useGEmolumentoFormHook } from '@/packages/administrativo/hooks/GEmolumento/useGEmolumentoFormHook';
|
||||||
import { GEmolumentoFormInterface } from '../../interfaces/GEmolumento/GEmolumentoFormInterface';
|
import { GEmolumentoFormInterface } from '@/packages/administrativo/interfaces/GEmolumento/GEmolumentoFormInterface';
|
||||||
import GSeloGrupoSelect from '../GSeloGrupo/GSeloGrupoSelect';
|
import GSeloGrupoSelect from '../GSeloGrupo/GSeloGrupoSelect';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -140,7 +140,7 @@ export default function GEmolumentoForm({
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="selo_grupo_id"
|
name="selo_grupo_id"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className='w-full'>
|
<FormItem className="w-full">
|
||||||
<FormLabel>Selo Grupo</FormLabel>
|
<FormLabel>Selo Grupo</FormLabel>
|
||||||
<GSeloGrupoSelect field={field} />
|
<GSeloGrupoSelect field={field} />
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|
@ -155,7 +155,7 @@ export default function GEmolumentoForm({
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="reg_averb"
|
name="reg_averb"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className='w-full'>
|
<FormItem className="w-full">
|
||||||
<FormLabel>Registro/Averbação</FormLabel>
|
<FormLabel>Registro/Averbação</FormLabel>
|
||||||
<Input {...field} type="text" maxLength={1} />
|
<Input {...field} type="text" maxLength={1} />
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|
@ -218,7 +218,8 @@ export default function GEmolumentoForm({
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Código Nota</FormLabel>
|
<FormLabel>Código Nota</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input {...field}
|
<Input
|
||||||
|
{...field}
|
||||||
type="number"
|
type="number"
|
||||||
step="0.01"
|
step="0.01"
|
||||||
onChange={(e) => field.onChange(parseNumberInput(e))}
|
onChange={(e) => field.onChange(parseNumberInput(e))}
|
||||||
|
|
@ -271,7 +272,8 @@ export default function GEmolumentoForm({
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Valor Máximo Certidão</FormLabel>
|
<FormLabel>Valor Máximo Certidão</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input {...field}
|
<Input
|
||||||
|
{...field}
|
||||||
type="number"
|
type="number"
|
||||||
step="0.001"
|
step="0.001"
|
||||||
onChange={(e) => field.onChange(parseNumberInput(e))}
|
onChange={(e) => field.onChange(parseNumberInput(e))}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ import GEmolumentoForm from './GEmolumentoForm';
|
||||||
import GEmolumentoTable from './GEmolumentoTable';
|
import GEmolumentoTable from './GEmolumentoTable';
|
||||||
|
|
||||||
export default function GEmolumentoIndex() {
|
export default function GEmolumentoIndex() {
|
||||||
|
|
||||||
// Controle de estado do botão
|
// Controle de estado do botão
|
||||||
const [buttonIsLoading, setButtonIsLoading] = useState(false);
|
const [buttonIsLoading, setButtonIsLoading] = useState(false);
|
||||||
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue