From f2b2181136fb13c4ee2e6b283f31c5b716fec593 Mon Sep 17 00:00:00 2001 From: keven Date: Mon, 6 Oct 2025 09:34:45 -0300 Subject: [PATCH] refactor(Pastas): Reestrutura pastas do projeto --- .../usuarios/[id]/detalhes/page.tsx | 2 +- .../(g_usuario)/usuarios/page.tsx | 2 +- .../_data/g_usuario/GUsuarioDeleteData.ts | 4 +- .../_data/g_usuario/GUsuarioIndexData.ts | 4 +- .../_data/g_usuario/GUsuarioLoginData.ts | 4 +- .../_data/g_usuario/GUsuarioReadData.ts | 4 +- .../_data/g_usuario/GUsuarioSaveData.ts | 4 +- .../_hooks/g_usuario/useGUsuarioIndexHook.ts | 2 +- .../_hooks/g_usuario/useGUsuarioReadHooks.ts | 2 +- .../_hooks/g_usuario/useGUsuarioSaveHook.ts | 2 +- .../cadastros/(g_cidade)/cidades/page.tsx | 8 +- .../(g_medidatipo)/medida-tipo/page.tsx | 12 +- .../cadastros/(g_tb_bairro)/bairro/page.tsx | 12 +- .../(g_tb_estadocivil)/estado-civil/page.tsx | 10 +- .../(g_tb_profissao)/profissoes/page.tsx | 8 +- .../(g_tb_regimebens)/regime-bens/page.tsx | 8 +- .../regime-comunhao/page.tsx | 8 +- .../tipo-logradouro/page.tsx | 10 +- .../cadastros/(t_censec)/censec/page.tsx | 8 +- .../censec-tipoato/page.tsx | 8 +- .../censec-natureza-litigio/page.tsx | 12 +- .../(t_minuta)/minuta/[id]/detalhes/page.tsx | 2 +- .../cadastros/(t_minuta)/minuta/page.tsx | 8 +- .../andamentos/page.tsx | 8 +- .../reconhecimentos/page.tsx | 8 +- .../g_medidatipo/GMedidaTipoForm.tsx | 2 +- .../_components/g_tb_bairro/GTBBairroForm.tsx | 4 +- .../g_tb_estadocivil/GTBEstadoCivilForm.tsx | 2 +- .../GTBTipoLogradouroForm.tsx | 2 +- .../_components/t_censec/TCensecForm.tsx | 4 +- .../TCensecNaturezaLitigioForm.tsx | 2 +- .../_data/GCidade/GCidadeIndexData.ts | 6 +- .../_data/GCidade/GCidadeRemoveData.ts | 6 +- .../_data/GCidade/GCidadeSaveData.ts | 6 +- .../_data/GMedidoTipo/GMedidaTipoIndexData.ts | 6 +- .../GMedidoTipo/GMedidaTipoRemoveData.ts | 6 +- .../_data/GMedidoTipo/GMedidaTipoSaveData.ts | 6 +- .../_data/GTBBairro/GTBBairroIndexData.ts | 6 +- .../_data/GTBBairro/GTBBairroRemoveData.ts | 6 +- .../_data/GTBBairro/GTBBairroSaveData.ts | 6 +- .../GTBEstadoCivil/GTBEstadoCivilIndexData.ts | 6 +- .../GTBEstadoCivilRemoveData.ts | 6 +- .../GTBEstadoCivil/GTBEstadoCivilSaveData.ts | 6 +- .../GTBProfissao/GTBProfissaoIndexData.ts | 4 +- .../GTBProfissao/GTBProfissaoRemoveData.ts | 4 +- .../GTBProfissao/GTBProfissaoSaveData.ts | 4 +- .../GTBRegimeBens/GTBRegimeBensIndexData.ts | 4 +- .../GTBRegimeBens/GTBRegimeBensRemoveData.ts | 4 +- .../GTBRegimeBens/GTBRegimeBensSaveData.ts | 6 +- .../GTBTipoLogradouroIndexData.ts | 6 +- .../GTBTipoLogradouroRemoveData.ts | 6 +- .../GTBTipoLogradouroSaveData.ts | 6 +- .../GTBRegimeComunhaoIndexData.ts | 4 +- .../GTBRegimeComunhaoRemoveData.ts | 4 +- .../GTBRegimeComunhaoSaveData.ts | 4 +- .../cadastros/_data/GUf/GUfIndexData.ts | 4 +- .../_data/TCensec/TCensecDeleteData.ts | 6 +- .../_data/TCensec/TCensecIndexData.ts | 6 +- .../_data/TCensec/TCensecSaveData.ts | 6 +- .../TCensecNaturezaLitigioIndexData.ts | 6 +- .../TCensecNaturezaLitigioRemoveData.ts | 6 +- .../TCensecNaturezaLitigioSaveData.ts | 6 +- .../TCensecTipoAto/GMedidaTipoIndexData.ts | 6 +- .../TCensecTipoAto/GMedidaTipoRemoveData.ts | 6 +- .../TCensecTipoAto/GMedidaTipoSaveData.ts | 6 +- .../cadastros/_data/TMinuta/TMinutaIndex.ts | 4 +- .../_data/TMinuta/TMinutaIndexData.ts | 4 +- .../_data/TMinuta/TMinutaRemoveData.ts | 4 +- .../_data/TMinuta/TMinutaSaveData.ts | 4 +- .../TTBAndamentoServicoIndexData.ts | 4 +- .../TTBAndamentoServicoRemoveData.ts | 4 +- .../TTBAndamentoServicoSaveData.ts | 6 +- .../TTBReconhecimentoTipoDeleteData.ts | 4 +- .../TTBReconhecimentoTipoIndexData.ts | 4 +- .../TTBReconhecimentoTipoSaveData.ts | 4 +- .../_hooks/g_cidade/useGCidadeReadHook.ts | 2 +- .../_hooks/g_cidade/useGCidadeRemoveHook.ts | 2 +- .../_hooks/g_cidade/useGCidadeSaveHook.ts | 2 +- .../g_medidatipo/useGMedidaTipoReadHook.ts | 2 +- .../g_medidatipo/useGMedidaTipoRemoveHook.ts | 2 +- .../g_medidatipo/useGMedidaTipoSaveHook.ts | 2 +- .../g_tb_bairro/useGTBBairroReadHook.ts | 2 +- .../g_tb_bairro/useGTBBairroRemoveHook.ts | 2 +- .../g_tb_bairro/useGTBBairroSaveHook.ts | 2 +- .../useGTBEstadoCivilReadHook.ts | 2 +- .../useGTBEstadoCivilRemoveHook.ts | 2 +- .../useGTBEstadoCivilSaveHook.ts | 2 +- .../g_tb_profissao/useGTBProfissaoReadHook.ts | 2 +- .../useGTBProfissaoRemoveHook.ts | 2 +- .../g_tb_profissao/useGTBProfissaoSaveHook.ts | 2 +- .../useGTBRegimeBensReadHook.ts | 2 +- .../useGTBRegimeBensRemoveHook.ts | 2 +- .../useGTBRegimeBensSaveHook.ts | 2 +- .../useGTBRegimeComunhaoReadHook.ts | 2 +- .../useGTBRegimeComunhaoRemoveHook.ts | 2 +- .../useGTBRegimeComunhaoSaveHook.ts | 2 +- .../useGTBTipoLogradouroReadHook.ts | 2 +- .../useGTBTipoLogradouroRemoveHook.ts | 2 +- .../useGTBTipoLogradouroSaveHook.ts | 2 +- .../cadastros/_hooks/g_uf/useGUfReadHook.ts | 2 +- .../_hooks/t_censec/useTCensecDeleteHook.ts | 2 +- .../_hooks/t_censec/useTCensecReadHook.ts | 2 +- .../_hooks/t_censec/useTCensecSaveHook.ts | 2 +- .../useTCensecTipoAtoReadHook.ts | 2 +- .../useTCensecTipoAtoRemoveHook.ts | 2 +- .../useTCensecTipoAtoSaveHook.ts | 2 +- .../useTCensecNaturezaLitigioReadHook.ts | 2 +- .../useTCensecNaturezaLitigioRemoveHook.ts | 2 +- .../useTCensecNaturezaLitigioSaveHook.ts | 2 +- .../_hooks/t_minuta/useTMinutaIndexHook.ts | 2 +- .../_hooks/t_minuta/useTMinutaReadHook.ts | 2 +- .../_hooks/t_minuta/useTMinutaRemoveHook.ts | 2 +- .../_hooks/t_minuta/useTMinutaSaveHook.ts | 2 +- .../useTTBAndamentoServicoDeleteHook.ts | 2 +- .../useTTBAndamentoServicoReadHook.ts | 2 +- .../useTTBAndamentoServicoSaveHook.ts | 2 +- .../useTTBReconhecimentoTipoDeleteHook.ts | 2 +- .../useTTBReconhecimentoTipoReadHook.ts | 2 +- .../useTTBReconhecimentoTipoSaveHook.ts | 2 +- .../_interfaces/GTBBairroInterface.ts | 2 +- .../cadastros/_schemas/GTBBairroSchema.ts | 2 +- .../_services/g_cidade/GCidadeIndexService.ts | 2 +- .../g_cidade/GCidadeRemoveService.ts | 2 +- .../_services/g_cidade/GCidadeSaveService.ts | 2 +- .../g_medidatipo/GMedidaTipoIndexService.ts | 2 +- .../g_medidatipo/GMedidaTipoRemoveService.ts | 2 +- .../g_medidatipo/GMedidaTipoSaveService.ts | 2 +- .../g_tb_bairro/GTBBairroIndexService.ts | 2 +- .../g_tb_bairro/GTBBairroRemoveService.ts | 2 +- .../g_tb_bairro/GTBBairroSaveService.ts | 2 +- .../GTBEstadoCivilIndexService.ts | 2 +- .../GTBEstadoCivilRemoveService.ts | 2 +- .../GTBEstadoCivilSaveService.ts | 2 +- .../GTBRegimeBensSaveService.ts | 2 +- .../GTBRegimeComunhaoIndexService.ts | 2 +- .../GTBRegimeComunhaoRemoveService.ts | 2 +- .../GTBRegimeComunhaoSaveService.ts | 2 +- .../GTBTipoLogradouroIndexService.ts | 2 +- .../GTBTipoLogradouroRemoveService.ts | 2 +- .../GTBTipoLogradouroSaveService.ts | 2 +- .../t_censec/TCensecDeleteService.ts | 2 +- .../_services/t_censec/TCensecIndexService.ts | 2 +- .../_services/t_censec/TCensecSaveService.ts | 2 +- .../TCensecTipoAtoIndexService.ts | 2 +- .../TCensecTipoAtoRemoveService.ts | 2 +- .../TCensecTipoAtoSaveService.ts | 2 +- .../TCensecNaturezaLitigioIndexService.ts | 2 +- .../TCensecNaturezaLitigioRemoveService.ts | 2 +- .../TCensecNaturezaLitigioSaveService.ts | 2 +- src/app/(protected)/layout.tsx | 4 +- src/components/app-sidebar.tsx | 2 +- src/components/login-form.tsx | 2 +- src/components/nav-user.tsx | 4 +- .../components/TImovel/TImovelColumns.tsx | 8 +- .../components/TImovel/TImovelForm.tsx | 10 +- .../components/TImovel/TImovelIndex.tsx | 8 +- .../TImovelUnidadeRuralColumns.tsx | 2 +- .../TImovelUnidadeRuralForm.tsx | 8 +- .../TImovelUnidadeRuralPage.tsx | 8 +- .../TImovelUnidadeUrbanoColumns.tsx | 2 +- .../TImovelUnidadeUrbanoForm.tsx | 12 +- .../TImovelUnidadeUrbanoPage.tsx | 8 +- .../TPessoaFisica/TPessoaFisicaColumns.tsx | 10 +- .../TPessoaFisica/TPessoaFisicaForm.tsx | 8 +- .../TPessoaFisica/TPessoaFisicaIndex.tsx | 8 +- .../TPessoaJuridicaColumns.tsx | 8 +- .../TPessoaJuridica/TPessoaJuridicaForm.tsx | 2 +- .../TPessoaJuridica/TPessoaJuridicaIndex.tsx | 8 +- .../TPessoaRepresentanteForm.tsx | 16 +- .../TPessoaRepresentanteIndex.tsx | 8 +- .../data/TImovel/TImovelDeleteData.ts | 2 +- .../data/TImovel/TImovelIndexData.ts | 2 +- .../data/TImovel/TImovelSaveData.ts | 2 +- .../TImovelUnidadeRuralDeleteData.ts | 2 +- .../TImovelUnidadeRuralIndexData.ts | 2 +- .../TImovelUnidadeRuralSaveData.ts | 2 +- .../TImovelUnidadeUrbanoDeleteData.ts | 2 +- .../TImovelUnidadeUrbanoIndexData.ts | 2 +- .../TImovelUnidadeUrbanoSaveData.ts | 2 +- .../TPessoaFisica/TPessoaFisicaIndexData.ts | 2 +- .../TPessoaFisica/TPessoaFisicaRemoveData.ts | 2 +- .../TPessoaFisica/TPessoaFisicaSaveData.ts | 2 +- .../TPessoaJuridicaIndexData.ts | 2 +- .../TPessoaJuridicaRemoveData.ts | 2 +- .../TPessoaJuridicaSaveData.ts | 2 +- .../TPessoaRepresentanteIndexData.ts | 2 +- .../TPessoaRepresentanteRemoveData.ts | 2 +- .../TPessoaRepresentanteSaveData.ts | 2 +- .../components/TImovel/TImovelColumns.tsx | 125 +++ .../data/components/TImovel/TImovelForm.tsx | 384 ++++++++ .../data/components/TImovel/TImovelIndex.tsx | 170 ++++ .../data/components/TImovel/TImovelTable.tsx | 22 + .../TImovelUnidadeRuralColumns.tsx | 90 ++ .../TImovelUnidadeRuralForm.tsx | 379 ++++++++ .../TImovelUnidadeRuralPage.tsx | 165 ++++ .../TImovelUnidadeRuralTable.tsx | 22 + .../TImovelUnidadeUrbanoColumns.tsx | 90 ++ .../TImovelUnidadeUrbanoForm.tsx | 538 +++++++++++ .../TImovelUnidadeUrbanoPage.tsx | 165 ++++ .../TImovelUnidadeUrbanoTable.tsx | 21 + .../TPessoaFisica/TPessoaFisicaColumns.tsx | 179 ++++ .../TPessoaFisica/TPessoaFisicaForm.tsx | 833 ++++++++++++++++++ .../TPessoaFisica/TPessoaFisicaIndex.tsx | 166 ++++ .../TPessoaFisica/TPessoaFisicaTable.tsx | 22 + .../TPessoaJuridicaColumns.tsx | 159 ++++ .../TPessoaJuridica/TPessoaJuridicaForm.tsx | 393 +++++++++ .../TPessoaJuridica/TPessoaJuridicaIndex.tsx | 167 ++++ .../TPessoaJuridica/TPessoaJuridicaTable.tsx | 27 + .../TPessoaRepresentanteColumns.tsx | 58 ++ .../TPessoaRepresentanteForm.tsx | 336 +++++++ .../TPessoaRepresentanteIndex.tsx | 171 ++++ .../TPessoaRepresentanteTable.tsx | 25 + .../hooks/TImovel/useTImovelDeleteHook.ts | 2 +- .../hooks/TImovel/useTImovelIndexHook.ts | 2 +- .../hooks/TImovel/useTImovelSaveHook.ts | 2 +- .../useTImovelUnidadeRuralDeleteHook.ts | 2 +- .../useTImovelUnidadeRuralIndexHook.ts | 2 +- .../useTImovelUnidadeRuralSaveHook.ts | 2 +- .../useTImovelUnidadeUrbanoDeleteHook.ts | 2 +- .../useTImovelUnidadeUrbanoIndexHook.ts | 2 +- .../useTImovelUnidadeUrbanoSaveHook.ts | 2 +- .../useTPessoaFisicaDeleteHook.ts | 2 +- .../useTPessoaFisicaIndexHook.ts | 2 +- .../TPessoaFisica/useTPessoaFisicaSaveHook.ts | 2 +- .../useTPessoaJuridicaDeleteHook.ts | 2 +- .../useTPessoaJuridicaIndexHook.ts | 2 +- .../useTPessoaJuridicaSaveHook.ts | 2 +- .../useTPessoaRepresentanteDeleteHook.ts | 2 +- .../useTPessoaRepresentanteIndexHook.ts | 2 +- .../useTPessoaRepresentanteSaveHook.ts | 2 +- .../services/TImovel/TImovelDeleteService.ts | 2 +- .../services/TImovel/TImovelIndexService.ts | 2 +- .../services/TImovel/TImovelSaveService.ts | 2 +- .../TImovelUnidadeRuralDeleteService.ts | 2 +- .../TImovelUnidadeRuralIndexService.ts | 2 +- .../TImovelUnidadeRuralSaveService.ts | 2 +- .../TImovelUnidadeUrbanoDeleteService.ts | 2 +- .../TImovelUnidadeUrbanoIndexService.ts | 2 +- .../TImovelUnidadeUrbanoSaveService.ts | 2 +- .../TPessoaFisicaIndexService.ts | 2 +- .../TPessoaFisicaRemoveService.ts | 2 +- .../TPessoaFisica/TPessoaFisicaSaveService.ts | 2 +- .../TPessoaJuridicaIndexService.ts | 2 +- .../TPessoaJuridicaRemoveService.ts | 2 +- .../TPessoaJuridicaSaveService.ts | 2 +- .../TPessoaRepresentanteIndexService.ts | 2 +- .../TPessoaRepresentanteRemoveService.ts | 2 +- .../TPessoaRepresentanteSaveService.ts | 2 +- src/{ => shared}/abstracts/Schema.ts | 0 src/{ => shared}/actions/CEP/FormatCEP.ts | 0 src/{ => shared}/actions/CNPJ/FormatCNPJ.ts | 0 src/{ => shared}/actions/CPF/FormatCPF.ts | 0 .../actions/cookies/CookiesGet.ts | 0 .../actions/dateTime/FormatDateTime.ts | 0 .../actions/form/ResetFormIfData.ts | 0 .../actions/form/parseNumberInput.ts | 0 src/{ => shared}/actions/json/Json.ts | 2 +- src/{ => shared}/actions/phone/FormatPhone.ts | 0 .../actions/text/GetCapitalize.ts | 0 .../actions/text/GetNameInitials.ts | 0 src/{ => shared}/actions/text/GetSigla.ts | 0 src/{ => shared}/actions/token/TokenGet.ts | 0 src/{ => shared}/actions/validations/empty.ts | 0 .../withClientErrorHandler.ts | 0 .../withClientErrorHandlerInterface.ts | 0 .../confirmDialog}/ConfirmDialog.tsx | 0 .../confirmDialog}/useConfirmDialog.ts | 0 .../components/dataTable/DataTable.tsx} | 0 .../components}/dataTable/SortableHeader.tsx | 0 .../components}/loading/loading.tsx | 0 .../components}/loading/skeletonCard.tsx | 0 .../components}/loading/skeletonTable.tsx | 0 .../loadingButton/LoadingButton.tsx | 0 .../loadingButton/LoadingButtonProps.ts | 0 .../components/response}/ResponseContext.tsx | 0 .../components/response}/response.tsx | 0 .../components}/structure/Header.tsx | 0 .../enums/ImovelConstrucaoEnum.ts | 0 .../enums/ImovelTipoClasseEnum.ts | 0 src/{ => shared}/enums/ImovelTipoEnum.ts | 0 src/{ => shared}/enums/ImovelTipoRegistro.ts | 0 src/{ => shared}/enums/SexoEnum.ts | 0 src/{ => shared}/enums/SituacoesEnum.ts | 0 .../hooks/auth/useGUsuarioGetJWTHook.ts | 4 +- .../GUsuarioAuthenticatedInterface.ts | 0 src/{ => shared}/interfaces/IConfig.ts | 0 src/{ => shared}/services/api/Api.ts | 8 +- .../services/api/enums/ApiMethodEnum.ts | 0 .../services/api/interfaces/ApiInterface.ts | 0 .../services/api/schemas/ApiSchema.ts | 4 +- .../services/response/Response.ts | 0 291 files changed, 5119 insertions(+), 412 deletions(-) create mode 100644 src/packages/administrativo/data/components/TImovel/TImovelColumns.tsx create mode 100644 src/packages/administrativo/data/components/TImovel/TImovelForm.tsx create mode 100644 src/packages/administrativo/data/components/TImovel/TImovelIndex.tsx create mode 100644 src/packages/administrativo/data/components/TImovel/TImovelTable.tsx create mode 100644 src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx create mode 100644 src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx create mode 100644 src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralPage.tsx create mode 100644 src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTable.tsx create mode 100644 src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx create mode 100644 src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx create mode 100644 src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoPage.tsx create mode 100644 src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTable.tsx create mode 100644 src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx create mode 100644 src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx create mode 100644 src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx create mode 100644 src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaTable.tsx create mode 100644 src/packages/administrativo/data/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx create mode 100644 src/packages/administrativo/data/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx create mode 100644 src/packages/administrativo/data/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx create mode 100644 src/packages/administrativo/data/components/TPessoa/TPessoaJuridica/TPessoaJuridicaTable.tsx create mode 100644 src/packages/administrativo/data/components/TPessoaRepresentante/TPessoaRepresentanteColumns.tsx create mode 100644 src/packages/administrativo/data/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx create mode 100644 src/packages/administrativo/data/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx create mode 100644 src/packages/administrativo/data/components/TPessoaRepresentante/TPessoaRepresentanteTable.tsx rename src/{ => shared}/abstracts/Schema.ts (100%) rename src/{ => shared}/actions/CEP/FormatCEP.ts (100%) rename src/{ => shared}/actions/CNPJ/FormatCNPJ.ts (100%) rename src/{ => shared}/actions/CPF/FormatCPF.ts (100%) rename src/{ => shared}/actions/cookies/CookiesGet.ts (100%) rename src/{ => shared}/actions/dateTime/FormatDateTime.ts (100%) rename src/{ => shared}/actions/form/ResetFormIfData.ts (100%) rename src/{ => shared}/actions/form/parseNumberInput.ts (100%) rename src/{ => shared}/actions/json/Json.ts (60%) rename src/{ => shared}/actions/phone/FormatPhone.ts (100%) rename src/{ => shared}/actions/text/GetCapitalize.ts (100%) rename src/{ => shared}/actions/text/GetNameInitials.ts (100%) rename src/{ => shared}/actions/text/GetSigla.ts (100%) rename src/{ => shared}/actions/token/TokenGet.ts (100%) rename src/{ => shared}/actions/validations/empty.ts (100%) rename src/{ => shared}/actions/withClientErrorHandler/withClientErrorHandler.ts (100%) rename src/{ => shared}/actions/withClientErrorHandler/withClientErrorHandlerInterface.ts (100%) rename src/{app/_components/confirm_dialog => shared/components/confirmDialog}/ConfirmDialog.tsx (100%) rename src/{app/_components/confirm_dialog => shared/components/confirmDialog}/useConfirmDialog.ts (100%) rename src/{app/_components/dataTable/dataTable.tsx => shared/components/dataTable/DataTable.tsx} (100%) rename src/{app/_components => shared/components}/dataTable/SortableHeader.tsx (100%) rename src/{app/_components => shared/components}/loading/loading.tsx (100%) rename src/{app/_components => shared/components}/loading/skeletonCard.tsx (100%) rename src/{app/_components => shared/components}/loading/skeletonTable.tsx (100%) rename src/{app/_components => shared/components}/loadingButton/LoadingButton.tsx (100%) rename src/{app/_components => shared/components}/loadingButton/LoadingButtonProps.ts (100%) rename src/{app/_response => shared/components/response}/ResponseContext.tsx (100%) rename src/{app/_response => shared/components/response}/response.tsx (100%) rename src/{app/_components => shared/components}/structure/Header.tsx (100%) rename src/{ => shared}/enums/ImovelConstrucaoEnum.ts (100%) rename src/{ => shared}/enums/ImovelTipoClasseEnum.ts (100%) rename src/{ => shared}/enums/ImovelTipoEnum.ts (100%) rename src/{ => shared}/enums/ImovelTipoRegistro.ts (100%) rename src/{ => shared}/enums/SexoEnum.ts (100%) rename src/{ => shared}/enums/SituacoesEnum.ts (100%) rename src/{ => shared}/hooks/auth/useGUsuarioGetJWTHook.ts (91%) rename src/{ => shared}/interfaces/GUsuarioAuthenticatedInterface.ts (100%) rename src/{ => shared}/interfaces/IConfig.ts (100%) rename src/{ => shared}/services/api/Api.ts (89%) rename src/{ => shared}/services/api/enums/ApiMethodEnum.ts (100%) rename src/{ => shared}/services/api/interfaces/ApiInterface.ts (100%) rename src/{ => shared}/services/api/schemas/ApiSchema.ts (93%) rename src/{ => shared}/services/response/Response.ts (100%) diff --git a/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/[id]/detalhes/page.tsx b/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/[id]/detalhes/page.tsx index 208fd4e..12250a9 100644 --- a/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/[id]/detalhes/page.tsx +++ b/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/[id]/detalhes/page.tsx @@ -6,7 +6,7 @@ import { useParams } from 'next/navigation'; import { Card, CardContent } from '@/components/ui/card'; import { useGUsuarioReadHooks } from '@/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioReadHooks'; import Usuario from '@/app/(protected)/(administrativo)/_interfaces/GUsuarioInterface'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; export default function UsuarioDetalhes() { const params = useParams(); diff --git a/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/page.tsx b/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/page.tsx index 9539e74..95fcb73 100644 --- a/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/page.tsx +++ b/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/page.tsx @@ -16,7 +16,7 @@ import { Button } from '@/components/ui/button'; import Link from 'next/link'; import { useGUsuarioIndexHook } from '../../_hooks/g_usuario/useGUsuarioIndexHook'; import { useEffect } from 'react'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; export default function UsuarioPage() { const { usuarios, fetchUsuarios } = useGUsuarioIndexHook(); diff --git a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioDeleteData.ts b/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioDeleteData.ts index a65d9a3..01b4fea 100644 --- a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioDeleteData.ts +++ b/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioDeleteData.ts @@ -1,7 +1,7 @@ 'use server'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GUsuarioDeleteData(usuarioId: number) { const api = new API(); diff --git a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioIndexData.ts b/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioIndexData.ts index 5f82cdc..1d0ceba 100644 --- a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioIndexData.ts +++ b/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioIndexData.ts @@ -1,7 +1,7 @@ 'use server'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GUsuarioIndexData() { const api = new API(); diff --git a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioLoginData.ts b/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioLoginData.ts index eb0313f..621f05f 100644 --- a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioLoginData.ts +++ b/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioLoginData.ts @@ -1,7 +1,7 @@ 'use server'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import API from '@/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; export default async function GUsuarioLoginData(form: any) { const api = new API(); diff --git a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioReadData.ts b/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioReadData.ts index d0c9a00..887c9ae 100644 --- a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioReadData.ts +++ b/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioReadData.ts @@ -1,7 +1,7 @@ 'use server'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GUsuarioReadData(usuarioId: number) { const api = new API(); diff --git a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioSaveData.ts b/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioSaveData.ts index d1de35a..8fd0f94 100644 --- a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioSaveData.ts +++ b/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioSaveData.ts @@ -1,7 +1,7 @@ 'use server'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GUsuarioSaveData(form: any) { const api = new API(); diff --git a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioIndexHook.ts b/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioIndexHook.ts index 41e8c97..2df1b1e 100644 --- a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioIndexHook.ts +++ b/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioIndexHook.ts @@ -3,7 +3,7 @@ import { useState } from 'react'; import Usuario from '../../_interfaces/GUsuarioInterface'; import GUsuarioIndex from '../../_services/g_usuario/GUsuarioIndex'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGUsuarioIndexHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioReadHooks.ts b/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioReadHooks.ts index ba64b81..985cf24 100644 --- a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioReadHooks.ts +++ b/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioReadHooks.ts @@ -3,7 +3,7 @@ import { useState } from 'react'; import Usuario from '../../_interfaces/GUsuarioInterface'; import GUsuarioRead from '../../_services/g_usuario/GUsuarioRead'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGUsuarioReadHooks = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioSaveHook.ts b/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioSaveHook.ts index 159fb29..58846ed 100644 --- a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioSaveHook.ts +++ b/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioSaveHook.ts @@ -3,7 +3,7 @@ import { useState } from 'react'; import Usuario from '../../_interfaces/GUsuarioInterface'; import GUsuarioSave from '../../_services/g_usuario/GUsuarioSave'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGUsuarioSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_cidade)/cidades/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(g_cidade)/cidades/page.tsx index cd890e7..22c02b2 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_cidade)/cidades/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(g_cidade)/cidades/page.tsx @@ -3,7 +3,7 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import GCidadeTable from '../../_components/g_cidade/GCidadeTable'; import GCidadeForm from '../../_components/g_cidade/GCidadeForm'; @@ -11,11 +11,11 @@ import { useGCidadeReadHook } from '../../_hooks/g_cidade/useGCidadeReadHook'; import { useGCidadeSaveHook } from '../../_hooks/g_cidade/useGCidadeSaveHook'; import { useGCidadeRemoveHook } from '../../_hooks/g_cidade/useGCidadeRemoveHook'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import GCidadeInterface from '../../_interfaces/GCidadeInterface'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; export default function GCidadePage() { // Hooks para leitura e salvamento diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_medidatipo)/medida-tipo/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(g_medidatipo)/medida-tipo/page.tsx index fe193f0..071daec 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_medidatipo)/medida-tipo/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(g_medidatipo)/medida-tipo/page.tsx @@ -2,12 +2,12 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; +import { useResponse } from '@/shared/components/response/ResponseContext'; -import Header from '@/app/_components/structure/Header'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import Loading from '@/app/_components/loading/loading'; +import Header from '@/shared/components/structure/Header'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import Loading from '@/shared/components/loading/loading'; import GMedidaTipoTable from '../../_components/g_medidatipo/GMedidaTipoTable'; import GMedidaTipoForm from '../../_components/g_medidatipo/GMedidaTipoForm'; @@ -16,7 +16,7 @@ import { useGMedidaTipoSaveHook } from '../../_hooks/g_medidatipo/useGMedidaTipo import { useGMedidaTipoRemoveHook } from '../../_hooks/g_medidatipo/useGMedidaTipoRemoveHook'; import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; -import { SituacoesEnum } from '@/enums/SituacoesEnum'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; const initialMedidaTipo: GMedidaTipoInterface = { medida_tipo_id: 0, diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_bairro)/bairro/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(g_tb_bairro)/bairro/page.tsx index bb662a8..9fb2583 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_bairro)/bairro/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(g_tb_bairro)/bairro/page.tsx @@ -2,12 +2,12 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; +import { useResponse } from '@/shared/components/response/ResponseContext'; -import Header from '@/app/_components/structure/Header'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import Loading from '@/app/_components/loading/loading'; +import Header from '@/shared/components/structure/Header'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import Loading from '@/shared/components/loading/loading'; import GTBBairroTable from '../../_components/g_tb_bairro/GTBBairroTable'; import GTBBairroForm from '../../_components/g_tb_bairro/GTBBairroForm'; @@ -16,7 +16,7 @@ import { useGTBBairroSaveHook } from '../../_hooks/g_tb_bairro/useGTBBairroSaveH import { useGTBBairroRemoveHook } from '../../_hooks/g_tb_bairro/useGTBBairroRemoveHook'; import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; -import { SituacoesEnum } from '@/enums/SituacoesEnum'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; const initialBairro: GTBBairroInterface = { sistema_id: null, diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_estadocivil)/estado-civil/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(g_tb_estadocivil)/estado-civil/page.tsx index 1e635a7..da1bc9c 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_estadocivil)/estado-civil/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(g_tb_estadocivil)/estado-civil/page.tsx @@ -2,11 +2,11 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import Header from '@/app/_components/structure/Header'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import Loading from '@/app/_components/loading/loading'; +import Header from '@/shared/components/structure/Header'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import Loading from '@/shared/components/loading/loading'; import GTBEstadoCivilTable from '../../_components/g_tb_estadocivil/GTBEstadoCivilTable'; import GTBEstadoCivilForm from '../../_components/g_tb_estadocivil/GTBEstadoCivilForm'; @@ -15,7 +15,7 @@ import { useGTBEstadoCivilSaveHook } from '../../_hooks/g_tb_estadocivil/useGTBE import { useGTBEstadoCivilRemoveHook } from '../../_hooks/g_tb_estadocivil/useGTBEstadoCivilRemoveHook'; import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; const initalEstadoCivil: GTBEstadoCivilInterface = { tb_estadocivil_id: 0, diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_profissao)/profissoes/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(g_tb_profissao)/profissoes/page.tsx index 3e8efe1..c19269c 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_profissao)/profissoes/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(g_tb_profissao)/profissoes/page.tsx @@ -3,7 +3,7 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import GTBProfissaoTable from '../../_components/g_tb_profissao/GTBProfissaoTable'; import GTBProfissaoForm from '../../_components/g_tb_profissao/GTBProfissaoForm'; @@ -11,11 +11,11 @@ import { useGTBProfissaoReadHook } from '../../_hooks/g_tb_profissao/useGTBProfi import { useGTBProfissaoSaveHook } from '../../_hooks/g_tb_profissao/useGTBProfissaoSaveHook'; import { useGTBProfissaoRemoveHook } from '../../_hooks/g_tb_profissao/useGTBProfissaoRemoveHook'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; export default function TTBAndamentoServico() { // Hooks para leitura e salvamento diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimebens)/regime-bens/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimebens)/regime-bens/page.tsx index dfc472f..10c36f7 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimebens)/regime-bens/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimebens)/regime-bens/page.tsx @@ -3,7 +3,7 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import GTBRegimeBensTable from '../../_components/g_tb_regimebens/GTBRegimeBensTable'; import GTBRegimeBensForm from '../../_components/g_tb_regimebens/GTBRegimeBensForm'; @@ -11,11 +11,11 @@ import { useGTBRegimeBensReadHook } from '../../_hooks/g_tb_regimebens/useGTBReg import { useGTBRegimeBensSaveHook } from '../../_hooks/g_tb_regimebens/useGTBRegimeBensSaveHook'; import { useGTBRegimeBensRemoveHook } from '../../_hooks/g_tb_regimebens/useGTBRegimeBensRemoveHook'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; export default function TTBAndamentoServico() { // Hooks para leitura e salvamento diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimecomunhao)/regime-comunhao/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimecomunhao)/regime-comunhao/page.tsx index 626615d..5de6c1c 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimecomunhao)/regime-comunhao/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimecomunhao)/regime-comunhao/page.tsx @@ -3,7 +3,7 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import GTBRegimeComunhaoTable from '../../_components/g_tb_regimecomunhao/GTBRegimeComunhaoTable'; import GTBRegimeComunhaoForm from '../../_components/g_tb_regimecomunhao/GTBRegimeComunhaoForm'; @@ -11,11 +11,11 @@ import { useGTBRegimeComunhaoReadHook } from '../../_hooks/g_tb_regimecomunhao/u import { useGTBRegimeComunhaoSaveHook } from '../../_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoSaveHook'; import { useGTBRegimeComunhaoRemoveHook } from '../../_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoRemoveHook'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; export default function TTBAndamentoServico() { // Hooks para leitura e salvamento diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_tipologradouro)/tipo-logradouro/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(g_tb_tipologradouro)/tipo-logradouro/page.tsx index 023c5a4..8a198b4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_tipologradouro)/tipo-logradouro/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(g_tb_tipologradouro)/tipo-logradouro/page.tsx @@ -2,11 +2,11 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import Header from '@/app/_components/structure/Header'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import Loading from '@/app/_components/loading/loading'; +import Header from '@/shared/components/structure/Header'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import Loading from '@/shared/components/loading/loading'; import GTBTipoLogradouroTable from '../../_components/g_tb_tipologradouro/GTBTipoLogradouroTable'; import GTBTipoLogradouroForm from '../../_components/g_tb_tipologradouro/GTBTipoLogradouroForm'; @@ -16,7 +16,7 @@ import { useGTBTipoLogradouroRemoveHook } from '../../_hooks/g_tb_tipologradouro import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export default function TTBAndamentoServico() { // Controle de exibição de respostas diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_censec)/censec/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(t_censec)/censec/page.tsx index ffceb27..e9235b8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_censec)/censec/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(t_censec)/censec/page.tsx @@ -3,7 +3,7 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import TCensecTable from '../../_components/t_censec/TCensecTable'; import TCensecForm from '../../_components/t_censec/TCensecForm'; @@ -11,11 +11,11 @@ import { useTCensecReadHook } from '../../_hooks/t_censec/useTCensecReadHook'; import { useTCensecSaveHook } from '../../_hooks/t_censec/useTCensecSaveHook'; import { useTCensecDeleteHook } from '../../_hooks/t_censec/useTCensecDeleteHook'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import TCensecInterface from '../../_interfaces/TCensecInterface'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; export default function TTBAndamentoServico() { // Controle de estado do botão diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_censec_tipoato)/censec-tipoato/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(t_censec_tipoato)/censec-tipoato/page.tsx index 3b20226..9a9565b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_censec_tipoato)/censec-tipoato/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(t_censec_tipoato)/censec-tipoato/page.tsx @@ -2,11 +2,11 @@ import { useEffect, useState, useCallback } from "react"; import { Card, CardContent } from "@/components/ui/card"; -import { useConfirmDialog } from "@/app/_components/confirm_dialog/useConfirmDialog"; +import { useConfirmDialog } from "@/shared/components/confirmDialog/useConfirmDialog"; -import Header from "@/app/_components/structure/Header"; -import ConfirmDialog from "@/app/_components/confirm_dialog/ConfirmDialog"; -import Loading from "@/app/_components/loading/loading"; +import Header from "@/shared/components/structure/Header"; +import ConfirmDialog from "@/shared/components/confirmDialog/ConfirmDialog"; +import Loading from "@/shared/components/loading/loading"; import TCensecTipoAtoTable from "../../_components/t_censec_tipoato/TCensecTipoAtoTable"; import TCensecTipoAtoForm from "../../_components/t_censec_tipoato/TCensecTipoAtoForm"; diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_censecnaturezalitigio)/censec-natureza-litigio/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(t_censecnaturezalitigio)/censec-natureza-litigio/page.tsx index 147b5b5..0e8b588 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_censecnaturezalitigio)/censec-natureza-litigio/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(t_censecnaturezalitigio)/censec-natureza-litigio/page.tsx @@ -2,12 +2,12 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; +import { useResponse } from '@/shared/components/response/ResponseContext'; -import Header from '@/app/_components/structure/Header'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import Loading from '@/app/_components/loading/loading'; +import Header from '@/shared/components/structure/Header'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import Loading from '@/shared/components/loading/loading'; import TCensecNaturezaLitigioTable from '../../_components/t_censecnaturezalitigio/TCensecNaturezaLitigioTable'; import TCensecNaturezaLitigioForm from '../../_components/t_censecnaturezalitigio/TCensecNaturezaLitigioForm'; @@ -17,7 +17,7 @@ import { useTCensecNaturezaLitigioSaveHook } from '../../_hooks/t_censecnatureza import { useTCensecNaturezaLitigioRemoveHook } from '../../_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioRemoveHook'; import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; -import { SituacoesEnum } from '@/enums/SituacoesEnum'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; const initialCensecNaturezaLitigio: TCensecNaturezaLitigioInterface = { censec_naturezalitigio_id: 0, diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/[id]/detalhes/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/[id]/detalhes/page.tsx index 08b35d7..108127f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/[id]/detalhes/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/[id]/detalhes/page.tsx @@ -6,7 +6,7 @@ import { useParams } from 'next/navigation'; import { Card, CardContent } from '@/components/ui/card'; import MainEditor from '@/components/MainEditor'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import { useTMinutaReadHook } from '../../../../_hooks/t_minuta/useTMinutaReadHook'; import { TMinutaInterface } from '../../../../_interfaces/TMinutaInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/page.tsx index 96a2818..b2f2b32 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/page.tsx @@ -2,11 +2,11 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import Header from '@/app/_components/structure/Header'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import Loading from '@/app/_components/loading/loading'; +import Header from '@/shared/components/structure/Header'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import Loading from '@/shared/components/loading/loading'; import TMinutaTable from '../../_components/t_minuta/TMinutaTable'; import TMinutaForm from '../../_components/t_minuta/TMinutaForm'; diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_tb_andamentoservico)/andamentos/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(t_tb_andamentoservico)/andamentos/page.tsx index ade341d..8ac3997 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_tb_andamentoservico)/andamentos/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(t_tb_andamentoservico)/andamentos/page.tsx @@ -3,19 +3,19 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import TTBAndamentoServicoTable from '../../_components/t_tb_andamentoservico/TTBAndamentoServicoTable'; import TTBAndamentoServicoForm from '../../_components/t_tb_andamentoservico/TTBAndamentoServicoForm'; import { useTTBAndamentoServicoReadHook } from '../../_hooks/t_tb_andamentoservico/useTTBAndamentoServicoReadHook'; import { useTTBAndamentoServicoSaveHook } from '../../_hooks/t_tb_andamentoservico/useTTBAndamentoServicoSaveHook'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import TTBAndamentoServicoInterface from '../../_interfaces/TTBAndamentoServicoInterface'; import { useTTBAndamentoServicoDeleteHook } from '../../_hooks/t_tb_andamentoservico/useTTBAndamentoServicoDeleteHook'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; export default function TTBAndamentoServico() { // Hooks para leitura e salvamento diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_tb_reconhecimentotipo)/reconhecimentos/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(t_tb_reconhecimentotipo)/reconhecimentos/page.tsx index e6683f7..d289116 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_tb_reconhecimentotipo)/reconhecimentos/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(t_tb_reconhecimentotipo)/reconhecimentos/page.tsx @@ -3,8 +3,8 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import Loading from '@/app/_components/loading/loading'; -import Header from '@/app/_components/structure/Header'; +import Loading from '@/shared/components/loading/loading'; +import Header from '@/shared/components/structure/Header'; import TTBReconhecimentoTipoTable from '../../_components/t_tb_reconhecimentotipo/TTBReconhecimentoTipoTable'; import TTBReconhecimentoTipoForm from '../../_components/t_tb_reconhecimentotipo/TTBReconhecimentoTipoForm'; @@ -12,8 +12,8 @@ import { useTTBReconhecimentoTipoReadHook } from '../../_hooks/t_tb_reconhecimen import { useTTBReconhecimentoTipoSaveHook } from '../../_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoSaveHook'; import { useTTBReconhecimentoTipoDeleteHook } from '../../_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoDeleteHook'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import TTBReconhecimentoTipoInterface from '../../_interfaces/TTBReconhecimentoTipoInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_medidatipo/GMedidaTipoForm.tsx b/src/app/(protected)/(cadastros)/cadastros/_components/g_medidatipo/GMedidaTipoForm.tsx index 38b28cd..5d7b2ac 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_medidatipo/GMedidaTipoForm.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/_components/g_medidatipo/GMedidaTipoForm.tsx @@ -24,7 +24,7 @@ import { FormMessage, } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { GMedidaTipoSchema } from '../../_schemas/GMedidaTipoSchema'; import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroForm.tsx b/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroForm.tsx index d88f690..7c11262 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroForm.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroForm.tsx @@ -28,8 +28,8 @@ import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { GTBBairroSchema } from '../../_schemas/GTBBairroSchema'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; -import { SituacoesEnum } from '@/enums/SituacoesEnum'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; type FormValues = z.infer; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil/GTBEstadoCivilForm.tsx b/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil/GTBEstadoCivilForm.tsx index 038c4a7..50c9723 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil/GTBEstadoCivilForm.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil/GTBEstadoCivilForm.tsx @@ -5,7 +5,7 @@ import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; import { diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro/GTBTipoLogradouroForm.tsx b/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro/GTBTipoLogradouroForm.tsx index 83dba7d..08ba132 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro/GTBTipoLogradouroForm.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro/GTBTipoLogradouroForm.tsx @@ -27,7 +27,7 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { GTBTipoLogradouroSchema } from '../../_schemas/GTBTipoLogradouroSchema'; import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec/TCensecForm.tsx b/src/app/(protected)/(cadastros)/cadastros/_components/t_censec/TCensecForm.tsx index 740e380..28bee9c 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec/TCensecForm.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/_components/t_censec/TCensecForm.tsx @@ -28,8 +28,8 @@ import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { TCensecSchema } from '../../_schemas/TCensecSchema'; -import { SituacoesEnum } from '@/enums/SituacoesEnum'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; type FormValues = z.infer; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioForm.tsx b/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioForm.tsx index 31e26cd..9aa91e6 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioForm.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioForm.tsx @@ -5,7 +5,7 @@ import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; import { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeIndexData.ts index 8453416..f44552c 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeIndexData.ts @@ -1,11 +1,11 @@ // Importa o serviço de API que será utilizado para realizar requisições HTTP -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; // Importa o enum que contém os métodos HTTP disponíveis (GET, POST, PUT, DELETE) -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; // Importa função que encapsula chamadas assíncronas e trata erros automaticamente -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; // Função assíncrona que implementa a lógica de salvar (criar/atualizar) uma cidade async function executeGcidadeIndexData() { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeRemoveData.ts index cd67260..7f4a5df 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeRemoveData.ts @@ -1,14 +1,14 @@ // Importa o serviço de API que será utilizado para realizar requisições HTTP -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; // Importa o enum que contém os métodos HTTP disponíveis (GET, POST, PUT, DELETE) -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; // Importa a interface tipada que define a estrutura dos dados de uma cidade import GCidadeInterface from '../../_interfaces/GCidadeInterface'; // Importa função que encapsula chamadas assíncronas e trata erros automaticamente -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; // Função assíncrona que implementa a lógica de salvar (criar/atualizar) uma cidade async function executeGcidadeRemoveData(data: GCidadeInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeSaveData.ts index d1f2433..aa9f549 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeSaveData.ts @@ -1,14 +1,14 @@ // Importa o serviço de API que será utilizado para realizar requisições HTTP -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; // Importa o enum que contém os métodos HTTP disponíveis (GET, POST, PUT, DELETE) -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; // Importa a interface tipada que define a estrutura dos dados de uma cidade import GCidadeInterface from '../../_interfaces/GCidadeInterface'; // Importa função que encapsula chamadas assíncronas e trata erros automaticamente -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; // Função assíncrona que implementa a lógica de salvar (criar/atualizar) uma cidade async function executeGcidadeSaveData(data: GCidadeInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoIndexData.ts index f0bdd84..6719b43 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoIndexData.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeGMedidaTipoIndexData() { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoRemoveData.ts index 57901fc..0aa1865 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoRemoveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGMedidaTipoRemoveData(data: GMedidaTipoInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoSaveData.ts index 0237d51..6451de4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoSaveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGMedidaTipoSaveData(data: GMedidaTipoInterface) { const isUpdate = Boolean(data.medida_tipo_id); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroIndexData.ts index 1ab262c..34c9080 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroIndexData.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeGTBBairroIndexData() { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroRemoveData.ts index 1961cd6..ec18573 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroRemoveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBBairroRemoveData(data: GTBBairroInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroSaveData.ts index aedd80e..aff56c6 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroSaveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBBairroSaveData(data: GTBBairroInterface) { const isUpdate = Boolean(data.tb_bairro_id); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilIndexData.ts index 8df8d93..05e713c 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilIndexData.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeGTBEstadoCivilIndexData() { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts index c642dda..90fefea 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBEstadoCivilRemoveData(data: GTBEstadoCivilInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts index 26b3b13..35b42aa 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBEstadoCivilSaveData(data: GTBEstadoCivilInterface) { const isUpdate = Boolean(data.tb_estadocivil_id); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoIndexData.ts index 8d551b8..7664ee8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoIndexData.ts @@ -1,5 +1,5 @@ -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBProfissoesIndexData() { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoRemoveData.ts index 5532336..05362e5 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoRemoveData.ts @@ -1,6 +1,6 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBProfissaoRemoveData(data: GTBProfissaoInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoSaveData.ts index 05a3c56..28fd36e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoSaveData.ts @@ -1,6 +1,6 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBProfissaoSaveData(data: GTBProfissaoInterface) { const isUpdate = Boolean(data.tb_profissao_id); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensIndexData.ts index 9d6dd91..5200452 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensIndexData.ts @@ -1,5 +1,5 @@ -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBRegimeBensIndexData() { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensRemoveData.ts index 367e792..04ffc5c 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensRemoveData.ts @@ -1,5 +1,5 @@ -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; export default async function GTBRegimeBensRemoveData(data: GTBRegimeBensInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensSaveData.ts index 449cd4b..bddea05 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensSaveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBRegimeBensSaveData(data: GTBRegimeBensInterface) { throw new Error('Nome e email são obrigatórios'); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroIndexData.ts index 285aa98..b468f95 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroIndexData.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeGTBTipoLogradouroIndexData() { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts index 505e67e..5162f52 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBTipoLogradouroRemoveData(data: GTBTipoLogradouroInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts index 5f4f95b..5fa84e2 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBTipoLogradouroSaveData(data: GTBTipoLogradouroInterface) { const isUpdate = Boolean(data.tb_tipologradouro_id); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts index 63e4137..ac1f446 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts @@ -1,6 +1,6 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBRegimeComunhaoIndexData() { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts index dea4b2a..77f3c34 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts @@ -1,5 +1,5 @@ -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; export default async function GTBRegimeComunhaoRemoveData(data: GTBRegimeComunhaoInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts index ddd9763..a994921 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts @@ -1,6 +1,6 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBRegimeComunhaoSaveData(data: GTBRegimeComunhaoInterface) { const isUpdate = Boolean(data.tb_regimecomunhao_id); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GUf/GUfIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GUf/GUfIndexData.ts index 3b46f14..309e05d 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GUf/GUfIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GUf/GUfIndexData.ts @@ -1,8 +1,8 @@ // Importa a classe API responsável por centralizar chamadas HTTP -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; // Importa o enum de métodos HTTP (GET, POST, PUT, DELETE, etc.) -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; // Exporta por padrão a função assíncrona GUfIndexData export default async function GUfIndexData() { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecDeleteData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecDeleteData.ts index 8e28965..3723b28 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecDeleteData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecDeleteData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import TCensecInterface from '../../_interfaces/TCensecInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecDeleteData(data: TCensecInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecIndexData.ts index 08b1178..01730d8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecIndexData.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeTCensecIndexData() { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecSaveData.ts index 17e5c84..1d493e2 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecSaveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import TCensecInterface from '../../_interfaces/TCensecInterface'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecSaveData(data: TCensecInterface) { const isUpdate = Boolean(data.censec_id); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData.ts index e812168..23a3c09 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeTCensecNaturezaLitigioIndexData() { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts index 0bc6e49..885a818 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecNaturezaLitigioRemoveData(data: TCensecNaturezaLitigioInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts index 9f16d00..edee5c4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts @@ -1,7 +1,7 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecNaturezaLitigioSaveData(data: TCensecNaturezaLitigioInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoIndexData.ts index 24c3a54..283110b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoIndexData.ts @@ -1,7 +1,7 @@ -import API from "@/services/api/Api"; -import { Methods } from "@/services/api/enums/ApiMethodEnum"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; import TCensecTipoAtoMockDeDados from "./mockCensecTipoAto"; -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; const useMock = true diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoRemoveData.ts index 7293ad5..5d36abb 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoRemoveData.ts @@ -1,7 +1,7 @@ -import API from "@/services/api/Api"; +import API from "@/shared/services/api/Api"; import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; -import { Methods } from "@/services/api/enums/ApiMethodEnum"; -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; async function executeTCensecTipoAtoRemoveData(data: TCensecTipoAtoInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoSaveData.ts index 80c9438..042e234 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoSaveData.ts @@ -1,7 +1,7 @@ -import API from "@/services/api/Api"; +import API from "@/shared/services/api/Api"; import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; -import { Methods } from "@/services/api/enums/ApiMethodEnum"; -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; async function executeTCensecTipoAtoSaveData(data: TCensecTipoAtoInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndex.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndex.ts index 756e010..ab06a75 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndex.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndex.ts @@ -1,5 +1,5 @@ -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { MinutaMockDeDadosPorId } from './mockMinuta'; const useMock = true; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndexData.ts index 7db1e34..abe42f4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndexData.ts @@ -1,5 +1,5 @@ -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import MinutaMockDeDados from './mockMinuta'; const useMock = true; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaRemoveData.ts index 00b4ca7..509dc38 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaRemoveData.ts @@ -1,6 +1,6 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function TMinutaRemoveData(data: TMinutaInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaSaveData.ts index b8ad241..f14ccd2 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaSaveData.ts @@ -1,6 +1,6 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function TMinutaSaveData(data: TMinutaInterface) { const isUpdate = Boolean(data.t_minuta_id); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoIndexData.ts index 5eb0651..31e8581 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoIndexData.ts @@ -1,7 +1,7 @@ 'use server'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function TTBAndamentoServicoIndexData() { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts index c9e8187..0289c71 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts @@ -1,8 +1,8 @@ 'use server'; -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import TTBAndamentoServicoInteface from '../../_interfaces/TTBAndamentoServicoInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function TTBAndamentoServicoRemoveData( tTBAndamentoServico: TTBAndamentoServicoInteface, diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts index 16c80db..292226f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts @@ -1,9 +1,9 @@ 'use server'; -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import TTBAndamentoServicoInteface from '../../_interfaces/TTBAndamentoServicoInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTTBAndamentoServicoSaveData(data: TTBAndamentoServicoInteface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts index ca33698..21c3280 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts @@ -1,6 +1,6 @@ -import API from '@/services/api/Api'; +import API from '@/shared/services/api/Api'; import TTBReconhecimentoTipoInterface from '../../_interfaces/TTBReconhecimentoTipoInterface'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function TTBReconhecimentoTipoDeleteData( data: TTBReconhecimentoTipoInterface, diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData.ts index 6db517b..eff0ffd 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData.ts @@ -1,7 +1,7 @@ 'use server'; -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function TTBReconhecimentoTipoIndexData() { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts index 6a9a084..b3851ce 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts @@ -1,5 +1,5 @@ -import API from '@/services/api/Api'; -import { Methods } from '@/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import TTBReconhecimentoTipoInterface from '../../_interfaces/TTBReconhecimentoTipoInterface'; export default async function TTBReconhecimentoTipoSaveData(data: TTBReconhecimentoTipoInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeReadHook.ts index 6cdf6ee..93aa244 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeReadHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; // Contexto global para gerenciar respostas da API +import { useResponse } from '@/shared/components/response/ResponseContext'; // Contexto global para gerenciar respostas da API import { useState } from 'react'; import { GCidadeIndexService } from '../../_services/g_cidade/GCidadeIndexService'; // Serviço que busca a lista de cidades import GCidadeInterface from '../../_interfaces/GCidadeInterface'; // Interface tipada da cidade diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeRemoveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeRemoveHook.ts index 74501c8..1606f60 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeRemoveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeRemoveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from "@/app/_response/ResponseContext"; // Contexto global para gerenciar respostas da API +import { useResponse } from "@/shared/components/response/ResponseContext"; // Contexto global para gerenciar respostas da API import GCidadeInterface from "../../_interfaces/GCidadeInterface"; // Interface tipada da cidade import { GCidadeRemoveData } from "../../_data/GCidade/GCidadeRemoveData"; // Função que remove a cidade via API diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeSaveHook.ts index 9837722..0b0a34e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeSaveHook.ts @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import GCidadeInterface from '../../_interfaces/GCidadeInterface'; import { GCidadeSaveService } from '../../_services/g_cidade/GCidadeSaveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoReadHook.ts index be47be7..4b6ed74 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoReadHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; import { GMedidaTipoIndexService } from '../../_services/g_medidatipo/GMedidaTipoIndexService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoRemoveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoRemoveHook.ts index f8bbac8..9ce8bd8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoRemoveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoRemoveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; import { GMedidaTipoRemoveService } from '../../_services/g_medidatipo/GMedidaTipoRemoveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoSaveHook.ts index d79a302..a5de7c4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoSaveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; import { GMedidaTipoSaveService } from '../../_services/g_medidatipo/GMedidaTipoSaveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroReadHook.ts index bec7bfd..a4e9967 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroReadHook.ts @@ -1,6 +1,6 @@ 'use client'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { use, useState } from 'react'; import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; import { GTBBairroIndexService } from '../../_services/g_tb_bairro/GTBBairroIndexService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroRemoveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroRemoveHook.ts index 5827da0..c5f914b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroRemoveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroRemoveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; import { GTBBairroRemoveService } from '../../_services/g_tb_bairro/GTBBairroRemoveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroSaveHook.ts index 5d2fe86..397c63a 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroSaveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; import { GTBBairroSaveService } from '../../_services/g_tb_bairro/GTBBairroSaveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilReadHook.ts index 23c31d4..ea867be 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilReadHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; import { GTBEstadoCivilIndexService } from '../../_services/g_tb_estadocivil/GTBEstadoCivilIndexService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilRemoveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilRemoveHook.ts index bce4089..20d0757 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilRemoveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilRemoveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; import { GTBEstadoCivilRemoveService } from '../../_services/g_tb_estadocivil/GTBEstadoCivilRemoveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilSaveHook.ts index 71f9eed..c353803 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilSaveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; import { GTBEstadoCivilSaveService } from '../../_services/g_tb_estadocivil/GTBEstadoCivilSaveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts index c8e1eaf..9449750 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; import GTBProfissaoIndexService from '../../_services/g_tb_profissao/GTBProfissaoIndexService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoRemoveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoRemoveHook.ts index 110808b..7bcc420 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoRemoveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoRemoveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; import GTBProfissaoRemoveService from '../../_services/g_tb_profissao/GTBProfissaoRemoveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoSaveHook.ts index eba19d0..e70613f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoSaveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; import GTBProfissaoSaveService from '../../_services/g_tb_profissao/GTBProfissaoSaveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensReadHook.ts index 2113480..c1fcd33 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensReadHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import GTBRegimeBensIndexService from '../../_services/g_tb_regimebens/GTBRegimeBensIndexService'; import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensRemoveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensRemoveHook.ts index 4f24bb0..5d13520 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensRemoveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensRemoveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; import GTBRegimeBensRemoveData from '../../_data/GTBRegimeBens/GTBRegimeBensRemoveData'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensSaveHook.ts index bbcd5fa..172d2b5 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensSaveHook.ts @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; import { GTBRegimeBensSaveService } from '../../_services/g_tb_regimebens/GTBRegimeBensSaveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoReadHook.ts index c92f14b..da4de8b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoReadHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; import { GTBRegimeComunhaoIndexService } from '../../_services/g_tb_regimecomunhao/GTBRegimeComunhaoIndexService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoRemoveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoRemoveHook.ts index 3e33a29..136c291 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoRemoveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoRemoveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; import { GTBRegimeComunhaoRemoveService } from '../../_services/g_tb_regimecomunhao/GTBRegimeComunhaoRemoveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoSaveHook.ts index 454a5e8..0f66906 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoSaveHook.ts @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; import { GTBRegimeComunhaoSaveService } from '../../_services/g_tb_regimecomunhao/GTBRegimeComunhaoSaveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook.ts index 7dfa126..623fa4a 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; import { GTBTipoLogradouroIndexService } from '../../_services/g_tb_tipologradouro/GTBTipoLogradouroIndexService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroRemoveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroRemoveHook.ts index 4b73009..93ce5c2 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroRemoveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroRemoveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; import { GTBTipoLogradouroRemoveService } from '../../_services/g_tb_tipologradouro/GTBTipoLogradouroRemoveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroSaveHook.ts index aeeeda0..e64278a 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroSaveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; import { GTBTipoLogradouroSaveService } from '../../_services/g_tb_tipologradouro/GTBTipoLogradouroSaveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_uf/useGUfReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_uf/useGUfReadHook.ts index 3ebefa3..6361973 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_uf/useGUfReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_uf/useGUfReadHook.ts @@ -1,6 +1,6 @@ 'use client'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { use, useState } from 'react'; import GUfInterface from '../../_interfaces/GUfInterface'; import GUfIndexService from '../../_services/g_uf/GUfIndexService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecDeleteHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecDeleteHook.ts index 88627a6..c420a37 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecDeleteHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecDeleteHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import TCensecInterface from '../../_interfaces/TCensecInterface'; import { TCensecDeleteService } from '../../_services/t_censec/TCensecDeleteService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecReadHook.ts index a3d9dc2..b3ed67d 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecReadHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { TCensecIndexService } from '../../_services/t_censec/TCensecIndexService'; import { useState } from 'react'; import TCensecInterface from '../../_interfaces/TCensecInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecSaveHook.ts index 4e6dd16..9d1c6e9 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecSaveHook.ts @@ -1,6 +1,6 @@ 'use client'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import TCensecInterface from '../../_interfaces/TCensecInterface'; import { TCensecSaveService } from '../../_services/t_censec/TCensecSaveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoReadHook.ts index 61ff510..2252b93 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoReadHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from "@/app/_response/ResponseContext" +import { useResponse } from "@/shared/components/response/ResponseContext" import { useState } from "react"; import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; import { TCensecTipoAtoIndexService } from "../../_services/t_censec_tipoato/TCensecTipoAtoIndexService"; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoRemoveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoRemoveHook.ts index 8af2d06..d1083bb 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoRemoveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoRemoveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from "@/app/_response/ResponseContext" +import { useResponse } from "@/shared/components/response/ResponseContext" import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; import { TCensecTipoAtoRemoveService } from "../../_services/t_censec_tipoato/TCensecTipoAtoRemoveService"; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoSaveHook.ts index 1dde915..6f8390b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoSaveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from "@/app/_response/ResponseContext" +import { useResponse } from "@/shared/components/response/ResponseContext" import { useState } from "react"; import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; import { TCensecTipoAtoSaveService } from "../../_services/t_censec_tipoato/TCensecTipoAtoSaveService"; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioReadHook.ts index b3a770f..1f84443 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioReadHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; import { TCensecNaturezaLitigioIndexService } from '../../_services/t_censecnaturezalitigio/TCensecNaturezaLitigioIndexService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioRemoveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioRemoveHook.ts index 79bd281..5e06778 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioRemoveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioRemoveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; import { useState } from 'react'; import { TCensecNaturezaLitigioRemoveData } from '../../_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioSaveHook.ts index 594e86d..afdf235 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioSaveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; import { TCensecNaturezaLitigioSaveService } from '../../_services/t_censecnaturezalitigio/TCensecNaturezaLitigioSaveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaIndexHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaIndexHook.ts index a5eecc8..1187fb9 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaIndexHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaIndexHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; import TMinutaIndex from '../../_services/t_minuta/TMinutaIndex'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaReadHook.ts index 1540c3a..21ac682 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaReadHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; import TMinutaIndexService from '../../_services/t_minuta/TMinutaIndexService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaRemoveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaRemoveHook.ts index 9f9ac96..9d05bc4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaRemoveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaRemoveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; import TMinutaRemoveService from '../../_services/t_minuta/TMinutaRemoveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaSaveHook.ts index 03b56ab..4e68362 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaSaveHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; import TMinutaSaveService from '../../_services/t_minuta/TMinutaSaveService'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoDeleteHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoDeleteHook.ts index 4494491..5d40130 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoDeleteHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoDeleteHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import TTBAndamentoServicoInteface from '../../_interfaces/TTBAndamentoServicoInterface'; import TTBAndamentoServicoRemoveData from '../../_data/TTBAndamentoServico/TTBAndamentoServicoRemoveData'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoReadHook.ts index b3d7a60..170b07e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoReadHook.ts @@ -1,6 +1,6 @@ 'use client'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import TTBAndamentoServicoInteface from '../../_interfaces/TTBAndamentoServicoInterface'; import TTBAndamentoServicoIndexData from '../../_data/TTBAndamentoServico/TTBAndamentoServicoIndexData'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoSaveHook.ts index ada2e0a..a94b5e7 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoSaveHook.ts @@ -1,6 +1,6 @@ 'use client'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import TTBAndamentoServicoInteface from '../../_interfaces/TTBAndamentoServicoInterface'; import { TTBAndamentoServicoSaveData } from '../../_data/TTBAndamentoServico/TTBAndamentoServicoSaveData'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoDeleteHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoDeleteHook.ts index 7172147..e2ca4bc 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoDeleteHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoDeleteHook.ts @@ -1,4 +1,4 @@ -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import TTBReconhecimentoTipoInterface from '../../_interfaces/TTBReconhecimentoTipoInterface'; import TTBReconhecimentoTipoDeleteData from '../../_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoReadHook.ts index 23283d2..0b10fae 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoReadHook.ts @@ -1,7 +1,7 @@ 'use client'; import ITTTBReconhecimentoTipo from '../../_interfaces/TTBReconhecimentoTipoInterface'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import TTBReconhecimentoTipoIndexData from '../../_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoSaveHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoSaveHook.ts index df0dde2..8d348b1 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoSaveHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoSaveHook.ts @@ -1,6 +1,6 @@ 'use client'; -import { useResponse } from '@/app/_response/ResponseContext'; +import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; import ITTTBReconhecimentoTipo from '../../_interfaces/TTBReconhecimentoTipoInterface'; import TTBReconhecimentoTipoSaveData from '../../_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBBairroInterface.ts b/src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBBairroInterface.ts index fc34127..8f6cd82 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBBairroInterface.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBBairroInterface.ts @@ -1,4 +1,4 @@ -import { SituacoesEnum } from '@/enums/SituacoesEnum'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; export interface GTBBairroInterface { sistema_id: number | null; diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/GTBBairroSchema.ts b/src/app/(protected)/(cadastros)/cadastros/_schemas/GTBBairroSchema.ts index 0f90550..ab2f8de 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_schemas/GTBBairroSchema.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_schemas/GTBBairroSchema.ts @@ -1,4 +1,4 @@ -import { SituacoesEnum } from '@/enums/SituacoesEnum'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; import { z } from 'zod'; export const GTBBairroSchema = z.object({ diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeIndexService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeIndexService.ts index 2374ecc..e6ab8dd 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeIndexService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeIndexService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; // Função que envolve qualquer ação assíncrona para capturar e tratar erros do cliente import { GCidadeIndexData } from '../../_data/GCidade/GCidadeIndexData'; // Função que retorna os dados da lista de cidades (chamada à API ou mock) diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeRemoveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeRemoveService.ts index ac09c09..01ae1be 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeRemoveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeRemoveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; // Função que envolve qualquer ação assíncrona para capturar e tratar erros do cliente import GCidadeRemoveData from '../../_data/GCidade/GCidadeRemoveData'; // Função que remove os dados da cidade via API diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeSaveService.ts index efd017f..9b92ea0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeSaveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeSaveService.ts @@ -1,5 +1,5 @@ // Função que envolve qualquer ação assíncrona para capturar e tratar erros do cliente -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; // Função que salva os dados da cidade via API (ou mock) import { GCidadeSaveData } from '../../_data/GCidade/GCidadeSaveData'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoIndexService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoIndexService.ts index 51db841..28f4f30 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoIndexService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoIndexService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GMedidaTipoIndexData } from '../../_data/GMedidoTipo/GMedidaTipoIndexData'; async function executeGMedidaTipoIndexService() { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoRemoveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoRemoveService.ts index cf3ce99..c6892bb 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoRemoveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoRemoveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GMedidaTipoRemoveData } from '../../_data/GMedidoTipo/GMedidaTipoRemoveData'; import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoSaveService.ts index cbd94db..98dcf60 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoSaveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoSaveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GMedidaTipoSaveData } from '../../_data/GMedidoTipo/GMedidaTipoSaveData'; import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroIndexService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroIndexService.ts index cc22deb..eddaef0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroIndexService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroIndexService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBBairroIndexData } from '../../_data/GTBBairro/GTBBairroIndexData'; async function executeGTBBairroIndexService() { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroRemoveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroRemoveService.ts index b5ca009..64a389d 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroRemoveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroRemoveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBBairroRemoveData } from '../../_data/GTBBairro/GTBBairroRemoveData'; import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroSaveService.ts index 00bbbb5..e5d8f46 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroSaveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroSaveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBBairroSaveData } from '../../_data/GTBBairro/GTBBairroSaveData'; import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilIndexService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilIndexService.ts index d7c4634..fcca3c8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilIndexService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilIndexService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBEstadoCivilIndexData } from '../../_data/GTBEstadoCivil/GTBEstadoCivilIndexData'; async function executeGTBEstadoCivilIndexService() { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilRemoveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilRemoveService.ts index 35e1b4b..1b75fb5 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilRemoveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilRemoveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBEstadoCivilSaveData } from '../../_data/GTBEstadoCivil/GTBEstadoCivilSaveData'; import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilSaveService.ts index c2b6ed8..1e32b0f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilSaveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilSaveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBEstadoCivilSaveData } from '../../_data/GTBEstadoCivil/GTBEstadoCivilSaveData'; import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensSaveService.ts index c885163..d2798fa 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensSaveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensSaveService.ts @@ -1,6 +1,6 @@ import { GTBRegimeBensSaveData } from '../../_data/GTBRegimeBens/GTBRegimeBensSaveData'; import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBRegimeBensSaveService(data: GTBRegimeBensInterface) { const response = await GTBRegimeBensSaveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoIndexService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoIndexService.ts index cd47d4f..9f5f192 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoIndexService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoIndexService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import GTBRegimeComunhaoIndexData from '../../_data/GTRegimeComunhao/GTBRegimeComunhaoIndexData'; async function executeGTBRegimeComunhaoIndexService() { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoRemoveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoRemoveService.ts index feae044..006a4c0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoRemoveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoRemoveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import GTBRegimeComunhaoRemoveData from '../../_data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData'; import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoSaveService.ts index 95a3f9f..cef3225 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoSaveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoSaveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import GTBRegimeComunhaoSaveData from '../../_data/GTRegimeComunhao/GTBRegimeComunhaoSaveData'; import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroIndexService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroIndexService.ts index 8a00007..62ab288 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroIndexService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroIndexService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBTipoLogradouroIndexData } from '../../_data/GTBTipoLogradouro/GTBTipoLogradouroIndexData'; async function executeGTBTipoLogradouroIndexService() { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroRemoveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroRemoveService.ts index 7ec6c49..0909e9e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroRemoveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroRemoveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBTipoLogradouroRemoveData } from '../../_data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData'; import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroSaveService.ts index 2a1614f..be04889 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroSaveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroSaveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBTipoLogradouroSaveData } from '../../_data/GTBTipoLogradouro/GTBTipoLogradouroSaveData'; import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecDeleteService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecDeleteService.ts index 8e93e85..6846f9e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecDeleteService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecDeleteService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TCensecDeleteData } from '../../_data/TCensec/TCensecDeleteData'; import TCensecInterface from '../../_interfaces/TCensecInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecIndexService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecIndexService.ts index 5c797d2..52971e0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecIndexService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecIndexService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TCensecIndexData } from '../../_data/TCensec/TCensecIndexData'; export default async function executeTCensecIndexService() { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecSaveService.ts index 08c5dc0..e3a2687 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecSaveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecSaveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TCensecSaveData } from '../../_data/TCensec/TCensecSaveData'; import TCensecInterface from '../../_interfaces/TCensecInterface'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoIndexService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoIndexService.ts index bfbf931..8398297 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoIndexService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoIndexService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; import { TCensecTipoAtoIndexData } from "../../_data/TCensecTipoAto/GMedidaTipoIndexData"; async function executeTCensecTipoAtoIndexService() { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoRemoveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoRemoveService.ts index ce87845..260bb69 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoRemoveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoRemoveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; import { TCensecTipoAtoRemoveData } from "../../_data/TCensecTipoAto/GMedidaTipoRemoveData"; import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoSaveService.ts index d7d2731..5a7a7b0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoSaveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoSaveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; import { TCensecTipoAtoSaveData } from "../../_data/TCensecTipoAto/GMedidaTipoSaveData"; import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioIndexService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioIndexService.ts index 12ac589..520435d 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioIndexService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioIndexService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TCensecNaturezaLitigioIndexData } from '../../_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData'; async function executeTCensecNaturezaLitigioIndexService() { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioRemoveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioRemoveService.ts index ea483ec..6387bff 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioRemoveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioRemoveService.ts @@ -1,6 +1,6 @@ import { TCensecNaturezaLitigioRemoveData } from '../../_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData'; import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecNaturezaLitigioRemoveService(data: TCensecNaturezaLitigioInterface) { const response = await TCensecNaturezaLitigioRemoveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioSaveService.ts index 5dc0136..1ab36a9 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioSaveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioSaveService.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TCensecNaturezaLitigioSaveData } from '../../_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData'; import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; diff --git a/src/app/(protected)/layout.tsx b/src/app/(protected)/layout.tsx index bc7c9f4..0e86ae0 100644 --- a/src/app/(protected)/layout.tsx +++ b/src/app/(protected)/layout.tsx @@ -2,7 +2,7 @@ import type { Metadata } from 'next'; import { Geist, Geist_Mono } from 'next/font/google'; import '../globals.css'; -import { ResponseProvider } from '../_response/ResponseContext'; +import { ResponseProvider } from '../../shared/components/response/ResponseContext'; import { AppSidebar } from '@/components/app-sidebar'; import { Breadcrumb, @@ -15,7 +15,7 @@ import { import { Separator } from '@/components/ui/separator'; import { SidebarInset, SidebarProvider, SidebarTrigger } from '@/components/ui/sidebar'; import { Toaster } from '@/components/ui/sonner'; -import Response from '../_response/response'; +import Response from '../../shared/components/response/response'; const geistSans = Geist({ variable: '--font-geist-sans', diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx index 5f9a2d0..4d1d164 100644 --- a/src/components/app-sidebar.tsx +++ b/src/components/app-sidebar.tsx @@ -31,7 +31,7 @@ import { SidebarRail, } from '@/components/ui/sidebar'; -import useGUsuarioGetJWTHook from '@/hooks/auth/useGUsuarioGetJWTHook'; +import useGUsuarioGetJWTHook from '@/shared/hooks/auth/useGUsuarioGetJWTHook'; import Image from 'next/image'; // This is sample data. diff --git a/src/components/login-form.tsx b/src/components/login-form.tsx index 32e16ba..5ce6fd0 100644 --- a/src/components/login-form.tsx +++ b/src/components/login-form.tsx @@ -10,7 +10,7 @@ import GUsuarioLoginService from '@/app/(protected)/(administrativo)/_services/g import { useForm } from 'react-hook-form'; import { useState } from 'react'; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from './ui/form'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { Button } from './ui/button'; import { GUsuarioLoginSchema } from '@/app/(protected)/(administrativo)/_schemas/GUsuarioLoginSchema'; diff --git a/src/components/nav-user.tsx b/src/components/nav-user.tsx index c9b8493..dfe7c20 100644 --- a/src/components/nav-user.tsx +++ b/src/components/nav-user.tsx @@ -18,8 +18,8 @@ import { useSidebar, } from '@/components/ui/sidebar'; -import GUsuarioAuthenticatedInterface from '@/interfaces/GUsuarioAuthenticatedInterface'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; +import GUsuarioAuthenticatedInterface from '@/shared/interfaces/GUsuarioAuthenticatedInterface'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useGUsuarioLogoutHook } from '@/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioLogoutHook'; import { use, useCallback, useState } from 'react'; diff --git a/src/packages/administrativo/components/TImovel/TImovelColumns.tsx b/src/packages/administrativo/components/TImovel/TImovelColumns.tsx index f1ae059..472a1bf 100644 --- a/src/packages/administrativo/components/TImovel/TImovelColumns.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelColumns.tsx @@ -6,8 +6,8 @@ import { PencilIcon, Trash2Icon, } from "lucide-react"; -import { FormatDateTime } from "@/actions/dateTime/FormatDateTime"; -import { FormatCEP } from "@/actions/CEP/FormatCEP"; +import { FormatDateTime } from "@/shared/actions/dateTime/FormatDateTime"; +import { FormatCEP } from "@/shared/actions/CEP/FormatCEP"; import { DropdownMenu, DropdownMenuContent, @@ -16,8 +16,8 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { ImovelTipoRegistro } from "@/enums/ImovelTipoRegistro"; -import { SortableHeader } from "@/app/_components/dataTable/SortableHeader"; +import { ImovelTipoRegistro } from "@/shared/enums/ImovelTipoRegistro"; +import { SortableHeader } from "@/shared/components/dataTable/SortableHeader"; export default function TImovelColumns( onEdit: (item: TImovelInterface, isEditingFormStatus: boolean) => void, diff --git a/src/packages/administrativo/components/TImovel/TImovelForm.tsx b/src/packages/administrativo/components/TImovel/TImovelForm.tsx index 5ef55a4..536b4ce 100644 --- a/src/packages/administrativo/components/TImovel/TImovelForm.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelForm.tsx @@ -22,18 +22,18 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { CheckIcon, ChevronsUpDownIcon, HouseIcon, IdCardIcon } from 'lucide-react'; import { Select, SelectContent, SelectItem, SelectTrigger } from '@/components/ui/select'; -import { ImovelTipoRegistro } from '@/enums/ImovelTipoRegistro'; -import { ImovelTipoClasseEnum } from '@/enums/ImovelTipoClasseEnum'; -import { ResetFormIfData } from '@/actions/form/ResetFormIfData'; +import { ImovelTipoRegistro } from '@/shared/enums/ImovelTipoRegistro'; +import { ImovelTipoClasseEnum } from '@/shared/enums/ImovelTipoClasseEnum'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; import { useGTBBairroReadHook } from '../../../../app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroReadHook'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@/components/ui/command'; import { cn } from '@/lib/utils'; -import GetCapitalize from '@/actions/text/GetCapitalize'; +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'; diff --git a/src/packages/administrativo/components/TImovel/TImovelIndex.tsx b/src/packages/administrativo/components/TImovel/TImovelIndex.tsx index 24ccde2..be55ec5 100644 --- a/src/packages/administrativo/components/TImovel/TImovelIndex.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelIndex.tsx @@ -2,17 +2,17 @@ import { useEffect, useState, useCallback } from 'react'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import { useTImovelIndexHook } from '@/packages/administrativo/hooks/TImovel/useTImovelIndexHook'; import { useTImovelSaveHook } from '@/packages/administrativo/hooks/TImovel/useTImovelSaveHook'; import { useTImovelDeleteHook } from '@/packages/administrativo/hooks/TImovel/useTImovelDeleteHook'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import TImovelInterface from '@/packages/administrativo/interfaces/TImovel/TImovelInterface'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; import { TImovelIndexInterface } from '../../interfaces/TImovel/TImovelIndexInterface'; import TImovelTable from './TImovelTable'; import TImovelForm from './TImovelForm'; diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx index 925f586..d996423 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx @@ -13,7 +13,7 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { SortableHeader } from "@/app/_components/dataTable/SortableHeader"; +import { SortableHeader } from "@/shared/components/dataTable/SortableHeader"; import { TImovelUnidadeRuralInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural"; export default function TImovelUnidadeColumns( diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx index a809d0b..3c3b7f2 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx @@ -22,17 +22,17 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; -import { ResetFormIfData } from '@/actions/form/ResetFormIfData'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; import { useGTBTipoLogradouroReadHook } from '@/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook'; import { TImovelUnidadeRuralFormInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralFormInterface'; import { useTImovelUnidadeRuralFormHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@/components/ui/command'; -import { ImovelTipoEnum } from '@/enums/ImovelTipoEnum'; +import { ImovelTipoEnum } from '@/shared/enums/ImovelTipoEnum'; import { cn } from '@/lib/utils'; -import { ImovelConstrucaoEnum } from '@/enums/ImovelConstrucaoEnum'; +import { ImovelConstrucaoEnum } from '@/shared/enums/ImovelConstrucaoEnum'; import { Checkbox } from '@/components/ui/checkbox'; export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TImovelUnidadeRuralFormInterface) { diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralPage.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralPage.tsx index b664e84..d41803b 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralPage.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralPage.tsx @@ -2,14 +2,14 @@ import { useEffect, useState, useCallback } from 'react'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import TImovelUnidadeTable from './TImovelUnidadeRuralTable'; import TImovelUnidadeRuralForm from './TImovelUnidadeRuralForm'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; import { useTImovelUnidadeRuralIndexHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralIndexHook'; import { useTImovelUnidadeRuralSaveHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralSaveHook'; import { useTImovelUnidadeRuralDeleteHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralDeleteHook'; diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx index 7372069..d618f39 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx @@ -13,7 +13,7 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { SortableHeader } from "@/app/_components/dataTable/SortableHeader"; +import { SortableHeader } from "@/shared/components/dataTable/SortableHeader"; import { TImovelUnidadeUrbanoInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface"; export default function TImovelUnidadeUrbanoColumns( diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx index c735a1f..7f9a48b 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx @@ -22,16 +22,16 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@/components/ui/command'; import { cn } from '@/lib/utils'; -import GetCapitalize from '@/actions/text/GetCapitalize'; -import { ResetFormIfData } from '@/actions/form/ResetFormIfData'; -import { parseNumberInput } from '@/actions/form/parseNumberInput'; -import { ImovelTipoEnum } from '@/enums/ImovelTipoEnum'; -import { ImovelConstrucaoEnum } from '@/enums/ImovelConstrucaoEnum'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; +import { ImovelTipoEnum } from '@/shared/enums/ImovelTipoEnum'; +import { ImovelConstrucaoEnum } from '@/shared/enums/ImovelConstrucaoEnum'; import { useGTBTipoLogradouroReadHook } from '@/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook'; import { useTImovelUnidadeUrbanoFormHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoFormHook'; import { TImovelUnidadeUrbanoFormInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoFormInterface'; diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoPage.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoPage.tsx index 28f5ed4..843feb4 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoPage.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoPage.tsx @@ -2,12 +2,12 @@ import { useEffect, useState, useCallback } from 'react'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; import { useTImovelUnidadeUrbanoIndexHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoIndexHook'; import { useTImovelUnidadeUrbanoSaveHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoSaveHook'; import { useTImovelUnidadeUrbanoDeleteHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoDeleteHook'; diff --git a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx index 120b85c..e12fac1 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx @@ -1,8 +1,8 @@ -import { FormatCPF } from "@/actions/CPF/FormatCPF"; -import { FormatDateTime } from "@/actions/dateTime/FormatDateTime"; -import { FormatPhone } from "@/actions/phone/FormatPhone"; -import GetNameInitials from "@/actions/text/GetNameInitials"; -import empty from "@/actions/validations/empty"; +import { FormatCPF } from "@/shared/actions/CPF/FormatCPF"; +import { FormatDateTime } from "@/shared/actions/dateTime/FormatDateTime"; +import { FormatPhone } from "@/shared/actions/phone/FormatPhone"; +import GetNameInitials from "@/shared/actions/text/GetNameInitials"; +import empty from "@/shared/actions/validations/empty"; import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; import TPessoaFisicaInterface from "@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface"; diff --git a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx index 372e784..965f093 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx @@ -22,7 +22,7 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { Select, @@ -31,9 +31,9 @@ import { SelectTrigger, } from '@/components/ui/select'; import { CheckIcon, ChevronsUpDownIcon, HouseIcon, IdCardIcon, UserIcon } from 'lucide-react'; -import { Sexo } from '@/enums/SexoEnum'; +import { Sexo } from '@/shared/enums/SexoEnum'; import { useGTBEstadoCivilReadHook } from '../../../../../app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilReadHook'; -import GetCapitalize from '@/actions/text/GetCapitalize'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; import { useGTBRegimeComunhaoReadHook } from '../../../../../app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoReadHook'; import { useGTBProfissaoReadHook } from '../../../../../app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; @@ -48,7 +48,7 @@ import { import { cn } from '@/lib/utils'; import TPessoaFisicaFormInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaFormInterface'; import { useTPessoaFisicaFormHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaFormHook'; -import { ResetFormIfData } from '@/actions/form/ResetFormIfData'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; export default function TPessoaFisicaForm({ isOpen, diff --git a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx index 86bbf67..b508cba 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState, useCallback } from 'react'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import TPessoaTable from '@/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaTable'; import TPessoaForm from '@/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm'; @@ -10,11 +10,11 @@ import { useTPessoaFisicaIndexHook } from '@/packages/administrativo/hooks/TPess import { useTPessoaFisicaSaveHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaSaveHook'; import { useTPessoaFisicaDeleteHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaDeleteHook'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; export default function TPessoaFisicaIndex() { // Controle de estado do botão diff --git a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx index 9adc96c..85b18fe 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx @@ -1,7 +1,7 @@ -import { FormatCNPJ } from "@/actions/CNPJ/FormatCNPJ"; -import { FormatDateTime } from "@/actions/dateTime/FormatDateTime"; -import { FormatPhone } from "@/actions/phone/FormatPhone"; -import empty from "@/actions/validations/empty"; +import { FormatCNPJ } from "@/shared/actions/CNPJ/FormatCNPJ"; +import { FormatDateTime } from "@/shared/actions/dateTime/FormatDateTime"; +import { FormatPhone } from "@/shared/actions/phone/FormatPhone"; +import empty from "@/shared/actions/validations/empty"; import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; import TPessoaJuridicaInterface from "@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface"; diff --git a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx index 4dcfea5..c0ba391 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx @@ -22,7 +22,7 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { HouseIcon, IdCardIcon, UserIcon } from 'lucide-react'; import { Textarea } from '@/components/ui/textarea'; diff --git a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx index d96dd1c..19eac5e 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx @@ -2,16 +2,16 @@ import React, { useEffect, useState, useCallback } from 'react'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import { useTPessoaJuridicaSaveHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaSaveHook'; import { useTPessoaJuridicaDeleteHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaDeleteHook'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import TPessoaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaInterface'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; import TPessoaJuridicaTable from '@/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaTable'; import { useTPessoaJuridicaIndexHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaIndexHook'; import TPessoaJuridicaForm from '@/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm'; diff --git a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx index a25ecff..16220e7 100644 --- a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx +++ b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx @@ -26,7 +26,7 @@ import { import { Input } from '@/components/ui/input'; import { TPessoaSchema } from '../../schemas/TPessoa/TPessoaSchema'; -import LoadingButton from '@/app/_components/loadingButton/LoadingButton'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { Select, @@ -46,9 +46,9 @@ import { Trash2Icon, UserIcon, } from 'lucide-react'; -import { Sexo } from '@/enums/SexoEnum'; +import { Sexo } from '@/shared/enums/SexoEnum'; import { useGTBEstadoCivilReadHook } from '../../../../app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilReadHook'; -import GetCapitalize from '@/actions/text/GetCapitalize'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; import { useGTBRegimeComunhaoReadHook } from '../../../../app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoReadHook'; import { useGTBProfissaoReadHook } from '../../../../app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; @@ -64,10 +64,10 @@ import { cn } from '@/lib/utils'; import TPessoaTable from '../TPessoa/TPessoaFisica/TPessoaFisicaTable'; import TPessoaInterface from '../../interfaces/TPessoa/TPessoaInterface'; import { ColumnDef } from '@tanstack/react-table'; -import GetNameInitials from '@/actions/text/GetNameInitials'; -import empty from '@/actions/validations/empty'; -import { FormatCPF } from '@/actions/CPF/FormatCPF'; -import { FormatPhone } from '@/actions/phone/FormatPhone'; +import GetNameInitials from '@/shared/actions/text/GetNameInitials'; +import empty from '@/shared/actions/validations/empty'; +import { FormatCPF } from '@/shared/actions/CPF/FormatCPF'; +import { FormatPhone } from '@/shared/actions/phone/FormatPhone'; import { DropdownMenu, DropdownMenuGroup, @@ -80,7 +80,7 @@ import { DataTable } from '@/app/_components/dataTable/DataTable'; import { Checkbox } from '@/components/ui/checkbox'; import { useTPessoaFisicaIndexHook } from '../../hooks/TPessoa/TPessoaFisica/useTPessoaFisicaIndexHook'; import { useTPessoaRepresentanteFormHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteFormHook'; -import { ResetFormIfData } from '@/actions/form/ResetFormIfData'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; type FormValues = z.infer; diff --git a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx index 99a023e..a271071 100644 --- a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx +++ b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx @@ -2,19 +2,19 @@ import React, { useEffect, useState, useCallback } from 'react'; -import Loading from '@/app/_components/loading/loading'; +import Loading from '@/shared/components/loading/loading'; import TPessoaForm from '../TPessoa/TPessoaFisica/TPessoaFisicaForm'; import { useTPessoaRepresentanteIndexHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook'; import { useTPessoaRepresentanteSaveHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteSaveHook'; import { useTPessoaRepresentanteDeleteHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteDeleteHook'; -import ConfirmDialog from '@/app/_components/confirm_dialog/ConfirmDialog'; -import { useConfirmDialog } from '@/app/_components/confirm_dialog/useConfirmDialog'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import TPessoaInterface from '../../interfaces/TPessoa/TPessoaInterface'; import TPessoaRepresentanteTable from './TPessoaRepresentanteTable'; -import Header from '@/app/_components/structure/Header'; +import Header from '@/shared/components/structure/Header'; import TPessoaRepresentanteForm from './TPessoaRepresentanteForm'; export default function TPessoaRepresentantePage() { diff --git a/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts b/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts index 23a6553..01fff3f 100644 --- a/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts +++ b/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; import TImovelInterface from "../../interfaces/TImovel/TImovelInterface"; async function executeTImovelDeleteData(data: TImovelInterface) { diff --git a/src/packages/administrativo/data/TImovel/TImovelIndexData.ts b/src/packages/administrativo/data/TImovel/TImovelIndexData.ts index c8eb517..e6132c3 100644 --- a/src/packages/administrativo/data/TImovel/TImovelIndexData.ts +++ b/src/packages/administrativo/data/TImovel/TImovelIndexData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; async function executeTImovelIndexData() { diff --git a/src/packages/administrativo/data/TImovel/TImovelSaveData.ts b/src/packages/administrativo/data/TImovel/TImovelSaveData.ts index e7d26e8..77267a4 100644 --- a/src/packages/administrativo/data/TImovel/TImovelSaveData.ts +++ b/src/packages/administrativo/data/TImovel/TImovelSaveData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; import TImovelInterface from "../../interfaces/TImovel/TImovelInterface"; async function executeTImovelSaveData(data: TImovelInterface) { diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts index 99812d0..f7ffa20 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; import { TImovelUnidadeRuralInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural"; async function executeTImovelUnidadeRuralDeleteData(data: TImovelUnidadeRuralInterface) { diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexData.ts index f92661e..8ddfd2c 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; async function executeTImovelUnidadeRuralIndexData() { diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts index 2574f85..d63d21b 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; import { TImovelUnidadeRuralInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural"; async function executeTImovelUnidadeRuralDeleteData(data: TImovelUnidadeRuralInterface) { diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts index 20dc2c8..f4f7a88 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; import { TImovelUnidadeUrbanoInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface"; async function executeTImovelUnidadeUrbanoDeleteData(data: TImovelUnidadeUrbanoInterface) { diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexData.ts index 12079c9..f551301 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; async function executeTImovelUnidadeUrbanoIndexData() { diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts index d785c77..852378a 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; import { TImovelUnidadeUrbanoInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface"; async function executeTImovelUnidadeUrbanoSaveData(data: TImovelUnidadeUrbanoInterface) { diff --git a/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaIndexData.ts b/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaIndexData.ts index e8cf67a..1e674b0 100644 --- a/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaIndexData.ts +++ b/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaIndexData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTPessoaFisicaIndexData() { return Promise.resolve({ diff --git a/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaRemoveData.ts b/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaRemoveData.ts index 9a3a474..bfda1d0 100644 --- a/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaRemoveData.ts +++ b/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaRemoveData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTPessoaFisicaRemoveData() { return Promise.resolve({ diff --git a/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaSaveData.ts b/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaSaveData.ts index 5a73586..2b91fe4 100644 --- a/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaSaveData.ts +++ b/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaSaveData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; async function executeTPessoaFisicaSaveData(data: TPessoaFisicaInterface) { diff --git a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexData.ts b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexData.ts index 4dd4e32..fe6c8fa 100644 --- a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexData.ts +++ b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTPessoaJuridicaIndexData() { return Promise.resolve({ diff --git a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveData.ts b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveData.ts index 7c4e280..2ba9f69 100644 --- a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveData.ts +++ b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; async function executeTPessoaJuridicaRemoveData(data: TPessoaJuridicaInterface) { diff --git a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveData.ts b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveData.ts index e6937b9..b911ab0 100644 --- a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveData.ts +++ b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; async function executeTPessoaJuridicaSaveData(data: TPessoaJuridicaInterface) { diff --git a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts index 193468e..8b51a46 100644 --- a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts +++ b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTPessoaRepresentanteIndexData() { return Promise.resolve({ diff --git a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts index 43c437e..2b8243f 100644 --- a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts +++ b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; async function executeTPessoaRepresentanteIndexData(data: TPessoaRepresentanteInterface) { diff --git a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts index aff24ad..d10cad2 100644 --- a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts +++ b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts @@ -1,4 +1,4 @@ -import { withClientErrorHandler } from '@/actions/withClientErrorHandler/withClientErrorHandler'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; async function executeTPessoaRepresentanteSaveData(data: TPessoaRepresentanteInterface) { diff --git a/src/packages/administrativo/data/components/TImovel/TImovelColumns.tsx b/src/packages/administrativo/data/components/TImovel/TImovelColumns.tsx new file mode 100644 index 0000000..482a014 --- /dev/null +++ b/src/packages/administrativo/data/components/TImovel/TImovelColumns.tsx @@ -0,0 +1,125 @@ +import { ColumnDef } from "@tanstack/react-table"; +import TImovelInterface from "../../../interfaces/TImovel/TImovelInterface"; +import { Button } from "@/components/ui/button"; +import { + EllipsisIcon, + PencilIcon, + Trash2Icon, +} from "lucide-react"; +import { FormatDateTime } from "@/shared/actions/dateTime/FormatDateTime"; +import { FormatCEP } from "@/shared/actions/CEP/FormatCEP"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; +import { ImovelTipoRegistro } from "@/shared/enums/ImovelTipoRegistro"; +import { SortableHeader } from "@/shared/components/dataTable/SortableHeader"; + +export default function TImovelColumns( + onEdit: (item: TImovelInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: TImovelInterface, isEditingFormStatus: boolean) => void +): ColumnDef[] { + return [ + // ID + { + accessorKey: "imovel_id", + header: ({ column }) => SortableHeader("#", column), + cell: ({ row }) => Number(row.getValue("imovel_id")), + enableSorting: false, + }, + + // Tipo Registro + { + accessorKey: "tipo_registro", + header: ({ column }) => SortableHeader("Tipo Registro", column), + cell: ({ row }) => { + const value = row.getValue("tipo_registro") as keyof typeof ImovelTipoRegistro; + return ImovelTipoRegistro[value] ?? value; + }, + }, + + // Número + { + accessorKey: "numero", + header: ({ column }) => SortableHeader("Número", column), + cell: ({ row }) => row.getValue("numero"), + }, + + // UF / Cidade / Bairro + { + id: "uf_cidade_bairro", + accessorFn: (row) => row, + header: ({ column }) => SortableHeader("Cidade / UF / Bairro", column), + cell: ({ row }) => { + const imovel = row.original; + return ( +
+ + {imovel.cidade}/{imovel.uf} + + {imovel.gtb_descricao} +
+ ); + }, + sortingFn: (a, b) => + (a.original.cartorio?.toLowerCase() || "").localeCompare( + b.original.cartorio?.toLowerCase() || "" + ), + }, + + // CEP + { + accessorKey: "cep", + header: ({ column }) => SortableHeader("CEP", column), + cell: ({ row }) => FormatCEP(row.getValue("cep")), + }, + + // Data de Registro + { + accessorKey: "data_registro", + header: ({ column }) => SortableHeader("Cadastro", column), + cell: ({ row }) => FormatDateTime(row.getValue("data_registro")), + sortingFn: "datetime", + }, + + // Ações + { + id: "actions", + header: "Ações", + cell: ({ row }) => { + const imovel = row.original; + return ( + + + + + + + onEdit(imovel, true)}> + + Editar + + + onDelete(imovel, true)} + > + + Remover + + + + + ); + }, + enableSorting: false, + enableHiding: false, + }, + ]; +} diff --git a/src/packages/administrativo/data/components/TImovel/TImovelForm.tsx b/src/packages/administrativo/data/components/TImovel/TImovelForm.tsx new file mode 100644 index 0000000..77261b2 --- /dev/null +++ b/src/packages/administrativo/data/components/TImovel/TImovelForm.tsx @@ -0,0 +1,384 @@ +'use client'; + +import React, { useEffect } from 'react'; + +import { Button } from '@/components/ui/button'; +import { + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog'; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from '@/components/ui/form'; +import { Input } from '@/components/ui/input'; + +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import { CheckIcon, ChevronsUpDownIcon, HouseIcon, IdCardIcon } from 'lucide-react'; +import { Select, SelectContent, SelectItem, SelectTrigger } from '@/components/ui/select'; +import { ImovelTipoRegistro } from '@/shared/enums/ImovelTipoRegistro'; +import { ImovelTipoClasseEnum } from '@/shared/enums/ImovelTipoClasseEnum'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import { useGTBBairroReadHook } from '../../../../../app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroReadHook'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@/components/ui/command'; +import { cn } from '@/lib/utils'; +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'; + +export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoading, tipoClasse }: TImovelFormInterface) { + + const { gTBBairro, fetchGTBBairro } = useGTBBairroReadHook(); + + // Inicializa o react-hook-form com schema zod + const form = useTImovelFormHook(); + + // Atualiza o formulário quando recebe dados para edição + useEffect(() => { + + // Se existir dados, reseta o formulário com os mesmos + ResetFormIfData(form, data); + + // Função sincrona para carregamento de dados + async function loadData() { + + // Busca os bairros + await fetchGTBBairro(); + + } + + // Executa a função + loadData(); + + }, [data, form]); + + return ( + { + if (!open) onClose(null, false); + }} + > + + + + Imóvel Urbano + + + Cadastro de imóvel urbano + + +
+ + {/* Tabs */} + + + + + Dados do Imóvel + + + + Unidades + + + {/* Dados do Imóvel */} + +
+ {/* UF */} +
+ ( + + UF + + + + + + )} + /> +
+ {/* CEP */} +
+ ( + + CEP + + + + + + )} + /> +
+ {/* Cidade */} +
+ ( + + Cidade + + + + + + )} + /> +
+ {/* Bairro */} +
+ { + const [open, setOpen] = React.useState(false); + return ( + + Bairro + + + + + + + + + + + Nenhum resultado encontrado. + + {gTBBairro?.map((item) => ( + { + field.onChange(Number(item.tb_bairro_id)); + setOpen(false); + }} + > + + {GetCapitalize(item.descricao)} + + ))} + + + + + + + + ); + }} + /> +
+ {/* Cartório */} +
+ ( + + Cartório + + + + + + )} + /> +
+ {/* CNS */} +
+ ( + + CNS + + + + + + )} + /> +
+ {/* Livro */} +
+ ( + + Livro + + + + + + )} + /> +
+ {/* Tipo Registro */} +
+ ( + + Tipo Registro + + + + + + )} + /> +
+ {/* Número */} +
+ ( + + Número + + + + + + )} + /> +
+ {/* Número Letra */} +
+ ( + + Número Letra + + + + + + )} + /> +
+ {/* Tipo Registro */} +
+ ( + + Tipo Classe + + + + + + )} + /> +
+
+
+ {/* Unidades */} + + {/* Conteúdo das unidades */} + {tipoClasse === 1 ? : null} + {/* Conteúdo das unidades */} + {tipoClasse === 3 ? : null} + +
+ {/* Rodapé do Dialog */} + + + + + + + {/* Campo oculto */} + +
+ +
+
+ ); +} \ No newline at end of file diff --git a/src/packages/administrativo/data/components/TImovel/TImovelIndex.tsx b/src/packages/administrativo/data/components/TImovel/TImovelIndex.tsx new file mode 100644 index 0000000..8e27bb4 --- /dev/null +++ b/src/packages/administrativo/data/components/TImovel/TImovelIndex.tsx @@ -0,0 +1,170 @@ +'use client'; + +import { useEffect, useState, useCallback } from 'react'; + +import Loading from '@/shared/components/loading/loading'; + +import { useTImovelIndexHook } from '@/packages/administrativo/hooks/TImovel/useTImovelIndexHook'; +import { useTImovelSaveHook } from '@/packages/administrativo/hooks/TImovel/useTImovelSaveHook'; +import { useTImovelDeleteHook } from '@/packages/administrativo/hooks/TImovel/useTImovelDeleteHook'; + +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; + +import TImovelInterface from '@/packages/administrativo/interfaces/TImovel/TImovelInterface'; +import Header from '@/shared/components/structure/Header'; +import { TImovelIndexInterface } from '../../../interfaces/TImovel/TImovelIndexInterface'; +import TImovelTable from './TImovelTable'; +import TImovelForm from './TImovelForm'; + +export default function TImovelIndex({ pageTitle, pageDescription, tipoClasse }: TImovelIndexInterface) { + + // Controle de estado do botão + const [buttonIsLoading, setButtonIsLoading] = useState(false); + + // Hooks para leitura e salvamento + const { tImovel, indexTImovel } = useTImovelIndexHook(); + const { saveTImovel } = useTImovelSaveHook(); + const { deleteTImovel } = useTImovelDeleteHook(); + + // Estados + const [selectedAndamento, setSelectedAndamento] = useState(null); + const [isFormOpen, setIsFormOpen] = useState(false); + + // Estado para saber qual item será deletado + const [itemToDelete, setItemToDelete] = useState(null); + + /** + * Hook do modal de confirmação + */ + const { + isOpen: isConfirmOpen, + openDialog: openConfirmDialog, + handleConfirm, + handleCancel, + } = useConfirmDialog(); + + /** + * Abre o formulário no modo de edição ou criação + */ + const handleOpenForm = useCallback((data: TImovelInterface | null) => { + setSelectedAndamento(data); + setIsFormOpen(true); + }, []); + + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback(() => { + setSelectedAndamento(null); + setIsFormOpen(false); + }, []); + + /** + * Salva os dados do formulário + */ + const handleSave = useCallback( + async (formData: TImovelInterface) => { + // Coloca o botão em estado de loading + setButtonIsLoading(true); + + // Aguarda salvar o registro + await saveTImovel(formData); + + // Remove o botão em estado de loading + setButtonIsLoading(false); + + // Atualiza a lista de dados + indexTImovel(); + }, + [saveTImovel, indexTImovel, handleCloseForm], + ); + + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: TImovelInterface) => { + // Define o item atual para remoção + setItemToDelete(item); + + // Abre o modal de confirmação + openConfirmDialog(); + }, + [openConfirmDialog], + ); + + /** + * Executa a exclusão de fato quando o usuário confirma + */ + const handleDelete = useCallback(async () => { + // Protege contra null + if (!itemToDelete) return; + + // Executa o Hook de remoção + await deleteTImovel(itemToDelete); + + // Atualiza a lista + await indexTImovel(); + + // Limpa o item selecionado + setItemToDelete(null); + + // Fecha o modal + handleCancel(); + }, [itemToDelete, indexTImovel, handleCancel]); + + /** + * Busca inicial dos dados + */ + useEffect(() => { + indexTImovel(); + }, []); + + /** + * Tela de loading enquanto carrega os dados + */ + if (tImovel?.length == 0) { + return ; + } + + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> + {/* Tabela de andamentos */} + + {/* Modal de confirmação */} + + {/* Formulário de criação/edição */} + +
+ ); +} diff --git a/src/packages/administrativo/data/components/TImovel/TImovelTable.tsx b/src/packages/administrativo/data/components/TImovel/TImovelTable.tsx new file mode 100644 index 0000000..43ce94e --- /dev/null +++ b/src/packages/administrativo/data/components/TImovel/TImovelTable.tsx @@ -0,0 +1,22 @@ +'use client'; + +import { DataTable } from '@/app/_components/dataTable/DataTable'; +import TImovelColumns from './TImovelColumns'; +import TImovelTableInterface from '../../../interfaces/TImovel/TImovelTabelInterface'; + +/** + * Componente principal da tabela + */ +export default function TImovelTable({ data, onEdit, onDelete }: TImovelTableInterface) { + const columns = TImovelColumns(onEdit, onDelete); + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx new file mode 100644 index 0000000..d996423 --- /dev/null +++ b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx @@ -0,0 +1,90 @@ +import { ColumnDef } from "@tanstack/react-table"; +import { Button } from "@/components/ui/button"; +import { + EllipsisIcon, + PencilIcon, + Trash2Icon, +} from "lucide-react"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; +import { SortableHeader } from "@/shared/components/dataTable/SortableHeader"; +import { TImovelUnidadeRuralInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural"; + +export default function TImovelUnidadeColumns( + onEdit: (item: TImovelUnidadeRuralInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: TImovelUnidadeRuralInterface, isEditingFormStatus: boolean) => void +): ColumnDef[] { + return [ + // ID + { + accessorKey: "imovel_unidade_id", + header: ({ column }) => SortableHeader("#", column), + cell: ({ row }) => Number(row.getValue("imovel_unidade_id")), + }, + // Número da Unidade + { + accessorKey: "numero_unidade", + header: ({ column }) => SortableHeader("Número da Unidade", column), + cell: ({ row }) => row.getValue("numero_unidade"), + }, + // Quadra + { + accessorKey: "quadra", + header: ({ column }) => SortableHeader("Quadra", column), + cell: ({ row }) => row.getValue("quadra"), + }, + // Area + { + accessorKey: "area", + header: ({ column }) => SortableHeader("Área", column), + cell: ({ row }) => row.getValue("area"), + }, + // Logradouros + { + accessorKey: "logradouro", + header: ({ column }) => SortableHeader("Logradouro", column), + cell: ({ row }) => row.getValue("logradouro"), + }, + // Ações + { + id: "actions", + header: "Ações", + cell: ({ row }) => { + const imovel = row.original; + return ( + + + + + + + onEdit(imovel, true)}> + + Editar + + + onDelete(imovel, true)} + > + + Remover + + + + + ); + }, + enableSorting: false, + enableHiding: false, + }, + ]; +} diff --git a/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx new file mode 100644 index 0000000..3c3b7f2 --- /dev/null +++ b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx @@ -0,0 +1,379 @@ +'use client'; + +import React, { useEffect } from 'react'; + +import { Button } from '@/components/ui/button'; +import { + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog'; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from '@/components/ui/form'; +import { Input } from '@/components/ui/input'; + +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import { useGTBTipoLogradouroReadHook } from '@/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook'; +import { TImovelUnidadeRuralFormInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralFormInterface'; +import { useTImovelUnidadeRuralFormHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@/components/ui/command'; +import { ImovelTipoEnum } from '@/shared/enums/ImovelTipoEnum'; +import { cn } from '@/lib/utils'; +import { ImovelConstrucaoEnum } from '@/shared/enums/ImovelConstrucaoEnum'; +import { Checkbox } from '@/components/ui/checkbox'; + +export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TImovelUnidadeRuralFormInterface) { + + const { gTBTipoLogradouro, fetchGTBTipoLogradouro } = useGTBTipoLogradouroReadHook(); + + // Inicializa o react-hook-form com schema zod + const form = useTImovelUnidadeRuralFormHook(); + + // Atualiza o formulário quando recebe dados para edição + useEffect(() => { + + // Se existir dados, reseta o formulário com os mesmos + ResetFormIfData(form, data); + + // Carregamento de dados iniciais + async function loadData() { + + // Carrega o tipo de logradouro + await fetchGTBTipoLogradouro(); + + } + + // Executa a função + loadData(); + + }, [data, form]); + + return ( + { + if (!open) onClose(null, false); + }} + > + + + + Unidades do Imóvel + + + Cadastro de unidades do imóvel + + +
+ +
+ {/* Tipo Imóvel */} +
+ { + const [open, setOpen] = React.useState(false); + // transforma o objeto em um array [{value, label}] + const options = Object.entries(ImovelTipoEnum).map(([id, label]) => ({ + value: Number(id), + label, + })); + return ( + + Tipo Imóvel + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); // salva o número (id) + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + + + ); + }} + /> +
+ {/* Construção */} +
+ { + const [open, setOpen] = React.useState(false); + const options = Object.entries(ImovelConstrucaoEnum).map(([id, label]) => ({ + value: Number(id), + label, + })); + return ( + + Construção + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + + + ); + }} + /> +
+ {/* Nome Identificação */} +
+ ( + + + Nome Identificação + + + + + + + )} + /> +
+ {/* Nome Denominação */} +
+ ( + + + Denominação + + + + + + + )} + /> +
+ {/* Area Descritiva */} +
+ ( + + + Área Descritiva + + + + + + + )} + /> +
+ {/* CCIR (Incra) */} +
+ ( + + + CCIR (Incra) + + + + + + + )} + /> +
+ {/* Nirf */} +
+ ( + + + NIRF + + + + + + + )} + /> +
+ {/* Geo Referenciamento */} +
+ ( + +
+ + + + + Geo Referenciamento + +
+ +
+ )} + /> +
+ {/* Reserva Florestal */} +
+ ( + +
+ + + + + Reserva Florestal + +
+ +
+ )} + /> +
+ {/* Campo oculto */} + + +
+ {/* Rodapé do Dialog */} + + + + + + +
+ +
+
+ ); +} diff --git a/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralPage.tsx b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralPage.tsx new file mode 100644 index 0000000..d41803b --- /dev/null +++ b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralPage.tsx @@ -0,0 +1,165 @@ +'use client'; + +import { useEffect, useState, useCallback } from 'react'; + +import Loading from '@/shared/components/loading/loading'; +import TImovelUnidadeTable from './TImovelUnidadeRuralTable'; +import TImovelUnidadeRuralForm from './TImovelUnidadeRuralForm'; + +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; + +import Header from '@/shared/components/structure/Header'; +import { useTImovelUnidadeRuralIndexHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralIndexHook'; +import { useTImovelUnidadeRuralSaveHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralSaveHook'; +import { useTImovelUnidadeRuralDeleteHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralDeleteHook'; +import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; + +export default function TImovelUnidadePage() { + // Controle de estado do botão + const [buttonIsLoading, setButtonIsLoading] = useState(false); + + // Hooks para leitura e salvamento + const { tImovelUnidadeRural, indexTImovelUnidadeRural } = useTImovelUnidadeRuralIndexHook(); + const { saveTImovelUnidadeRural } = useTImovelUnidadeRuralSaveHook(); + const { deleteTImovelUnidadeRural } = useTImovelUnidadeRuralDeleteHook(); + + // Estados + const [selectedAndamento, setSelectedAndamento] = useState(null); + const [isFormOpen, setIsFormOpen] = useState(false); + + // Estado para saber qual item será deletado + const [itemToDelete, setItemToDelete] = useState(null); + + /** + * Hook do modal de confirmação + */ + const { + isOpen: isConfirmOpen, + openDialog: openConfirmDialog, + handleConfirm, + handleCancel, + } = useConfirmDialog(); + + /** + * Abre o formulário no modo de edição ou criação + */ + const handleOpenForm = useCallback((data: TImovelUnidadeRuralInterface | null) => { + setSelectedAndamento(data); + setIsFormOpen(true); + }, []); + + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback(() => { + setSelectedAndamento(null); + setIsFormOpen(false); + }, []); + + /** + * Salva os dados do formulário + */ + const handleSave = useCallback( + async (formData: TImovelUnidadeRuralInterface) => { + // Coloca o botão em estado de loading + setButtonIsLoading(true); + + // Aguarda salvar o registro + await saveTImovelUnidadeRural(formData); + + // Remove o botão em estado de loading + setButtonIsLoading(false); + + // Atualiza a lista de dados + indexTImovelUnidadeRural(); + }, + [saveTImovelUnidadeRural, indexTImovelUnidadeRural, handleCloseForm], + ); + + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: TImovelUnidadeRuralInterface) => { + // Define o item atual para remoção + setItemToDelete(item); + + // Abre o modal de confirmação + openConfirmDialog(); + }, + [openConfirmDialog], + ); + + /** + * Executa a exclusão de fato quando o usuário confirma + */ + const handleDelete = useCallback(async () => { + // Protege contra null + if (!itemToDelete) return; + + // Executa o Hook de remoção + await deleteTImovelUnidadeRural(itemToDelete); + + // Atualiza a lista + await indexTImovelUnidadeRural(); + + // Limpa o item selecionado + setItemToDelete(null); + + // Fecha o modal + handleCancel(); + }, [itemToDelete, indexTImovelUnidadeRural, handleCancel]); + + /** + * Busca inicial dos dados + */ + useEffect(() => { + indexTImovelUnidadeRural(); + }, []); + + /** + * Tela de loading enquanto carrega os dados + */ + if (tImovelUnidadeRural?.length == 0) { + return ; + } + + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> + {/* Tabela de andamentos */} + + {/* Modal de confirmação */} + + {/* Formulário de criação/edição */} + +
+ ); +} diff --git a/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTable.tsx b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTable.tsx new file mode 100644 index 0000000..3ab07c7 --- /dev/null +++ b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTable.tsx @@ -0,0 +1,22 @@ +'use client'; + +import { DataTable } from '@/app/_components/dataTable/DataTable'; +import TImovelUnidadeColumns from './TImovelUnidadeRuralColumns'; +import TImovelUnidadeRuralTableInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTableInterface'; + +/** + * Componente principal da tabela + */ +export default function TImovelUnidadeTable({ data, onEdit, onDelete }: TImovelUnidadeRuralTableInterface) { + const columns = TImovelUnidadeColumns(onEdit, onDelete); + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx new file mode 100644 index 0000000..d618f39 --- /dev/null +++ b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx @@ -0,0 +1,90 @@ +import { ColumnDef } from "@tanstack/react-table"; +import { Button } from "@/components/ui/button"; +import { + EllipsisIcon, + PencilIcon, + Trash2Icon, +} from "lucide-react"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; +import { SortableHeader } from "@/shared/components/dataTable/SortableHeader"; +import { TImovelUnidadeUrbanoInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface"; + +export default function TImovelUnidadeUrbanoColumns( + onEdit: (item: TImovelUnidadeUrbanoInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: TImovelUnidadeUrbanoInterface, isEditingFormStatus: boolean) => void +): ColumnDef[] { + return [ + // ID + { + accessorKey: "imovel_unidade_id", + header: ({ column }) => SortableHeader("#", column), + cell: ({ row }) => Number(row.getValue("imovel_unidade_id")), + }, + // Número da Unidade + { + accessorKey: "numero_unidade", + header: ({ column }) => SortableHeader("Número da Unidade", column), + cell: ({ row }) => row.getValue("numero_unidade"), + }, + // Quadra + { + accessorKey: "quadra", + header: ({ column }) => SortableHeader("Quadra", column), + cell: ({ row }) => row.getValue("quadra"), + }, + // Area + { + accessorKey: "area", + header: ({ column }) => SortableHeader("Área", column), + cell: ({ row }) => row.getValue("area"), + }, + // Logradouros + { + accessorKey: "logradouro", + header: ({ column }) => SortableHeader("Logradouro", column), + cell: ({ row }) => row.getValue("logradouro"), + }, + // Ações + { + id: "actions", + header: "Ações", + cell: ({ row }) => { + const imovel = row.original; + return ( + + + + + + + onEdit(imovel, true)}> + + Editar + + + onDelete(imovel, true)} + > + + Remover + + + + + ); + }, + enableSorting: false, + enableHiding: false, + }, + ]; +} diff --git a/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx new file mode 100644 index 0000000..7f9a48b --- /dev/null +++ b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx @@ -0,0 +1,538 @@ +'use client'; + +import React, { useEffect } from 'react'; + +import { Button } from '@/components/ui/button'; +import { + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog'; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from '@/components/ui/form'; +import { Input } from '@/components/ui/input'; + +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@/components/ui/command'; +import { cn } from '@/lib/utils'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; +import { ImovelTipoEnum } from '@/shared/enums/ImovelTipoEnum'; +import { ImovelConstrucaoEnum } from '@/shared/enums/ImovelConstrucaoEnum'; +import { useGTBTipoLogradouroReadHook } from '@/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook'; +import { useTImovelUnidadeUrbanoFormHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoFormHook'; +import { TImovelUnidadeUrbanoFormInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoFormInterface'; + +export default function TImovelUnidadeUrbanoForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TImovelUnidadeUrbanoFormInterface) { + + const { gTBTipoLogradouro, fetchGTBTipoLogradouro } = useGTBTipoLogradouroReadHook(); + + // Inicializa o react-hook-form com schema zod + const form = useTImovelUnidadeUrbanoFormHook(); + + // Atualiza o formulário quando recebe dados para edição + useEffect(() => { + + // Se existir dados, reseta o formulário com os mesmos + ResetFormIfData(form, data); + + // Carregamento de dados iniciais + async function loadData() { + + // Carrega o tipo de logradouro + await fetchGTBTipoLogradouro(); + + } + + // Executa a função + loadData(); + + }, [data, form]); + + return ( + { + if (!open) onClose(null, false); + }} + > + + + + UnidadeUrbanos do Imóvel + + + Cadastro de unidades do imóvel + + +
+ +
+ {/* Quadra */} +
+ ( + + Quadra + + + + + + )} + /> +
+ {/* Lote */} +
+ ( + + Lote + + + + + + )} + /> +
+ {/* Area */} +
+ ( + + Área(m2) + + field.onChange(parseNumberInput(e))} + /> + + + + )} + /> +
+ {/* Inscrição Municipal */} +
+ ( + + Inscrição Municipal + + + + + + )} + /> +
+ {/* Tipo Logradouro */} +
+ { + const [open, setOpen] = React.useState(false); + return ( + + Tipo logradouro + + + + + + + + + + + Nenhum resultado encontrado. + + {gTBTipoLogradouro?.map((item) => ( + { + field.onChange(Number(item.tb_tipologradouro_id)); + setOpen(false); + }} + > + + {GetCapitalize(item.descricao)} + + ))} + + + + + + + + ); + }} + /> +
+ {/* Logradouro */} +
+ ( + + Logradouro + + + + + + )} + /> +
+ {/* Tipo Imóvel */} +
+ { + const [open, setOpen] = React.useState(false); + // transforma o objeto em um array [{value, label}] + const options = Object.entries(ImovelTipoEnum).map(([id, label]) => ({ + value: Number(id), + label, + })); + return ( + + Tipo Imóvel + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); // salva o número (id) + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + + + ); + }} + /> +
+ {/* Construção */} +
+ { + const [open, setOpen] = React.useState(false); + const options = Object.entries(ImovelConstrucaoEnum).map(([id, label]) => ({ + value: Number(id), + label, + })); + return ( + + Construção + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + + + ); + }} + /> +
+ {/* Iptu */} +
+ ( + + IPTU + + + + + + )} + /> +
+ {/* UnidadeUrbano */} +
+ ( + + UnidadeUrbano + + + + + + )} + /> +
+ {/* Torre */} +
+ ( + + Torre + + + + + + )} + /> +
+ {/* Condominio */} +
+ ( + + Condominio + + + + + + )} + /> +
+ {/* Loteamento */} +
+ ( + + Loteamento + + + + + + )} + /> +
+ {/* CNM */} +
+ ( + + CNM + + + + + + )} + /> +
+ {/* CIB */} +
+ ( + + CIB + + + + + + )} + /> +
+ + {/* Numero da Edificação */} +
+ ( + + Número da Edificação + + + + + + )} + /> +
+ {/* Complemento */} +
+ ( + + Complemento + + + + + + )} + /> +
+
+ {/* Rodapé do Dialog */} + + + + + + + {/* Campo oculto */} + + +
+ +
+
+ ); +} diff --git a/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoPage.tsx b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoPage.tsx new file mode 100644 index 0000000..843feb4 --- /dev/null +++ b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoPage.tsx @@ -0,0 +1,165 @@ +'use client'; + +import { useEffect, useState, useCallback } from 'react'; + +import Loading from '@/shared/components/loading/loading'; + +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; + +import Header from '@/shared/components/structure/Header'; +import { useTImovelUnidadeUrbanoIndexHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoIndexHook'; +import { useTImovelUnidadeUrbanoSaveHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoSaveHook'; +import { useTImovelUnidadeUrbanoDeleteHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoDeleteHook'; +import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; +import TImovelUnidadeUrbanoTable from './TImovelUnidadeUrbanoTable'; +import TImovelUnidadeUrbanoForm from './TImovelUnidadeUrbanoForm'; + +export default function TImovelUnidadeUrbanoPage() { + // Controle de estado do botão + const [buttonIsLoading, setButtonIsLoading] = useState(false); + + // Hooks para leitura e salvamento + const { tImovelUnidadeUrbano, indexTImovelUnidadeUrbano } = useTImovelUnidadeUrbanoIndexHook(); + const { saveTImovelUnidadeUrbano } = useTImovelUnidadeUrbanoSaveHook(); + const { deleteTImovelUnidadeUrbano } = useTImovelUnidadeUrbanoDeleteHook(); + + // Estados + const [selectedAndamento, setSelectedAndamento] = useState(null); + const [isFormOpen, setIsFormOpen] = useState(false); + + // Estado para saber qual item será deletado + const [itemToDelete, setItemToDelete] = useState(null); + + /** + * Hook do modal de confirmação + */ + const { + isOpen: isConfirmOpen, + openDialog: openConfirmDialog, + handleConfirm, + handleCancel, + } = useConfirmDialog(); + + /** + * Abre o formulário no modo de edição ou criação + */ + const handleOpenForm = useCallback((data: TImovelUnidadeUrbanoInterface | null) => { + setSelectedAndamento(data); + setIsFormOpen(true); + }, []); + + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback(() => { + setSelectedAndamento(null); + setIsFormOpen(false); + }, []); + + /** + * Salva os dados do formulário + */ + const handleSave = useCallback( + async (formData: TImovelUnidadeUrbanoInterface) => { + // Coloca o botão em estado de loading + setButtonIsLoading(true); + + // Aguarda salvar o registro + await saveTImovelUnidadeUrbano(formData); + + // Remove o botão em estado de loading + setButtonIsLoading(false); + + // Atualiza a lista de dados + indexTImovelUnidadeUrbano(); + }, + [saveTImovelUnidadeUrbano, indexTImovelUnidadeUrbano, handleCloseForm], + ); + + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: TImovelUnidadeUrbanoInterface) => { + // Define o item atual para remoção + setItemToDelete(item); + + // Abre o modal de confirmação + openConfirmDialog(); + }, + [openConfirmDialog], + ); + + /** + * Executa a exclusão de fato quando o usuário confirma + */ + const handleDelete = useCallback(async () => { + // Protege contra null + if (!itemToDelete) return; + + // Executa o Hook de remoção + await deleteTImovelUnidadeUrbano(itemToDelete); + + // Atualiza a lista + await indexTImovelUnidadeUrbano(); + + // Limpa o item selecionado + setItemToDelete(null); + + // Fecha o modal + handleCancel(); + }, [itemToDelete, indexTImovelUnidadeUrbano, handleCancel]); + + /** + * Busca inicial dos dados + */ + useEffect(() => { + indexTImovelUnidadeUrbano(); + }, []); + + /** + * Tela de loading enquanto carrega os dados + */ + if (tImovelUnidadeUrbano?.length == 0) { + return ; + } + + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> + {/* Tabela de andamentos */} + + {/* Modal de confirmação */} + + {/* Formulário de criação/edição */} + +
+ ); +} diff --git a/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTable.tsx b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTable.tsx new file mode 100644 index 0000000..860120d --- /dev/null +++ b/src/packages/administrativo/data/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTable.tsx @@ -0,0 +1,21 @@ +'use client'; + +import { DataTable } from '@/app/_components/dataTable/DataTable'; +import TImovelUnidadeColumns from './TImovelUnidadeUrbanoColumns'; +import TImovelUnidadeUrbanoTableInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTableInterface'; +/** + * Componente principal da tabela + */ +export default function TImovelUnidadeUrbanoTable({ data, onEdit, onDelete }: TImovelUnidadeUrbanoTableInterface) { + const columns = TImovelUnidadeColumns(onEdit, onDelete); + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx b/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx new file mode 100644 index 0000000..e12fac1 --- /dev/null +++ b/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx @@ -0,0 +1,179 @@ +import { FormatCPF } from "@/shared/actions/CPF/FormatCPF"; +import { FormatDateTime } from "@/shared/actions/dateTime/FormatDateTime"; +import { FormatPhone } from "@/shared/actions/phone/FormatPhone"; +import GetNameInitials from "@/shared/actions/text/GetNameInitials"; +import empty from "@/shared/actions/validations/empty"; +import { Button } from "@/components/ui/button"; +import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; +import TPessoaFisicaInterface from "@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface"; +import { ColumnDef } from "@tanstack/react-table"; +import { ArrowUpDownIcon, EllipsisIcon, PencilIcon, Trash2Icon } from "lucide-react"; + +/** + * Função para criar a definição das colunas da tabela + */ +export function TPessoaFisicaColumns( + onEdit: (item: TPessoaFisicaInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: TPessoaFisicaInterface, isEditingFormStatus: boolean) => void, +): ColumnDef[] { + return [ + // ID + { + accessorKey: 'pessoa_id', + header: ({ column }) => ( + + ), + cell: ({ row }) => Number(row.getValue('pessoa_id')), + enableSorting: false, + }, + + // Nome / Email / Foto + { + id: 'nome_completo', + accessorFn: (row) => row, + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const pessoa = row.original; + + return ( +
+ {/* Foto ou Iniciais */} +
+ {pessoa.foto ? ( + {pessoa.nome + ) : ( + + {GetNameInitials(pessoa.nome)} + + )} +
+ + {/* Nome e Email */} +
+
{pessoa.nome || '-'}
+
+ {empty(pessoa.email) ? 'Email não informado' : pessoa.email} +
+
+
+ ); + }, + sortingFn: (a, b) => + (a.original.nome?.toLowerCase() || '').localeCompare(b.original.nome?.toLowerCase() || ''), + }, + + // CPF + { + accessorKey: 'cpf_cnpj', + header: ({ column }) => ( + + ), + cell: ({ row }) => FormatCPF(row.getValue('cpf_cnpj')), + }, + + // Telefone + { + accessorKey: 'telefone', + header: ({ column }) => ( + + ), + cell: ({ row }) => FormatPhone(row.getValue('telefone')), + }, + + // Cidade / UF + { + id: 'cidade_uf', + accessorFn: (row) => `${row.cidade}/${row.uf}`, + header: ({ column }) => ( + + ), + cell: ({ row }) => {row.getValue('cidade_uf') || '-'}, + sortingFn: (a, b) => + `${a.original.cidade}/${a.original.uf}` + .toLowerCase() + .localeCompare(`${b.original.cidade}/${b.original.uf}`.toLowerCase()), + }, + + // Data de cadastro + { + accessorKey: 'data_cadastro', + header: ({ column }) => ( + + ), + cell: ({ row }) => FormatDateTime(row.getValue('data_cadastro')), + sortingFn: 'datetime', + }, + + // Ações + { + id: 'actions', + header: 'Ações', + cell: ({ row }) => { + const pessoa = row.original; + return ( + + + + + + + onEdit(pessoa, true)}> + + Editar + + + onDelete(pessoa, true)} + > + + Remover + + + + + ); + }, + enableSorting: false, + enableHiding: false, + }, + ]; +} \ No newline at end of file diff --git a/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx b/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx new file mode 100644 index 0000000..6a64ad8 --- /dev/null +++ b/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx @@ -0,0 +1,833 @@ +'use client'; + +import React, { useEffect } from 'react'; + +import { Button } from '@/components/ui/button'; +import { + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog'; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from '@/components/ui/form'; +import { Input } from '@/components/ui/input'; + +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, +} from '@/components/ui/select'; +import { CheckIcon, ChevronsUpDownIcon, HouseIcon, IdCardIcon, UserIcon } from 'lucide-react'; +import { Sexo } from '@/shared/enums/SexoEnum'; +import { useGTBEstadoCivilReadHook } from '../../../../../../app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilReadHook'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { useGTBRegimeComunhaoReadHook } from '../../../../../../app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoReadHook'; +import { useGTBProfissaoReadHook } from '../../../../../../app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command'; +import { cn } from '@/lib/utils'; +import TPessoaFisicaFormInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaFormInterface'; +import { useTPessoaFisicaFormHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaFormHook'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; + +export default function TPessoaFisicaForm({ + isOpen, + data, + onClose, + onSave, + buttonIsLoading, +}: TPessoaFisicaFormInterface) { + + const { gTBProfissao, fetchGTBProfissao } = useGTBProfissaoReadHook(); + const { gTBEstadoCivil, fetchGTBEstadoCivil } = useGTBEstadoCivilReadHook(); + const { gTBRegimeComunhao, fetchGTBRegimeComunhao } = useGTBRegimeComunhaoReadHook(); + + // Inicializa o react-hook-form com schema zod + const form = useTPessoaFisicaFormHook({}); + + // Atualiza o formulário quando recebe dados para edição + useEffect(() => { + // Função para carregar os dados de forma sincrona + const loadData = async () => { + // Se existir dados, reseta o formulário com os dados informados + ResetFormIfData(form, data) + // Aguarda a busca terminar + await fetchGTBProfissao(); + await fetchGTBEstadoCivil(); + await fetchGTBRegimeComunhao(); + }; + // Dispara a função + loadData(); + }, [data, form]); + + return ( + { + if (!open) onClose(null, false); + }} + > + + + + Pessoa Física + + + Preencha os dados da pessoa + + +
+ + {/* Tabs */} + + + + + Dados Pessoais + + + Endereço + + + Documentos + + + {/* Dados Pessoais */} + +
+ {/* Nome */} +
+ ( + + Nome + + + + + + )} + /> +
+ {/* Data de Nascimento */} +
+ ( + + Data de Nascimento + + + + + + )} + /> +
+ {/* Sexo */} +
+ ( + + Sexo + + + + + + )} + /> +
+ {/* Nacionalidade */} +
+ ( + + Nacionalidade + + + + + + )} + /> +
+ {/* País de Nascimento */} +
+ ( + + País de Nascimento + + + + + + )} + /> +
+ {/* UF */} +
+ ( + + UF + + + + + + )} + /> +
+ {/* Município */} +
+ ( + + Município + + + + + + )} + /> +
+ {/* Naturalidade */} +
+ ( + + Naturalidade + + + + + + )} + /> +
+ + {/* Estado Civil */} +
+ { + const [open, setOpen] = React.useState(false); + return ( + + Estado Civil + + + + + + + + + + + Nenhum resultado encontrado. + + {gTBEstadoCivil?.map((item) => ( + { + field.onChange(Number(item.tb_estadocivil_id)); + setOpen(false); + }} + > + + {GetCapitalize(item.descricao)} + + ))} + + + + + + + + ); + }} + /> +
+ {/* Regime */} +
+ { + const [open, setOpen] = React.useState(false); + return ( + + Regime + + + + + + + + + + + Nenhum regime encontrado. + + {gTBRegimeComunhao?.map((item) => ( + { + field.onChange(Number(item.tb_regimecomunhao_id)); + setOpen(false); + }} + > + + {GetCapitalize(item.descricao)} + + ))} + + + + + + + + ); + }} + /> +
+ {/* Profissão */} +
+ { + const [open, setOpen] = React.useState(false); + return ( + + Profissão + + + + + + + + + + + Nenhuma profissão encontrado. + + {gTBProfissao?.map((item) => ( + { + field.onChange(Number(item.tb_profissao_id)); + setOpen(false); + }} + > + + {GetCapitalize(item.descricao)} + + ))} + + + + + + + + ); + }} + /> +
+ {/* Pai */} +
+ ( + + Pai + + + + + + )} + /> +
+ {/* Mãe */} +
+ ( + + Mãe + + + + + + )} + /> +
+
+
+ {/* Endereço */} + +
+ {/* País */} +
+ ( + + País + + + + + + )} + /> +
+ {/* UF */} +
+ ( + + UF + + + + + + )} + /> +
+ {/* CEP */} +
+ ( + + CEP + + + + + + )} + /> +
+ {/* Cidade */} +
+ ( + + Cidade + + + + + + )} + /> +
+ {/* Município */} +
+ ( + + Município + + + + + + )} + /> +
+ {/* Bairro */} +
+ ( + + Bairro + + + + + + )} + /> +
+ {/* Logradouro */} +
+ ( + + Logradouro + + + + + + )} + /> +
+ {/* Número */} +
+ ( + + Número + + + + + + )} + /> +
+ {/* Unidade */} +
+ ( + + Unidade + + + + + + )} + /> +
+ {/* Cidade não encontrada */} +
+ ( + + Cidade não encontrada + + + + + + )} + /> +
+
+
+ {/* Documentos */} + +
+ {/* Tipo */} +
+ ( + + Tipo + + + + + + )} + /> +
+ {/* Número */} +
+ ( + + Número + + + + + + )} + /> +
+ {/* CPF */} +
+ ( + + CPF + + + + + + )} + /> +
+ {/* Órgão Emissor */} +
+ ( + + Órgão + + + + + + )} + /> +
+ {/* UF */} +
+ ( + + UF + + + + + + )} + /> +
+ {/* Data de Expedição */} +
+ ( + + Expedição + + + + + + )} + /> +
+ {/* Validade */} +
+ ( + + Validade + + + + + + )} + /> +
+
+
+
+ {/* Rodapé do Dialog */} + + + + + + + {/* Campo oculto */} + +
+ +
+
+ ); +} diff --git a/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx b/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx new file mode 100644 index 0000000..e4c22cc --- /dev/null +++ b/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx @@ -0,0 +1,166 @@ +'use client'; + +import React, { useEffect, useState, useCallback } from 'react'; + +import Loading from '@/shared/components/loading/loading'; +import TPessoaTable from '@/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaTable'; +import TPessoaForm from '@/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaForm'; + +import { useTPessoaFisicaIndexHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaIndexHook'; +import { useTPessoaFisicaSaveHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaSaveHook'; +import { useTPessoaFisicaDeleteHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaDeleteHook'; + +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; + +import TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; +import Header from '@/shared/components/structure/Header'; + +export default function TPessoaFisicaIndex() { + // Controle de estado do botão + const [buttonIsLoading, setButtonIsLoading] = useState(false); + + // Hooks para leitura e salvamento + const { tPessoaFisica, fetchTPessoaFisica } = useTPessoaFisicaIndexHook(); + const { saveTPessoaFisica } = useTPessoaFisicaSaveHook(); + const { deleteTPessoaFisica } = useTPessoaFisicaDeleteHook(); + + // Estados + const [selectedAndamento, setSelectedAndamento] = useState(null); + const [isFormOpen, setIsFormOpen] = useState(false); + + // Estado para saber qual item será deletado + const [itemToDelete, setItemToDelete] = useState(null); + + /** + * Hook do modal de confirmação + */ + const { + isOpen: isConfirmOpen, + openDialog: openConfirmDialog, + handleConfirm, + handleCancel, + } = useConfirmDialog(); + + /** + * Abre o formulário no modo de edição ou criação + */ + const handleOpenForm = useCallback((data: TPessoaFisicaInterface | null) => { + setSelectedAndamento(data); + setIsFormOpen(true); + }, []); + + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback(() => { + setSelectedAndamento(null); + setIsFormOpen(false); + }, []); + + /** + * Salva os dados do formulário + */ + const handleSave = useCallback( + async (formData: TPessoaFisicaInterface) => { + // Coloca o botão em estado de loading + setButtonIsLoading(true); + + // Aguarda salvar o registro + await saveTPessoaFisica(formData); + + // Remove o botão em estado de loading + setButtonIsLoading(false); + + // Atualiza a lista de dados + fetchTPessoaFisica(); + }, + [saveTPessoaFisica, fetchTPessoaFisica, handleCloseForm], + ); + + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: TPessoaFisicaInterface) => { + // Define o item atual para remoção + setItemToDelete(item); + + // Abre o modal de confirmação + openConfirmDialog(); + }, + [openConfirmDialog], + ); + + /** + * Executa a exclusão de fato quando o usuário confirma + */ + const handleDelete = useCallback(async () => { + // Protege contra null + if (!itemToDelete) return; + + // Executa o Hook de remoção + await deleteTPessoaFisica(itemToDelete); + + // Atualiza a lista + await fetchTPessoaFisica(); + + // Limpa o item selecionado + setItemToDelete(null); + + // Fecha o modal + handleCancel(); + }, [itemToDelete, fetchTPessoaFisica, handleCancel]); + + /** + * Busca inicial dos dados + */ + useEffect(() => { + fetchTPessoaFisica(); + }, []); + + /** + * Tela de loading enquanto carrega os dados + */ + if (tPessoaFisica.length == 0) { + return ; + } + + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> + + {/* Tabela de Registros */} + + + {/* Modal de confirmação */} + + + {/* Formulário de criação/edição */} + +
+ ); +} diff --git a/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaTable.tsx b/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaTable.tsx new file mode 100644 index 0000000..4179571 --- /dev/null +++ b/src/packages/administrativo/data/components/TPessoa/TPessoaFisica/TPessoaFisicaTable.tsx @@ -0,0 +1,22 @@ +'use client'; + +import { DataTable } from '@/app/_components/dataTable/DataTable'; +import TPessoaFisicaTableInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaTableInterface'; +import { TPessoaFisicaColumns } from './TPessoaFisicaColumns'; + +/** + * Componente principal da tabela + */ +export default function TPessoaFisicaTable({ data, onEdit, onDelete }: TPessoaFisicaTableInterface) { + const columns = TPessoaFisicaColumns(onEdit, onDelete); + return ( +
+ +
+ ); +} diff --git a/src/packages/administrativo/data/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx b/src/packages/administrativo/data/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx new file mode 100644 index 0000000..85b18fe --- /dev/null +++ b/src/packages/administrativo/data/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx @@ -0,0 +1,159 @@ +import { FormatCNPJ } from "@/shared/actions/CNPJ/FormatCNPJ"; +import { FormatDateTime } from "@/shared/actions/dateTime/FormatDateTime"; +import { FormatPhone } from "@/shared/actions/phone/FormatPhone"; +import empty from "@/shared/actions/validations/empty"; +import { Button } from "@/components/ui/button"; +import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; +import TPessoaJuridicaInterface from "@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface"; +import { ColumnDef } from "@tanstack/react-table"; +import { ArrowUpDownIcon, EllipsisIcon, PencilIcon, Trash2Icon } from "lucide-react"; + +export default function TPessoaJuridicaColumns( + onEdit: (item: TPessoaJuridicaInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: TPessoaJuridicaInterface, isEditingFormStatus: boolean) => void, +): ColumnDef[] { + return [ + // ID + { + accessorKey: 'pessoa_id', + header: ({ column }) => ( + + ), + cell: ({ row }) => Number(row.getValue('pessoa_id')), + enableSorting: false, + }, + + // Nome / Email / Foto + { + id: 'nome_completo', + accessorFn: (row) => row, + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const pessoa = row.original; + return ( +
+ {/* Nome e Email */} +
+
{pessoa.nome || '-'}
+
+ {empty(pessoa.email) ? 'Email não informado' : pessoa.email} +
+
+
+ ); + }, + sortingFn: (a, b) => + (a.original.nome?.toLowerCase() || '').localeCompare(b.original.nome?.toLowerCase() || ''), + }, + + // CPF + { + accessorKey: 'cpf_cnpj', + header: ({ column }) => ( + + ), + cell: ({ row }) => FormatCNPJ(row.getValue('cpf_cnpj')), + }, + + // Telefone + { + accessorKey: 'telefone', + header: ({ column }) => ( + + ), + cell: ({ row }) => FormatPhone(row.getValue('telefone')), + }, + + // Cidade / UF + { + id: 'cidade_uf', + accessorFn: (row) => `${row.cidade}/${row.uf}`, + header: ({ column }) => ( + + ), + cell: ({ row }) => {row.getValue('cidade_uf') || '-'}, + sortingFn: (a, b) => + `${a.original.cidade}/${a.original.uf}` + .toLowerCase() + .localeCompare(`${b.original.cidade}/${b.original.uf}`.toLowerCase()), + }, + + // Data de cadastro + { + accessorKey: 'data_cadastro', + header: ({ column }) => ( + + ), + cell: ({ row }) => FormatDateTime(row.getValue('data_cadastro')), + sortingFn: 'datetime', + }, + + // Ações + { + id: 'actions', + header: 'Ações', + cell: ({ row }) => { + const pessoa = row.original; + return ( + + + + + + + onEdit(pessoa, true)}> + + Editar + + + onDelete(pessoa, true)} + > + + Remover + + + + + ); + }, + enableSorting: false, + enableHiding: false, + }, + ]; +} diff --git a/src/packages/administrativo/data/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx b/src/packages/administrativo/data/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx new file mode 100644 index 0000000..4a84d20 --- /dev/null +++ b/src/packages/administrativo/data/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx @@ -0,0 +1,393 @@ +'use client'; + +import React, { useEffect } from 'react'; + +import { Button } from '@/components/ui/button'; +import { + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog'; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from '@/components/ui/form'; +import { Input } from '@/components/ui/input'; + +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import { HouseIcon, IdCardIcon, UserIcon } from 'lucide-react'; +import { Textarea } from '@/components/ui/textarea'; +import { useTPessoaRepresentanteIndexHook } from '../../../../hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook'; +import TPessoaRepresentantePage from '../../TPessoaRepresentante/TPessoaRepresentanteIndex'; +import { useTPessoaJuridicaFormHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaFormHook'; +import TPessoaJuridicaFormInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaFormInterface'; + +export default function TPessoaJuridicaForm({ + isOpen, + data, + onClose, + onSave, + buttonIsLoading, +}: TPessoaJuridicaFormInterface) { + + const { tPessoaRepresentante, fetchTPessoaRepresentante } = useTPessoaRepresentanteIndexHook(); + + // Inicializa o react-hook-form com schema zod + const form = useTPessoaJuridicaFormHook({}); + + // Atualiza o formulário quando recebe dados para edição + useEffect(() => { + // Carregamento de dados sincronos + const loadData = async () => { + // Se existir dados, reseta o formulário com os dados informados + if (data) form.reset(data); + + // Aguarda a busca terminar + await fetchTPessoaRepresentante(); + }; + + // Dispara a função + loadData(); + }, [data, form]); + + return ( + { + if (!open) onClose(null, false); + }} + > + + + Pessoa + Preencha os dados da pessoa + +
+ + {/* Tabs */} + + + + + Dados Pessoais + + + Endereço + + + Representantes + + +
+ {/* Dados Pessoais */} + +
+ {/* Razão Social */} +
+ ( + + Razão Social + + + + + + )} + /> +
+ + {/* Nome Fantasia */} +
+ ( + + Nome Fantasia + + + + + + )} + /> +
+ + {/* Inscrição Estadual */} +
+ ( + + Inscrição Estadual + + + + + + )} + /> +
+ + {/* CNPJ */} +
+ ( + + CNPJ + + + + + + )} + /> +
+ + {/* Observação */} +
+ ( + + Observação + +