Compare commits
66 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 | ||
|
|
7db6d27035 | ||
|
|
32924cd8da | ||
| 7af4c82dd1 | |||
|
|
3df00e38bc | ||
|
|
7fe725bdeb |
676 changed files with 9044 additions and 5729 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;
|
||||||
|
|
|
||||||
316
package-lock.json
generated
316
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",
|
||||||
|
|
@ -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",
|
||||||
|
|
@ -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",
|
||||||
|
|
|
||||||
|
|
@ -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",
|
||||||
|
|
@ -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,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 />
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import TServicoTipoIndex from "@/packages/administrativo/components/TServicoTipo/TServicoTipoIndex";
|
import TServicoTipoIndex from '@/packages/administrativo/components/TServicoTipo/TServicoTipoIndex';
|
||||||
|
|
||||||
export default function TServicoTipoPage() {
|
export default function TServicoTipoPage() {
|
||||||
|
return <TServicoTipoIndex />;
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -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,8 +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: [],
|
||||||
|
|
@ -56,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/',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -179,33 +181,33 @@ const data = {
|
||||||
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,5 +1,8 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {
|
import {
|
||||||
Command,
|
Command,
|
||||||
|
|
@ -15,8 +18,6 @@ import { cn } from '@/lib/utils';
|
||||||
import { CCaixaServicoReadInterface } from '@/packages/administrativo/hooks/CCaixaServico/CCaixaServicoReadInterface';
|
import { CCaixaServicoReadInterface } from '@/packages/administrativo/hooks/CCaixaServico/CCaixaServicoReadInterface';
|
||||||
import { useCCaixaServicoReadHook } from '@/packages/administrativo/interfaces/CCaixaServico/useCCaixaServicoReadHook';
|
import { useCCaixaServicoReadHook } from '@/packages/administrativo/interfaces/CCaixaServico/useCCaixaServicoReadHook';
|
||||||
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
||||||
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
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,10 +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
|
<GEmolumentoSelect field={field} sistema_id={2} />
|
||||||
field={field}
|
|
||||||
sistema_id={2}
|
|
||||||
/>
|
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
|
|
@ -133,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>
|
||||||
|
|
@ -152,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
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,9 @@ import { DataTable } from '@/shared/components/dataTable/DataTable';
|
||||||
import GCalculoColumns from './GCalculoColumns';
|
import GCalculoColumns from './GCalculoColumns';
|
||||||
|
|
||||||
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
|
||||||
data={data}
|
data={data}
|
||||||
|
|
@ -19,6 +17,5 @@ export default function GCalculoTable({ data, onEdit, onDelete }: GCalculoTableI
|
||||||
filterPlaceholder="Buscar por apresentante da natureza..."
|
filterPlaceholder="Buscar por apresentante da natureza..."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {
|
import {
|
||||||
Command,
|
Command,
|
||||||
CommandEmpty,
|
CommandEmpty,
|
||||||
CommandGroup,
|
CommandGroup,
|
||||||
CommandInput,
|
CommandInput,
|
||||||
CommandItem,
|
CommandItem,
|
||||||
CommandList,
|
CommandList,
|
||||||
} from '@/components/ui/command';
|
} from '@/components/ui/command';
|
||||||
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';
|
||||||
|
|
@ -21,131 +21,130 @@ import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
||||||
|
|
||||||
// Tipagem das props do componente
|
// Tipagem das props do componente
|
||||||
interface GEmolumentoSelectProps {
|
interface GEmolumentoSelectProps {
|
||||||
sistema_id: number;
|
sistema_id: number;
|
||||||
field: any;
|
field: any;
|
||||||
onSelectChange?: (emolumento: { emolumento_id: number; descricao: string }) => void;
|
onSelectChange?: (emolumento: { emolumento_id: number; descricao: string }) => void;
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Componente principal do select de emolumentos
|
// Componente principal do select de emolumentos
|
||||||
export default function GEmolumentoServicoSelect({
|
export default function GEmolumentoServicoSelect({
|
||||||
sistema_id,
|
sistema_id,
|
||||||
field,
|
field,
|
||||||
onSelectChange,
|
onSelectChange,
|
||||||
className,
|
className,
|
||||||
}: GEmolumentoSelectProps) {
|
}: GEmolumentoSelectProps) {
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
|
||||||
// Define parâmetros de leitura para o hook que busca os emolumentos
|
// Define parâmetros de leitura para o hook que busca os emolumentos
|
||||||
const gEmolumentoReadParams: GEmolumentoReadInterface = { sistema_id, urlParams: { situacao: 'A' } };
|
const gEmolumentoReadParams: GEmolumentoReadInterface = {
|
||||||
const { gEmolumento = [], fetchGEmolumento } = useGEmolumentoReadHook();
|
sistema_id,
|
||||||
|
urlParams: { situacao: 'A' },
|
||||||
|
};
|
||||||
|
const { gEmolumento = [], fetchGEmolumento } = useGEmolumentoReadHook();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Efeito para buscar os dados apenas uma vez.
|
* Efeito para buscar os dados apenas uma vez.
|
||||||
*/
|
*/
|
||||||
const loadData = useCallback(async () => {
|
const loadData = useCallback(async () => {
|
||||||
if (gEmolumento.length) return;
|
if (gEmolumento.length) return;
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
await fetchGEmolumento(gEmolumentoReadParams);
|
await fetchGEmolumento(gEmolumentoReadParams);
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}, [gEmolumento.length, fetchGEmolumento, gEmolumentoReadParams]);
|
}, [gEmolumento.length, fetchGEmolumento, gEmolumentoReadParams]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
loadData();
|
loadData();
|
||||||
}, [loadData]);
|
}, [loadData]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Memoriza o item selecionado para evitar reprocessamentos.
|
* Memoriza o item selecionado para evitar reprocessamentos.
|
||||||
*/
|
*/
|
||||||
const selected = useMemo(
|
const selected = useMemo(
|
||||||
() =>
|
() => gEmolumento.find((item) => String(item.emolumento_id) === String(field?.value?.id ?? '')),
|
||||||
gEmolumento.find(
|
[gEmolumento, field?.value],
|
||||||
(item) => String(item.emolumento_id) === String(field?.value?.id ?? ''),
|
);
|
||||||
),
|
|
||||||
[gEmolumento, field?.value],
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manipulador de seleção com verificação segura.
|
* Manipulador de seleção com verificação segura.
|
||||||
*/
|
*/
|
||||||
const handleSelect = useCallback(
|
const handleSelect = useCallback(
|
||||||
(item: any) => {
|
(item: any) => {
|
||||||
if (!field?.onChange) return;
|
if (!field?.onChange) return;
|
||||||
|
|
||||||
const selectedValue = {
|
const selectedValue = {
|
||||||
emolumento_id: Number(item.emolumento_id),
|
emolumento_id: Number(item.emolumento_id),
|
||||||
descricao: item.descricao,
|
descricao: item.descricao,
|
||||||
sistema_id: item.sistema_id,
|
sistema_id: item.sistema_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
field.onChange(selectedValue);
|
field.onChange(selectedValue);
|
||||||
|
|
||||||
if (onSelectChange) onSelectChange(selectedValue);
|
if (onSelectChange) onSelectChange(selectedValue);
|
||||||
|
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
},
|
},
|
||||||
[field, onSelectChange],
|
[field, onSelectChange],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Popover open={open} onOpenChange={setOpen}>
|
<Popover open={open} onOpenChange={setOpen}>
|
||||||
<PopoverTrigger asChild>
|
<PopoverTrigger asChild>
|
||||||
<FormControl className="w-full">
|
<FormControl className="w-full">
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
role="combobox"
|
role="combobox"
|
||||||
aria-expanded={open}
|
aria-expanded={open}
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
className={cn(
|
className={cn(
|
||||||
'justify-between min-h-[2.5rem] w-full text-left break-words whitespace-normal',
|
'min-h-[2.5rem] w-full justify-between text-left break-words whitespace-normal',
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{isLoading
|
{isLoading
|
||||||
? 'Carregando...'
|
? 'Carregando...'
|
||||||
: field.value?.descricao
|
: field.value?.descricao
|
||||||
? GetCapitalize(field.value.descricao)
|
? GetCapitalize(field.value.descricao)
|
||||||
: 'Selecione emolumento'}
|
: 'Selecione emolumento'}
|
||||||
<ChevronsUpDownIcon className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
<ChevronsUpDownIcon className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
||||||
</Button>
|
</Button>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
|
|
||||||
<PopoverContent
|
<PopoverContent
|
||||||
align="start"
|
align="start"
|
||||||
side="bottom"
|
side="bottom"
|
||||||
className="w-[var(--radix-popover-trigger-width)] max-w-full p-0"
|
className="w-[var(--radix-popover-trigger-width)] max-w-full p-0"
|
||||||
>
|
>
|
||||||
<Command>
|
<Command>
|
||||||
<CommandInput placeholder="Buscar emolumentos..." disabled={isLoading} />
|
<CommandInput placeholder="Buscar emolumentos..." disabled={isLoading} />
|
||||||
<CommandList>
|
<CommandList>
|
||||||
<CommandEmpty>
|
<CommandEmpty>
|
||||||
{isLoading ? 'Carregando...' : 'Nenhum resultado encontrado.'}
|
{isLoading ? 'Carregando...' : 'Nenhum resultado encontrado.'}
|
||||||
</CommandEmpty>
|
</CommandEmpty>
|
||||||
<CommandGroup>
|
<CommandGroup>
|
||||||
{gEmolumento.map((item) => (
|
{gEmolumento.map((item) => (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
key={item.emolumento_id}
|
key={item.emolumento_id}
|
||||||
value={item.descricao?.toLowerCase() ?? ''}
|
value={item.descricao?.toLowerCase() ?? ''}
|
||||||
onSelect={() => handleSelect(item)}
|
onSelect={() => handleSelect(item)}
|
||||||
>
|
>
|
||||||
<CheckIcon
|
<CheckIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
'mr-2 h-4 w-4',
|
'mr-2 h-4 w-4',
|
||||||
String(field?.value?.emolumento_id ?? '') ===
|
String(field?.value?.emolumento_id ?? '') === String(item.emolumento_id)
|
||||||
String(item.emolumento_id)
|
? 'opacity-100'
|
||||||
? 'opacity-100'
|
: 'opacity-0',
|
||||||
: 'opacity-0',
|
)}
|
||||||
)}
|
/>
|
||||||
/>
|
{GetCapitalize(item.descricao ?? '')}
|
||||||
{GetCapitalize(item.descricao ?? '')}
|
</CommandItem>
|
||||||
</CommandItem>
|
))}
|
||||||
))}
|
</CommandGroup>
|
||||||
</CommandGroup>
|
</CommandList>
|
||||||
</CommandList>
|
</Command>
|
||||||
</Command>
|
</PopoverContent>
|
||||||
</PopoverContent>
|
</Popover>
|
||||||
</Popover>
|
);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,24 @@
|
||||||
|
|
||||||
import { DataTable } from '@/shared/components/dataTable/DataTable';
|
import { DataTable } from '@/shared/components/dataTable/DataTable';
|
||||||
|
|
||||||
import GEmolumentoTableInterface from '../../interfaces/GEmolumento/GEmolumentoTableInterface';
|
import GEmolumentoTableInterface from '@/packages/administrativo/interfaces/GEmolumento/GEmolumentoTableInterface';
|
||||||
import GEmolumentoPeriodoSelect from '../GEmolumentoPeriodo/GEmolumentoPeriodoSelect';
|
import GEmolumentoPeriodoSelect from '../GEmolumentoPeriodo/GEmolumentoPeriodoSelect';
|
||||||
import GEmolumentoColumns from './GEmolumentoColumns';
|
import GEmolumentoColumns from './GEmolumentoColumns';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Componente principal da tabela de Naturezas
|
* Componente principal da tabela de Naturezas
|
||||||
*/
|
*/
|
||||||
export default function GEmolumentoTable({ data, onEdit, onDelete, onSelectedEmolumentoPeriodo, emolumentoPeriodoId }: GEmolumentoTableInterface) {
|
export default function GEmolumentoTable({
|
||||||
|
data,
|
||||||
|
onEdit,
|
||||||
|
onDelete,
|
||||||
|
onSelectedEmolumentoPeriodo,
|
||||||
|
emolumentoPeriodoId,
|
||||||
|
}: GEmolumentoTableInterface) {
|
||||||
const columns = GEmolumentoColumns(onEdit, onDelete, emolumentoPeriodoId);
|
const columns = GEmolumentoColumns(onEdit, onDelete, emolumentoPeriodoId);
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<GEmolumentoPeriodoSelect
|
<GEmolumentoPeriodoSelect onSelectedEmolumentoPeriodo={onSelectedEmolumentoPeriodo} />
|
||||||
onSelectedEmolumentoPeriodo={onSelectedEmolumentoPeriodo}
|
|
||||||
/>
|
|
||||||
<DataTable
|
<DataTable
|
||||||
data={data}
|
data={data}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|
@ -24,4 +28,4 @@ export default function GEmolumentoTable({ data, onEdit, onDelete, onSelectedEmo
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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 GEmolumentoItemInterface from '../../interfaces/GEmolumentoItem/GEmolumentoItemInterface';
|
import GEmolumentoItemInterface from '@/packages/administrativo/interfaces/GEmolumentoItem/GEmolumentoItemInterface';
|
||||||
|
|
||||||
export default function GEmolumentoItemColumns(
|
export default function GEmolumentoItemColumns(
|
||||||
onEdit: (item: GEmolumentoItemInterface, isEditingFormStatus: boolean) => void,
|
onEdit: (item: GEmolumentoItemInterface, isEditingFormStatus: boolean) => void,
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ import { parseNumberInput } from '@/shared/actions/form/parseNumberInput';
|
||||||
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 { useGEmolumentoItemFormHook } from '../../hooks/GEmolumentoItem/useGEmolumentoItemFormHook';
|
import { useGEmolumentoItemFormHook } from '@/packages/administrativo/hooks/GEmolumentoItem/useGEmolumentoItemFormHook';
|
||||||
import { GEmolumentoItemFormInterface } from '../../interfaces/GEmolumentoItem/GEmolumentoItemFormInterface';
|
import { GEmolumentoItemFormInterface } from '@/packages/administrativo/interfaces/GEmolumentoItem/GEmolumentoItemFormInterface';
|
||||||
|
|
||||||
export default function GEmolumentoItemForm({
|
export default function GEmolumentoItemForm({
|
||||||
isOpen,
|
isOpen,
|
||||||
|
|
@ -37,7 +37,6 @@ export default function GEmolumentoItemForm({
|
||||||
onSave,
|
onSave,
|
||||||
buttonIsLoading,
|
buttonIsLoading,
|
||||||
}: GEmolumentoItemFormInterface) {
|
}: GEmolumentoItemFormInterface) {
|
||||||
|
|
||||||
// Inicializa o formulário
|
// Inicializa o formulário
|
||||||
const form = useGEmolumentoItemFormHook({});
|
const form = useGEmolumentoItemFormHook({});
|
||||||
|
|
||||||
|
|
@ -86,7 +85,8 @@ export default function GEmolumentoItemForm({
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Valor Início</FormLabel>
|
<FormLabel>Valor Início</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input {...field}
|
<Input
|
||||||
|
{...field}
|
||||||
type="number"
|
type="number"
|
||||||
onChange={(e) => field.onChange(parseNumberInput(e))}
|
onChange={(e) => field.onChange(parseNumberInput(e))}
|
||||||
/>
|
/>
|
||||||
|
|
@ -104,7 +104,8 @@ export default function GEmolumentoItemForm({
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Valor Fim</FormLabel>
|
<FormLabel>Valor Fim</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input {...field}
|
<Input
|
||||||
|
{...field}
|
||||||
type="number"
|
type="number"
|
||||||
onChange={(e) => field.onChange(parseNumberInput(e))}
|
onChange={(e) => field.onChange(parseNumberInput(e))}
|
||||||
/>
|
/>
|
||||||
|
|
@ -122,7 +123,8 @@ export default function GEmolumentoItemForm({
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Valor Taxa Judiciária</FormLabel>
|
<FormLabel>Valor Taxa Judiciária</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input {...field}
|
<Input
|
||||||
|
{...field}
|
||||||
type="number"
|
type="number"
|
||||||
onChange={(e) => field.onChange(parseNumberInput(e))}
|
onChange={(e) => field.onChange(parseNumberInput(e))}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -12,16 +12,17 @@ import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDi
|
||||||
import Loading from '@/shared/components/loading/loading';
|
import Loading from '@/shared/components/loading/loading';
|
||||||
import Header from '@/shared/components/structure/Header';
|
import Header from '@/shared/components/structure/Header';
|
||||||
|
|
||||||
|
|
||||||
import GEmolumentoItemForm from './GEmolumentoItemForm';
|
import GEmolumentoItemForm from './GEmolumentoItemForm';
|
||||||
import GEmolumentoItemTable from './GEmolumentoItemTable';
|
import GEmolumentoItemTable from './GEmolumentoItemTable';
|
||||||
|
|
||||||
export default function GEmolumentoItemIndex({ emolumento_id, emolumento_periodo_id }: GEmolumentoItemIndexInterface) {
|
export default function GEmolumentoItemIndex({
|
||||||
|
emolumento_id,
|
||||||
|
emolumento_periodo_id,
|
||||||
|
}: GEmolumentoItemIndexInterface) {
|
||||||
const gEmolumentoItemParams = {
|
const gEmolumentoItemParams = {
|
||||||
emolumento_id: emolumento_id,
|
emolumento_id: emolumento_id,
|
||||||
emolumento_periodo_id: emolumento_periodo_id
|
emolumento_periodo_id: emolumento_periodo_id,
|
||||||
}
|
};
|
||||||
|
|
||||||
// Controle de estado do botão
|
// Controle de estado do botão
|
||||||
const [buttonIsLoading, setButtonIsLoading] = useState(false);
|
const [buttonIsLoading, setButtonIsLoading] = useState(false);
|
||||||
|
|
@ -48,7 +49,8 @@ export default function GEmolumentoItemIndex({ emolumento_id, emolumento_periodo
|
||||||
*/
|
*/
|
||||||
const handleOpenForm = useCallback((data: GEmolumentoItemInterface | null) => {
|
const handleOpenForm = useCallback((data: GEmolumentoItemInterface | null) => {
|
||||||
// Se não houver dados (criação), cria um objeto inicial com imovel_id
|
// Se não houver dados (criação), cria um objeto inicial com imovel_id
|
||||||
const initialData: GEmolumentoItemInterface = data ?? ({ emolumento_id, emolumento_periodo_id } as GEmolumentoItemInterface);
|
const initialData: GEmolumentoItemInterface =
|
||||||
|
data ?? ({ emolumento_id, emolumento_periodo_id } as GEmolumentoItemInterface);
|
||||||
setSelectedData(initialData);
|
setSelectedData(initialData);
|
||||||
setIsFormOpen(true);
|
setIsFormOpen(true);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,11 @@ import GEmolumentoItemColumns from './GEmolumentoItemColumns';
|
||||||
/**
|
/**
|
||||||
* Componente principal da tabela de Naturezas
|
* Componente principal da tabela de Naturezas
|
||||||
*/
|
*/
|
||||||
export default function GEmolumentoItemTable({ data, onEdit, onDelete }: GEmolumentoItemTableInterface) {
|
export default function GEmolumentoItemTable({
|
||||||
|
data,
|
||||||
|
onEdit,
|
||||||
|
onDelete,
|
||||||
|
}: GEmolumentoItemTableInterface) {
|
||||||
const columns = GEmolumentoItemColumns(onEdit, onDelete);
|
const columns = GEmolumentoItemColumns(onEdit, onDelete);
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import { FormatDateTime } from '@/shared/actions/dateTime/FormatDateTime';
|
||||||
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 GEmolumentoPeriodoInterface from '../../interfaces/GEmolumentoPeriodo/GEmolumentoPeriodoInterface';
|
import GEmolumentoPeriodoInterface from '@/packages/administrativo/interfaces/GEmolumentoPeriodo/GEmolumentoPeriodoInterface';
|
||||||
|
|
||||||
export default function GEmolumentoPeriodoColumns(
|
export default function GEmolumentoPeriodoColumns(
|
||||||
onEdit: (item: GEmolumentoPeriodoInterface, isEditingFormStatus: boolean) => void,
|
onEdit: (item: GEmolumentoPeriodoInterface, 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 { useGEmolumentoPeriodoFormHook } from '../../hooks/GEmolumentoPeriodo/useGEmolumentoPeriodoFormHook';
|
import { useGEmolumentoPeriodoFormHook } from '@/packages/administrativo/hooks/GEmolumentoPeriodo/useGEmolumentoPeriodoFormHook';
|
||||||
import { GEmolumentoPeriodoFormInterface } from '../../interfaces/GEmolumentoPeriodo/GEmolumentoPeriodoFormInterface';
|
import { GEmolumentoPeriodoFormInterface } from '@/packages/administrativo/interfaces/GEmolumentoPeriodo/GEmolumentoPeriodoFormInterface';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formulário de cadastro/edição de Natureza
|
* Formulário de cadastro/edição de Natureza
|
||||||
|
|
@ -77,10 +77,7 @@ export default function GEmolumentoPeriodoForm({
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Palavra</FormLabel>
|
<FormLabel>Palavra</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input {...field} type="text" />
|
||||||
{...field}
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import { useEffect, useState, useCallback } from 'react';
|
import { useEffect, useState, useCallback } from 'react';
|
||||||
|
|
||||||
|
|
||||||
import { useGEmolumentoPeriodoDeleteHook } from '@/packages/administrativo/hooks/GEmolumentoPeriodo/useGEmolumentoPeriodoDeleteHook';
|
import { useGEmolumentoPeriodoDeleteHook } from '@/packages/administrativo/hooks/GEmolumentoPeriodo/useGEmolumentoPeriodoDeleteHook';
|
||||||
import { useGEmolumentoPeriodoIndexHook } from '@/packages/administrativo/hooks/GEmolumentoPeriodo/useGEmolumentoPeriodoIndexHook';
|
import { useGEmolumentoPeriodoIndexHook } from '@/packages/administrativo/hooks/GEmolumentoPeriodo/useGEmolumentoPeriodoIndexHook';
|
||||||
import { useGEmolumentoPeriodoSaveHook } from '@/packages/administrativo/hooks/GEmolumentoPeriodo/useGEmolumentoPeriodoSaveHook';
|
import { useGEmolumentoPeriodoSaveHook } from '@/packages/administrativo/hooks/GEmolumentoPeriodo/useGEmolumentoPeriodoSaveHook';
|
||||||
|
|
@ -16,7 +15,6 @@ import GEmolumentoPeriodoForm from './GEmolumentoPeriodoForm';
|
||||||
import GEmolumentoPeriodoTable from './GEmolumentoPeriodoTable';
|
import GEmolumentoPeriodoTable from './GEmolumentoPeriodoTable';
|
||||||
|
|
||||||
export default function GEmolumentoPeriodoIndex() {
|
export default function GEmolumentoPeriodoIndex() {
|
||||||
|
|
||||||
// Controle de estado do botão
|
// Controle de estado do botão
|
||||||
const [buttonIsLoading, setButtonIsLoading] = useState(false);
|
const [buttonIsLoading, setButtonIsLoading] = useState(false);
|
||||||
|
|
||||||
|
|
@ -132,7 +130,11 @@ export default function GEmolumentoPeriodoIndex() {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/* Tabela de andamentos */}
|
{/* Tabela de andamentos */}
|
||||||
<GEmolumentoPeriodoTable data={gEmolumentoPeriodo} onEdit={handleOpenForm} onDelete={handleConfirmDelete} />
|
<GEmolumentoPeriodoTable
|
||||||
|
data={gEmolumentoPeriodo}
|
||||||
|
onEdit={handleOpenForm}
|
||||||
|
onDelete={handleConfirmDelete}
|
||||||
|
/>
|
||||||
{/* Modal de confirmação */}
|
{/* Modal de confirmação */}
|
||||||
{isConfirmOpen && (
|
{isConfirmOpen && (
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
|
|
|
||||||
|
|
@ -5,106 +5,108 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {
|
import {
|
||||||
Command,
|
Command,
|
||||||
CommandEmpty,
|
CommandEmpty,
|
||||||
CommandGroup,
|
CommandGroup,
|
||||||
CommandInput,
|
CommandInput,
|
||||||
CommandItem,
|
CommandItem,
|
||||||
CommandList,
|
CommandList,
|
||||||
} from '@/components/ui/command';
|
} from '@/components/ui/command';
|
||||||
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 GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
||||||
|
|
||||||
import { useGEmolumentoPeriodoIndexHook } from '../../hooks/GEmolumentoPeriodo/useGEmolumentoPeriodoIndexHook';
|
import { useGEmolumentoPeriodoIndexHook } from '@/packages/administrativo/hooks/GEmolumentoPeriodo/useGEmolumentoPeriodoIndexHook';
|
||||||
import GEmolumentoPeriodoSelectInterface from '../../interfaces/GEmolumentoPeriodo/GEmolumentoPeriodoSelectInterface';
|
import GEmolumentoPeriodoSelectInterface from '@/packages/administrativo/interfaces/GEmolumentoPeriodo/GEmolumentoPeriodoSelectInterface';
|
||||||
|
|
||||||
export default function GEmolumentoPeriodoSelect({ onSelectedEmolumentoPeriodo }: GEmolumentoPeriodoSelectInterface) {
|
export default function GEmolumentoPeriodoSelect({
|
||||||
|
onSelectedEmolumentoPeriodo,
|
||||||
|
}: GEmolumentoPeriodoSelectInterface) {
|
||||||
|
const [open, setOpen] = useState(false);
|
||||||
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
const [selectedId, setSelectedId] = useState<number | null>(null);
|
||||||
|
|
||||||
const [open, setOpen] = useState(false);
|
const { gEmolumentoPeriodo, indexGEmolumentoPeriodo } = useGEmolumentoPeriodoIndexHook();
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
|
||||||
const [selectedId, setSelectedId] = useState<number | null>(null);
|
|
||||||
|
|
||||||
const { gEmolumentoPeriodo, indexGEmolumentoPeriodo } = useGEmolumentoPeriodoIndexHook();
|
// ---------------------------------------------------------------------------
|
||||||
|
// Carrega os períodos apenas uma vez
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
const loadData = useCallback(async () => {
|
||||||
|
if (gEmolumentoPeriodo.length) return;
|
||||||
|
setIsLoading(true);
|
||||||
|
await indexGEmolumentoPeriodo();
|
||||||
|
setIsLoading(false);
|
||||||
|
}, [gEmolumentoPeriodo.length, indexGEmolumentoPeriodo]);
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
useEffect(() => {
|
||||||
// Carrega os períodos apenas uma vez
|
loadData();
|
||||||
// ---------------------------------------------------------------------------
|
}, [loadData]);
|
||||||
const loadData = useCallback(async () => {
|
|
||||||
if (gEmolumentoPeriodo.length) return;
|
|
||||||
setIsLoading(true);
|
|
||||||
await indexGEmolumentoPeriodo();
|
|
||||||
setIsLoading(false);
|
|
||||||
}, [gEmolumentoPeriodo.length, indexGEmolumentoPeriodo]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
// ---------------------------------------------------------------------------
|
||||||
loadData();
|
// Item selecionado
|
||||||
}, [loadData]);
|
// ---------------------------------------------------------------------------
|
||||||
|
const selected = useMemo(
|
||||||
|
() =>
|
||||||
|
gEmolumentoPeriodo.find((b) => String(b.emolumento_periodo_id) === String(selectedId ?? '')),
|
||||||
|
[gEmolumentoPeriodo, selectedId],
|
||||||
|
);
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Item selecionado
|
// Ao selecionar um item → dispara novo hook
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
const selected = useMemo(
|
const handleSelect = async (id: number) => {
|
||||||
() => gEmolumentoPeriodo.find((b) => String(b.emolumento_periodo_id) === String(selectedId ?? '')),
|
setSelectedId(id);
|
||||||
[gEmolumentoPeriodo, selectedId]
|
setOpen(false);
|
||||||
);
|
onSelectedEmolumentoPeriodo(id);
|
||||||
|
};
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
return (
|
||||||
// Ao selecionar um item → dispara novo hook
|
<Popover open={open} onOpenChange={setOpen}>
|
||||||
// ---------------------------------------------------------------------------
|
<PopoverTrigger asChild>
|
||||||
const handleSelect = async (id: number) => {
|
<Button
|
||||||
setSelectedId(id);
|
variant="outline"
|
||||||
setOpen(false);
|
role="combobox"
|
||||||
onSelectedEmolumentoPeriodo(id);
|
aria-expanded={open}
|
||||||
};
|
disabled={isLoading}
|
||||||
|
className="w-full justify-between"
|
||||||
return (
|
>
|
||||||
<Popover open={open} onOpenChange={setOpen}>
|
{isLoading
|
||||||
<PopoverTrigger asChild>
|
? 'Carregando...'
|
||||||
<Button
|
: selected
|
||||||
variant="outline"
|
? GetCapitalize(selected.descricao)
|
||||||
role="combobox"
|
: 'Selecione...'}
|
||||||
aria-expanded={open}
|
<ChevronsUpDownIcon className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
||||||
disabled={isLoading}
|
</Button>
|
||||||
className="w-full justify-between"
|
</PopoverTrigger>
|
||||||
|
<PopoverContent className="mb-5 w-full p-0">
|
||||||
|
<Command>
|
||||||
|
<CommandInput placeholder="Buscar período..." disabled={isLoading} />
|
||||||
|
<CommandList>
|
||||||
|
<CommandEmpty>
|
||||||
|
{isLoading ? 'Carregando...' : 'Nenhum resultado encontrado.'}
|
||||||
|
</CommandEmpty>
|
||||||
|
<CommandGroup>
|
||||||
|
{gEmolumentoPeriodo.map((item) => (
|
||||||
|
<CommandItem
|
||||||
|
key={item.emolumento_periodo_id}
|
||||||
|
value={item.descricao?.toLowerCase() ?? ''}
|
||||||
|
onSelect={() => handleSelect(Number(item.emolumento_periodo_id))}
|
||||||
>
|
>
|
||||||
{isLoading
|
<CheckIcon
|
||||||
? 'Carregando...'
|
className={cn(
|
||||||
: selected
|
'mr-2 h-4 w-4',
|
||||||
? GetCapitalize(selected.descricao)
|
String(selectedId ?? '') === String(item.emolumento_periodo_id)
|
||||||
: 'Selecione...'}
|
? 'opacity-100'
|
||||||
<ChevronsUpDownIcon className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
: 'opacity-0',
|
||||||
</Button>
|
)}
|
||||||
</PopoverTrigger>
|
/>
|
||||||
<PopoverContent className="w-full p-0 mb-5">
|
{GetCapitalize(item.descricao ?? '')}
|
||||||
<Command>
|
</CommandItem>
|
||||||
<CommandInput placeholder="Buscar período..." disabled={isLoading} />
|
))}
|
||||||
<CommandList>
|
</CommandGroup>
|
||||||
<CommandEmpty>
|
</CommandList>
|
||||||
{isLoading ? 'Carregando...' : 'Nenhum resultado encontrado.'}
|
</Command>
|
||||||
</CommandEmpty>
|
</PopoverContent>
|
||||||
<CommandGroup>
|
</Popover>
|
||||||
{gEmolumentoPeriodo.map((item) => (
|
);
|
||||||
<CommandItem
|
|
||||||
key={item.emolumento_periodo_id}
|
|
||||||
value={item.descricao?.toLowerCase() ?? ''}
|
|
||||||
onSelect={() => handleSelect(Number(item.emolumento_periodo_id))}
|
|
||||||
>
|
|
||||||
<CheckIcon
|
|
||||||
className={cn(
|
|
||||||
'mr-2 h-4 w-4',
|
|
||||||
String(selectedId ?? '') === String(item.emolumento_periodo_id)
|
|
||||||
? 'opacity-100'
|
|
||||||
: 'opacity-0'
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
{GetCapitalize(item.descricao ?? '')}
|
|
||||||
</CommandItem>
|
|
||||||
))}
|
|
||||||
</CommandGroup>
|
|
||||||
</CommandList>
|
|
||||||
</Command>
|
|
||||||
</PopoverContent>
|
|
||||||
</Popover>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,17 @@
|
||||||
|
|
||||||
import { DataTable } from '@/shared/components/dataTable/DataTable';
|
import { DataTable } from '@/shared/components/dataTable/DataTable';
|
||||||
|
|
||||||
|
import GEmolumentoPeriodoTableInterface from '@/packages/administrativo/interfaces/GEmolumentoPeriodo/GEmolumentoPeriodoTableInterface';
|
||||||
import GEmolumentoPeriodoColumns from './GEmolumentoPeriodoColumns';
|
import GEmolumentoPeriodoColumns from './GEmolumentoPeriodoColumns';
|
||||||
import GEmolumentoPeriodoTableInterface from '../../interfaces/GEmolumentoPeriodo/GEmolumentoPeriodoTableInterface';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Componente principal da tabela de Naturezas
|
* Componente principal da tabela de Naturezas
|
||||||
*/
|
*/
|
||||||
export default function GEmolumentoPeriodoTable({ data, onEdit, onDelete }: GEmolumentoPeriodoTableInterface) {
|
export default function GEmolumentoPeriodoTable({
|
||||||
|
data,
|
||||||
|
onEdit,
|
||||||
|
onDelete,
|
||||||
|
}: GEmolumentoPeriodoTableInterface) {
|
||||||
const columns = GEmolumentoPeriodoColumns(onEdit, onDelete);
|
const columns = GEmolumentoPeriodoColumns(onEdit, onDelete);
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -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 GGramaticaInterface from '../../interfaces/GGramatica/GGramaticaInterface';
|
import GGramaticaInterface from '@/packages/administrativo/interfaces/GGramatica/GGramaticaInterface';
|
||||||
|
|
||||||
export default function GGramaticaColumns(
|
export default function GGramaticaColumns(
|
||||||
onEdit: (item: GGramaticaInterface, isEditingFormStatus: boolean) => void,
|
onEdit: (item: GGramaticaInterface, isEditingFormStatus: boolean) => void,
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,11 @@ import {
|
||||||
FormMessage,
|
FormMessage,
|
||||||
} from '@/components/ui/form';
|
} from '@/components/ui/form';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
|
import { useGGramaticaFormHook } from '@/packages/administrativo/hooks/GGramatica/useGGramaticaFormHook';
|
||||||
|
import { GGramaticaFormInterface } from '@/packages/administrativo/interfaces/GGramatica/GGramaticaFormInterface';
|
||||||
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 { useGGramaticaFormHook } from '../../hooks/GGramatica/useGGramaticaFormHook';
|
|
||||||
import { GGramaticaFormInterface } from '../../interfaces/GGramatica/GGramaticaFormInterface';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formulário de cadastro/edição de Natureza
|
* Formulário de cadastro/edição de Natureza
|
||||||
|
|
@ -38,7 +38,6 @@ export default function GGramaticaForm({
|
||||||
onSave,
|
onSave,
|
||||||
buttonIsLoading,
|
buttonIsLoading,
|
||||||
}: GGramaticaFormInterface) {
|
}: GGramaticaFormInterface) {
|
||||||
|
|
||||||
const form = useGGramaticaFormHook({});
|
const form = useGGramaticaFormHook({});
|
||||||
|
|
||||||
// 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 GGramaticaForm({
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Palavra</FormLabel>
|
<FormLabel>Palavra</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input {...field} type="text" />
|
||||||
{...field}
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -97,10 +93,7 @@ export default function GGramaticaForm({
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Prefixo</FormLabel>
|
<FormLabel>Prefixo</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input {...field} type="text" />
|
||||||
{...field}
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -116,10 +109,7 @@ export default function GGramaticaForm({
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Sufixo Masculino Singular</FormLabel>
|
<FormLabel>Sufixo Masculino Singular</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input {...field} type="text" />
|
||||||
{...field}
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -135,10 +125,7 @@ export default function GGramaticaForm({
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Sufixo Masculino Plural</FormLabel>
|
<FormLabel>Sufixo Masculino Plural</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input {...field} type="text" />
|
||||||
{...field}
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -154,10 +141,7 @@ export default function GGramaticaForm({
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Sufixo Feminino Singular</FormLabel>
|
<FormLabel>Sufixo Feminino Singular</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input {...field} type="text" />
|
||||||
{...field}
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -173,10 +157,7 @@ export default function GGramaticaForm({
|
||||||
<FormItem className="col-span-1 sm:col-span-2">
|
<FormItem className="col-span-1 sm:col-span-2">
|
||||||
<FormLabel>Sufixo Feminino Plural</FormLabel>
|
<FormLabel>Sufixo Feminino Plural</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input {...field} type="text" />
|
||||||
{...field}
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
|
||||||
import { useGGramaticaDeleteHook } from '@/packages/administrativo/hooks/GGramatica/useGGramaticaDeleteHook';
|
import { useGGramaticaDeleteHook } from '@/packages/administrativo/hooks/GGramatica/useGGramaticaDeleteHook';
|
||||||
import { useGGramaticaIndexHook } from '@/packages/administrativo/hooks/GGramatica/useGGramaticaIndexHook';
|
import { useGGramaticaIndexHook } from '@/packages/administrativo/hooks/GGramatica/useGGramaticaIndexHook';
|
||||||
import { useGGramaticaSaveHook } from '@/packages/administrativo/hooks/GGramatica/useGGramaticaSaveHook';
|
import { useGGramaticaSaveHook } from '@/packages/administrativo/hooks/GGramatica/useGGramaticaSaveHook';
|
||||||
|
|
@ -16,7 +15,6 @@ import GGramaticaForm from './GGramaticaForm';
|
||||||
import GGramaticaTable from './GGramaticaTable';
|
import GGramaticaTable from './GGramaticaTable';
|
||||||
|
|
||||||
export default function GGramaticaIndex() {
|
export default function GGramaticaIndex() {
|
||||||
|
|
||||||
// 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