diff --git a/src/packages/administrativo/components/TImovel/TImovelForm.tsx b/src/packages/administrativo/components/TImovel/TImovelForm.tsx
index 68dec33..5b4d89b 100644
--- a/src/packages/administrativo/components/TImovel/TImovelForm.tsx
+++ b/src/packages/administrativo/components/TImovel/TImovelForm.tsx
@@ -37,7 +37,7 @@ import GetCapitalize from '@/shared/actions/text/GetCapitalize';
import { TImovelFormInterface } from '../../interfaces/TImovel/TImovelFormInterface';
import { useTImovelFormHook } from '../../hooks/TImovel/useTImovelFormHook';
import TImovelUnidadeUrbanoPage from '../TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoPage';
-import TImovelUnidadeRuralPage from '../TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralPage';
+import TImovelUnidadeRuralIndex from '../TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndex';
import { parseNumberInput } from '@/shared/actions/form/parseNumberInput';
export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoading, tipoClasse }: TImovelFormInterface) {
@@ -83,21 +83,21 @@ export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoa
+ {/* Rodapé do Dialog */}
+
+
+
+
+
+
+
+
+
+ {/* Unidades */}
+
+ {/* Conteúdo das unidades */}
+ {tipoClasse === 1 ? : null}
+ {/* Conteúdo das unidades */}
+ {tipoClasse === 3 ? : null}
+
+
+ {/* Campo oculto */}
-
+
);
}
\ No newline at end of file
diff --git a/src/packages/administrativo/components/TImovel/TImovelIndex.tsx b/src/packages/administrativo/components/TImovel/TImovelIndex.tsx
index be55ec5..c217ea6 100644
--- a/src/packages/administrativo/components/TImovel/TImovelIndex.tsx
+++ b/src/packages/administrativo/components/TImovel/TImovelIndex.tsx
@@ -19,6 +19,10 @@ import TImovelForm from './TImovelForm';
export default function TImovelIndex({ pageTitle, pageDescription, tipoClasse }: TImovelIndexInterface) {
+ const TImovelIndexInterface: TImovelIndexInterface = {
+ tipoClasse: tipoClasse
+ }
+
// Controle de estado do botão
const [buttonIsLoading, setButtonIsLoading] = useState(false);
@@ -75,7 +79,7 @@ export default function TImovelIndex({ pageTitle, pageDescription, tipoClasse }:
setButtonIsLoading(false);
// Atualiza a lista de dados
- indexTImovel();
+ indexTImovel(TImovelIndexInterface);
},
[saveTImovel, indexTImovel, handleCloseForm],
);
@@ -105,7 +109,7 @@ export default function TImovelIndex({ pageTitle, pageDescription, tipoClasse }:
await deleteTImovel(itemToDelete);
// Atualiza a lista
- await indexTImovel();
+ await indexTImovel(TImovelIndexInterface);
// Limpa o item selecionado
setItemToDelete(null);
@@ -118,7 +122,7 @@ export default function TImovelIndex({ pageTitle, pageDescription, tipoClasse }:
* Busca inicial dos dados
*/
useEffect(() => {
- indexTImovel();
+ indexTImovel(TImovelIndexInterface);
}, []);
/**
diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx
index 3c3b7f2..1758ef1 100644
--- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx
+++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx
@@ -33,7 +33,8 @@ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, Command
import { ImovelTipoEnum } from '@/shared/enums/ImovelTipoEnum';
import { cn } from '@/lib/utils';
import { ImovelConstrucaoEnum } from '@/shared/enums/ImovelConstrucaoEnum';
-import { Checkbox } from '@/components/ui/checkbox';
+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
+import { SituacoesEnum } from '@/shared/enums/SituacoesEnum';
export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TImovelUnidadeRuralFormInterface) {
@@ -61,6 +62,10 @@ export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave,
}, [data, form]);
+ function onErro(errors: any) {
+ console.log(errors);
+ }
+
return (